# Using voltage divider with appropriate resistor calculations to give +/-1V signal a 1.65V level shift

simulate this circuit – Schematic created using CircuitLab

I am trying to use this circuit to level shift V2 which is +/-1v to 0.65 to 2.65V, pretty much adding a 1.65v offset, and I have V1 a 3.3V source to work with. I know my calculations to set resistor values are wrong but I am not sure how to fix them.

I chose an arbitrary value of 10k for R1, and then I thought that R2||R3 should be equal to R1 because if I were to replace R2 and R3 with a single equivalent resistor Rx it would be in parallel with R1 for a voltage divider based on a Thevenin equivalent. Since I am only going from 2vpp to 2vpp, or a ratio of 1/1 I thought then R2||R3 = 10k = R1. So I again chose a value of 10k for R2 to solve for R3 but I got -9k for R3 which doesn't work.

Simulating the circuit At 0V input my output is only 1.06V when it should be 1.65V.

• You would need a virtual ground for V2 if you just want to superimpose the two sources. A better solution is to use an operational amplifier to achieve the level shift. See this answer for reference electronics.stackexchange.com/questions/30719/… Commented Nov 16, 2020 at 6:25
• Lombo, your calculations are showing you that it cannot be done the way you are trying. With a 10k source impedance (R1), I get R2 = 20k and R3 = -20k to get the range you want. Note the minus sign. So your solving that resulted in a negative resistance was pointing you in the right (but impossible) direction. Your output range will have to be smaller than your input range. But it's not. So you are stuck. Besides, with typical 2% ranges for the resistors, you probably wouldn't get the precision you want, regardless. (May also be a problem for an opamp solution.)
– jonk
Commented Nov 16, 2020 at 9:35
• I see now that to solve this I will need to add an op amp and revise the circuit. Commented Nov 16, 2020 at 20:02

Assuming you have only a 3.3V supply you'll have to offset the input before it gets to an op-amp input, otherwise there is no way to make it work without a negative supply.

This can be made easier by finding the fictional input voltage that corresponds to 0V at the output, then you can calculate the input divider without regard to gain, then use the op-amp to restore the gain of 1.0.

I can tell you that it's possible to do with two 10K and two 20K resistors, and an op-amp.

It could also be done with a few resistors and a TLV431 if you don't care about output impedance.

As you've discovered, keeping the same dynamic range ($$\2\:\text{V}\$$ here) -- input to output -- with resistors as in this arrangement isn't possible. It's not difficult to see why:

simulate this circuit – Schematic created using CircuitLab

The two schematics are equivalent. Looking at the right side, $$\V_\text{TH}\$$ is a fixed value. Imagine the two resistors as a long board with a marked point along the board where OUT is located and that one end of the board is screwed into a wall at a height of $$\V_\text{TH}\$$, using a hinge to secure it. Then imagine that you move IN up and down through a swing of $$\2\:\text{V}\$$. I think you can readily see that the swing of OUT must be less than this. But you want it to be the same. It's just not going to work.

You will need an active device of some kind. If you want to keep a single-rail $$\3.3\:\text{V}\$$ supply, then you will need some voltage gain to get back what you will lose with the resistors. And also as Spehro mentions, you will need to make sure that the input signal to the opamp is within range where its inputs can operate. (Essentially, this means above ground somewhere, at its lowest point.)

There are other issues that you haven't properly grappled with, even given the above. Resistors come with tolerances. So even if you use a resistor network to translate the input voltage up into the input range of the opamp, you will be applying gain to that and the resistors will only be able to present a range of uncertainty.

So let's go with your approach, but accept a lower dynamic range at the output and also a dynamic range that is entirely above ground. (Even with a rail-to-rail input opamp you will need to get the input somewhat above ground.) So let's pick $$\162.5\:\text{mV}\$$ to $$\662.5\:\text{mV}\$$ for OUT ($$\\frac14\$$th the dynamic range of IN and where a gain of 4 would restore your desired output values.) Keeping $$\R_1=10\:\text{k}\Omega\$$, find $$\R_2=20\:\text{k}\Omega\$$ and $$\R_3=4\:\text{k}\Omega\$$. This achieves the desired output range.

But suppose you use 2% resistors? Then the output range will instead be anywhere from a larger dynamic range of $$\147.1966\:\text{mV}\to 678.97848\:\text{mV}\$$ to a smaller dynamic range of $$\178.26476\:\text{mV}\to 646.18386\:\text{mV}\$$. If you apply a fixed gain of 4 to this, you would wind up with anything from $$\589\:\text{mV}\to 2.716\:\text{V}\$$ at one extreme to $$\713\:\text{mV}\to 2.585\:\text{V}\$$ at the other extreme. And that's assuming your gain-setting for the opamp is an absolutely perfect 4.0000 (which it won't be.)

So what are your specifications for the output? Seriously. How accurately do you need to make this shift?