Is there a reason that many teams choose to use a CANdle or a Blinkin instead of controlling LEDs directly through PWM. It seems that WPI does have support for PWM control and even has some examples.
I’m thinking there has to be some reason that so many teams choose to use a CANdle or Blinkin over PWM.
One big advantage of both the Blinkin and CANdle is they have build in power regulation designed for lots LED’s, which if running the one in the roboRIO you have to find some way to power the lights.
The roboRIO support is relatively new as well. I know the Blinkin is older, not sure about the CANdle.
Also lots of teams are very bad at knowing which features are actually in WPILib. So I’d suspect some of the teams that use an external device don’t even know the roboRIO functionality exists.
The Blinkin was conceptually nice. We mounted one in 2022 originally because it seemed like the simplest solution; in addition to power regulation it provided some flexible patterns and such out of the box with basically no effort, and avoided burdening the Rio with updating LED patterns.
In practice, the Blinkin proved problematic for us. It was prone to several types of lockup: one form required a power cycle to recover from, while the other required a factory reset. I believe this to be due to software issues in the Blinkin and not a hardware fault. As we were using it for more than just decorative purposes, we needed a reliable on-field solution. We ended up moving to PWM for control and using a simple 5V regulator that we had on hand for power. Our programming team had the LED strips doing better, more sophisticated patterns under Rio control within 1 meeting’s time, and the load on the Rio is absolutely negligible. Honestly I don’t know why we would bother with anything else for RGB LED strip control now that we know how easy it is.
I believe that the CANdle can power ~400 lights and the Blinkin ~200; I’m guessing that you would have to power the LEDs off of a VRM or something else, would that make it so you can power less LEDs since the VRM has a 2 amp peak limit?
The power limit would depend on whether you’re using the 12V or 5V rail on the VRM, but yes the LED count would be limited by that current limitation much more than it would the Blinkin/CANdle support
I’d probably put LEDs on a separate regulated supply off of the PDP/PDH, if there’s a free slot. That way you can give them more current and power more LEDs at once. (Side note: does anyone even use the VRM for anything other than the radio? Is the VRM effectively just a radio power module?)
Our team has used both the blinkin and the RIO. My quick summary is:
Blinkin
(+) Easier to integrate
(-) Can’t program LEDs individual (but does have lots of options)
RIO
(+) Cheap (LED strip)
(+) Can program individual LEDs
(-) Custom circuit (simple)
(-) Need custom code to do anything (good examples available)
CANdle (we haven’t used it, so this is just my understanding)
(+) Easy integration
(+) Can program individual LEDs
(+) Cool mini-LED panel
(-) Most expensive
Yes, exactly. You’d need a slot for the CANdle/Blinkin anyway, so it’s just a different form of custom circuit.
By their specs, WS2812B RGB LEDs can draw up to 50mA each (at full brightness white, when the red/green/blue LEDs are all lit). In practice, typical draw is less, especially if you’re not setting it to full-white. I believe we have a cheap (Amazon sourced) 3A DC-DC converter, running a strip of high density LEDs on 3 sides and 2 strips on the 4th.
Given that it’s in the critical path of running your radio, it’s wise to be cautious how much else you ask of it. The power rail going to the radio (12V 2A) cannot (R616A) be shared - though it’s OK to dual-wire a barrel connector + PoE injector since that’s just a redundant path to the same load. The 12V 500mA output is handy for low current things like a proximity sensor. You can use the 5V outputs for reasonable loads, such as maybe an Ethernet switch (which might also be critical if it’s in your communication path). You could probably run a small number of LEDs, but unless you’re really tight on PDP/PDH slots, for that much-less-critical function it’s likely better to simply have a separate custom circuit with its own 5V DC-DC converter.
So if you are using a CAN bus for the robot, can you hook a blinkin into the PWM port of the RoboRio and it acts like a motor controller in the code? or do you have to wire the whole robot the same way, ie all CAN or all PWM?
I’m not sure if I am understanding your question correctly, but you can use both PWM and CAN on your robot at the same time and to control the Blinkin you would just use the SPARK pwm motor controller library to control it.