1

So PWM goes from 0 to 5V. How could I do -2.5 - 2.5V? Basically I am asking how to add offset to PWM signal. Should I use operational amplifier? How would I use it? I never had to deal with them, but I have LM2904P laying around.

Name
  • 135
  • 2
  • 6

1 Answers1

1

Consider removing the average of the PWM voltage by subtracting the Direct Current (DC) component of the PWM output.

Often, between different audio amplifiers stages, the DC component of the signal is removed through the use of coupling capacitors. The above link offers these guide lines for picking the value of the capacitor:

Below is a basic rough guideline of capacitors that can be used for various frequencies.

For coupling a 100Hz signal, a 10μF capacitor can be used.

For a 1000Hz signal, a 1μF capacitor can be used.

For a 10KHz signal, a 100nF capacitor can be used.

For a 100KHz signal, 10nF capacitor can be used.

For a 1MHz signal, a 1nF capacitor can be used.

For a 10MHz signal, a 100pF capacitor can be used.

For a 100MHz signal, a 10pF capacitor can be used.

This is a rough estimate that will be effective the majority of the time. The only variable that could affect the above values is the resistance in parallel to the capacitor.

Consider the last paragraph above when designing your circuit. The lower the input impedance of the circuit you are driving the more likely the possibility of unexpected results. At which point you might consider adding the OpAmp suggest in the question.

st2000
  • 7,513
  • 2
  • 13
  • 19