3
\$\begingroup\$

In short the question is: how can I get the audio from the 3.5mm port of my Raspberry Pi board to play through a small external speaker? Space is a concern in this project I will only have a few square inches and it only needs to be loud enough to be audible within ~20 feet.

More details: I'm working on a Raspberry Pi project where I want to have it play some sounds. The board itself will not be hooked up to a monitor or anything at run time so the audio will need to come through the 3.5mm jack. I raided an old clock radio to steal the speaker out of it and stripped one side of an old set of headphones so that I could connect the wires to the speaker I pulled. The sounds are playing fine through the intact earbud but when I connect the bare wires to the speaker I don't hear anything.

What can I do to get this working? Do I need some sort of amplifier? Are there better options than what I'm trying? I was hoping that the small speaker would just run off of the power coming through the headset wires.

\$\endgroup\$
2
  • \$\begingroup\$ If you want to output more power than a headphone speaker: Yeah you will need some sort of amplifier, could be as simple as a transistor, or an ic, to much more complicated full wave amplifier. \$\endgroup\$ Commented Mar 9, 2013 at 20:11
  • \$\begingroup\$ If your speaker is small enough, and in the correct ohm range you will get a small amount of sound though... But an old clock radio speaker could be designed to work in a very different range \$\endgroup\$ Commented Mar 9, 2013 at 20:12

1 Answer 1

4
\$\begingroup\$

The 3.5mm output of the raspberry Pi is a line level output. It cannot drive a speaker directly. You will need an amplifier. Headphones/Earbuds vary, but are often 32 ohm, with a power rating of half or less watts. Most small speakers are 1/2/4/8 ohms, with a power rating of 1 or more watts. The line level output just can't drive them.

You can get a simple amplifier premade, or use a audio amplifier chip like the LM386 or TPA2080D1 and a few passive components and make your own.

Alternatively, you can buy a dollar store battery powered mp3/ipod speaker and gut it, powering it off one of the Raspberry's voltage output pins.

\$\endgroup\$
1
  • \$\begingroup\$ Ok thanks. I'll see about getting the LM386 chip. \$\endgroup\$
    – William
    Commented Mar 11, 2013 at 1:57

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.