# Help me modify this level-shifting circuit

I want to modify this circuit to output a 0-5V triangle wave. It is currently configured to level shift a 5-10V triangle wave to +/- 10V (for use in other parts the circuit), and the triangle wave output is taken from a voltage divider to give +/-5V. Also, I will be using 12V power instead of 15V in the new circuit. I haven't found any easy-to-understand tutorials on how to do this yet.

(source: staticflickr.com)

• You might want to provide the $\pm$ rails you are supplying the opamp, rather than making us assume anything there. And the actual opamp you are using, too. Just to be complete. It's not entirely required though. But it would lend towards a better answer. – jonk Jan 27 '17 at 20:44
• The op-amp is TL072 and the rails are +/-15V, although I want to use +/- 12V in the new circuit – Jon Jan 27 '17 at 20:54
• So you only want to add an -5V offset to the original 5 to 10V signal? – auoa Jan 27 '17 at 21:11
• If you want a +/- 10V output just get rid of R9 and R10 as they are halving the output from the opamp or just take the output directly from pin 14 – JIm Dearden Jan 27 '17 at 21:14
• I see, my mistake - reduce +15V in to +10V - output will be 0V to +10V, then divided in two by R9/R10 to 0 to 5V. – JIm Dearden Jan 27 '17 at 21:32

I decided to keep $R_{22}$ at the same value, along with the output divider resistors. Just changed $R_{17}$ and $R_{21}$ and assumed a new rail voltage for the pair.

simulate this circuit – Schematic created using CircuitLab

You can refer to an answer I made elsewhere to see how to make the calculation for those two resistors. It's here. So you can do your own computation if you like.

\begin{align*} R_{17} &= \frac{20\:\textrm{k}\Omega\cdot\left(10\:\textrm{V}-5\:\textrm{V}\right)\cdot\left(0\:\textrm{V}-12\:\textrm{V}\right)}{0\:\textrm{V}\cdot\left(\left(10\:\textrm{V}-0\:\textrm{V}\right)-\left(10\:\textrm{V}-5\:\textrm{V}\right)\right)-5\:\textrm{V}\cdot 10\:\textrm{V}+10\:\textrm{V}\cdot 0\:\textrm{V}}=24\:\textrm{k}\Omega \\ \\ R_{21} &= \frac{20\:\textrm{k}\Omega\cdot\left(10\:\textrm{V}-5\:\textrm{V}\right)\cdot\left(12\:\textrm{V}-0\:\textrm{V}\right)}{12\:\textrm{V}\cdot\left(\left(10\:\textrm{V}-0\:\textrm{V}\right)-\left(10\:\textrm{V}-5\:\textrm{V}\right)\right)-5\:\textrm{V}\cdot 10\:\textrm{V}+10\:\textrm{V}\cdot 0\:\textrm{V}}=120\:\textrm{k}\Omega \end{align*}

The output of the opamp should be from $0\:\textrm{V}$ to $10\:\textrm{V}$ and, with the added divider, result in $0\:\textrm{V}$ to $5\:\textrm{V}$ at the $V_o$ point in the schematic above. The output impedance will be the same, the loading on the opamp output will be the same, and this is now at $12\:\textrm{V}$ operation. I didn't bother worrying here about input bias/offset issues. The divider's Thevenin resistance is obviously different. And I don't know what's driving your circuit, either. But this is the best I could do with the information at hand.

Despite your comments, the above circuit will still generate the output you want. A level-shifted result that is in phase with the input. An inverter circuit would be trivial to design to do the level shift, too. But the output would be inverted from the input. And there are still other methods for just performing a level-shift (as unexpected perhaps as using a current source through a resistor with your signal driving one end and the output picked up from the other end.)

But the above matches up with your "I want to modify this circuit to ..."

I don't know op-amp circuits as well as most of the people here, but depending on what you need, could you just use a capacitor to remove the DC component and then pull it up afterwards? If you need a low-impedance output, then you can use an op-amp follower. Here's what I have in mind:

simulate this circuit – Schematic created using CircuitLab

(Don't put RL in your finished circuit; it's there to represent the load you may have against the output.)

That circuit is built with the idea that you have a 5-10V triangle as your input, want a 0-5V triangle as output, are in the kHz range, and prefer a +12 VDC supply, but no -12 VDC. If I misunderstood your design parameters, let me know.

You can simulate that circuit with the link if you want. The parameters I'd recommend you try at first are (Start: 0 Stop: 10m Step: 10u) to see the overall behavior, and (Start: 240u Stop: 260u Step: 5n) to see the behavior at transition.

TI has a handy worksheet for op-amp level shifters that might be helpful to you.

There's also an online calculator at daycounter.com.