This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PWM Audio driver

Hello,

I just wanted to throw in that for a hobby project I created a PWM audio driver, with which one can play back 8-bit audio data very easily. Since it may be useful for others, too, I have uploaded the sources to https://nrf52-pwm-audio.sourceforge.io/, along with SES project files for nRF52832 and nRF52840. Plus, there you will also find a link to a video to see what you can do with the driver.

Cheers,
Tamas

Parents
  • Awesome, thanks Tamas.

    I used Tamas's implementation as basis audio playback in my NRF52840 SoC based project and it works like a charm. Simple flexiblel and lightweight. This saved me a lot of time. I used a PAM3804 audio amplifier for prototyping and attenuated the noise using a 22uF cap in parallel with the PWM output pin and GND. This is ok for a 4 Ohm speaker. 
    NOTE! Powering the PAM8304 with a separate power source is recommended to prevent power surges on the usb port.

Reply
  • Awesome, thanks Tamas.

    I used Tamas's implementation as basis audio playback in my NRF52840 SoC based project and it works like a charm. Simple flexiblel and lightweight. This saved me a lot of time. I used a PAM3804 audio amplifier for prototyping and attenuated the noise using a 22uF cap in parallel with the PWM output pin and GND. This is ok for a 4 Ohm speaker. 
    NOTE! Powering the PAM8304 with a separate power source is recommended to prevent power surges on the usb port.

Children
Related