How to change the polarity of 0~5 volts get -5~+5 volts?

I am doing a project using NI DAQ USB 6008 to control an speaker. The DAQ analogic ouput range is 0 to 5 volts and the output current drive is 5 mA. But to control the speaker I need a different range. For example, I need a range that goes from -5V to 5V to the audio amplifier which will be conected to the speaker. My audio amplifier has input impedance 30 K ohms and minimum frequency 10 Hz.

I know that if my controller calculates a negative voltage output I can multiply this value to -1 (in the control algorithm) to the DAQ card send a value between 0~5V, and then I could change the polarity of this signal after the DAQ board output (implementing an circuit to change the polarity and using a digital output of the DAQ card as switcher). So, what I need is a circuit between the DAQ card and the audio amplifier to change the voltage polarity. I do not know if this is the best/simple way to solve this problem and how to I can do this circuit in a simple way. Any ideas?

simulate this circuit – Schematic created using CircuitLab

Add a capacitor in series. It will block DC and your 5 V square-wave will become ±2.5 V squarewave. Amplify by a factor of two and you have your ±5 V.

Cut-off frequency -3 dB point for a high-pass filter is given by

$$f_c = \frac {1}{2 \pi R C}$$

and rearranging for the unknown C we get

$$C = \frac {1}{2 \pi R f_{c}} = \frac {1}{2 \pi \cdot 30k \cdot 10} = 0.5 µF$$

Put a 1 µF or 10 µF capacitor in there and you should be fine.

Links: High pass filter. See the notes on the RC differentiator circuit to make sure you understand that this arrangement will slightly 'un-square' your waveform. The effect can be reduced by lowering the cut-off frequency. Also online calculator.

• Thanks for the answer. My audio amplifier has input impedance 30 K ohms and minimum frequency 10 Hz. – Gustavo Jan 16 '16 at 16:48
• Answer updated. – Transistor Jan 16 '16 at 17:33

All you need to do is connect your DAQ to the audio amp through a capacitor. This will remove any DC component from the signal. If the Amp side of the capacitor is at "0V" then the voltage will appear to swing -2.5V to +2.5V. I know that's not exactly what you asked for, but if your Amp has enough gain it should work. If you really need -5V to +5V then you will have to add an op-amp with a gain of 2. The good thing is that most audio amps already have a capacitor in their input circuit so you probably don't even need to add the capacitor!. If you need to add a capacitor then try a value of 100nF as a starting point.

You need to first get a negative supply rail than use a properly biased op amp to get the voltage. To get the negative supply rail you can use a separate power supply that supplies dual rail or use a voltage inverting switch-mode power supply to generate it from a positive supply rail.