Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

negative to positive level shifting 2

Status
Not open for further replies.

keystrike

Electrical
Aug 26, 2008
3
Ok here we go, for very complicated reasons I don't want to explain, here is my setup: I have a 68hc12 that needs to talk to a digital resistor chip over SPI.

Microcontroller: Gnd: 0V Vcc: 5V
dig resistor : Gnd: -5V Vcc: 0V


So as you can see I need to level shift into the negative voltage range. I was thinking about using pulldown resistors, however I would also need to put a resistor in series from the MCU to the dig resistor. Does anybody know of some level shifting chips I might be able to use in order to make this happen? Thank u very much.
 
Replies continue below

Recommended for you

Yeah I would just look at those.

The key thing with optocouplers is to look at the TRANSFER RATIO. That is of key importance. You will never get more than that thru the transistor.

In your case you want to pay attention to the switching delays too. Rise time and fall times as all optos have them. You don't want your SPI frequency to exceed about 1/3 the time alloted: 1/3 rise 1/3, at level, 1/3 drop.


Keith Cress
kcress -
 
What I have done in the past is to use a common base connected PNP transistor.

Drive the emitter through a resistor from the 0 to +5v signal source, and connect a pullup resistor of similar or slightly higher value from the collector down to -5v.

This circuit will be non inverting, it just level shifts, so a further refinement is to capacitively couple direct from one level (signal input) to the other level (signal output). The capacitor makes for very fast edges without introducing significant transmission delays, and the transistor, maybe even a slow transistor, handles the dc shifting function, so it works right down to continuous dc,

This circuit is fast, cheap and simple.

 
An excellent way to do this voltage translation is to use an HC4053 device. This will translate three lines. Basically you connect Vcc to +5, Vee to -5 and of course gnd to gnd. Your 0-5V logic controls the analog switch control inputs (usually labeled A, B, and C). Then hook the X inputs to GND and the Y inputs to -5V. Then the common lines are your output to your digital resistor, switching from 0V to -5V. You can invert the output polarity if needed by switching the X and Y inputs as well. Cheap and effective, HC4053 are usually about 50 cents in small quantities. For higher switching speeds, you can use the VHC variants, but the standard HC4053 should be able to switch at >5MHz. No pullups or pull downs required. You will need to evaluate your prop delays if your switching speeds are high.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor