Driving two transistors with same signal

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 ?

Thanks.

Reply to
vic
Loading thread data ...

Add diodes to isolate the bases, and resistors to bias the transistors off when the desired on signal is not present.

Ed

see below

VCC + | +-------------+ | | [R] | | ___ |< o--------||-+-|___|--| GND | |>

[R] | | | | Display1 | | +----------+ | GND
Reply to
ehsjr

I need to achieve

is OFF. When the

connected (high

connecting their bases

floating current

turn each other on,

The revised circuit does not solve the problem. Both diodes will be conducting when the input is floating. As a result both displays will still be on.

A simpler solution is to remove the diodes, change the locations of the added resistors, and move Display1. I.e.:

VCC + | +---------+ | | [R1] | | |< o-------------[R2]---+-------| | |\\ | VCC | | + | | | Display2 | Display1 | | | | | |/ | Input---o-----[R2]-+--------| GND | |>

[R1] | | | +----------+ | GND

The R1 / R2 resistor pairs need to be chosen so that there is only about 0.5 volts across the transistors' base-emitter junctions when the input is floating. When the input is floating, the various resistors will pull the input to VCC/2. The value of 0.5 volts was chosen to be low enough to keep the transistors from turning on when the input is floating but still allow the transistors to be turned on when the input is being driven to VCC or ground.

Reply to
Dan Coby

"vic" schreef in bericht news:48233453$0$20289$ snipped-for-privacy@news.free.fr...

Try this circuit. Choose the resistor values to limit the base current into the transistors, yet this current should be high enough to drive the transistors into saturation.

+--------+------------------+-------+--Vcc | | | | ___ |< | | .---. in----+--|___|---| | | | | | |\\ | .-. | D | | | | | | | | | | |< | | '---' | +------| '-' | | | |\\ | |/ | .-. | +-----| | | | .---. | |>

| | | | | | | | '-' | D | ___ |/ | | | | | +-|___|---| | | | '---' | |> | | | | | | | ------)------------+--------+------)-----------+-------+--GND | | +----------------------------+

If your displays need GND on one side, then try this. Mind the type of the transistors.

+--------+------------------+-------+--Vcc | | | | ___ |< | ___ |/ | in----+--|___|---| | +--|___|--| | | |\\ | | |> | | | | | | | | | |< | | |< | +------| | +-----| | | |\\ | | |\\ | .-. | | .-. | | | | .---. | | | .---. | | | | | | | | | | | '-' | D | | '-' | D | | | | | | | | | | | '---' | | '---' | | | | | | ------)------------+--------+------)-----------+-------+--GND | | +----------------------------+ created by Andy´s ASCII-Circuit v1.24.140803 Beta
formatting link

petrus bitbyter

Reply to
petrus bitbyter

This looks a little iffy - when there's no drive, then both bases will still be forward biased unless you divide the drive down so dramatically that you don't^H^H^H^H^Hmight not get full saturation when it's supposed to be on.

A much more elegant solution uses two NPN's (the same thing could be done with two PMP's, just turn the arrows around and the power supply upside down. ;-) )

Vcc Vcc | | | [Display 2] | | [Display 1] | | |/ +--[R]---+---| | | |>

|/ [R] | Control --[R]--+--| | | | |> | | [R] | | | | | | | gnd gnd gnd gnd

The resistors can be anything from around 4.7K to maybe 22K.

Cheers! Rich

Reply to
Rich Grise

"Dan Coby" schreef in bericht news:7vCdnV2xQMRN4b7VnZ2dnUVZ snipped-for-privacy@earthlink.com...

This may work, (so there are some ifs.) Most important, the driving source must be able to provide the extra current (sink and source). The displays may need GND on one side. The OP did not said so, but his schematic suggests it. You need to do a little bit of serious calculation to find the values of the resistors. The voltages are important as you mentioned already, but the base currents need to be high enough to switch the transistors on when active. I leave it an excercise for the interested reader.

petrus bitbyter

Reply to
petrus bitbyter

Try this: 5V | 5V R5 | | |-- 5V | | | | | R3 | | | ---R1-----R2---------- | | | | | R4 | |---- R6 | | GND GND

Q1 and Q2 form a comparator so that when the input is floating they will both be off. R3 and R4 set the input threshold.

When the input is high (5V) then Q1 will be on and that will turn on Q3. When the input is low (GND) then Q2 will be on and that will turn on Q4.

You can figure out the resistor values. They shouldn't be too critical, but R3 and R4 need to be small enough to ensure enough drive for the four transistors.

I hope I got the ascii art right as I had to compose it in a separate word processor.

Bob

--
== NOTE: I automatically delete all Google Group posts due to uncontrolled 
SPAM ==
Reply to
BobW

I see, now, that your displays are both common anode. You'll need to add another PNP (common emitter mode) driven by Q4.

As Monica Lewinsky used to say, "Close, but no cigar."

Bob

--
== NOTE: I automatically delete all Google Group posts due to uncontrolled 
SPAM ==
Reply to
BobW

message

them. I need to achieve

is OFF. When the

connected (high

connecting their bases

is floating current

turn each other on,

(sink and source).

Actually there is not a very large increase in the driving source requirements.. The maximum voltages across the R1 resistors is 0.7 volts. If VCC is 5 volts, then there is only about a 14% increase in the required drive currents. Some diodes can be put in series with the transistor bases to decrease the extra drive requirements and to add some more margin to the circuit.

schematic suggests it.

Yes, this may be a concern.

Reply to
Dan Coby

I need to achieve

is OFF. When the

connected (high

connecting their bases

floating current

turn each other on,

You're right - my circuit fails. Thanks for spotting the error.

Ed

Reply to
ehsjr

Yes, as I said I'm driving common-anode 7 segments displays, so I can only use transistors on the "plus" side of the displays. This is part of my problem :)

Reply to
vic

*gasp* 5 transistors needed to do what seemed simple at first glance ...

I don't quite understand what R5 and R6 are for, when Q1 and Q2 do not conduct, the base current of Q3 and Q4 would be zero so the ressitors do not seem necessary ?

Well I guess I could just try it and see if it works :)

Reply to
vic

them. I need to achieve

is OFF. When the

connected (high

connecting their bases

is floating current

turn each other on,

Would it work if, instead of diodes, I used Zener diodes of voltage around Vcc/2 ?

Reply to
vic

There is always some leakage from collector to base, so R5 is there to insure that Q3 doesn't conduct when Q1 is off. Same goes for R6/Q4.

Yeah, it's a lot of parts, but your requirements are kinda tough.

If you're only building one of these, and your supply is tightly regulated, and your temperature range is limited, then the method (I forget who proposed it) that keeps Vbe at about 0.4V when the drive is high impedance may work okay.

If it were my project and the thing had to ALWAYS work (in production quantities, over a varying range of Vcc, temperature, and Voh/Vol), then I'd use this scheme.

If you have trouble with the resistor values then give a yell. R3 and R4 should be equal if your drive is from a CMOS output (i.e. the output swings from supply to supply). If it's from an old TTL output, then the voltage at the R3/R4 connection should be set to about ((2.4V-0.4V)/2)+0.4V = 1.4V (i.e. the middle of the output swing range for worst-case TTL).

Have fun with it.

Bob

--
== NOTE: I automatically delete all Google Group posts due to uncontrolled 
SPAM ==
Reply to
BobW

Didn't you see my four transistors, four resistors solution yesterday?

+--------+------------------+-------+--Vcc | | | | ___ |< | ___ |/ | in----+--|___|---| | +--|___|--| | | |\\ | | |> | | | | | | | | | |< | | |< | +------| | +-----| | | |\\ | | |\\ | .-. | | .-. | | | | .---. | | | .---. | | | | | | | | | | | '-' | D | | '-' | D | | | | | | | | | | | '---' | | '---' | | | | | | ------)------------+--------+------)-----------+-------+--GND | | +----------------------------+ created by Andy´s ASCII-Circuit v1.24.140803 Beta
formatting link

petrus bitbyter

Reply to
petrus bitbyter

--
Yes. View in Courier:



+5V>-------+-----------+-----------+-----------+
 Click to see the full signature
Reply to
John Fields

--
Oops...

Missed the part about when the input signal floats.
 Click to see the full signature
Reply to
John Fields

--
This works:


Vcc>----+------+-----+----+-----------+---------+
 Click to see the full signature
Reply to
John Fields

"petrus bitbyter" schreef in bericht news:4825926d$0$15509$ snipped-for-privacy@dreader16.news.xs4all.nl...

Oops, checking out my own schematic I found it wrong. The one below is good. I added a diode to make the voltage loss for both displays more equal. If that loss is not acceptable you can use a five transistor variant shown by someone else already. I added similar schematic below.

+--------+------------------+-------+--Vcc | | | | ___ |< V .-. | in----+--|___|---| - | | | | |\\ | | | | | | | '-' | | | |< | |/ | +------| +-----| | | |\\ | |>

| .-. | | | | | | .---. ___ |/ .---. | | | | | +--|___|--| | | | '-' | D | | |> | D | | | | | | | | | | | '---' | '---' | | | | | | ------)------------+--------+------)-----------+-------+--GND | | +----------------------------+

+------+---------------------+------+--Vcc | | | | ___ |< | |< | in---+--|___|--| | +--| | | |\\ | | |\\ | | | | .-. | |< | | |< | | +----| | +----| | | | |\\ | | |\\ '-' | | | .-. | | | | | | | .---. | | .---. | | | | | ___ |/ .-. | | | '-' | D | +--|___|--| | | | D | | | | | | |> | | | | | | '---' | | '-' '---' | | | | | | | -----)-----------+------+----)-----------+----+------+--GND | | +-----------------------+ created by Andy´s ASCII-Circuit v1.24.140803 Beta
formatting link

For a a Vcc of 5V all resistors can be 4k7. Transistors are general purpose

2N3904, 2N3906 or BC550, BC560.

petrus bitbyter

Reply to
petrus bitbyter

Sorry I missed your post. Looks like a good solution. Thanks !

Reply to
vic

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.