Electronic – Trying to recover audio from PWM


I am trying to make a Raspberry pi Bluetooth receiver. I finally got the raspberry pi to output audio via bluetooth, however the output seems like it is a modulated PWM. The width of the PWM seems to change (The falling edges shakes) when I start playing music. I dont know how to recover the audio.

I tried using a DAC but I have no idea how to even use it.

The Dac I have MAX544

EDIT 1: I have tried using a low pass filter with a cutoff frequency around 40kHz. I noticed something strange. I have put in a buffer for the signal (PWM) and as I checked the output its a triangle wave? Is this due to the op amp slew rate or is there actual filtering happening within the op amp? OP amp in question MCP601 Otherwise the low pass filter seems to work well.

enter image description here

Best Answer

Use a low-passRC at 16 kHz thus putting the PWM energy at 40:1 down. Perhaps two cascaded RCs.


simulate this circuit – Schematic created using CircuitLab