I was wondering what multi-color LEDs teams like 118 use on their robot, and how they control them. We have access to an Arduino, but we are unsure as to how to wire it. Also some tips and tricks for custom 5v LEDs running off PWMs would be appreciated.
Thank you very much,
Alex
I Assume that Team 118 - Robonauts Used RGB LED Strips and were hooked up to the robot since Whenever they powered the robot the LED Strips Would Light Up.
One Thing I’m Unsure of though, Is on how they programmed/controlled their LEDs to Go In an Certain Motion
Teams that use Multicolor LEDs, such as 118 (Robonauts) or 1629 (GaCo), use these types of LEDs. These LEDs use the SPI bus and allow each Pixel (LED) on the strip to be addressed by a controller, such as an Arduino, and sent a value via the SPI bus thus changing the color of that one pixel but leaving the others unchanged or to make a pattern.
Access to an SPI bus can be obtained by a standard arduino or a C-RIO, WPILib has modules for this. SPI can be tricky though, clock speed, data rate, which register to write too, etc. However, this link goes to a library available to the arduino and makes the communication between the arduino and the LEDs, simple and fast. The library also gives a couple example test code projects.
If you wanted, this does the same thing but is very expensive but simple, and you can achieve the same effect using an Arduino.
Great To known someone who has the real answers!
If you need some help with this, I could help you get started, that is where I was hung up the most figuring out how it was done. :]
Dem LEDs :ahh:
Thanks for the quick responses, what I am most unsure about is the wiring, we have LPD8806 LED strips, and there appear to be 5 wires coming out of it. From what I can tell, there are 2 power cables, and a PWM. I’m not sure how to wire that to the Arduino, I have a few links to images of what we have.
Thanks again.
There are actually only four inputs on those strips of LEDs, but for some reason there are five wires. The SPI bus has two inputs, DI and CL which stand for Data In and Clock, respectively. The other two pins are +5 Volts and Ground. In this picture you supplied Dropbox - Error - Simplify your life , the order of pins from top to bottom (as marked by the solder pads, circled in black) are GND (Ground), DI (Data In), CL (Clock), and +5 Volts.
The other picture seems to have two wires on the GND (Ground) solder pad… You may need to peel off that hot glue to get a good look at it, but there are only 4 wires needed, not 5.
Which revision of Arduino do you have? This is needed because only certain pins on the Arduino support the SPI bus.
We have an Arduino Uno. Upon closer examination of the LED strip, both of the two black wires are connected to the ground on the strip, the thicker of the two red wires is to 5V. The thinner red wire is to Data In, and the white wire is connected to clock. Where would the strip get 5V from on the robot?
What about lights that use 12v inputs? We supply the ground, and then each of the colors has an appropriate 12v lead. Would we have to use bulky motor controllers? Someone tell me there is a simpler solution. I realize we can develop a lot of colors and effects because of that, but it might not be the nicest thing to use… Even then, how would a motor controller work? The same ground for all three? might be a little sketch and destroy some stuff…
The 5v on the robot (not legal for competition, but works for your own ideas. Or an inverter. That’s generally how teams get more 5v power for assorted things…
Okay, thanks. My main concern was how to power the LEDs so they are FRC legal, thanks for your help.
You can find one 5V header here on the Digital Sidecar (+5V is marked in green, Ground is marked in Red below it.) However, be careful doing this. You cannot exceed a 4 Amps max with everything connected to the DIOs on the Sidecar, doing so might result in permanent damage to your sidecar. http://tinyurl.com/bpbbwh4
As far as connecting the DI and CL pins to your arduino, Connect the Clock wire to digital Pin 3 and Connect the Green Data wire to digital Pin 2. Since you are using the LPD8806’s, the original linked library does not support this type. Adafruit, on the other hand, has a great tutorial on the code and a link to their library which fully supports the LPD8806’s. Code | LPD8806 Digital RGB LED Strip | Adafruit Learning System
Assuming your LEDs look like this , there is actually one +12 Volt input and 3 Grounds (labeled ‘R’ ‘G’ and ‘B’). Connecting +12 volts to the +12 volt labeled on the PCB, and connecting one of the grounds to ground will result in that color being displayed. I am not sure exactly how one would power these LEDs without a custom circuit to do so. Adafruit again has a great tutorial on this. http://learn.adafruit.com/rgb-led-strips/overview