An LED to Monitor an Output
SailerMan
Posts: 337
Quick Question... I have an SX48 attached to a Motor Controller IC 1 pin is PWM and two pins to control the Direction.
What I want to do is when Pin 1 (Direction CW ) Goes High it Lights an LED and Pin 2 (Direction CCW) Turns off an LED and Vise Versa, I am thinking........, is it just as simple as A resistor - LED - Ground?
Maybe to a Transistor .
Will this interfere with the input of the motor controller?
Eric
Post Edited (SailerMan) : 10/10/2007 4:15:50 PM GMT
What I want to do is when Pin 1 (Direction CW ) Goes High it Lights an LED and Pin 2 (Direction CCW) Turns off an LED and Vise Versa, I am thinking........, is it just as simple as A resistor - LED - Ground?
Maybe to a Transistor .
Will this interfere with the input of the motor controller?
Eric
Post Edited (SailerMan) : 10/10/2007 4:15:50 PM GMT
Comments
I'm assuming it is the Prop rather than SX driving the LED/resistor. Less than 10 ma should light modern LEDs; older vintage, some are quite dim.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
R = (Vdd - Vf) / Id
R = value of your current limiting resistor
Vdd = 3.3V
Vf = forward voltage drop of your LED (depends on color)
Id = 20mA or so
Hope this helps
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
Thanks for the tips
Eric
PS This should have been in Sandbox forum... Sorry.
http://forums.parallax.com/showthread.php?p=679578
because it can be used whether the pin is an input or an output...· Instead of going to a switch, you could just have it go to your controller.
An FET is a good choice for the reasons you mentioned. A switching transistor will work too if you limit the input current. The 2N2222 has a gain of at least 75, so would need only 300uA to have more than enough drive for an LED. A base resistor of around 10K should work.
Your pins 1 and 2 for controlling the direction will most unlikely draw any noticeable current, so it should be possible to sideline some for the LED. The Prop can produce upto 40 mA, the SX most likely 20+ mA.
However note that the max voltage will be reduced when drawing this max current out of a pin! This can be an issue with 3.3V devices, where it can esily drop below 3 V which seems to be the limit for motor controllers....
There are so called "low current" LEDs which are a little bit "dim" compared to the ultra bright LEDs we get accustomed to, but will do fine for any sensible application... "Low Current" means 2 to 3 mA, i.e. needing a resistor of 710 Ohms for 3.3V and 2.2k for 5V.
I myself would waste 10 mA (and spend 25 Cents) , connecting a two-wire DUO-LED (red/green) - and a 100 Ohms resistor - just between pins 1 and 2... As the SX is 5V I think, you should take 330R or 470R with it...
---
"Low Current":A "low current" LED has the same price as any standard LED. How does this work? The semiconductor inside is extremely small. Which also means that there is little tolerance for heat dissipation.. They will definitely die @ 10mA, which is the reason careless deSilva does no longer use them... I take an "ultra bright" LED for 15 cents and just run 2 mA through it... same result (though at higher cost..)
Post Edited (deSilva) : 11/25/2007 9:29:04 AM GMT