Logic Level Shifting from 0-5 V logic to -5 - 5 V logic

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all,
I want to shift logic level of AVR output which is 0-5V to be -5 to 5 V logic. Any suggestion?

Thanx

Deni

There's no such as destiny, there are only different choices.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Pass the signal into an inverter chip, then into half of a MAX232 ? That would give you about -7v to +7v as a starting point.

Maybe clamp the output to 5v using a resistor / zener diode combinations ? Not sure how the MAX232 would feel about this though...

Cheers
Robin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Or see if the device is +10/-10 V tolerant. What are you using it for?

There are pointy haired bald people.
Time flies when you have a bad prescaler selected.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

well, I think its gonna cost to much if i used 232 (so many capacitor there), because there are 10 data to be shifted.
I need this shifting to drive the IGBT. My IGBT driver need plus minus input.
I am thinking about using OpAmp comparator but I am not sure about the OpAmp type I'll use and how to configure it.

Deni

There's no such as destiny, there are only different choices.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmm, there are multichannel versions of MAX232 if it helps.

There are pointy haired bald people.
Time flies when you have a bad prescaler selected.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for all your replies. I've found the solution.
I was using transistor (common emitter mode -> NPN Transistor) before but it wasn't work. After examining, its because the base resistor is to high. After I replace that resistor to the small one then its work. The only problem now is the logic being inverted. Well its simple matter I'll use the inverter before the transistor. Its better solution than use a comparator. The transient of transistor is better than comparator (I use LM311).
Thanks once again.
I'm sorry for being newbie.

Deni

Hungry makes you weak, but sometimes its be the motivation to you to eat.
Have to eat now, this thing makes me forget my lunch. :roll:

There's no such as destiny, there are only different choices.

Last Edited: Sun. Jul 15, 2007 - 05:40 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you hava a negative supply, then you can leave of the MAX232 caps.

If you DON'T have a negative supply then the op-amp or comparator won't work.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

THere are also some Maxim MAX232 lookalikes which don't need external capacitors.... MAX202 if I recall correctly.

HTH
Robin

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

denidoank wrote:
The only problem now is the logic being inverted. Well its simple matter I'll use the inverter before the transistor.
Depending upon your circuit, rather than using an inverter, perhaps you can change the polarity of your transistor (PNP vs. NPN) and change the voltage source being switched (Vcc vs. Gnd).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Exactly, with MAX232 I don't need negative power supply. About MAX202, I never heard that before and I'm not sure about availibility of this component in my rural town. Beside I have negative power supply, so I prefer using single transistor and two resistor.
About PNP transistor, I don't know how to arrange this transistor. Kevin, would you give some drawing how to use PNP transistor?

Thanks all

Deni

ps; I have made some correction on my Jul 14, 2007 - 04:25 PM post (in blue)

There's no such as destiny, there are only different choices.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Invert your output from the micro. Rather than doing it hardware, do it in software.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmm, thats a good one but I have to reverse my logical thinking, sometimes it's make me confuse.

There's no such as destiny, there are only different choices.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

denidoank wrote:
Kevin, would you give some drawing how to use PNP transistor?
Perhaps the text and schematics in this PDF will help: http://techhouse.brown.edu/~dmor...

As a brief summary of the PDF in terms of your proposed inverter need, rather than switching ground with a NPN transistor, you can switch the positive voltage with a PNP transistor where a logic 0 at the base causes the transistor to conduct and a logic 1 at the base turns off the transistor.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Emitter of PNP transistor to VCC, resistor (about 2K) from base to processor output, 1K resistor from base of transistor to VCC, 2K (or so) resistor from collector of PNP transistor to -5 volts.

It's a resistive pulldown, so it's going to have a slow +5 to -5 volt transition, but a rapid -5 to +5 volt transition.

Smaller the collector resistor, the faster the risetime, but the smaller the base resistor needed.

There might be some bipolar level translators out there, not sure. Op amps would be ok, but you'd possibly have the same kind of rise and fall time problems.

Harvey

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And to make the list of suggestions even longer: have a look at the CD4051/52/53.
Vdd to +5V
Vss to Gnd
Vee to -5V
And from there on you can make it inverting, non-inverting etc
Very low-cost, push-pull output and flexible

Nard

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips