Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   LEDs on Operator Console? (http://www.chiefdelphi.com/forums/showthread.php?t=93238)

WizenedEE 05-03-2011 03:02

LEDs on Operator Console?
 
We are using the Cypress IO board included in the 2010 KOP to connect physical switches to our driver station. We are using the enhanced IO, with the 3.3V setting.

We are wanted to add four LEDs to our operator console to assist the drivers. Has anybody has any success with this?

On the pinout diagrams for the Cypress, it indicates that most of the DIO pins can only source/sink 4/8 mA. That seems extremely low... and it seems that wouldn't power a standard LED. There are two "high current" pins that say they can do 20mA. Do we have to use those for the LEDs and only use two of them? Has anybody tried this with a sucessful outcome?

Also, with 3.3V, we can just use a resistor with about 200 ohms, correct?

Note that we got these LEDs from radio shack, and have literally no documentation (we got a variety pack, so even the size was listed as "varoius"). However, they seem like pretty standard 5mm LEDs.

Al Skierkiewicz 05-03-2011 08:40

Re: LEDs on Operator Console?
 
An assortment pack from Radio Shack is your garden variety of 20ma LEDs. Try one and see if it bright enough. The reds are likely to be the brightest in your assortment. At 3.3 volts, 200 ohms sounds ok for a series resistor. Be sure to make measurements so you are not drawing more than the recommended maximum current.

The Lucas 05-03-2011 09:42

Re: LEDs on Operator Console?
 
If you look at the pinout there are actually 4 high current outputs but 2 (P2_3 P2_5) are not used in the default code for the Cypress. If you are comfortable reprogramming the Cypress you could probably get them working. If you don't want to reprogram and you have a few extra NPN BJTs you could drive the base of the transistor with any digital output.

I think we used the 25mA high current outputs for a couple LEDS last year so it can work (provided you wire it correctly as a current sink). The 200 ohm resistor sounds a bit high if you went them bright. If your LEDs are like this Radioshack one the voltage drop is around 2.25v (you could test it with a good multimeter). Assuming you want 20mA I get 52.5 ohms, so use a 56 ohms or higher resistor (higher is always safer).
Math:
3.3 V - 2.25V = 1.05V (to drop across resistor)
V/I = R
1.05 V / .020 A = 52.5 ohms

WizenedEE 05-03-2011 15:12

Re: LEDs on Operator Console?
 
Oh I see. So I can take my LEDs that want 20mA and give them a resistor so they'll only draw 5mA and it will work fine on any pin, right?

And since the sink current is higher than the source current, the cathode goes to 3.3V and the anode should go to the pin, and they turn on by turning the pin off. Is that correct?

PhilBot 06-03-2011 08:54

Re: LEDs on Operator Console?
 
We use a variety of panel mount LEDs from allelectronics.com. 220 ohm resistors make for bright LEDs ESP blue. Fast shipping too. We use regular outputs for led and high current for buzzer. Wiring common annode ( with switcing to ground) means the LEDs all light up on boot. Good test to verify operation of cypress.

Matt Krass 06-03-2011 12:32

Re: LEDs on Operator Console?
 
Quote:

Originally Posted by WizenedEE (Post 1035004)
Oh I see. So I can take my LEDs that want 20mA and give them a resistor so they'll only draw 5mA and it will work fine on any pin, right?

And since the sink current is higher than the source current, the cathode goes to 3.3V and the anode should go to the pin, and they turn on by turning the pin off. Is that correct?

You can certainly use a resistor to restrict the current flow to 5mA, however that may not result in a particularly visible LED. I would recommend using BJTs to switch the LEDs, power them off the VCC pin of the Cypress (or an external battery pack, a couple AAs should do fine for a good deal of time, just be sure to switch them!) and use the regular I/O pins. If you need help with this let me know, I can post a more detailed explanation for you.

Matt


All times are GMT -5. The time now is 09:51.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi