3-State buffer using BJT?

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
How many lines? What kind of load? What are the 3 states (0,1,hi-z or other 3)? Is global control needed?

There are sundry off the shelf 3 state logic ICs, why is discrete desirable?

You can look at logic schematics for guts of old school tri-state buffers for some clues.

JR
 
JohnRoberts said:
How many lines? What kind of load? What are the 3 states (0,1,hi-z or other 3)? Is global control needed?

There are sundry off the shelf 3 state logic ICs, why is discrete desirable?

You can look at logic schematics for guts of old school tri-state buffers for some clues.

JR

It's driving other logic, single lines (I need up to 3). states are 0,1,hi-Z.
Global Control is not required.

I have a bag of 1K PN2222's lying around (bought for a penny each). Whilst I can always reach for an IC, I think it's a lot more interesting to do some basic logic like this in discrete transistors.

(I'm inspired by some schematics I saw for some symmetrix stuff... use of basic transistors for various logic functions was incredible).

Thanks for any advice you have.

/R
 
OK, I'm old school enough to recall rolling my own crude logic with bipolar (BTL?).

2222s are NPN so you are limited to common emitter saturated switch for logic low. Emitter follower for logic high, give or take the Vbe (probably OK for 5V logic), and floating base and open collector for high Z. You can take advantage of the fact that the be junction can be driven almost 7V reverse before zenering.

Another question is what kind of speed does this buffer need to operate at?

If this only has to handle very slow data like mode information you can cobble something together with several transistors per line. if this needs to operate at decent data rates, I wouldn't mess with it.

JR

 
http://en.wikipedia.org/wiki/Resistor–transistor_logic
http://en.wikipedia.org/wiki/Transistor–transistor_logic
http://en.wikipedia.org/wiki/Diode–transistor_logic

Most simple logic is designed around one sex transistor because of the IC process technology they were limited to, but if you mix npn and pnp devices you can do other tricks more easily like pull to both rails and/or tri-state the output.

JR
 
Hello John,

Here's what I've come up with.

discreteANDswitch.jpg


Here's some details on the usage. I have a digital switch controller at the moment, using a GPIO on an MSP430 that pulls up to 3v3. Externally, there's a pulldown switch.
On my product, I have two channels of this, and a button that can "link" control of both channels to CH1.

Therefor, when the "link" button is pressed, I need the output from CH1 to trigger to emulate the button on CH2.


I do this by creating a discrete diode logic AND gate using D1 and D2 in the diagram. If either of them = 0, then R1 pulls the anode of D3 to 3.3V.
If both inputs are 1, then the Anode of D3 becomes 3V3 or thereabouts.
If either input is 0, then the Anode of D3 becomes 0V7 or so.

D3 drops any voltage on it's input(anode) by 0.7V. This makes sure that Q1 doesn't start to conduct when the output is supposed to be logic level 0 (but floating at 0.7V).
This has the negative outcome of making the base of Q1 be 2.6V when DATA and ENABLE are high. That's enough to get the transistor biased though :)

Q2 is a simple inverter, that essentially connects its collector (3V3 through a pullup from the processor) when it's input is high (that is, then Q1 is not saturated)
I'm assuming that when Q2 is not saturated, it's collector looks like a high impedance with respect to ground, and therefor helps the processor input see the 3v3, as the pullup provides.

Any thoughts? Marks out of 10? :)

Cheers

/R
 
Rochey said:
Hello John,

Here's what I've come up with.



Here's some details on the usage. I have a digital switch controller at the moment, using a GPIO on an MSP430 that pulls up to 3v3. Externally, there's a pulldown switch.
On my product, I have two channels of this, and a button that can "link" control of both channels to CH1.

Therefor, when the "link" button is pressed, I need the output from CH1 to trigger to emulate the button on CH2.


I do this by creating a discrete diode logic AND gate using D1 and D2 in the diagram. If either of them = 0, then R1 pulls the anode of D3 to 3.3V.
If both inputs are 1, then the Anode of D3 becomes 3V3 or thereabouts.
If either input is 0, then the Anode of D3 becomes 0V7 or so.

D3 drops any voltage on it's input(anode) by 0.7V. This makes sure that Q1 doesn't start to conduct when the output is supposed to be logic level 0 (but floating at 0.7V).
This has the negative outcome of making the base of Q1 be 2.6V when DATA and ENABLE are high. That's enough to get the transistor biased though :)

Q2 is a simple inverter, that essentially connects its collector (3V3 through a pullup from the processor) when it's input is high (that is, then Q1 is not saturated)
I'm assuming that when Q2 is not saturated, it's collector looks like a high impedance with respect to ground, and therefor helps the processor input see the 3v3, as the pullup provides.

Any thoughts? Marks out of 10? :)

Cheers

/R
Well... you could simplify it somewhat if you just connect your two diodes (D1 and D2) directly to the MPS430 input port, and lose all the transistors, even though they are only $.01, ASSuming one diode drop is read as logic low. Note: you could make diodes out of the transistors if you are trying to use them up. 

You can grade yourself... Just like in life. 8)

JR

 
Rochey said:
By the way, the basic Logic version what I want to do is the SN74AHC240.

Daffyd -- yr own Logic guys have the 74LVC1G125 (active-low output enable) and the 74LVC1G126 (active-high output enable). Itty bitty in the SOT23-5 package and even ittier-bitter in the SC-70 or SOT-553 (the bypass cap is as big as the part!).

Sure as heck beats jigging up a discrete thing.

-a
 
oooh, nanostar package... that'd be a challenge on my soldering skills! Sot-23? no issue.

your right, it'll be easier using single devices, however, my end-goal is to try and make this a project to share on groupdiy.
Folks here are still on thru-hole. Pity really.

I've found the solution I want for now. thank you for your inputs.
 

Latest posts

Back
Top