CANifier for Addressable LEDs?

Has anyone ever used the CANifier from CTR for addressable LEDs? I see they have LED channels which seem to be for RGB strips but addressable strips. I see it can be used as a PWM but there isn’t a lot of documentation around that.

The WPILib addressable LED code want a PWM port number so I don’t think its output could be piped to a CANifier as a virtual PWM port anyway.

Just curious if anyone has tried to skin this cat. I realize that there are many other options, the CANdle, Blinken, PWM with a 5v power regulator to an addressable strip…

3 Likes

The addressable LEDs in WPIlib make use of the fpga to output to the LED strips. This would not work with the canifier. I do not believe the canifier currently has any way to support addressable LEDs.

3 Likes

Also Arduino or other microcontrollers using fastLED. We have 2 canifiers but have only ever used them with non addressable strips. All of our addressables are controlled via Arduino because there wasn’t a way via Canifiers we could find. If someone did figure out a way we’d love to use that instead. That being said I don’t think it’s physically possible with the components it has.

For more details on the Arduino method we connect it to the roboRio with unused digital IO pins. We have animations and color ‘bits’ that we set high and low on the roboRio side as outputs and the Arduino acts as a dummy listener. Based on what bits are set it triggers the color and loops animation. If we needed something more dynamic with feedback from a sensor we could use PWM from a roboRio as an analog input on the Arduino and again when a bit pattern is set it uses that real time data.

It works but that’s not great compared to a direct canifier connection and suspect when hit hard due to the default Arduino connectors.

1 Like

Given that addressable LED take PWM input and the CANifier can make PWM output it is possible but as one of out other mentors frequently says “the juice isn’t worth the squeeze”

It’s not just pwm from what I gather

https://www.arrow.com/en/research-and-events/articles/protocol-for-the-ws2812b-programmable-led

Rather using PWM to send a 24 bit signal at a specific frequency. So maybe this is a firmware change only?

1 Like

Individually addressable LEDs have a more sophisticated communication protocol as mentioned. The CANifier can only directly PWM the RGB channels, similar to a motor controller. Still suits most uses IMO. Just wire a 12V non-adressable RGB strip to it and you’re good to go.

My understanding is that the RIO implementation of WS2812B support is done using the FPGA to ensure accuracy and the PWM pins were chosen for output due to their 5V signal level. I feel like CTRE did have some way to control addressable LEDs from a CANifier or Talon SRX at one point, but it must have either been dropped or it was for the SPI-based APA102 LEDs.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.