Some questions about LED strips

My tean wants to use LED strips this year to show our shooter’s status. However , l don’t know where to buy the LED strips which can be programmed with WPILIB. Is there any advice for buying LED strips and any advice on how to program LED strips?

Any reply is appreciated!

3 Likes

Yeah I know that we wanted to do that for our 2020 robot for outreach. I remember that you can plug the led strips into the roborio with the pins. try this link

https://docs.wpilib.org/en/stable/docs/software/hardware-apis/misc/addressable-leds.html

1 Like

Thanks for providng the programm resources. But where can l buy these LED strips?

1 Like

WS2812 strips are common.

Just make sure you are buying a strip that matches the power output you expect. If they are going to be plugged into a 5v source, get the 5v. If it’s a 12v source, then get 12, and so on.

l should wire the LED strips to where?

微信图片_20220118095702
Can this output port be wired on a FRC robot?

I would suggest you read that section a bit more closely.

If you don’t know what the LED strips are, then I’d suggest taking a tour of the many youtube and other tutorials to show you how to work with them with things like an Arduino.

Here’s an example of one: Guide for WS2812B Addressable RGB LED Strip with Arduino | Random Nerd Tutorials

Once you get them powered, and wired such that the Roborio PWM port is controlling the data, you can use the WPILib code.

They make 12 volt neopixels too. That way you do not need a level shifter to 5 volts.

The LED strips have three pads that need to be soldered, Ground, Data, and Power.

If you’re using the Roborio PWM, you’d plug the female end of a PWM cable into the Roborio, and solder the mail end of the corresponding wires (red, black, or white) to the appropriate pads on the LED strip.

Just the normal 3 wire, PWM cables are all you’ll need if you have some basic soldering skills.

It has three wires , so if l wire it to the PWM, they are all in one port, is that right?

image
If the above wire is input and the below one is output, can l wire it on the PWM

Yes, but be careful. Neopixels are greedy. You could theoretically starve the Rio for voltage by not utilizing those other two leads (v+ red, and 0v white).

I would power them with something else.

We have some like this that solves that problem automatically.

You might be able to find non-waterproof ones cheaper.

Just run the other leads right into the pdp/h. Also, if you have a PDH, this is a great time for current limiting (or better yet, you can use the formula in the Adafruit uberguide linked above).
With swerve, I could see a situation where power becomes a problem.

1 Like

I wouldn’t power LED strips direct from the PDP/PDH. They will see major drops in voltage and thus drop in brightness when motors kick on. Power them from a regulated supply like the VRM.

3 Likes

If you haven’t bought anything yet, take a look at the rev blinkin.

3 Likes

Heard good things about the blinkin. CTRE also just came out with the CANdle that is great as well.

3 Likes

It seems that it can improve the stability of LED strips? If l don’t use this , will something be wrong with my LED strips?

How to wire WS2812 on a vrm?

Make sure you use the correct voltage (12 if you use a 12 volt strip and 5 if you use a 5 volt strip), then put the extra red and white wires into the red and black pins on the vrm. I would do the 2 amp channel if you are going to use many lights (you can cut the strip if you do it on one of the solder junctions).

Then wire the rest directly to the Rio as you planned.

Thanks!

To the PWM port?

I think it is pwm. Yes. You can also test the algorithm in the simulator.

If you want to see a programming example (in Python), let me know. It should be in our release. If not, I can find it for you.

Here is the section from docs.wpilib in programming them. The blinking and CTRE device might make programming easier.

1 Like