Go to Post Sure, whining is easier than working, but what's more rewarding? - PayneTrain [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 12-02-2015, 21:03
Samwise_T Samwise_T is offline
Registered User
FRC #4284
 
Join Date: Feb 2015
Location: Ohio
Posts: 4
Samwise_T is an unknown quantity at this point
Question How to use an RGB LED strip with a Vex Spike?

My team wants to put an RGB LED strip on the robot, and we have some Vex Spike relays to use (I've heard these would work, not sure). Our LED strip has a common anode, so one wire to take an input voltage, and then one wire for each cathode of the LEDs, so one wire for red, one for blue, and one for green. Our Vex Spikes have a Voltage in, ground, and PWM input, and then a M+ and M- output. How would I wire the LED strip with one (or a few) of these relays in order to control the light color? So far I've tjougjt of using one relay per LED cathode, but I'm not sure what to do with the remaining + wire. Any help would be greatly appreciated.
  #2   Spotlight this post!  
Unread 12-02-2015, 21:17
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,723
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: How to use an RGB LED strip with a Vex Spike?

We just did this with two spikes, also with a common +12 and separate 0V lines.

We wired the red, green, blue, and black (common) to the four outputs of two spikes, then set the values to high or low as needed. If you do this, you will need not only to use kForward (+ is positive, - is negative) and kReverse (- terminal is positive, + is negative), but also kOn (both positive) and kOff (both negative). I'll post a truth table for this in a few minutes...
__________________

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.
  #3   Spotlight this post!  
Unread 12-02-2015, 21:24
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,723
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: How to use an RGB LED strip with a Vex Spike?

Even better, here is our FunLights class (in Java) posted after this evening's build. We don't have the lights working properly, but we're pretty sure it's in how these methods are being called, not in this class.

It didn't get recorded in the code, but it looks like we wired
  • Red: Spike 1, + terminal
  • Grn: Spike 1, - terminal
  • Blu: Spike 2 + terminal
  • Blk: Spike 2 - terminal
__________________

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.
  #4   Spotlight this post!  
Unread 12-02-2015, 21:29
Samwise_T Samwise_T is offline
Registered User
FRC #4284
 
Join Date: Feb 2015
Location: Ohio
Posts: 4
Samwise_T is an unknown quantity at this point
Re: How to use an RGB LED strip with a Vex Spike?

So by "red" do you mean the red (positive) wire, or the wire for the red LED? Our 4 pins are labeled +, B, R, and G.
  #5   Spotlight this post!  
Unread 12-02-2015, 21:36
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,723
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: How to use an RGB LED strip with a Vex Spike?

Quote:
Originally Posted by Samwise_T View Post
Our Vex Spikes have a Voltage in, ground, and PWM input, and then a M+ and M- output.
Glad I went back and re-read this. Spike relays do NOT have a PWM input. The connector is the same, but the signals are VERY different - so different that I wish they didn't have the same pins. The Spike relays must be connected to a RELAY port on the 'RIO, not the PWM port. The black is ground on both PWM and RELAY, but on RELAY the red and white wires are both data lines that may be at either 0V or 5V. For PWM, the red line is at a constant 5V, and the white line switches back and forth rapidly to provide control.
__________________

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.
  #6   Spotlight this post!  
Unread 12-02-2015, 21:38
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,723
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: How to use an RGB LED strip with a Vex Spike?

Quote:
Originally Posted by Samwise_T View Post
So by "red" do you mean the red (positive) wire, or the wire for the red LED? Our 4 pins are labeled +, B, R, and G.
My bad assumption -- On ours, the wires were color coded:
  • +: black
  • R: red
  • G: green
  • B: blue
__________________

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.
  #7   Spotlight this post!  
Unread 12-02-2015, 21:41
Samwise_T Samwise_T is offline
Registered User
FRC #4284
 
Join Date: Feb 2015
Location: Ohio
Posts: 4
Samwise_T is an unknown quantity at this point
Re: How to use an RGB LED strip with a Vex Spike?

That makes sense, thank you. I've always just associated black with ground, so I was a bit confused at that. Thanks for the help, this is exactly what I was looking for.
Closed Thread


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

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