# 0~12V to 0~5V level shifter

Discussion in 'General Electronics Chat' started by tpny, Dec 20, 2012.

1. ### tpny Thread Starter Member

May 6, 2012
216
0
Output from op amp is 0~12V. I want to feed this signal into a 0~5V input adc. I guess a voltage divider, fet transistor, or op amp might fill the task.. But what would you recommend? Thank you!

2. ### ScottWang Moderator

Aug 23, 2012
6,373
987
12V → 7K+5K(Voltage Divider) + 5.1V Zener(To GND) → Op Amp Voltage Follower → Vout 0~5V.

nepdeep likes this.
3. ### WBahn Moderator

Mar 31, 2012
23,093
6,946
Depends on a few other issues that you haven't given any info on. Without any further info, my first thought would be a resistive voltage divider.

4. ### tpny Thread Starter Member

May 6, 2012
216
0
Do you put a resistor between zener and ground?
Will Vout see 5.1V?

5. ### t06afre AAC Fanatic!

May 11, 2009
5,939
1,227
I would have skipped the zener. And just used the voltage divider. Perhaps with a pot for fine tuning. But the using an OPAMP before the ADC input is a good idea

6. ### nepdeep Active Member

Sep 14, 2011
140
0
What is the reason you are using zener...and very odd value of zener....the voltage across the resistors in total would be (12-5.1)=6.9[V]...bit consufest

7. ### ErnieM AAC Fanatic!

Apr 24, 2011
7,953
1,824
Many times an input will have diodes for ESD protection and these may also serve for other input over voltage event protection. Here with a resistive divider it is simple to calculate how much current a given over voltage will drive into the input, and this can be checked to insure it is something safe.

When trying to achieve some level of precision using a Zener is not recomended due to the unknown leakage currents thru the device even when below the Zener voltage: these things leak current and usually are not required any way.

8. ### t06afre AAC Fanatic!

May 11, 2009
5,939
1,227
http://www.datasheetcatalog.org/datasheet2/3/074g7qee7jr0tgehc1k7j342htcy.pdf
The figure 9 and in this datasheet is quite explaining. Note how much sharper the curve is for the zeners around 7 volt and above.

9. ### ScottWang Moderator

Aug 23, 2012
6,373
987
Sorry about the Zener, in the begining that I just want to protect the input side for the op Amp, but I forgot the Zener will regulate the input Volt of Op Amp to 5.1V.

So I move the 5.1V Zener to the Input of ADC.

12V → 7K+5K(Voltage Divider) → Op Amp Voltage Follower → 5.1V Zener(To GND) → Vout 0~5V → ADC

The reason why I move the 5.1V Zener to the input of the ADC, the first reason is to protect the ADC, because almost the Op Amp Vout won't output the Voltage over 5V, when it got the chance to over 5.1V, , because the current not very much, probably it won't damage the Zener, and the ADC is more expensive than a op Amp, if the ADC is inside the Mcu, then it will protect the Mcu.

10. ### tpny Thread Starter Member

May 6, 2012
216
0
My understanding is when you put a 5.1V zener in front of an ADC, the ADC can still see 5.1V isn't it? Why do you say 5V? Thanks!

Yes, I do need to clip the input voltages in front of ADC. Should I use zener or 2 regular diodes (1 to clip > 5V inputs, the other to clip < 0 inputs). Thanks.

11. ### WBahn Moderator

Mar 31, 2012
23,093
6,946
If the output of your opamp never goes outside the 0V to 12V range and you use a properly set voltage divider, then the voltage at the input of the opamp will never be outside the 0V to 5V range.

A common practice is to put small signal diodes between the input and the supplies such that they become forward biased if the input voltage goes outside that range. This will clip the voltage to be no more than one diode drop outside the range. Almost all I/O pads contain similar protection structures internally.

12. ### tpny Thread Starter Member

May 6, 2012
216
0
Could you give a part number example of this kind of diode? Thanks!

13. ### ScottWang Moderator

Aug 23, 2012
6,373
987
If the 12V is really fixed 12V, when 12V pass through the 7K+5K voltage divider, the V_5K will never over 5V, so the Vout of Op amp also never over 5V, And the 5.1V zener will clip the Input of ADC on 5.1V, but it won't affect the Vout of OP Amp when the Vout in the range 0~5V.

So normally this should be OK.
12V → 7K+5K(Voltage Divider) → Op Amp Voltage Follower → 5.1V Zener(To GND) → Vout 0~5V → ADC

But when you want to use the Zener that you should measure it first, because the Zener have a range may not fixed on 5.1V, you can't use a zener ≦ 5V.