2 Attachment(s)
Tristated output to two common Base transistor issue
Hello,
I have to power automotive LEDs that drain 50mA.
I use twenty LEDS and have a 16F630, so my circuit connects two LEDs to 1 I/O port and I use the Z state to switch them OFF.
To make this without destroying the PIC, I use transistors like this (one port example):
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1965&stc=1&d=118901631 5">
Problem: when I have set the port direction to Input (=Z state), both LEDs still light; less than normal, but still enough to make this look not good.
The SMD transistors have built-in 22k resistors like this (the PNP one has same connections):
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1964&stc=1&d=118901608 9">
I tried to add 1k resistors at each Tr's Base, but... still the same.
Is there a way to sort out this issue?
NB: how do I put text beside the images???
Your circuit is fundamentally flawed
With no PIC or any other drive, the PNP and NPN transistors are both turned ON by each other and the two series resistors (not shown) which are inside the cases. If you used regular PNP and NPN without intrinsic series resistors the circuit would instantly blow up two transistors.
IF the LED supply is the 12 volt auto battery things get worse. The PNP is always conducting because its base is at either 0 or 5 volts while the emitter is at 12 volts. The PNP base sees either 7 or 12 volts drive so it is always ON.
A rethink is needed.
HTH
Brian