![]() |
Led Tape Control
Our team has the idea of putting 12 volt LED strip lights on our robot to signal what kind of game piece we'd like the feeders to give us, but we do not know how to control them.
These lights have one 12V power supply, then 3 ground pins for Red, Green, and Blue. They are meant to be controlled by PWM. Ideally, we would use the outputs of the digital sidecar to control the PWM, but rule <R62> states that custom circuits can only be connected to certain things, none of which could be an output for PWM. However, if you read the rule, it mentions that "sensor inputs, custom circuits..." can only be connected to those, so we were wondering if the circuits weren't inputs if they could be used. |
Re: Led Tape Control
The only way to control LEDs that I know of is with a Spike relay. Since each Spike contains two relays, two Spikes should be able to control the three colors.
|
Re: Led Tape Control
OK, first of all be absolutely certain that your lights are not too bright. No sense in blinding anyone...
An RGB strip light is really intended for display of "any" color, by finely varying the intensity of the three primary colors using "pulse width modulation" - but this is a DIFFERENT PWM than what is used to control Jaguars and servos. The PWM outputs of the Sidecar won't work for you. In this case, you just want to display 3 colors (Red, White, Blue). Why not run to Radio Shack and buy an LED in each color and just connect those? Lighter, cheaper, simpler to implement. Just be sure to use a dropping resistor to bring the 12 volts down into the LEDs range - the package or an Internet resource should help you there. Controlling would be via a Spike, or you can verify that the rules allow a Digital Output from the DSC to be connected to an LED, because that would be even simpler. For that matter, you can even use a Spike as the indicator: It shows Red, Yellow and Green. But sometimes your alliance partner might not recognize that you're trying to signal them if-you-know-what-I-mean. Good luck, let us know what you decide. |
Re: Led Tape Control
Quote:
|
Re: Led Tape Control
Quote:
|
Re: Led Tape Control
For Lunacy we had a LED light strip to signify that a ball was ready to shoot. They came from a car supply place and were controlled by a Spike. We used blue, but they come in red, blue and white, about 12 LED's in a 24" strip. Can you post the link to your tri-color strips?
A strip of LED's will be easier to see rather than a single LED as you rocket across the field. We wired it the same way you would wire the compressor. Compressor on, LED on. It sounds like your strip has a common power feed, so you would do +12 to that. You would connect the other end via the spike to ground. I'm still thinking you want three spikes to make it easy. Spikes connect to the relay points. You could even go wild and have it be solid on for the low, slow flash for the med and fast flash for the high so your robot partners know where you going. |
Re: Led Tape Control
(I'm on Celestial's team)
Quote:
Quote:
Quote:
Quote:
Quote:
What wiring up MOSFETs instead of spikes? It's a custom circuit anyway, and MOSFETs weigh aabbbooouuttt 1% of what a spike weighs and 6% of what it costs, and is much easier to control. |
Re: Led Tape Control
Quote:
The spike is really two relays, and the three-pin cable contains two digital lines (fwd and rev) plus ground. The first coil (fwd) switches m+ between GND and 12v, and the second coil (rev) switches m- between GND and 12v. The output is never disconnected. Hope that makes sense |
Re: Led Tape Control
Thanks for the link to the Adafruit site, those LED's look great.
Output devices like motors, compressors, etc need to be controlled by Victors or Spike like devices. You could always ask the GDC for approval to build a custom circuit to drive the LED's. Since it's part of your game play, you can't use the decoration rule. You could see if the Victors will drive them to the bright/dim that you want and see if the GDC will let you put a non motor on the device. We went with the Spikes to make sure there were no inspection issues. Good luck! |
Re: Led Tape Control
Quote:
Quote:
Victors are another good idea, but we can just make our own PWM in the robot code for the spikes. |
Re: Led Tape Control
I think I will just stick to LED's of one color per spike for simplicity. Really noob question, but what vi would I use for a spike? The only thing I've used a spike for is the compressor, which has it's own set of vi.
|
Re: Led Tape Control
under utilities I found "FRC LEDs.vi". It allows a choice of 2 LED types, FPGA LED and User LED. The state is either on, off, or toggle. Is this anything close to what I want?
|
Re: Led Tape Control
Quote:
|
Re: Led Tape Control
While the Spike has 4 output states, last year the WPILib C++ Relay class only allowed 3 states. The state where both outputs were switched to +12v was not allowed. I guess they did not consider it useful. In the off-season we tried including the Relay class code in our project and modifying it to allow the 4 states and it worked. I have not seen the source code for 2011 (is it available?) but I am hoping they changed it to allow all 4 states. I don't know how LabView or Java work.
|
Re: Led Tape Control
I would propose that you ask the GDC if custom electronics can be used to run the lights.
If you get turned down then I would ask if a Spike controls the power to the custom circuit that drives the LED would be acceptable. The GDC is super safety minded and that is one of the reasons for the output via a Spike, Victor or Jaguar. The cRio safety code controls the output to them. As far as the Spike vi goes, the one for the compressor is good. It wants the robot to be enabled and then uses the value from the pressure sensor to turn the spike on and off. You would feed inputs into the vi as if you were the pressure sensor. Remember, it's always faster to ask the GDC rather than fooling around in a CD thread collecting opinions on what the GDC will say. |
| All times are GMT -5. The time now is 12:00. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi