Maker Pro
Maker Pro

Simple sound via PWM problem...

A

arybinsky

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?
 
R

René

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?

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)
 
Top