J
Jon Slaughter
Guest
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
---
|
|
|
<| ___
|-o-|___|-o--- Parallel Port
/|
|
|
PIC ----o-----+
|
.-.
| |
| |
'-'
|
GND
I'm not sure if this is the best solution though. (Its not the complete
circuit and there are a few other issues but I think they are minor)
Just seems like a mess and I'm trying to find the best solution I can that
uses the least amount of components.
There are 4 lines and all our input(w.r.t to the pic) except one which is
input and output.
So what I really need is 3 5V to 2.5V level translators and 1 5V to 2.5V and
2.5V to 5V.
I suppose what would be nice is there was a device that translated between
two voltage levels with bidirectional capabilities? I was hoping I could get
away with just using resistors but this doesn't seem to be the case ;/
Maybe theres something easier that I'm overlooking or maybe my idea with the
BJT's won't work well?
Thanks,
Jon
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
---
|
|
|
<| ___
|-o-|___|-o--- Parallel Port
/|
|
|
PIC ----o-----+
|
.-.
| |
| |
'-'
|
GND
I'm not sure if this is the best solution though. (Its not the complete
circuit and there are a few other issues but I think they are minor)
Just seems like a mess and I'm trying to find the best solution I can that
uses the least amount of components.
There are 4 lines and all our input(w.r.t to the pic) except one which is
input and output.
So what I really need is 3 5V to 2.5V level translators and 1 5V to 2.5V and
2.5V to 5V.
I suppose what would be nice is there was a device that translated between
two voltage levels with bidirectional capabilities? I was hoping I could get
away with just using resistors but this doesn't seem to be the case ;/
Maybe theres something easier that I'm overlooking or maybe my idea with the
BJT's won't work well?
Thanks,
Jon