I am trying to design a circuit that will convert a unipolar 0 - 12V square wave signal of about 1kHz to a bipolar +/- 12V signal.

I have tried using a differential amplifier design approach similar to this (using classic diff. amp equations): https://masteringelectronicsdesign.com/design-a-unipolar-to-bipolar-converter-for-a-unipolar-voltage-output-dac/

The circuit I created is below with a TL074 op amp; however at the output of the op amp there is no signal (it just remains at about -12V). Can someone please explain why, or please direct me to a better way to convert a unipolar signal to a bipolar one?

I have also tried putting a .1u capacitor in series with the signal to the non-inv. input to create a bipolar signal input, but this did not work. I have also tried several other op amps (LM741, 4558, and 1458), all of which do the same thing.


simulate this circuit – Schematic created using CircuitLab

  • 1
    \$\begingroup\$ Move V1 down a bit to get rid of the short circuit to Vout. \$\endgroup\$
    – tim
    Commented Apr 10, 2021 at 18:26
  • \$\begingroup\$ What's R1 for? You don't need it if there's no decoupling capacitor on the input. \$\endgroup\$
    – Transistor
    Commented Apr 10, 2021 at 18:35
  • \$\begingroup\$ @tim yes, oops, that is a Circuit Lab error, but on the breadboard the op amp was powered correctly \$\endgroup\$ Commented Apr 10, 2021 at 18:36
  • \$\begingroup\$ @Transistor I had left it in per the difference amp equations, but I agree it is not needed. However with/without it, the design does not work. \$\endgroup\$ Commented Apr 10, 2021 at 18:37

2 Answers 2


There are two ways to achieve this:

  1. Operate OA1 an a linear amplifier with a gain of 2. With a "rail-to-rail" opamp and a gain of slightly less than 2, the output will not clip and the circuit could be used to shift other waveform types, like a sine or triangle wave.

  2. Operate OA1 as a comparator. In this case the output swings between positive and negative saturation, and any input wave shape is turned into an output squarewave.

To do this with an opamp acting as a comparator, make these changes to the original circuit:

  1. Delete Vref.

  2. Connect the free end of R3 to V2.

  3. Disconnect R2 from Vout.

  4. Connect the free end of R2 to GND.

This will place a reference voltage of 6 V (V2/2) at the inverting input. The comparator will slice the input signal at this voltage level. Because there no is no negative feedback, the output will bang back and forth between the rails.

If there are small noise bursts at the output as the input crosses the transition level, you can add hysteresis to the circuit.

  • \$\begingroup\$ I just need to convert a unipolar signal to a bipolar signal. I don't care if I use a linear amp or comparator. \$\endgroup\$ Commented Apr 10, 2021 at 18:39
  • \$\begingroup\$ yes maybe a comparator would be easiest. I have TL084 and LM339 on hand. \$\endgroup\$ Commented Apr 10, 2021 at 18:47
  • \$\begingroup\$ Yes this worked, thank you. One problem I had earlier was that my signal was not actually 0 - 12V, but actually about 0 - 10V, so my voltage references were too high. \$\endgroup\$ Commented Apr 10, 2021 at 19:36


simulate this circuit – Schematic created using CircuitLab

Figure 1. Modified circuit.

  • Vref sets the input bias to -3 V.
  • R4 and R5 form a simple averaging circuit. When VIN is 0 V the average is - 3 V. When VIN is +12 V the average is +3 V.
  • I've set the gain of OA1 to 3 deliberately so that VOUT doesn't clip. It gives a squarewave of -9 V to +9 V. Adjust R2 if you want it to clip.

Hit the simulate button and run the time domain analysis to see it in operation and to play with the gain.


simulate this circuit

Figure 2. Fix suggested by @James to avoid the -6 V reference requirement.

  • \$\begingroup\$ the averaging part of this circuit has solved my issue it appears. Before I was trying to use a capacitor to have the signal oscillate about 0, but by setting the bias as you've done, that works. This works fine in the simulator; however on the breadboard I am just getting a +/- .5V wave from the 0 - 12V input. I have used a resistor voltage divider to create a -6V voltage reference -- two 68k resistors going from -12 to ground, and taking the -6V to the middle and applying it to your R5 above. I think my voltage ref is not good, or voltage division is happening again with R5. \$\endgroup\$ Commented Apr 10, 2021 at 19:16
  • \$\begingroup\$ For your 6 V voltage divider to work you'd need a much stiffer reference than two 68k resistors. If your R5 is 10k then you would want a source impedance of no more than 1k. Using 1k resistors instead of the 68k pair would give you a source impedance of 500 ohms and that gives you a chance of getting it to work. \$\endgroup\$
    – Transistor
    Commented Apr 10, 2021 at 19:43
  • \$\begingroup\$ @Thomas Wilk Your potential divider has two high an output impedence. Remove R5 and Vref (-6V) and then add two 20k resistors, one between + input of op amp and -12V and the second one between + input of op amp and ground. You will need a rail to rail output op amp to get to +&- 12V output because the TL074 saturates well short of the supply rails. \$\endgroup\$
    – user173271
    Commented Apr 10, 2021 at 19:48
  • \$\begingroup\$ @James. I've used your suggestion. Note: there are no spaces in usernames when you're pinging. \$\endgroup\$
    – Transistor
    Commented Apr 10, 2021 at 19:52
  • \$\begingroup\$ @Transistor OK noted, thanks. Whilst you're modifying your circuit you could correct the indicated polarity of V1. \$\endgroup\$
    – user173271
    Commented Apr 11, 2021 at 1:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.