Hey everyone! I'm building an alarm clock using a Raspberry Pi Pico, and I'm pretty new to electronics. I want to connect 1 watt 8 ohm speakers through a PWM pin on the Pico to a PAM8403 amplifier board. I've attempted to create an RF filter using a 0.1 µF capacitor and a 1 kΩ resistor, but I only had a 2.2 kΩ on hand for now. This setup is causing a really terrible screeching noise, and the WAV file playback is super quiet, even quieter than that screeching sound. The PAM8403 is powered by 5V. Am I doing something wrong? How can I get this to work properly?
2 Answers
It seems like you're aiming for decent sound from a PWM signal, but instead of an RF filter, what you really need is a proper audio lowpass filter. You might want to make it more aggressive to filter out those high-frequency artifacts. A DFPlayer Mini MP3 player module might be a good alternative as well—it allows you to play higher quality audio without the hassle of dealing with PWM directly.
Not sure if you need super high fidelity, but to wire up the lowpass filter for your PAM8403, try using a combination of resistors and capacitors. Usually, a simple RC filter would work fine. If you saw a video using multiple resistors and capacitors for a subwoofer, it might not be ideal for your smaller setup. Start with what you have and adjust from there. It might also be worth checking your connections and components, since that could be affecting the volume.
