Electronic – arduino – Audio from Arduino Due’s analog outputs to line-in

arduinoaudio

Line inputs are high-impedance, Wikipedia says around 10kΩ. Due's DACs provide 0-3.3v (actually less) and are rated at 3mA max. \$\frac{3.3\rm{v}}{10\rm{k\Omega}}=0.33\rm{mA}\$. According to Wikipedia line levels are 0.316 VRMS for consumer-grade and 1.228 for professional equipment. 3.3v = 1.18 VRMS.

Then, can I assume driving a line-in won't break my DAC or line-in?

I found Groovuino which uses just a 500Ω resistor between the DAC and line-in, but it seems odd he got it working without any DC blocking. Perhaps the device he's plugging to is doing it for him?

Should I put a capacitor around 10μF between the DAC and the line-in just in case I plug somewhere without DC blocking? Is there any reason not to?

Groovuino's 500Ω resistor is very small compared to line-in. Why is it there? To plug headphones? Perhaps also to protect the DAC from an eventual short to ground?

Best Answer

Then, can I assume driving a line-in won't break my DAC or line-in?

You can drive a regular amp's line-in directly from a Due, but read on ...

I found Groovuino which uses just a 500Ω resistor between the DAC and line-in, but it seems odd he got it working without any DC blocking. Perhaps the device he's plugging to is doing it for him?

Any half decent amplifier will have AC coupling capacitors on its input. Should you blindly rely on that? Probably not.

Should I put a capacitor around 10μF between the DAC and the line-in just in case I plug somewhere without DC blocking?

Yes you should.

Is there any reason not to?

Unless you want extremely low frequencies, if not DC, and you are absolutely sure what you are doing (so well aware of out- and input stages) there is no reason why to leave them out.

Groovuino's 500Ω resistor is very small compared to line-in. Why is it there? To plug headphones? Perhaps also to protect the DAC from an eventual short to ground?

Probably the last. Limit the controller's output current so you don't accidentally damage it. With only 500Ω output impedance and approx. 10kΩ input impedance you won't notice the slightly lower input level caused by the resistive divider. To absolutely limit current to 3mA @ 3V you would need 1kΩ or even better use an output buffer to drive the cable and amplifier. The 1kΩ resistor will influence the frequency response too (high pass filter). The circuit as proposed has barely any protection for the microcontrollers output pins and that is bad practice when connecting long cables and external equipment to it. An extra opamp is much cheaper than a new Due.