Go to Post I wonder if the FIRST Place Holiday Party partly consists of watching the site activity.... - Jessica Boucher [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-08-2016, 13:27
s5511's Avatar
s5511 s5511 is offline
Registered User
FRC #5511
 
Join Date: Jan 2016
Location: Cary, NC
Posts: 58
s5511 is an unknown quantity at this point
LED RGB Lighting

We are trying to use RGB LEDs on our robot. We want to be able to change the color of all the LEDs when we program it to. We've heard that several teams are using AdaFruit Neopixel LEDs, but they require an arduino to control them. Is there an LED strip that we would be able to power/control just by using the DIO ports on the roboRIO?
__________________


NC Rookie All Star, Rookie Highest Seed 2015
NC THOR Winner 2015
NC Guilford County Winner and Creativity Award 2016
Reply With Quote
  #2   Spotlight this post!  
Unread 07-08-2016, 13:32
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
Re: LED RGB Lighting

When you control the colors, do you want individual LED control or just the strip as a whole? If individual, you're going to need to use something other than DIO. If strip level control is fine, you can hack something together using motor controllers or DIO.
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.
Reply With Quote
  #3   Spotlight this post!  
Unread 07-08-2016, 14:23
bobbysq bobbysq is offline
Registered User
FRC #4646 (Team ASAP)
Team Role: Leadership
 
Join Date: Apr 2016
Rookie Year: 2015
Location: Des Moines, IA
Posts: 269
bobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud of
Re: LED RGB Lighting

If you're comfortable with the programming, you could attempt to port FastLED to WPILib. I think other teams have also previously been successful with controlling NeoPixels directly from the RIO.
Reply With Quote
  #4   Spotlight this post!  
Unread 07-08-2016, 15:02
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,555
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: LED RGB Lighting

With a 4 channel 12V relay module (e.g. http://www.lightinthebox.com/4-lines...prm=1.2.1.0 ), and an RGB strip of LEDs (e.g. https://www.sparkfun.com/products/12023), it should be straighforward. You would use three DIO ports, one each for red, green, and blue, to control three of the relays, each of which controls power to one of the colors. For this application, you want a "non-addressable" LED strip. This means that all of the LEDs of a given color all go on or off at the same time. Addressable strips would require a microprocessor or a fair chunk of CPU time to send specific colors to specific LEDs on a strip.

Edit: fixed first link. Also, note that I recommend NOT using the ground jumper for a 12V relay module - let the opto-isolator do its job!
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.

Last edited by GeeTwo : 07-08-2016 at 15:04.
Reply With Quote
  #5   Spotlight this post!  
Unread 07-08-2016, 15:36
Bkeeneykid's Avatar
Bkeeneykid Bkeeneykid is offline
#wheatcoastneatcoast
AKA: Devin Keeney
FRC #1982 (Cougar Robotics); Season Long Fantasy FIRST (F3)
Team Role: Student
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Lenexa, Kansas
Posts: 298
Bkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud of
Re: LED RGB Lighting

A slightly more expensive alternative to NeoPixels are Adafruit's own Dotstar lineup. They are slightly more expensive than NeoPixels, and don't come in as many varieties, but just simply use SPI and don't require the specific timing that makes NeoPixels so hard to use with the Rio.

Link: https://www.adafruit.com/categories/885
__________________

F4 Network Website Designer

2010-2012: A Whole Buncha FLL Teams; Team Spirit, Gracious Professionalism Award winner
2015-Current: FRC 1982, Captain, Electrical Lead
Beginning FIRST Volunteer

Moderator on the FIRSTwiki
Reply With Quote
  #6   Spotlight this post!  
Unread 08-08-2016, 11:52
gerthworm's Avatar
gerthworm gerthworm is offline
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 56
gerthworm has a spectacular aura aboutgerthworm has a spectacular aura about
Re: LED RGB Lighting

This year, we used Adafruit APA102 DotStar LED strips controlled off the SPI on the RIO. Incidentally, I'd prefer to use an external device (probably arduino) to not soak up processor time on something which probably isn't as important as actually controlling the robot. However, if you're interested, here's our driver for those from 2016:

https://github.com/RobotCasserole173...sLEDStrip.java
Reply With Quote
  #7   Spotlight this post!  
Unread 08-08-2016, 13:16
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 521
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
Re: LED RGB Lighting

Not sure if it helps, but you can use a typical SPI to control the data line for neoPixels.

We did it for the HERO robot controller...
https://github.com/CrossTheRoadElec/...ixel%20Example
...basically just make each pixel bit a SPI byte. So if all you have is a SPI, you could get it to work.
Reply With Quote
  #8   Spotlight this post!  
Unread 08-08-2016, 17:37
Flipflop13 Flipflop13 is offline
electrical
FRC #5979
Team Role: Electrical
 
Join Date: Jun 2016
Rookie Year: 2016
Location: Maryland
Posts: 4
Flipflop13 is a glorious beacon of lightFlipflop13 is a glorious beacon of lightFlipflop13 is a glorious beacon of lightFlipflop13 is a glorious beacon of lightFlipflop13 is a glorious beacon of light
Re: LED RGB Lighting

Quote:
Originally Posted by Bkeeneykid View Post
A slightly more expensive alternative to NeoPixels are Adafruit's own Dotstar lineup. They are slightly more expensive than NeoPixels, and don't come in as many varieties, but just simply use SPI and don't require the specific timing that makes NeoPixels so hard to use with the Rio.

Link: https://www.adafruit.com/categories/885
Pretty cool find. We used neopixles this year with an arduino co-processor, but if you can just plug them right into the rio that would save a bunch of effort.

Do you externally power the LEDs or use roboRIO power?
Reply With Quote
  #9   Spotlight this post!  
Unread 08-08-2016, 17:38
Bkeeneykid's Avatar
Bkeeneykid Bkeeneykid is offline
#wheatcoastneatcoast
AKA: Devin Keeney
FRC #1982 (Cougar Robotics); Season Long Fantasy FIRST (F3)
Team Role: Student
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Lenexa, Kansas
Posts: 298
Bkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud of
Re: LED RGB Lighting

Quote:
Originally Posted by Flipflop13 View Post
Pretty cool find. We used neopixles in the past with an arduino co-processor, but if you can just plug them right into the rio that would save a bunch of effort.

Do you externally power the LEDs or use roboRIO power?
We personally haven't used the DotStars, but we used NeoPixel equivalents in the past. We used one of the 12V to 5V regulators on our 2014 bot to drive them there through a Arduino.
__________________

F4 Network Website Designer

2010-2012: A Whole Buncha FLL Teams; Team Spirit, Gracious Professionalism Award winner
2015-Current: FRC 1982, Captain, Electrical Lead
Beginning FIRST Volunteer

Moderator on the FIRSTwiki
Reply With Quote
  #10   Spotlight this post!  
Unread 08-08-2016, 18:43
s5511's Avatar
s5511 s5511 is offline
Registered User
FRC #5511
 
Join Date: Jan 2016
Location: Cary, NC
Posts: 58
s5511 is an unknown quantity at this point
Re: LED RGB Lighting

Our team uses LabVIEW to control the robot. We are looking to just change all the LEDs on the strip to different colors, instead of trying to control each individual LED.
__________________


NC Rookie All Star, Rookie Highest Seed 2015
NC THOR Winner 2015
NC Guilford County Winner and Creativity Award 2016
Reply With Quote
  #11   Spotlight this post!  
Unread 08-08-2016, 20:17
snekiam snekiam is offline
Registered User
FRC #3322 (Eagle Imperium)
Team Role: Programmer
 
Join Date: Dec 2015
Rookie Year: 2010
Location: SE Michigan
Posts: 85
snekiam has a spectacular aura aboutsnekiam has a spectacular aura aboutsnekiam has a spectacular aura about
Re: LED RGB Lighting

Quote:
Originally Posted by s5511 View Post
Our team uses LabVIEW to control the robot. We are looking to just change all the LEDs on the strip to different colors, instead of trying to control each individual LED.
I really think this would be easier to do with an arduino - but that may just be because I've done it before. I believe you got an arduino voucher in the KOP - if you need any help with the programming, just let me know. You should be able to use a simple loop to change the LED colors on the arduino - probably even simple digital out signals to change the program from the roborio.
Reply With Quote
  #12   Spotlight this post!  
Unread 08-08-2016, 20:26
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,555
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: LED RGB Lighting

Quote:
Originally Posted by s5511 View Post
Our team uses LabVIEW to control the robot. We are looking to just change all the LEDs on the strip to different colors, instead of trying to control each individual LED.
In that case, refer back to my post (#4). We used a very similar system using spike relays in 2014 in java; there's no reason it would not work with DIOs using the relay module I listed. (Both the team and I have used these modules with Arduinos.) Using this or a similar 12V relay module with the common ground jumper removed, the DIOs only need to drive a tiny LED on an optoisolator (already ballasted with a resistor on the module), and you can use unregulated 12V to drive the relays and the LEDs. Unless you have an unusually long strip of LEDs, you can power all three colors and the relays off a single PDP breaker.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
  #13   Spotlight this post!  
Unread 08-08-2016, 21:15
krieck's Avatar
krieck krieck is offline
Registered User
AKA: Keith
FRC #2846 (Firebears)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Minnesota
Posts: 49
krieck is an unknown quantity at this point
Re: LED RGB Lighting

I also recommend using an Arduino to control the lights. You can easily signal your color changes using I2C or just DIO changes.

An advantage to using a separate co-processor is that you can decouple the lights programming from the rest of the robot development. You can develop and test while the robot or the roboRIO is being used elsewhere. Being carefully mindful of the rules, you might be able to make lights programming part of your off-season training. Or, reprogram the lights after bag-day.
Reply With Quote
  #14   Spotlight this post!  
Unread 21-08-2016, 16:43
s5511's Avatar
s5511 s5511 is offline
Registered User
FRC #5511
 
Join Date: Jan 2016
Location: Cary, NC
Posts: 58
s5511 is an unknown quantity at this point
Exclamation Re: LED RGB Lighting

We ordered the Adafruit DotStar 32 led strip, and we are having trouble sending data to it over LabVIEW. It is powered through the 5V/2A port on the VRM and is connected to the SCLK, MOSL, and ground ports on the roboRIO. We are currently sending over an array that contains four 255s, 32 sets of 255 , 50, 50, 50 and then four more 0s. Does anyone have a LabVIEW library that already works with the DotStars? Any help would be greatly appreciated.
__________________


NC Rookie All Star, Rookie Highest Seed 2015
NC THOR Winner 2015
NC Guilford County Winner and Creativity Award 2016
Reply With Quote
  #15   Spotlight this post!  
Unread 21-08-2016, 16:50
Bkeeneykid's Avatar
Bkeeneykid Bkeeneykid is offline
#wheatcoastneatcoast
AKA: Devin Keeney
FRC #1982 (Cougar Robotics); Season Long Fantasy FIRST (F3)
Team Role: Student
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Lenexa, Kansas
Posts: 298
Bkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud of
Re: LED RGB Lighting

Quote:
Originally Posted by s5511 View Post
We ordered the Adafruit DotStar 32 led strip, and we are having trouble sending data to it over LabVIEW. It is powered through the 5V/2A port on the VRM and is connected to the SCLK, MOSL, and ground ports on the roboRIO. We are currently sending over an array that contains four 255s, 32 sets of 255 , 50, 50, 50 and then four more 0s. Does anyone have a LabVIEW library that already works with the DotStars? Any help would be greatly appreciated.
First, I'm going to assume that you meant MOSI, saying I have no idea what MOSL is. The Adafruit guide mentions that the DotStars may not work with 3.3v signals, which the RoboRio provides. You can use a signal level shifter such as this one to change this: https://www.adafruit.com/product/1787

NOTE: I've never used the DotStars before, so this may not be a problem.
__________________

F4 Network Website Designer

2010-2012: A Whole Buncha FLL Teams; Team Spirit, Gracious Professionalism Award winner
2015-Current: FRC 1982, Captain, Electrical Lead
Beginning FIRST Volunteer

Moderator on the FIRSTwiki
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 20:24.

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