3
\$\begingroup\$

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?

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

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.

\$\endgroup\$
3
  • \$\begingroup\$ Thanks! Glad to see I'm finally grasping all this. Does it matter if I connect the AC coupling cap after or before the buffer? Also, I'm curious why a 1kΩ series resistor would act as a high-pass filter. Isn't it a HP filter only the resistor is parallel to the audio output? \$\endgroup\$
    – DuckTyped
    Commented Feb 28, 2014 at 13:21
  • \$\begingroup\$ @DuckTyped Yes it does matter. You probably want one on both sides of the buffer. That way you can even use the buffer to amplify the signal a little. The buffer will have its own DC bias level and you don't want to mess with that by leaving the coupling cap out. \$\endgroup\$
    – jippie
    Commented Feb 28, 2014 at 13:47
  • \$\begingroup\$ Oh, I think I get it. It'd work more or less like this other question of mine (though LM386 is not an op-amp) but with a gain = 1 amplifier, i.e. not amplifying the signal but still AC coupling both ends of the op-amp and leveraging the op-amp's high impedance input to protect the μC pin from high current draw. In short: DAC -> Cap -> Buffer -> Cap -> Line and if something goes wrong the buffer will break before the pin is damaged. Did I get that right? \$\endgroup\$
    – DuckTyped
    Commented Feb 28, 2014 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.