# Need help very urgently with DC Level shift Op-amp Circuit

Discussion in 'General Electronics Chat' started by Hasin, Feb 4, 2015.

1. ### Hasin Thread Starter New Member

Feb 4, 2015
7
0
Hi, there.
I need a help on how to figure out and build a DC level-shift circuit. Basically I have voltage supply range between (11-18V) and I want to shift it down to (0-7V) and amp/attenuate that to (0-3.3V) ADC.
I'm totally new to this and have no idea how to design the circuit and which Op-amps, Resistors, Capacitors..etc I should use.
So, simply I looking for a circuit design that can shift the voltage level ranges (11-18V) down to (0-3.3V) ADC.

Thanks

2. ### MikeML AAC Fanatic!

Oct 2, 2009
5,451
1,066
Why a two step reduction?

What supply voltages do you have available?

How stable are the supplies? (Shifting implies subtracting a fixed voltage, but the fixed voltage has to be as accurate and stable as the ultimate measurement you are making with the ADC).

3. ### Hasin Thread Starter New Member

Feb 4, 2015
7
0
It doesn't have to be in two steps reduction. It can be basically linearly shifted from (11-18v) DC supply to (0-3.3V) ADC.
The supply voltages are 11-18V rages.
I'm not sure if i understand the stable part well. however, I'm basically using a 12V Wall wart to power my block. but the wall wart rage is in between (11-18V) and that's what I want to shift it down to (0-3.3V) to ADC.

Thank u

4. ### WBahn Moderator

Mar 31, 2012
18,093
4,920
Is the intent to be able to measure what the supply voltage is with the ADC?

5. ### Hasin Thread Starter New Member

Feb 4, 2015
7
0
It is a voltage sense circuit what i need to build. the changes in ranges between (11-18V) will be reflected on the (0-3.3V)ADC. For example, 11V corresponds to 0V, 14.5V corresponds to 1.65V, and 18 corresponds to 3.3V.

So, in other words I need a circuit that can take (11-18V) as inputs and spits out (0-3.3V) as outputs. This can be done using DC level shift methods.

6. ### WBahn Moderator

Mar 31, 2012
18,093
4,920
Do you have bipolar supplies available to your shifting circuit?

Feb 4, 2015
7
0
No

8. ### WBahn Moderator

Mar 31, 2012
18,093
4,920
What kind of accuracy/precision/resolution do you need (notice the use of the word "need" and not "want")?

9. ### Hasin Thread Starter New Member

Feb 4, 2015
7
0
It needs to be high accuracy possible within mV.

10. ### WBahn Moderator

Mar 31, 2012
18,093
4,920
Why on earth are you using a wall wart that walks over a 7V range to power something that you need a voltage accuracy of a millivolt? That's like using a chainsaw to cut something that you need to the nearest mil.

Lundwall_Paul likes this.
11. ### wayneh Expert

Sep 9, 2010
12,403
3,252
Because it's very urgent.

12. ### ronv AAC Fanatic!

Nov 12, 2008
3,404
1,495
The problem is the "few millivolts". If you think about it just a couple of resistors could easily give you a 50 mv error.
What will you use the A to D reading to do? You may have better accuracy with a smaller DAC range and fewer parts.

13. ### GopherT AAC Fanatic!

Nov 23, 2012
6,330
4,080
Assume true rail to rail output, you could do this

14. ### MikeML AAC Fanatic!

Oct 2, 2009
5,451
1,066
This is what it takes in theory:

In practise, the opamp must be capable of driving its output within mV of its Vss pin. Only a few opamps can do this.

The 5.200V reference voltage must be very precise. A 1mV change causes a -1mV error at the AD input. You could make the reference voltage using a TL431 adjustable Zener.

Here is a way of doing it with a 5.00V reference.

Last edited: Feb 5, 2015
Hasin likes this.
15. ### MikeML AAC Fanatic!

Oct 2, 2009
5,451
1,066
The circuit cannot be ac-coupled.

16. ### Hasin Thread Starter New Member

Feb 4, 2015
7
0

Thank you so much...This is works just perfect. I wonder how you got the values of the resistors and which equations and calculations did you use?
thanks

17. ### MikeML AAC Fanatic!

Oct 2, 2009
5,451
1,066
You could find the required gain and offset. Then to create that using the opamp stage, you can solve some simultaneous equations in several unknowns to find the resistors.

I did it by trial and error using LTSpice as a calculator. I just played with the resistors and the offset voltage to get the function to fit at the end points. I've done this before, so I can get it to converge pretty fast... LTSpice has an easy way of selecting standard 1% resistor values.

A lot of uProcessors that have an onboard AD converter have a pin where the AD's internal reference voltage can be exported off the chip. You might be able to redo my circuit using only the AD reference voltage (3.3V?), which would mean that the level shifter is ratiometric with respect to only the AD reference voltage, reducing thermal drift and improving accuracy.

Last edited: Feb 5, 2015
18. ### Hasin Thread Starter New Member

Feb 4, 2015
7
0

I have a question:
How I'm supposed to connect the diode in the circuit. From data sheet the diode has three pins (Cathode, Anode, and Ref) how are theses pins connect on the circuit. Also, for the 5.2 Voltage Reference, should I provide that as a voltage supply input into the zener diode, or does the diode itself creates the voltage reference?