Electronic – arduino – What kind of signal processing circuitry do I need to generate a line level output on an Arduino

arduinoaudiodaclevel-shiftingoperational-amplifier

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?

Best Answer

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.

enter image description here

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?

schematic

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.

Related Topic