Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Discrete bi-directional level converter for Tri-state devices?

Status
Not open for further replies.

()blivion

Active Member
Just as the title suggests. I'm looking for a good discrete bi-directional level converter for Tri-state devices. I am already aware of the very common FET version, and to my knowledge it does not work well with truly Tri-state logic. And of course I am aware of the level converter chips floating around. I would prefer a BJT solution that's also simple if at all possible. It should also be automatic in it's conversion task. (i.e., no direction choosing line) Thanks.

(I have STFW, many a times, so chill k)
 
Just as the title suggests. I'm looking for a good discrete bi-directional level converter for Tri-state devices. I am already aware of the very common FET version, and to my knowledge it does not work well with truly Tri-state logic. And of course I am aware of the level converter chips floating around. I would prefer a BJT solution that's also simple if at all possible. It should also be automatic in it's conversion task. (i.e., no direction choosing line) Thanks.

(I have STFW, many a times, so chill k)
Why do you want a discrete BJT solution?
 
. . . . Personal Preference.


_______________________________________________________
Edit: Deleted irreverent information and got right down to brass tacks.
 
Last edited:
Hi. Try this one:
 
Hey thanks. But that has an enable line and I don't really want that. Also, that is one direction only and I needed Bi-directional. (which is why it's such a hard find) But nice try, thanks again. (Edit: one could easily take out the AND gates to make it not have the enable line of course)

I'm thinking what we need is something like a "2 input dual voltage level latch with hysteresis".
 
Last edited:
Just as the title suggests. I'm looking for a good discrete bi-directional level converter for Tri-state devices. I am already aware of the very common FET version, and to my knowledge it does not work well with truly Tri-state logic. And of course I am aware of the level converter chips floating around. I would prefer a BJT solution that's also simple if at all possible. It should also be automatic in it's conversion task. (i.e., no direction choosing line) Thanks.

(I have STFW, many a times, so chill k)

Can you post the FET version? Then we can look at how it does it's job and translate it's operation to BJTs and try to fix it's deficiencies.
 
OK, sounds reasonable and only fair. It's the most common and well known one though. (at least I thought it was common knowledge :/ ) It was originally by Phillips/NXP for I2C bus usage. It's one spark fun does a lot too. Also published on www.rocketnumbernine.com. Really a google search for "FET bidirectional level converter." is all you need for the schematic. And you WON'T find a BJT version.

View attachment 64313

Edit: I am aware that this is *NOT* intended for Tri-state. Is for open drain/collector.
Edit2: And I don't know why this picture is so small. Clicking on it blows it up proper.
 
Last edited:
Hey thanks. But that has an enable line and I don't really want that. Also, that is one direction only and I needed Bi-directional. (which is why it's such a hard find) But nice try, thanks again. (Edit: one could easily take out the AND gates to make it not have the enable line of course)

I'm thinking what we need is something like a "2 input dual voltage level latch with hysteresis".
Hi. If you are little bit creative, it's not hard to combine two of those circuits to make it bidirectional.

Are you thinking on those analog ones, that act more like a physical switch?
 
Last edited:
I would be interested to see ANY bidirectional tristate level converter which works without a direction select input. It seems to me that, in the absence of direction select, it will latch up.
 
Hi. If you are little bit creative, it's not hard to combine two of those circuits to make it bidirectional.

Your talking about the circuit that you posted right? If so, I have tried combining circuits just like that once or twice before. It ended in failure. I think it's because BJT's are current controlled, where FET's are voltage controlled. So... how would you do it exactly?

What always ends up happening to me is I create a circuit that just sticks in one state or the other. Which basically is "a latch" in reality, but it can't be reset with a new signal like I want. You instead have to power it down and back on to reset, which is nonfunctional in practice. When I try fixing that problem I then end up building a circuit that has the transistors biased in the analog region. Then it starts getting too hot and dividing the voltage creating illegal logic. It's a tricky balance and I haven't been able to get it right just yet. This is why I think some hysteresis would be helpful. I think my biggest problem is that BJT's are current controlled transistors and not voltage controlled transistors like FET's are. That and I'm not using a simulator.

Are you thinking on those analog ones, that act more like a physical switch?

Do you mean the "solid state relay" circuit or analog multiplexer circuits? Like ones that are in IC's like the 74HC4052D or 74HC4067? If so then no, I don't really need to pass an analog voltage from one side to another. Though if there is something in those type of circuits that will aid with this project that would be interesting. Let me know what your thinking.
 
Last edited:
I would be interested to see ANY bidirectional tristate level converter which works without a direction select input. It seems to me that, in the absence of direction select, it will latch up.

That is the problem. I think it can be done *IF* each state of the level converter output is week enough to be overridden by the logic devices output. It would require analog circuit design and better current source/sinking of the logic's than the level converter. But I'm sure it can be done.
 
Last edited:
That is the problem. I think it can be done *IF* each state of the level converter output is week enough to be overridden by the logic devices output. It would require analog circuit design and better current source/sinking of the logic's than the level converter. But I'm sure it can be done.
If you want fast transition times, the converter's outputs have to provide enough current to drive the (sometimes) considerable capacitance of a bus. This conflicts with the need to be weak.
Besides, if the converter latches, the bus is technically no longer tri-state, although I suppose that doesn't matter, so long as the the other drivers on the bus can overpower it.
Maybe a driver could be designed with high transition current capability, but weak logic level holding capability. I'll think on it, unless i get bored. :D

Also - how much propagation delay can be tolerated? And you might want to address transition time requirements, while considering capacitive load.
I'm guessing you have a bet that this can be done. Why else would bipolar be so important to you?
 
If you want fast transition times, the converter's outputs have to provide enough current to drive the (sometimes) considerable capacitance of a bus. This conflicts with the need to be weak.

Let's aim for a short distance point to point two device bus for now, just to flesh it out. But indeed, I do want to have some good fanout in the end.

if the converter latches, the bus is technically no longer tri-state

Right, I didn't think about that actually. It may matter, IDK. The devices outputs are Tri-state, but the bus doesn't necessarily have to be I guess. Though if that was the case, one could just cheat and do 0=sink-to-gnd 1=high Z and ignore sourcing ability all together. Then you would have a normal open drain/collector bus. But if like you said, the converter output state can just be ignored when a receiver is high Z, and/or they can be driven by any other output just the same, then who cares I guess. A high Z state would be nice though. It depends on if someone can poll the bus for "not in use" state by detecting a high Z condition or not. I wouldn't know how to do that with a MCU myself. We can go with "it doesn't matter" for now I guess.

Maybe a driver could be designed with high transition current capability, but weak logic level holding capability.

I like that idea a lot. Maybe something like a tank capacitor parallel to a holding resistor? This way the rise/fall will have a high current spike from the cap, but the actual holding will be be week. Just wondering if it would end up being extremely frequency dependent because of this :)/). . . Hummm. . . . . Assuming the rise/fall times are constant and independent of the pulse length of a bit and we can short the cap to the supply when it's not latched into use. . . Then I don't see a problem.

Also - how much propagation delay can be tolerated? And you might want to address transition time requirements, while considering capacitive load. I'm guessing you have a bet that this can be done. Why else would bipolar be so important to you?

As fast as possible. . . (^_^) I would go full on ECL if I could.
(Also, going and buying some small FET's just for this project would make all the hundreds of small BJT's I already own jealous.)
 
Last edited:
Hi again.

I'm a bit struggling to see the obvious problem I think. Your circuit going hot you said? Can we have a look at that circuit if you have?

Have you considered the problem having to outputs on the same wire? Wich configuration is to be found in the other end of the wire? Open collector? What about impedance? Have you considered just inserting a resistor between outpput/input to prevent any overload in the case of two connected outputs having oposite logic level?
 
The problem is a challenge. I think it's mostly going to be for niche use, or it may even be completely useless IDK. But it is as stated below.

"Can we make a BJT circuit that will attach two or more Tri-state I/O devices with two different voltage levels, and still be able to do bi-directional communications passively"

The best I have been able to do is zener diodes (or several normal diodes) as voltage limiters, then buffer resisters on the I/O's like so.

View attachment 64346

But this requires a 5 volt device that sees 3.3 volts as logic high. And some 5v devices absolutely hate this and will refuse to work or even burn up if you try. At first it seems like you should only need to simply amplify the 3.3v signal. But try it and you get a whole bunch of other problems in on top of the first one. At least from what I have seen, It's mostly problems with latch up a Roff has suggested. Also of note, and strictly speaking, the above circuit is not "true High-Z" capable since forward biasing the zener has a relatively low resistance to ground. But it is "Logically High-Z", which is close enough for practical use. And one can play with the resistors to tune it even farther when needed.

Another different way to go about doing things, is if you have a 3.3 volt logic device that is also 5 volt tolerant. But doing that is cheating. You don't even need anything to convert levels at all, just buffer resistors to save the outputs if and when both a high and a low exist on the bus wire at the same time. Plus not all 3.3 volt devices are 5 volt tolerant. But.... I don't make the rules I just break them.

Have you considered the problem having [two] outputs on the same wire?

I think your speaking of "bus contention"? Yeah I though about it, all I/O's would either have to have resisters on them to make them have infinite short circuit sink/source time. Or there would have to be some kind of synchronization system that completely prevents such a state from ever happening. I do not like the idea of doing some kind of synchronization, as it's more complex and defeats the purpose of the project. It would be better to do the fist circuit you posted as is. So resistors seem to be the better way to go.

View attachment 64341

Above is a picture of a starting point schematic I guess, since that's what every one seem to want. It should look familiar, being a modification of the one you posted for me. Like I had said, there was no set in stone schematic and no particular project that needs this. It would be a nice niche circuit to develop and I could definitely put it to good use.
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top