Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Sound Play — Parallax Forums

Propeller Sound Play

william chanwilliam chan Posts: 1,326
edited 2008-09-27 07:34 in Propeller 1
I connected one of the Propeller IO pin directly (coupled through a 10uF capacitor) to a pcb mounted speaker

my.farnell.com/jsp/search/productdetail.jsp?SKU=1193537

from Star Micronics. I tried to play some simple music.

The specs say 1.5v and 8.3mA only.
I figured there should be enough drive since the Propeller can do 3.2v at 40mA for any IO pin.

But the result was not up to expectations. The sound is much softer than a similar sized 5v buzzer.
How to solve this problem without adding a complex and costly audio amplifier?

Thanks.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my

Comments

  • LeonLeon Posts: 7,620
    edited 2008-09-25 08:26
    Just use a transistor driver.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • william chanwilliam chan Posts: 1,326
    edited 2008-09-25 09:11
    Leon,

    How should the transistor be wired?
    Class A? How many ohms collector resistor value should I use?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-25 13:40
    These tiny PCB speakers in general have poor output away from their resonances (see www.farnell.com/datasheets/87099.pdf). Adding a transistor driver probably won't help. If you need better sound, get a bigger speaker. Once you get beyond the Propeller's drive capability, use an amplifier. A Propeller output is a digital output. If you want better quality (tones rather than just a buzz), use the ADC circuit shown on the Demo Board schematic. You can use the headphone amplifier that Parallax uses or something as simple as an LM386.

    This speaker is rated at only 1.5V and the Propeller's output range is about 3.3V. The output capacitor will tend to limit the current, but the transducer is not designed for this use.

    Post Edited (Mike Green) : 9/25/2008 1:45:55 PM GMT
  • william chanwilliam chan Posts: 1,326
    edited 2008-09-27 00:55
    I don't think these speakers are too small (tiny).
    Compared to mobile phone speakers, these are large!
    How does mobile phones get so loud?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my

    Post Edited (william chan) : 9/27/2008 8:24:18 AM GMT
  • AribaAriba Posts: 2,687
    edited 2008-09-27 02:33
    I think this is a piezo transducer, made for a Buzzer not for Music. The specs say 2048 Hz frequency.
    I would say, if you output a squarewave with that frequency, you get a loud beeep.

    For Music, you need a little electromagnetic speaker.

    Andy
  • william chanwilliam chan Posts: 1,326
    edited 2008-09-27 06:06
    The specs say 140 ohms DC resistance, so I don't think it is a piezo.
    It must be a coil speaker.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-09-27 07:34
    You're right: it's not a piezo. It's electromagnetic.

    I've discovered that speakers like this require a resonant cavity for maximum sound performance. Try applying some shrink tubing to it, as illustrated in the catalog page for the Parallax SoundPAL. You may need to experiment with the length for best results. Also, see if a 100uF cap improves the sound output.

    -Phil
Sign In or Register to comment.