Level Converter

How can one convert one level to another in the simplest manner?

I have one device that works on 2.5V and another that works on ~5V. The bus is bi-directional so I need to convert both ways.

Actually the 5V device has open collector outputs but the problem is that its not truely open collector since it has a pullup itself. So if I put a

2.5V pullup it's actually larger than 2.5V. Of course I could reduce the resistor pulling up to 2.5V but then it causes the current to go out of spec.

The basic idea is

Vdd Vcc --- --- | | .-. .-. Vdd | | | | --- | |Rd | |Rc ---------o '-' '-' | | -o | ___ | _/ __--o---|---|___|---|---o/ o- GND GND------o Rw Sw1 Sw2

Where everythign after Rw(Vcc, Rc, Sw1) are internal(the parallel port) to the 5v device and everything before Sw2 is internel to the 2.5V(a micro pic).

Sw1 controls the parallel port output state and Sw2 controls the output of the pic. (it's also used as an input in which case Sw2 is set to Hi-Z(middle) and there is a line connected just before it)

Rw is the wire resistance which is significant in this case I believe since I'm actually getting only about 4V instead of 5V(although I haven't checked the parallel port's voltage itself so it might be low already).

In any case, Vdd is the pull I add which is suppose to be about 2.5 volts. In reality what the pic see's is over 3 volts dependon on how I choose Rd. (It has to be alteast 625ohms because Sw1 can only sink 4mA and 2.5V/4mA =

625Ohms.) Rc is suppose to be 4.7kohms or so but no telling what it actually is.

Actually there needs to be a current limiting resistor right after Sw2 in teh case Sw2 is at Vdd and Sw1 is at GND. It too needs to be atleast

625ohms.

In any case I don't see an easy to to convert the levels in any decent way because of the internal pullup ;/ What I was thinking is to use a bjt that is driven by the parallel port... something like

Vdd --- | | |

Reply to
Jon Slaughter
Loading thread data ...
Reply to
Brendan Gillatt

A problem I have with the bjt's(or even mosfets) is that the level is significantly below what I really need. I'm wondering if there is a way to reduce the voltage drop across the transistor to get closer to rail voltage?

e.g.,

Vdd | | +--+| || || +--+|----- | | \\ / \\ R / | GND

Reply to
Jon Slaughter

Maybe theres hope after all. I'm pretty sure it can be done but the problem I'm having with a single mosfet is that the voltage is significantly lower than what I need given that the gate is only about 1.5V above the drain. This means I have to pull up the gate past 5V or so to get practically rail to rail but that means I need another power source(2.5V and 5+V). This is not necessarily the worse thing but I'd like to avoid it if possible.

Reply to
Jon Slaughter

TI has some chips that do exactly this.

John

Reply to
John Larkin

I send a schematic showing my idea to binaries.schematics but there are some issues(the short that exists). Basically there are 4 parts. The parallel port, which is up to the 10ohm resistor(wire resistance). The pullup's for level translation which is the 8V and 2.5V parts. The Pic part which is J1 and everything after it(not sure the actual hardware involved but I modelled it similar to the parallel port(forgot the pullup resistor but in this case it doesn't matter to much). Then theres the read part which starts with Q2. This is only when the PIC part is set for output mode. This occurs only for one of the pins. The other 4 would not have this.

Even if this circuit worked as is(the resistor values were somewhat arbitrary though) it would require 3 power sources. (I might get away with just 2, a 2.5V and a 5V(or 6V even) but this might be risky).

Reply to
Jon Slaughter

Thanks, I'll look into it and see.

Jon

Reply to
Jon Slaughter

The

SN74LVC8T245

Looks pretty cool. Going to get some now. Probably all I need.

Thanks, Jon

Reply to
Jon Slaughter

Look at the level-shifter circuit on page 43 of the I2C specification:

formatting link

This is for bidirectional open-drain / open-collector signals.

Reply to
Andrew Holme
Reply to
Brendan Gillatt

Hehe, I was just reading over that spec last week and glanced over that but forgot ;/ It might work well.

I think though the biggest problem I'm going to have is that under certain circumstances I can end up with a short and I'm not sure how I am suppose to go about preventing any damange(I can, for the most part avoid the short but in some cases I might not). I was thinking about a foldback limiter but still working on the details.

Thanks, Jon

Reply to
Jon Slaughter

This looks like it might solve my problem too ;) The short won't exist because it reverse biases the mosfet ;) Seems like it might be the best discrete solution. The biggest problem is that it requires 2 voltage sources but I can live with that and theres probably no way around it anyways.

Thanks again, Jon

Reply to
Jon Slaughter

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.