Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Led Tape Control (http://www.chiefdelphi.com/forums/showthread.php?t=89207)

CelestialVortex 15-01-2011 12:52

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.

Steve Warner 16-01-2011 11:52

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.

DonRotolo 16-01-2011 12:05

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.

Joe Ross 16-01-2011 15:53

Re: Led Tape Control
 
Quote:

Originally Posted by DonRotolo (Post 1001017)
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.

This year, the fpga was updated to do PWM on the digital outputs. I know this is in the LabVIEW library. I'm not sure if it got into C++ or Java.

3p1c w1n 16-01-2011 19:21

Re: Led Tape Control
 
Quote:

Originally Posted by Steve Warner (Post 1001011)
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.

How does that work? I thought you could only attach one device, like a compressor, and it's either on or off.

Foster 16-01-2011 19:44

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.

WizenedEE 16-01-2011 20:10

Re: Led Tape Control
 
(I'm on Celestial's team)

Quote:

Originally Posted by DonRotolo (Post 1001017)
...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.

So the jaguar outputs are similar to standard servo outputs and don't just turn on and off depending on how fast the motor should turn? I guess that makes sense, because the jaguar has those special abilities rather than just being an h-bridge.

Quote:

Originally Posted by DonRotolo (Post 1001017)
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.

We might just go with that, but we're under the weight limit. I was also thinking of having some sort of victory dance with them.


Quote:

Originally Posted by 3p1c w1n (Post 1001327)
How does that work? I thought you could only attach one device, like a compressor, and it's either on or off.

Well, the LEDs are hard-wired to +12V and just need to be controlled by grounding them. If we attached one lead to the green and one lead to the blue, we could get blue by running the "motor" one way, which would provide +12V to one side (making nothing happen for lack of voltage differential) and GND to the other side (making the blue light up). However, the spike probably wouldn't let us make each side GND (it would just disconnect them if we turned it off) or 12V (why would it?)

Quote:

Originally Posted by Foster (Post 1001338)
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?

http://www.adafruit.com/index.php?ma...ducts _id=285

Quote:

Originally Posted by Foster (Post 1001338)
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.

Haha great idea!

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.

apalrd 16-01-2011 20:17

Re: Led Tape Control
 
Quote:

Originally Posted by WizenedEE (Post 1001363)
However, the spike probably wouldn't let us make each side GND (it would just disconnect them if we turned it off) or 12V (why would it?).

Yes it will. In LabVIEW, the Relay Set is an enumerated type with 4 states: On (both sides 12v), Off (both sides gnd), Forward (one side 12v, one side side gnd), and Reverse (other side 12v, and other side gnd).

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

Foster 16-01-2011 20:36

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!

WizenedEE 16-01-2011 21:48

Re: Led Tape Control
 
Quote:

Originally Posted by Foster (Post 1001384)
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.

I assume you're looking at <R03>? That's a weird rule -

Quote:

Originally Posted by 2011 Game Manual
<R03> Custom circuits and COTS electronics are expressly prohibited if they:
A. Interfere with the operation of other ROBOTS.
B. Directly affect any output devices on the ROBOT.

Wouldn't Jaguars and Spikes be COTS electronics? Although it does say you can use anything in the KOP, so that rule would take preference? I'll probably ask the GDC if lights are considered output devices.

Victors are another good idea, but we can just make our own PWM in the robot code for the spikes.

3p1c w1n 17-01-2011 00:58

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.

3p1c w1n 17-01-2011 01:20

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?

Joe Ross 17-01-2011 09:23

Re: Led Tape Control
 
Quote:

Originally Posted by 3p1c w1n (Post 1001676)
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?

Those change two little tiny LEDs that are on the cRIO. They are probably not what you want.

Steve Warner 17-01-2011 10:32

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.

Foster 17-01-2011 11:22

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