Electrical – Adding DC offset to PWM through a unity gain buffer

bufferdc-offsetoperational-amplifier

I have a PWM signal with a period of 200uS and a duty cycle of 20%. For prototyping reasons (this is simulating a pulse that I'll be receiving from circuitry later on in the project), I want to read the PWM signal via an ADC on an STM32F7. The ADC has a Vref of 2.5V from a TI 5025. The real world pulse will have a signal that drops below 0V before it recovers, so I want to add a DC offset that is half of the Vref (1.25V).

The voltage reference is working fine and I have added a voltage divider on the output to give me half the 1.25V offset that I want. As the pulse will interfere with the Vref signal I've opted to add a unity gain buffer (MAX4167) to the output to isolate the 2.5V reference and the 1.25V offset to add to the signal. The buffer outputs the expected DC voltage.

All of this circuitry works as expected.

What doesn't work is when I add the PWM signal to the output of the buffer. I expect to get my 1V PWM signal output with an offset of 1.25V but what happens is the DC offset remains but the signal gets completely lost. I want my PWM signal to be identical but with an offset. I've attached a picture of what I've done and what I want. It's much easier to digest visuallyenter image description here

PWM signal that I'm generating via signal generator:
enter image description here

Output that I'm getting from the buffer when I add the PWM signal to the output:
enter image description here

Any suggestions as to how I can solve this problem would be great. I've not done a lot of work with Op Amps before so I'm sure it's something simple. Thanks

Best Answer

You can't connect a signal to the output of an op-amp without using a series resistor in between. Try a 1 kohm resistor. The op-amp will fight any "hard" signal applied to its output and, in your circuit, the op-amp can only win by going unstable. Be reasonable and "sum" your signals.