![]() |
Programming RGB lighting
Anyone know of a way to wire these lights to the robot so they can be powered and programmed through the cRIO in Labview?
Here's the link for the diagrams: http://www.elementalled.com/academy/...iring-diagram/ |
Re: Programming RGB lighting
What lights are those?
I imagine decorative lights typically get wired to a Spike for power, and controlled as a Relay. |
Re: Programming RGB lighting
Quote:
Some RGB light strips have no computerized control, so you'll have to bit-bang them to get custom colors. Others have have communication protocols (like serial or I2C), potentially with individually addressable lights. |
Re: Programming RGB lighting
Quote:
http://www.amazon.com/LEDwholesalers...bxgy_hi_text_y |
they are leds with 4 pins that using pwm allow them to display any color you want by mixing internal red blue and green leds
i think you could connect just 1 led you could use 4 different dio pins but not knowing the max current draw on a dio i cant say for sure |
Re: Programming RGB lighting
Quote:
1: How do I use four different DIO pins to program it? 2: I don't know how to exactly program the lights or even how to define them in begin for that matter. |
Re: Programming RGB lighting
I didn't find a guide that explained how to control it, but if it truly is PWM, the PWM is available in the I/O palette, but the PWM term used in FRC is hobby servo PLM generation. General PWM duty cycle is different.
If it wants PWM, you may be able to use digital lines and a timed loop, or you may need to use an external circuit. If you can post a link to the documentation for the lights I'm sure someone can help get it working. Greg McKaskle |
Re: Programming RGB lighting
Hers a link of a bunch of diagrams of the four wires that go into the light strip:
http://www.elementalled.com/academy/...iring-diagram/ |
Re: Programming RGB lighting
Quote:
|
Re: Programming RGB lighting
Not getting into the specifics of your situation, but in general:
An RGB LED can display most any color by varying the amount of Red, Green and Blue light emitted. For example, if you show 100% red and 100% blue, you get purple. A 4-pin RGB LED - a raw LED, not one with a controller - has one pin for red, green and blue, plus one common pin. This common pin can be anode or cathode, depends on the device. ALL LEDs require a dropping resistor, even if the supply voltage is lower than the lED voltage. Google "thermal runaway of LEDs" to see why. You might need to put a resistor in each color's control line, or maybe one in line with the common. To make a color - white, let's say (which is R, G and B in a certain percentage of each, not 100% each) you control the three control pins with a duty-cycle of between 0% and 100% -- for white you use R=0.3, G = 0.59, and B = 0.11 (relative to absolute brightness - YMMV) So turn on the Red pins with a 30% duty cycle, green with a 59% duty cycle, and blue with an 11% duty cycle. To change the color, change the duty cycles. If your Digital Output pins don't "so" duty cycle, you can "bit bang" one anyway. See how fast it can deliver a signal of 10101010, and then change that signal as necessary (e.g, 25% is something like 11000000, 50% could be 11001100 or 11110000) Hope this helps understand the "why" |
Re: Programming RGB lighting
To actually control the color of these LEDs, you will have to manually generate the duty cycle for each color in your code using the generic duty cycle (0-100%) functionality to three output pins on the Digital Sidecar (one for each primary color). In essencse, you replace the giant control box on these LED light strips with the FRC control system, and wire directly into the four wires going into the LED light strip.
In addition, the signal pins on the DSC will likely not be able to provide enough current for lighting bright LEDs; in this case you have to use a signal amplifier, such as a homebrew solution using transistors and other discrete components or a COTS solution such as s solid-state relay. Mechanical relays (such as a Spike) will likely not be able to switch fast enough. Edit: To actually pink which color you want to generate, look up HTML hexadecimal color charts. Hexadecimal is a base-16 number system, where 0-9 are the same, but A=10, B=11, and so on until F=15. So for example, FF in hexadecimal would be 255. The sequence is 2 digit red, 2 digit green, 2 digit blue, so the hexadecimal color #FF6600 is 255 (out of 255) red, 102 (out of 255) green, and 0 blue. To convert these three numbers to a generic duty cycle, divide by the large possible number (255). So it becomes Red: 100% Green: 40% Blue: 0% Which will generate the color orange. |
Re: Programming RGB lighting
Quote:
|
Re: Programming RGB lighting
Quote:
For the remaining black wire, the wiring diagrams in the link above seem to have some units with this labeled positive, some are not labeled at all. Depending on whether the remaining wire is positive or negative will affect how you need to wire not only this wire, but also the signal amplifiers for the RGB lines. But... check the control box that comes with these LED lights. See if there are any additional ports on this unit, such as a serial/UART, I2C, SPI, etc. Sometimes these RGB LED light sets have additional input ports, to allow an external controller to communicate directly to the unit to command it what to do. If this is the case, then it becomes simpler to implement it. |
Re: Programming RGB lighting
Quote:
|
Re: Programming RGB lighting
Quote:
|
Re: Programming RGB lighting
If the strip you are using is 4 wires RGB and Power/Ground, you cannot power it directly off the DSC you will need transistors because the DSC cannot handle that much current.
|
Re: Programming RGB lighting
I talked to some mentors and we are going to power it off a DIO with some solid state relays.
|
Re: Programming RGB lighting
Quote:
SSR's only work on and off |
Re: Programming RGB lighting
Quote:
The LEDs intensity is controlled by PWM (Pulse Width Modulation) which IS an ON/OFF function. They are on the right track here. |
| All times are GMT -5. The time now is 22:52. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi