# What kind of signal processing circuitry do I need to generate a line level output on an Arduino?

I am trying to create an Arduino based music synthesizer. How can I safely generate line level output (+/- 2 volts centered at zero, with a frequency range from 20Hz-20KHz) from my Arduino using a minimal number of components? This is what I imagine the flow will look like, but please correct me if this is wrong.

• Generate a sine wave tone using a DAC (I'm doing this already using MCP4725)
• Level shift the signal -2.5 volts and lower gain

• To perform level shifting I think I need to generate a negative 5 volts to supply to a dual supply op amp, but I'm not sure if this is correct

There is a lot of confusing/mixed information on line level requirements. I hooked up the output jack of my macbook pro to an oscilloscope and generated a square wave. It looks like the macbook pro puts out -2 to 2 volts, so I think this is where my target output voltage should be.

Edit: My target output voltage is 1.25VRMS, since I am using a QSC PLX3602 amplifier with an input sensitivity of 1.25VRMS.

Some questions:

• How many milliamps do I need to be able to source for line level
• Given that I am going to be outputting square waves (which can sometimes damage speakers), is there anything I should keep in mind? I am planning on matching my amplifiers RMS wattage rating with the speakers RMS rating. Do square waves produce higher current than RMS?
• Can anyone recommend a schematic or components I can use to accomplish the signal conditioning needed to do this safely/without damaging audio equipment?
• Jan 31, 2018 at 18:41

To perform level shifting I think I need to generate a negative 5 volts to supply to a dual supply op amp, but I'm not sure if this is correct.

It's much simpler than that. Just add a DC blocking capacitor in series with the output. We'll calculate the value in a moment.

It looks like the macbook pro puts out -2 to 2 volts, so I think this is where my target output voltage should be.

See Wikipedia's Line leve for more on this but that will be plenty.

How many milliamps do I need to be able to source for line level?

Use Ohm's law. You'll need to find the input impedance of what you are driving but it's usually > 10k so current drain won't be a problem.

Given that I am going to be outputting square waves (which can sometimes damage speakers), is there anything I should keep in mind? I am planning on matching my amplifiers RMS wattage rating with the speakers RMS rating. Do square waves produce higher current than RMS?

You're getting mixed up. An RMS measurement allows comparison between different waveforms. If they have the same RMS value then they will have the same heating effect or power as each other or a DC current of the same value.

The problem with squarewaves is that they are high in harmonic content and, theoretically, these continue up to infinity. You can get an understanding of this from the Fourier transform of a squarish wave.

Figure 1. Fourier transform from time domain to frequency domain. Source: unknown to me.

Can anyone recommend a schematic or components I can use to accomplish the signal conditioning needed to do this safely/without damaging audio equipment?

simulate this circuit – Schematic created using CircuitLab

The capacitor and amplifier input will form a high-pass filter. (Think: it blocks DC which is 0 Hz.) The cut-off value is determined by $f_c = \frac {1}{2 \pi RC}$. You can read more and find a calculator on Learning Electronics.

• My amplifier's input sensitivity is 1.25 Vrms at 8 ohms. Does this mean I need to be able to source 156 mA (1.25/8)*1000? Jan 31, 2018 at 19:06
• Surely the 8 Ω refers to the amplifier output impedance? Jan 31, 2018 at 19:24
• Hmm I'm looking at qsc.com/resource-files/productresources/amp/plx2/…, for PLX3602. It says "input sensitivity at 8 ohms", but it also says "input impedance 10 kohms unbalanced, 20 kohms balanced." Jan 31, 2018 at 19:31
• In that event it seems like I would do (1.25/10k)*1000, and the current would be 0.125 mA. I am going to be driving a 4 ohm speaker though so I'm not sure if that would change things. Jan 31, 2018 at 19:33
• That figure is telling you that you will get the rated output into 8 Ω speakers with that level on the 10 kΩ input. Your ear has a logarithmic response to volume. Double the volume requires ten times the power. Turn the volume down and plug it in. Given that you're generating the sound from an Arduino I'd say you or your audience aren't going to listen to it for very long so I wouldn't waste too much time on the calculations. Jan 31, 2018 at 19:36