Electronic – Changing a Signal’s DC Offset

dc-offsetsignalwave

I have a square wave being generated from a waveform generator oscillating between 0 V and 5 V. The generator does not support negative DC offsets. I need to shift this signal down to be centered about the 0 V value, i.e. oscillating between -2.5 V and 2.5 V (AC Coupled?).

What are ways of doing this?

(Forgive me if I mess up any terminology I'm a software engineer by trade.)

Best Answer

What you need to do is simply remove the DC offset all together, not supply a negative one. This is known as AC coupling. If you run the output of your square wave generator through series capacitor, it should do what you need. This will however be at the expense of making the square wave less square.

An example circuit is shown below for you:

Example Circuit

And the output would look like this (Green Trace = Generator Output, Blue Trace = Voltage Across Resistor):

Green Trace = Generator Output, Blue Trace = Voltage Across Resistor

You will probably get a little voltage loss (meaning your peaks will be a little less that +/- 2.5V) since no capacitor is ideal, but you can get a pretty good square wave output if you get the right value capacitor. You'll have to experiment and see. Usually, the larger capacitor value you choose, the closer your output waveform will be to the original for any frequency a benchtop square wave generator is outputting.