|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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. |
|
#2
|
|||||
|
|||||
|
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.
|
|
#3
|
|||||
|
|||||
|
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 |
|
#4
|
||||
|
||||
|
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? |
|
#5
|
|||||
|
|||||
|
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.
|
|
#6
|
||||
|
||||
|
Re: LEDs on Operator Console?
Quote:
Matt |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|