Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Custom LED Help (http://www.chiefdelphi.com/forums/showthread.php?t=115953)

Belovan 10-04-2013 20:02

Custom LED Help
 
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

DjParaNoize- 10-04-2013 20:17

Re: Custom LED Help
 
Quote:

Originally Posted by Belovan (Post 1260102)
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

MDAWG25 10-04-2013 20:24

Re: Custom LED Help
 
Quote:

Originally Posted by Belovan (Post 1260102)
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

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.

DjParaNoize- 10-04-2013 20:28

Re: Custom LED Help
 
Quote:

Originally Posted by MDAWG25 (Post 1260135)
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.

Great To known someone who has the real answers!

MDAWG25 10-04-2013 20:35

Re: Custom LED Help
 
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. :]

benherms 10-04-2013 20:42

Re: Custom LED Help
 
Quote:

Originally Posted by Belovan (Post 1260102)
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

Dem LEDs :ahh:

Belovan 10-04-2013 20:42

Re: Custom LED Help
 
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.

https://www.dropbox.com/s/oryc62y4i2...2020.39.44.jpg
https://www.dropbox.com/s/3lvl0q6j2r...2020.39.23.jpg

Thanks again.

MDAWG25 10-04-2013 20:53

Re: Custom LED Help
 
Quote:

Originally Posted by Belovan (Post 1260147)
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.

https://www.dropbox.com/s/oryc62y4i2...2020.39.44.jpg
https://www.dropbox.com/s/3lvl0q6j2r...2020.39.23.jpg

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 https://www.dropbox.com/s/hiqjc8zhsa...2020.39.23.jpg , 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.

Belovan 10-04-2013 21:02

Re: Custom LED Help
 
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?

jbsmithtx 10-04-2013 21:04

Re: Custom LED Help
 
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...

Quote:

Originally Posted by Belovan (Post 1260162)
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?

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...

Belovan 10-04-2013 21:16

Re: Custom LED Help
 
Okay, thanks. My main concern was how to power the LEDs so they are FRC legal, thanks for your help.

MDAWG25 10-04-2013 21:47

Re: Custom LED Help
 
Quote:

Originally Posted by Belovan (Post 1260162)
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?

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. http://learn.adafruit.com/digital-led-strip/code

Quote:

Originally Posted by jbsmithtx (Post 1260163)
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...

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


All times are GMT -5. The time now is 11:19.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi