Go Down

Topic: Due audio DAC output for headphones/amplified speakers? (Read 1 time) previous topic - next topic

msemtd

The example circuit shown for SimpleAudioPlayer requires an amplifier circuit (see http://arduino.cc/en/Tutorial/SimpleAudioPlayer). The page gives warnings about DAC damage and there are a good few reports here on the forum -- this is all good information!

I don't really understand the DAC and how it gets damaged by attaching a speaker -- would it be damaged by attaching headphones?

How about attaching a little amplified MP3 player type speaker?

What additional circuit would be required to make the DAC output happy and able to drive "line-level" audio through, say, a 3.5mm stereo headphone socket?

garygid

Almost any output from the Due can tolerate delivering at most 3 ma,
or a 1100 ohm load resistor. 

Typical 8- or 16-ohm speakers, or 50-ohm headphones will essentially
"short out" the Due's output pin, and probably destroy your Due.

A typical (maybe not all) amplifier's line-in input has an input
impedance of something like 10,000 ohms (10k), so the would
appear to be (barring other issues, like grounding, etc.) a better match.

Analogy: What happens if you connect a speaker to the 12v battery
in your car?  (typically, the speaker explodes)

So, when things are connected, there must be compatible, otherwise
one or the other, or both can be severely damaged.
Cheers, Gary
Due for controlling Electric car charging.
Nissan LEAF - Mini Quick Charge (mQC)

msemtd

Thanks Gary,
It's that mysterious word "impedance" again -- that's what I need to deal with (some resistance and/or reactance as I understand it).

So, back to the question: what sort of circuit would be required to provide a safe (i.e. not damaging the DAC) line-level audio output for a 3.5mm stereo headphone socket?

I'm guessing that the circuit would need to provide some safety resistance and/or reactance in case the jack is shorted out during insertion (or is that overkill?). Do I need to make a full "pre-amplifier" for this purpose or would that still be unsafe for the DAC?

garygid

Line-level output and a headphone output are two different
things.  The line-level is usually about a 1 volt audio signal,
when lightly loaded with the input of an audio amplifier.

A headphone jack is usually designed to drive the speakers
in the headphone directly, requiring a lower voltage, and
substantially more current.

In both cases, the DC component of the "audio"output
should be blocked, and most audio amplifiers block
that DC component as well, just to be sure no DC is sent
to the speakers, which would usually be bad for the
speaker coils.

So, going from the Due (limited current out, and a DC
component that should be blocked) to typical headphones
usually requires a small audio amplifier.

I think there might be some special high-impedance
headphones, but I think the typical "hi-fi" headphones
are low impedance.

Google a bit for headphone specifications, and small
audio amplifier chips or breakout boards.
Cheers, Gary
Due for controlling Electric car charging.
Nissan LEAF - Mini Quick Charge (mQC)

stimmer

Simply place a 4.7k resistor in series with the DAC output and the amplified speaker input, for each of the two DACs. This will protect the Due, and if the amplified speaker is truly high-impedance then this will not attenuate the volume much (and if the volume is attenuated significantly then the amplified speaker isn't high-impedance)

Docedison

there is an IC made by Phillips called a TEA2025 it's a dual audio power amplifier that is characterized to operate @ 3V and develop 100 mW of audio output (2.3W @ 9V DC) that would make a perfect DIY audio driver. the 100 mW power out is ideal for driving headphones (with a 50 - 100 ohm current limiter) or speakers directly. I usually buy mine from Ebay...
Ebay also sells a class "D" (Switching type) stereo amplifier complete on a 15 X 25 mm PCB, The only thing additionally necessary is a volume control, typically a 10K audio taper (a "linear" taper will work but will be non linear at low volume levels.
Either of these 'solutions will allow the Due to safely drive headphones or speakers. I have taken the liberty of attaching a data sheet for the TEA2025, TEA5767 and LM1036.
National Semiconductor makes an LM1036 which is more complicated but offers DC operated Volume, Tone and Balance controls which are perfect for Digipot use. The combination of an LM1036 and a TEA2025 would be the beginnings of a good quality stereo audio power amp for playback of music from an SD card or... a digitally tuned TEA5767 FM stereo receiver for an Arduino controlled mini audio system.

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

msemtd

Thanks all for your help. I shall be trying out a few things tonight at my local Hackspace.

Ideally what I'm looking for is the simplest thing that could possibly work without risk of damaging my precious DUE. I'll start out with the 4.7k resistor going to a headphone jack and then set to work on a pre-amplifier circuit if that seems necessary. I have a little rechargeable "hamburger" speaker which I will use for testing and I guess I will be able to measure its impedance somehow.

Go Up