Go to Post Realizing your DON'T want to be an engineer is every bit as important as realizing you do - Lil' Lavery [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 14-02-2013, 19:26
CooneyTech CooneyTech is offline
Registered User
FRC #0269
 
Join Date: Jan 2013
Location: Oconomowoc
Posts: 32
CooneyTech is an unknown quantity at this point
Question 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/

Last edited by CooneyTech : 15-02-2013 at 16:47.
Reply With Quote
  #2   Spotlight this post!  
Unread 14-02-2013, 19:37
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #3   Spotlight this post!  
Unread 14-02-2013, 19:37
artdutra04's Avatar
artdutra04 artdutra04 is offline
VEX Robotics Engineer
AKA: Arthur Dutra IV; NERD #18
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2002
Location: Greenville, TX
Posts: 3,078
artdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond repute
Re: Programming RGB lighting

Quote:
Originally Posted by CooneyTech View Post
Anyone know of a way to wire these lights to the robot so they can be powered and programmed through the cRIO in Labview?
You may receive better help if you post a link to which specific type of LED lights you are using.

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.
__________________
Art Dutra IV
Robotics Engineer, VEX Robotics, Inc., a subsidiary of Innovation First International (IFI)
Robowranglers Team 148 | GUS Robotics Team 228 (Alumni) | Rho Beta Epsilon (Alumni) | @arthurdutra

世上无难事,只怕有心人.
Reply With Quote
  #4   Spotlight this post!  
Unread 14-02-2013, 19:38
CooneyTech CooneyTech is offline
Registered User
FRC #0269
 
Join Date: Jan 2013
Location: Oconomowoc
Posts: 32
CooneyTech is an unknown quantity at this point
Re: Programming RGB lighting

Quote:
Originally Posted by artdutra04 View Post
You may receive better help if you post a link to which specific type of LED lights you are using.

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.
Sorry forgot to include link:
http://www.amazon.com/LEDwholesalers...bxgy_hi_text_y
Reply With Quote
  #5   Spotlight this post!  
Unread 14-02-2013, 19:42
ferret_guy ferret_guy is offline
Registered User
AKA: Mark Omo
FRC #1703 (RATS)
Team Role: Leadership
 
Join Date: Mar 2012
Rookie Year: 2008
Location: Henderson
Posts: 97
ferret_guy is on a distinguished road
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
Reply With Quote
  #6   Spotlight this post!  
Unread 14-02-2013, 19:47
CooneyTech CooneyTech is offline
Registered User
FRC #0269
 
Join Date: Jan 2013
Location: Oconomowoc
Posts: 32
CooneyTech is an unknown quantity at this point
Re: Programming RGB lighting

Quote:
Originally Posted by ferret_guy View Post
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
My issue is:
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.
Reply With Quote
  #7   Spotlight this post!  
Unread 15-02-2013, 08:00
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #8   Spotlight this post!  
Unread 15-02-2013, 16:12
CooneyTech CooneyTech is offline
Registered User
FRC #0269
 
Join Date: Jan 2013
Location: Oconomowoc
Posts: 32
CooneyTech is an unknown quantity at this point
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/
Reply With Quote
  #9   Spotlight this post!  
Unread 15-02-2013, 18:17
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,579
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Programming RGB lighting

Quote:
Originally Posted by Greg McKaskle View Post
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.
In the digital ouput pallete, there are some VIs for generating what appears to be general PWM (there is both a duty cycle and a frequency). I have not tried them however.
Reply With Quote
  #10   Spotlight this post!  
Unread 15-02-2013, 18:41
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,011
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
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"
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #11   Spotlight this post!  
Unread 15-02-2013, 19:22
artdutra04's Avatar
artdutra04 artdutra04 is offline
VEX Robotics Engineer
AKA: Arthur Dutra IV; NERD #18
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2002
Location: Greenville, TX
Posts: 3,078
artdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond repute
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.
__________________
Art Dutra IV
Robotics Engineer, VEX Robotics, Inc., a subsidiary of Innovation First International (IFI)
Robowranglers Team 148 | GUS Robotics Team 228 (Alumni) | Rho Beta Epsilon (Alumni) | @arthurdutra

世上无难事,只怕有心人.

Last edited by artdutra04 : 15-02-2013 at 19:28.
Reply With Quote
  #12   Spotlight this post!  
Unread 15-02-2013, 19:53
CooneyTech CooneyTech is offline
Registered User
FRC #0269
 
Join Date: Jan 2013
Location: Oconomowoc
Posts: 32
CooneyTech is an unknown quantity at this point
Re: Programming RGB lighting

Quote:
Originally Posted by artdutra04 View Post
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.
For the pwm which color goes where in the PWM(the red, green, and blue wire)? and where does the common wire go(the black wire)?
Reply With Quote
  #13   Spotlight this post!  
Unread 16-02-2013, 03:14
artdutra04's Avatar
artdutra04 artdutra04 is offline
VEX Robotics Engineer
AKA: Arthur Dutra IV; NERD #18
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2002
Location: Greenville, TX
Posts: 3,078
artdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond repute
Re: Programming RGB lighting

Quote:
Originally Posted by CooneyTech View Post
For the pwm which color goes where in the PWM(the red, green, and blue wire)? and where does the common wire go(the black wire)?
You will have to put each color onto a separate PWM output channel. Each color needs to be pulsed at a different frequency to generate different colors. The reason you have to pulse the wires to generate different colors is because the digital circuit only goes on or off, there is no in between value. So if you pulse on and off really quickly, you create the "average color" that is seen by the human eye. To achieve this, you should pulse at least 60 times per second, ideally at least 100, to make the colors look smooth.

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.
__________________
Art Dutra IV
Robotics Engineer, VEX Robotics, Inc., a subsidiary of Innovation First International (IFI)
Robowranglers Team 148 | GUS Robotics Team 228 (Alumni) | Rho Beta Epsilon (Alumni) | @arthurdutra

世上无难事,只怕有心人.
Reply With Quote
  #14   Spotlight this post!  
Unread 16-02-2013, 09:53
CooneyTech CooneyTech is offline
Registered User
FRC #0269
 
Join Date: Jan 2013
Location: Oconomowoc
Posts: 32
CooneyTech is an unknown quantity at this point
Re: Programming RGB lighting

Quote:
Originally Posted by artdutra04 View Post
You will have to put each color onto a separate PWM output channel. Each color needs to be pulsed at a different frequency to generate different colors. The reason you have to pulse the wires to generate different colors is because the digital circuit only goes on or off, there is no in between value. So if you pulse on and off really quickly, you create the "average color" that is seen by the human eye. To achieve this, you should pulse at least 60 times per second, ideally at least 100, to make the colors look smooth.

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.
So for the pulsing how do I choose a color? Is it just the rate at which I pulse that particular color? I see what you mean be by on or off through my DIO blocks. I also understand hexadecimal through my web design class so that no issue for me.

Last edited by CooneyTech : 16-02-2013 at 09:55.
Reply With Quote
  #15   Spotlight this post!  
Unread 16-02-2013, 21:03
artdutra04's Avatar
artdutra04 artdutra04 is offline
VEX Robotics Engineer
AKA: Arthur Dutra IV; NERD #18
FRC #0148 (Robowranglers)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2002
Location: Greenville, TX
Posts: 3,078
artdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond reputeartdutra04 has a reputation beyond repute
Re: Programming RGB lighting

Quote:
Originally Posted by CooneyTech View Post
So for the pulsing how do I choose a color? Is it just the rate at which I pulse that particular color? I see what you mean be by on or off through my DIO blocks. I also understand hexadecimal through my web design class so that no issue for me.
The duty cycle (the ratio of how much the output pin is on versus off) for the three RGB lines determines the output LED color.
__________________
Art Dutra IV
Robotics Engineer, VEX Robotics, Inc., a subsidiary of Innovation First International (IFI)
Robowranglers Team 148 | GUS Robotics Team 228 (Alumni) | Rho Beta Epsilon (Alumni) | @arthurdutra

世上无难事,只怕有心人.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:52.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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