Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LED logic

Status
Not open for further replies.

chico

New Member
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.
 
Last edited:
hi,
What is the LED current and voltage specification.?
 
A single 2N222a transistor will comfortably power several LED's

circuit1-jpg.52851


Approx 11mA per LED 33mA through the transistor
gate the transistor via the 270 ohm resistor to your pin.

Cheers Ian
 

Attachments

  • circuit1.jpg
    circuit1.jpg
    11.4 KB · Views: 585
Last edited:
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.
 

Attachments

  • LEDs.gif
    LEDs.gif
    8.2 KB · Views: 174
Last edited:
A TTL logic gate can drive about two logic gates (not an LED and a logic gate)

I think a CMOS gate will be able to drive an LED and another CMOS logic input (CMOS have a much higher input impedance.)

Some one may correct me on this..

Cheers Ian
 
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.
 
Last edited:
The BJT you link to in the first link, Sanyo 50A02MH, is not what you want. It is PNP.

You want an NPN version.
 
It depends on the application. PNPs are the correct choice in some instances.

I was speaking from the posted schematics.

If the OP was considering using the posted schematics, he would be upset with the results if he used PNP ;)
 
sure, i always put leds on the outputs of my logic, 2 in series is best, may need a small resistor of some to not burn out single LED,

not all leds are created alike, but thats why I like using POT(S)!
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top