Op-Amp Level Shifting Circuit

Thread Starter

fedezampe

Joined Sep 28, 2020
8
Hi all,

I have an input signal ranging from 0.326V to 3.3V and I need to amplify and shift it so that the output will swing between 0-10V. How can I achieve that using an opamp, please? I know I could do that with a level shifting circuit but I can't figure out how to calculate resistor values.

Any help is much appreciated

Thanks!
 

Ian0

Joined Aug 7, 2020
8,966
This is the circuit that you need:
Screenshot from 2023-03-25 12-42-16.pngBearing in mind that Vin_m is equal to input. It is just a matter of Kirchhoff's laws and two simultaneous equations.
(Input-Output)/R2+input/R3+(input-3.3)/R1=0 for two cases where Output=10V and input=3.3V and for when Output=0V and input=0.326V.
Hint: the algebra goes more easily if you use conductances instead of resistances and substitute x.G for x/R
 

crutschow

Joined Mar 14, 2008
33,368
Depending upon your accuracy requirements, you may want to make V1 the same as the op amp supply (as needed to get 10V out from the amp).
 

Papabravo

Joined Feb 24, 2006
20,623
There is a linear transformation, in the form of an equation for straight line, that will do the job. Once you figure that out you can implement in at least two different ways.
 

Thread Starter

fedezampe

Joined Sep 28, 2020
8
Hi all,

Thank you very much for your replies.

I have tried the solution that Ian0 proposed and simulated it. It is somewhat working, unfortunately though the output can only reach about 5V. I'm not sure where the problem might lie, I've also tried to increase V1 as advised by crutschow but instead the behaviour became even worse. The calculations, circuit and simulation are attached. Can you show any major issue, please?

Thank you for your help!

1679757170342.png
1679757177778.png

LevelShifter.jpg

levelshifter1.jpg

This is the circuit that you need:
Bearing in mind that Vin_m is equal to input. It is just a matter of Kirchhoff's laws and two simultaneous equations.
(Input-Output)/R2+input/R3+(input-3.3)/R1=0 for two cases where Output=10V and input=3.3V and for when Output=0V and input=0.326V.
Hint: the algebra goes more easily if you use conductances instead of resistances and substitute x.G for x/R
 

Ian0

Joined Aug 7, 2020
8,966
It usually takes me a few goes to eliminate all the errors!
As a reality check, the gain is equal to 1+(R3/(R1||R2) and that should equal 3.36.
 

crutschow

Joined Mar 14, 2008
33,368
I don't have the patience to go through your calculations, but below is the simulation using the values I determined:
I try to avoid simultaneous equations, so I calculated the values using the four steps listed.
I hid the values for R2 and R3, but show a starter value for R1 that you can use for the rest of the calculations, if desired.
(I didn't have the op amp model for the one you show, so I used a rail-rail op amp model I have).

1679764905651.png
 
Last edited:

Thread Starter

fedezampe

Joined Sep 28, 2020
8
It usually takes me a few goes to eliminate all the errors!
As a reality check, the gain is equal to 1+(R3/(R1||R2) and that should equal 3.36.
Just found out I had mistakenly swapped R2 and R3 when building the circuit. This actually works as expected, thank you bery much, you saved my day.

All the best

1679766291162.png
 

Thread Starter

fedezampe

Joined Sep 28, 2020
8
I don't have the patience to go through your calculations, but below is the simulation using the values I determined:
I try to avoid simultaneous equations, so I calculated the values using the four steps listed.
I hid the values for R2 and R3, but show a starter value for R1 that you can use for the rest of the calculations, if desired.
(I didn't have the op amp model for the one you show, so I used a rail-rail op amp model I have).

View attachment 290685
crutschow, thanks for providing this for me, I have finally managed to get my circuit to work.
Thanks for all your help.

All the best
 

Ian0

Joined Aug 7, 2020
8,966
The ability to estimate an approximate answer if a very useful skill to learn, almost (but not quite) as important as being able to calculate the exact answer. If the calculated exact answer doesn't look like the estimate you know to check the calculations again.
 
Top