# Inverting video signal on op-amp on positive rail only

I wish to invert a video signal, keeping the signal positive. Initially I believed the analogue signal would be 0v->5v, so I used the inverting input on an op-amp, and biased the non-inverting input to be approximately 2.5v. This worked well, but then I discovered that depending on the analogue source, the voltage range can be 0v->2v or 0v->3v.

This means that biasing the non-inverting input to a single voltage doesn't work. Can anyone think of a way to use an op-amp so that the signal can be inverted (180o phase, keeping it positive though), whilst retaining 0v base?

I have searched for similar questions, but they all seem to be based on people that have a fixed source signal range.

Many thanks!

I'm attempting to convert old CGA arcade Nintendo RGB signals that use untraditional inverted colours. Each one of these colours is created from multiple TTL outputs (with different resistors), and through a transistor. Arcade monitors accept 1-5v p-p signals, but after measuring multiple sources they tend to be 0v to 2 or 3v max.

This means that on a standard monitor, black is displays as white and vice versa. Therefore, if we imagine that the signal goes from 0v to 2v, I need to invert that so that is goes from 2v to 0v to invert the colour. The composite sync signal is negative (standard), and so doesn't need to be altered, and the sync signal is 15.75khz, so we're not talking about large bandwidths.

• You should include a schematic. Commented Nov 9, 2017 at 7:18
• Smells like you need a capacitor. Commented Nov 9, 2017 at 7:28
• It's just the default configuration for a unity gain inverting amplifier, but I've added the schematic. Thanks. Commented Nov 9, 2017 at 7:29
• 324 is unlikely to be fast enough for video Commented Nov 9, 2017 at 9:39
• The sync signal is 15 kHz, but the pulse bandwidth is much higher than that to make the corners square. Also, the video bandwidth is 4.2 MHz or more, and will not get through an LM324 with any fidelity. If you want to stay with vintage parts, look into the LM318. Commented Mar 12, 2021 at 4:48

As i understand you, you want a circuit to reverse the voltage ramp (inverse the output relative to its maximum voltage).
The following circuit will do this.
Take into account, that a real OpAmp will introduce a phase shift to the signal, thus inducing an oscillation through the feedback paths, so it might be necessary to do some lowpass filtering and gain adjustment there.

simulate this circuit – Schematic created using CircuitLab
For better understanding of the circuit:
OA1 is a differential amplifier (it will output the difference between the + and - pin).
After this stage there is a Diode and a cap. This is a circuit to find the maximum voltage of the input signal and to keep this voltage "stored" in the cap.
To reset the maximum voltage (eg. if you want to switch the system) you just need to press the button to discharge the cap.
OA2 is a follower OpAmp to output the cap's voltage without discharging it too much.
OA4 is a differential amplifier to measure the reverse voltage drop of the diode and it feeds its output to the negative pin of OA1, which results in the addition of the diode voltage drop to the input signal, thus eliminating the bias introduced by the diode
OA3 will then subtract the input signal from its maximum voltage and thus reverse the ramp.

Before you do anything too complicated, try this:

simulate this circuit – Schematic created using CircuitLab

It's a single transistor inverter with output 0V/5V, and an input switching threshold of less than 1V, good for your 2V/3V signals.

Of course, you don't have to use a +5V supply, you can use +2V for example, to obtain 0V/2V output.

Here's its output (orange) when presented with an input (blue) switching rapidly between 0V, 2V and 3V:

The value of R1 is chosen to switch on the transistor a little more than enough, but also to keep it out of deep saturation, so that it can recover quickly. C1/R2 improve response to sharp input transitions.

This works well up to 5MHz or so.

The 2N2222 shown has quite a low current gain, about 100. If you use a higher gain device, like a 2N3904, with gain 150 or so, you'll need to increase R1 accordingly, to prevent it from saturating too deeply:

simulate this circuit

### Update

I almost forgot to tell you how to get a 0V/2V (or any fraction of 5V) from a single 5V supply, avoiding the need for a dedicated 2V source. You can add a single resistor to form a potential divider with R3:

simulate this circuit

Considering that when Q1 is on it simply short-circuits R4, and the output falls to near 0V, nothing's changed there. However, when Q1 is off, R3 and R4 become a potential divider providing $$\V_{OUT}=5V \times \frac{120\Omega}{120\Omega+180\Omega}=2V\$$. The output now looks like this (orange):

As @Harry Svensson alluded to, what if you just AC coupled the signal into your inverter (series capacitor), then clamped that output positive?

• and to which output level to AC couple it after inversion? Also uniform white black screen ?? Commented Jul 10, 2021 at 10:09