![]() |
Relay to control 2 outputs
Hey everyone.
I have an off season project to make LED rods and put them on the robot and get them to light up in patterns (I am also a programmer). Being that there are going to be 4 rods, I thought I could save space and money by using only two Spike relays, attaching two Positive wires to it and using a common ground that isn't run through a relay. If I recall right, this has been used for solenoids (? might be wrong). In my mind it should work, is there any reason it shouldn't? Secondly, is it legal to control two outputs with one controller? (haven't read rules for a long time, I forgot many of them) Thanks in advance, Micah |
Re: Relay to control 2 outputs
This is an off-season project, legality is not an issue.
There is no reason why it wouldn't work. In LV at least, the Spike has four output states (Off, Forward, Reverse, and On). Fwd will set one on and the other off, Reverse will set the second one on and the first one off, and On will turn them both on. |
Re: Relay to control 2 outputs
the reason legality is an issue is that I am making two sets, one for the current bot, and one for next years bot (using the same code)
|
Re: Relay to control 2 outputs
Quote:
However, what would not be legal is preparing these LED arrays and wire harnesses for use on a 2012 FRC robot - you must wait to perform all such work after kickoff of the 2012 season, during approved robot work times. |
Re: Relay to control 2 outputs
Oh, I didn't know about that.
what specifically is forbidden? Can I wire the leds and put them in a tube (therefore just creating a part), but not wire it to a relay? or is making custom parts before season not legal? |
Re: Relay to control 2 outputs
Quote:
|
Re: Relay to control 2 outputs
Thank you for pointing that out. I guess I only have to make one set this summer then.
|
Re: Relay to control 2 outputs
Micah,
It is also possible that this wiring method would be illegal during next year's game and rules. I would hope that the GDC allows teams to use this method but you never know for sure. As stated the Spike is capable of switching either or both outputs between high and low states. The manual for the Spike explains this. |
Re: Relay to control 2 outputs
Micah,
If you connect them to a Jaguar or Victor you could dim them. With different colors that could give you some interesting effects. You would need to put the LEDs in series to be able to tolerate the 12 volts...maybe 6 LEDs and a current limiting resistor. Just an idea... -Hugh |
Re: Relay to control 2 outputs
Just as a note, what Travis said is perfectly true; any design done preseason is not legal for use during competition. However, if the design is modified (i.e. improved or optimized during competition) for the robot, then it is indeed legal.
|
Re: Relay to control 2 outputs
Although it is worth noting that given that this seems to be more decorative than functional - designing a whole drive train in the offseason is one thing, designing some pretty lights is something else entirely. I wouldn't worry too much about breaking the intent of the "6 weeks" thing.
|
Re: Relay to control 2 outputs
I don't have the latest version of the C++ WpiLib source code available to look at right now, but I don't think it allows both relay outputs to be turned on at the same time. Could someone explain why the Relay class was written this way and if it can be changed for the next library release.
|
Re: Relay to control 2 outputs
Quote:
The only stated differences from V20110203rev2262 are: 1. A NetConsole error in the cRIO that under some circumstances corrupt memory in the cRIO. 2. Fixed an error with the ADXL345 I2C accelerometer. 3. Fixed an error with allocation tracking in the Counter class. |
Re: Relay to control 2 outputs
Thanks Ether. So in Relay::Set there is no way for the kOn case to set both outputs true. I think this is something that could be easily fixed.
|
Re: Relay to control 2 outputs
To my memory, I believe controlling the 4 states of a Spike involves splicing together two outputs into the Spike input, though I could be wrong.
|
Re: Relay to control 2 outputs
Quote:
The White input (0/1) controls the M+ output (GND/+12v). The Red input (0/1) controls the M- output (GND/+12v). Thus, the Spike can drive a motor forward, reverse, or brake (no coast). or Drive two solenoids (or LEDs, etc) independently. |
Re: Relay to control 2 outputs
Quote:
I was planning to put them in parallel however and use a Zenner Diode to regulate the voltage, simply because a 6 led chain isn't very long. I Have not tested the idea yet. I have never used Zenner Diodes before, Any opinion/experience with it? Other ideas? |
Re: Relay to control 2 outputs
1 Attachment(s)
Quote:
Quote:
|
Re: Relay to control 2 outputs
1 Attachment(s)
Quote:
I believe I attached a basic drawing of my idea. I might have the directions of the diodes backwards, I don't really do any work in schematics. Please bear with me, I am still not very experienced. |
Re: Relay to control 2 outputs
Quote:
|
Re: Relay to control 2 outputs
Quote:
Wait, I don't see a huge issue with the zener, It is in anti-parallel. X volts go around it and the rest go through it (in a simplified model) . All that is missing is a resistor between everything and the battery to limit current (the wire at the right still needs to go). |
Re: Relay to control 2 outputs
Quote:
Quote:
Micah, do you understand what we're saying ? |
Re: Relay to control 2 outputs
Quote:
|
Re: Relay to control 2 outputs
Micah,
The zener is not really needed unless you are determined to keep the LEDs at a fixed brilliance. Please remember that the battery voltage on the robot easily gets down into the 6-8 volt range during a match. What Ether showed is four LEDS in a string and several string in parallel with a series resistor to limit the current through the diodes. You could choose a three diode string and recalculate the series resistor. The string would stay on if the voltage falls to the 6 volt range. If you think you are up to it, a current source using a FET or transistor might be a better choice in this application. |
Re: Relay to control 2 outputs
Excuse my ignorance, but why is a transistor good for this? from my knowledge a transistor is used for controlling outputs based on signals.
|
Re: Relay to control 2 outputs
Quote:
Just Google the phrase "voltage regulator" and start reading. You will be amazed at what you find. |
Re: Relay to control 2 outputs
Micah,
The luminous intensity of an LED is a function of the current flowing through it. With a simple current limiting resistor, the intensity will vary with voltage supplied. In a constant current source, the current will remain the same with a varying supply voltage. Don't know if this is important for your application but I thought I would throw it in anyway. One place this was used in equipment I worked on is an audio console. This particular design used several LEDs for signalling which options had been selected. By wiring several LEDs in series and using a current source, the switches merely shorted across the LEDs that were not needed. The current source then kept the current constant and the LEDs were the same intensity whether one, two or all seven were on. |
Re: Relay to control 2 outputs
Quote:
|
| All times are GMT -5. The time now is 04:21. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi