Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

[SOLVED] +-12V to 0-5V Level Shifter

Status
Not open for further replies.

lincomatic

Newbie level 4
Joined
Jan 5, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,311
What's the best way to level shift a signal with a +/-12V voltage swing to 0->5V?
Many thanks in advance.
 

KerimF

Advanced Member level 4
Joined
May 17, 2011
Messages
1,461
Helped
374
Reputation
756
Reaction score
370
Trophy points
1,363
Location
Syria
Activity points
12,314
Did you consider using an FET?
 

lincomatic

Newbie level 4
Joined
Jan 5, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,311
Did you consider using an FET?
Yes, I've seen some FET level shifter circuits, but none that can handle conversion of a +- voltage swing to +.
Can you tell me how to do it? Thanks.
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,020
Reputation
4,156
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377
A N mosfet with the source connected to the gnd and a resistor from the drain to the +5v.
Connect the input in the gate, when +12 the mosfet will turn on and the drain will output 0, when the input is -12 the mosfet will turn off and the drain resistor will work as a pullup and the output will be 5v.
You never mentioned the rate of the pulses, if the speed needs to be high then you may also need some mosfet driver for fast switching.

Alex
 

lincomatic

Newbie level 4
Joined
Jan 5, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,311
A N mosfet with the source connected to the gnd and a resistor from the drain to the +5v.
Connect the input in the gate, when +12 the mosfet will turn on and the drain will output 0, when the input is -12 the mosfet will turn off and the drain resistor will work as a pullup and the output will be 5v.
You never mentioned the rate of the pulses, if the speed needs to be high then you may also need some mosfet driver for fast switching.

Alex
Thanks for the reply! Sorry, I forgot to mention that it needs to be fairly linear, because the 0-5V is going into an 8-bit ADC. The signal I need to be able to discriminate among approximately -12/-6/-3/0/+3/+6/+12 with a 1KHz signal.
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,020
Reputation
4,156
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377
Use a differential amplifier

DiffAmp.jpg

If you apply an offset of 12v and set the gain to 1/5 then the (+12 to -12)+12 offset x1/5 will give 0-4.8v

Alex
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,020
Reputation
4,156
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377
This is the schematic and the result, blue is input +-12 (to test I have used a sinusoidal 24v p-p), and red is the output (0-4.8v)

Differential-+-12-to-5.gif

Alex
 

dick_freebird

Advanced Member level 5
Joined
Mar 4, 2008
Messages
6,912
Helped
2,024
Reputation
4,052
Reaction score
1,864
Trophy points
1,393
Location
USA
Activity points
55,356
I expect an old RS-232 - TTL interface chip would do nicely, if this
is a digital application. I bet TI and National still make them.
 

lincomatic

Newbie level 4
Joined
Jan 5, 2011
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,311
This is the schematic and the result, blue is input +-12 (to test I have used a sinusoidal 24v p-p), and red is the output (0-4.8v)

View attachment 58195

Alex
I hooked it up exactly that way, except that I used 10K/50K. What's a good rule of thumb for picking the resistor values for these kinds of op amp circuits? And can you tell me what software you used to create the diagram? Thanks again.
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,020
Reputation
4,156
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377
You can use any simulator to get the same results, the one in my picture is proteus.
I didn't use the specific values on purpose, I have just used a 5/1 ratio, a higher resistance (50K/10K) will increase the input resistance which would help if you have a source with a high output impedance but other than that I can't guide you which values to use or the proper way to choose them.

Alex
 
Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top