Re: Driving two transistors with same signal



On Thu, 08 May 2008 19:11:47 +0200, vic <news@xxxxxxxxxxxxx> wrote:

Hi,

I have two common anode 7-segments displays, and only one wire to drive
them. I need to achieve the following : when the control signal is +5V,
display1 is ON and display2 is OFF. When the signal is 0V, display1 is
OFF and display2 is ON. When the signal is not connected (high
impedance), both displays are OFF.

I tried using a NPN transistor for display1 and a PNP for display2,
connecting their bases together. It works when the driving signal is
present, but when the signal is floating current flows from the base of
the PNP to the base of the NPN and both transistors turn each other on,
resulting in both displays being ON.

The circuit that didn't work :

VCC
+
|
|
___ |<
o---------------------|___|--|
| |\
| VCC |
| + |
| | Display2
| | |
| ___ |/ |
Input---o---|___|--| GND
|>
|
|
Display1
|
|
GND



Is there a way to achieve this ?

---
Yes. View in Courier:



+5V>-------+-----------+-----------+-----------+
| | | |
[100k] [100K] | |
| | | E
+-----------|-----------|---------B 2N3906
| | | C
| | E |
| +--[10K]--B 2N3906 |
[10k] | C |
| | | |
| C |A |A
VIN>-------+--[10k]--B 2N3904 [DISPLAY] [DISPLAY]
E | |
| [150R] [150R]
| | |
GND>-------------------+-----------+-----------+


Version 4
*** 1 880 680
WIRE -112 -128 -272 -128
WIRE 144 -128 -112 -128
WIRE 384 -128 144 -128
WIRE 624 -128 384 -128
WIRE -112 -80 -112 -128
WIRE 144 -80 144 -128
WIRE 624 0 624 -128
WIRE -112 48 -112 0
WIRE 560 48 -112 48
WIRE 384 96 384 -128
WIRE -112 112 -112 48
WIRE 144 144 144 0
WIRE 192 144 144 144
WIRE 320 144 272 144
WIRE 144 176 144 144
WIRE 624 192 624 96
WIRE -112 224 -112 192
WIRE -32 224 -112 224
WIRE 80 224 48 224
WIRE -272 256 -272 -128
WIRE -112 256 -112 224
WIRE 384 288 384 192
WIRE 624 288 624 256
WIRE 384 384 384 352
WIRE -272 512 -272 336
WIRE -112 512 -112 336
WIRE -112 512 -272 512
WIRE 144 512 144 272
WIRE 144 512 -112 512
WIRE 384 512 384 464
WIRE 384 512 144 512
WIRE 624 512 624 368
WIRE 624 512 384 512
WIRE -272 592 -272 512
FLAG -272 592 0
SYMBOL pnp 560 96 M180
SYMATTR InstName Q1
SYMATTR Value 2N3906
SYMBOL LED 608 192 R0
SYMATTR InstName D1
SYMATTR Value QTLP690C
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res 608 272 R0
SYMATTR InstName R1
SYMATTR Value 150
SYMBOL voltage -272 240 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 5
SYMBOL res -128 -96 R0
SYMATTR InstName R2
SYMATTR Value 100k
SYMBOL voltage -112 240 R0
WINDOW 3 24 104 Invisible 0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value PULSE(0 5 0 1e-6 1e-6 .1 .2)
SYMBOL res -128 96 R0
SYMATTR InstName R3
SYMATTR Value 10k
SYMBOL res 64 208 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R4
SYMATTR Value 10k
SYMBOL npn 80 176 R0
SYMATTR InstName Q2
SYMATTR Value 2N3904
SYMBOL res 128 -96 R0
SYMATTR InstName R5
SYMATTR Value 100k
SYMBOL pnp 320 192 M180
SYMATTR InstName Q3
SYMATTR Value 2N3906
SYMBOL LED 368 288 R0
SYMATTR InstName D2
SYMATTR Value QTLP690C
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res 368 368 R0
SYMATTR InstName R6
SYMATTR Value 150
SYMBOL res 288 128 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R7
SYMATTR Value 10k
TEXT -232 536 Left 0 !.tran 1 uic

JF
.