Controlling non addressable leds

We have this type of LEDs where there is 4 pins. 1 labeld +5V, and one for each R G B. We don’t have any led driver like the REV or CTRE one. How can you control them from the Rio?

If you’re not willing to buy a custom board, you will need to buy a 5V buck converter and solder yourself a custom controller board. Something like this, but instead of the Arduino, the data pins could go to the Rio (and you are using 5V instead of 12V)
qAhnq

There is no way to not use a custom circuit?

I agree that Arduino is the more professional approach, but you can also use the pwm ports on the robotRio. Notice it takes up three pwm ports for this single led.

  • Vcc channels of all three pwm ports goes to +5v.
  • Signal channels of the three pwm ports goes to rgb, respectively.
  • when programming, setting the pwm to max output TURNS OFF the led, moving it from max output to 0 output INCREASES the brightness of that led channel.

Do note that some leds consume a considerable amount of power, then you might want to use motor controllers or PCH to power them instead.

If they are WS2812 you should be able to control them off the pwm on the rio. Addressable LEDs — FIRST Robotics Competition documentation

1 Like

They are not addressable

̶T̶h̶i̶s̶ ̶d̶o̶e̶s̶n̶t̶ ̶w̶o̶r̶k̶ ̶b̶e̶c̶a̶u̶s̶e̶ ̶t̶h̶e̶y̶ ̶h̶a̶v̶e̶ ̶a̶ ̶1̶2̶V̶ ̶n̶o̶n̶-̶a̶d̶d̶r̶e̶s̶s̶a̶b̶l̶e̶ ̶L̶E̶D̶ ̶f̶r̶o̶m̶ ̶t̶h̶e̶ ̶p̶i̶c̶t̶u̶r̶e̶.̶ ̶I̶ ̶w̶a̶s̶n̶’̶t̶ ̶a̶c̶t̶u̶a̶l̶l̶y̶ ̶s̶u̶g̶g̶e̶s̶t̶i̶n̶g̶ ̶a̶n̶ ̶a̶r̶d̶u̶i̶n̶o̶,̶ ̶I̶ ̶j̶u̶s̶t̶ ̶u̶s̶e̶d̶ ̶t̶h̶a̶t̶ ̶p̶i̶c̶t̶u̶r̶e̶ ̶a̶n̶d̶ ̶s̶u̶g̶g̶e̶s̶t̶e̶d̶ ̶t̶h̶a̶t̶ ̶t̶h̶e̶y̶ ̶u̶s̶e̶ ̶t̶h̶e̶ ̶R̶i̶o̶ ̶P̶W̶M̶ ̶t̶o̶ ̶c̶o̶n̶t̶r̶o̶l̶ ̶a̶ ̶m̶o̶s̶f̶e̶t̶ ̶s̶i̶n̶c̶e̶ ̶i̶t̶s̶ ̶1̶2̶V̶.̶

Not unless you buy a custom controller…
…unless…
A really dumb idea is using 3 pwm motor controllers!

I don’t think that the one in your picture is one of those. But yes, you should consider switching to a programmable led. It is capable of displaying really cool patterns and WPILib provides a really convenient control over them.

We have 5V leds

I think it says +5v on the led.

My bad, I totally missed that on the picture. I would try what Gal said, but you need to be careful about how much current you draw directly from the Rio.

1 Like

You won’t be able to drive these directly from the RIO’s PWM pins. While the PWM power rail can provide a couple of amps, the signal outputs can only source 15 mA. Additionally, the PWM signal is not a 0-100% duty cycle output (which is what you need for this), it’s a servo-style PWM signal.

For non-addressable LEDs, you will need to use either a custom circuit with power MOSFETs controlled by a duty cycle control (the RIO can provide this on DIO outputs, or a separate device like an Arduino works), or the REV Blinkin. Unfortunately, the Blinkin only supports 12V non-addressable LEDs, and yours are 5V, so really the only option is a custom circuit.

As with others, I would recommend not trying to use these and buying some addressable LEDs instead.