Help about current PNP and NPN used as switch

Thread Starter

boggiano

Joined Nov 9, 2019
3
Hello,
just for learning I would like to use a 555 in astable mode to blink 2 LEDs with 2 BJTs

The exit of the 555 is wired to:
the base of BTJ BC548C NPN
the base of BTJ PN2907A PNP

Just for exercise I would like to have an astable 555 with 2 BJTs (a NPN and a PNP) and 2 leds.
The output of the 555 is about 3.92V : when HIGH the NPN must be saturated and turn on the red led,
when LOW the PNP must be saturated and turn on the green led.
Vcc 5V is external.

What I don't understand is why I get such current on the green led when it should be off.
On the simulator I see about 1mA but, in reality, I get 4mA (and I think it is too much).


Thank you!
Untitled Circuit-schematic.png
 

MrChips

Joined Oct 2, 2009
30,720
Transistors can be used as low side and high side switches.

In the first drawing, an NPN BJT is on the low side. A high voltage (exceeding 1V) on the base turns on the switch and activates the load. In other words the base-emitter voltage must exceed about 0.7V for the load to be activated.

In the second drawing, a PNP BJT is on the high side. Again, the emitter-to-base voltage must exceed 0.7V for the load to be activated. In other words, a base voltage higher than Vsupply - 0.7V will turn off the transistor.

1659032551669.png
 

dl324

Joined Mar 30, 2015
16,846
Schematics are easier to read when you follow the preferred conventions. Flow is primarily left to right and top to bottom, no unnecessary wire jogs, don't draw transistors upside down, etc.
1659035938290.png
What I don't understand is why I get such current on the green led when it should be off.
On the simulator I see about 1mA but, in reality, I get 4mA (and I think it is too much).
3.9V on the base of Q2 isn't sufficient to turn it off completely.

The simulator isn't giving you realistic results. You're only providing 0.16mA of base drive for Q1 and the datasheet says to use a beta of 20 when used in saturation mode. That would only support a collector current of 3.2mA, but the simulator is giving 15.4mA.

EDIT: For 2N2907, you'd use a beta of 10 for saturation mode operation.
 
Last edited:

MrChips

Joined Oct 2, 2009
30,720
Each common-emitter NPN stage is an inverter.

1659043326396.png

Cascade two of these and you have a non-inverting buffer.
Then use this to drive the PNP high-side LED driver.
 

dcbingaman

Joined Jun 30, 2021
1,065
The PNP cannot turn off well because the 555 output is more than 0.7V less than the 5V power on the emitter when it's output is 'high'. It is not 'high enough'. This is why the LED is still 'on' some when it should be off. The methods mentioned by others on the forum are methods for handling that situation.
 

dcbingaman

Joined Jun 30, 2021
1,065
Transistors can be used as low side and high side switches.

In the first drawing, an NPN BJT is on the low side. A high voltage (exceeding 1V) on the base turns on the switch and activates the load. In other words the base-emitter voltage must exceed about 0.7V for the load to be activated.

In the second drawing, a PNP BJT is on the high side. Again, the emitter-to-base voltage must exceed 0.7V for the load to be activated. In other words, a base voltage higher than Vsupply - 0.7V will turn off the transistor.

View attachment 272465
For the NPN and PNP don't forget a current limiting resistor on the base or you will destroy the transistor. The FET switches do not need it but the BJTs do.
 
Top