Connect with us

Simple sound via PWM problem...

Discussion in 'Electronic Design' started by arybinsky, Aug 20, 2007.

Scroll to continue with content
  1. arybinsky

    arybinsky Guest

    Dear group,
    I need to play 8-bit, 11kHz, mono .wav files using an MCU. The sound
    quality doesn't have to be great.
    The idea is to generate a 11 kHz PWM with a varying duty cycle
    proportional to the current sample's amplitude.

    A friend of mine proposed such a circuit:
    http://img230.imageshack.us/my.php?image=sndxg2.png

    I am not sure what should be the values of caps and the resistor. Any
    help here?
     
  2. René

    René Guest

    Too complex!

    Just do e.g. 8 Khz 8 bit, but play it out using a PWM channel on a
    very high PWM frequency (e.g. > 50 KHz). (sample freq =/= PWM freq!)

    The (buffered, of course) PWM output can be offered directly to the
    speaker. For more power invert the PWM and feed the speaker in bridge.

    The speaker will offer a high impedance towards the > 50 Khz pwm, and
    just reproduce the sound. No analog filtering / amplification
    required. No Hifi - but good enough for speech.

    This how al those talking toys are doing it...ultimate cheapness!

    Just be sure to filter the input sound loww pass below 4 KHz (or ~
    half the sample freq)
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-