if i want logic to turn an LED on is the typical way to just put the logic to the gate of a mosfet which is attached to a higher current source (also 5 V in my case).
I have to do this with a number of LEDs does something exist that has lets say 1 input, 4 gates and 4 outputs to power LEDs? Something simple not an LED driver or other crazyness.
ahh sorry let me be more clear. The logic would enable 4 different leds seperately.
Can I just attach the LED to the logic output which is also an input to another logic gate?
As for the current and forward voltage i arbirarily chose this one right now because it has 5V Vf (20 mA). I just chose that because then the Vf matches V+
Its just an indicator but I would like 4 of them to indicate different things.
ahh sorry let me be more clear. The logic would enable 4 different leds seperately.
Can I just attach the LED to the logic output which is also an input to another logic gate?
As for the current and forward voltage i arbirarily chose this one right now because it has 5V Vf (20 mA). I just chose that because then the Vf matches V+
Its just an indicator but I would like 4 of them to indicate different things.
hi,
Why are you using MOSFET's , a BJT for each LED will be fine.
Connect the transistor base via a 270R to a PIC output pin.
Connect the LED in series with a current limiting resistor between the transistor collector and +5V.
correct me if im wrong but the 270R (here) has a 0.6V Vce saturation limit which would mean that my 5V for V+ would cause this BJT to be in breakdown.
You asked why i would use mosfets... thats because i dont remeber how BJTs work.
If you say it will work i will trust you and go look in a book tonight.
correct me if im wrong but the 270R (here) has a 0.6V Vce saturation limit which would mean that my 5V for V+ would cause this BJT to be in breakdown.
You asked why i would use mosfets... thats because i dont remeber how BJTs work.
If you say it will work i will trust you and go look in a book tonight.
Saturation != breakdown. Saturation is when the transistor is turned "on" as far as it will go. The saturation limit of your transistor means it drops 0.6V between C and E when in saturation. Breakdown is the voltage where a reverse-biased junction will start to conduct, which is generally much higher than 0.6V.
The maximum allowed C-E voltage on the transistor in your datasheet is -55 V.
Your other mistake is that ericgibbs' reference to "270R" is a 270 ohm resistor, not a transistor.
The circuit calls for an NPN transistor, not PNP. 2n2222a or even a 2n3904 would be fine.
If i have an OR gate that can source 32 mA can I just attach the LED (and 2 logic inputs) without a BJT?
I dont know if it is 32 mA/circuit (2 circuit device) or not but I can just use a 10 mA LED.