Has anyone played back voice prompts via any of the PWM outputs to a piezo sounder before?
I have a sound that can play audio tones via the PWM output.
I need to add a single short voice prompt to a design that does not have an MP3 circuit. It doesn’t have to be high quality as long as it doesn’t sound like a robot.
Basically what you are describing is a class D amplifier. PWM in and analog out. Its a very efficient system.
The downside is that you need to modulate the PWM much faster than the upper frequency of the audio. For your case you might get away with around 5khz bandwidth. So modulating at maybe 15khz would do it.
Probably definately possible with RLP and maybe just with blocking managed code.
Interestingly there is a hack for the raspberry Pi that turns one of the GPIO pins into a radio transmitter at about 100MHz. The quality is surprisingly good.
I’ve spotted some code in Codeshare from Gus and another from WouterH that does this. I was hoping the PWM output could do this and save on additional components but looks like I might have to do some rework on the design to add a small audio amplifier. Downside is finding something that works on 3.3V as the power supply has been designed to meet CISPR25 standards and adding any other regulators may affect this.