PWM Analog DAC using MCU
Your requirements make things impossible.
Let's write things down. Ripple specs:

filter approach: single-stage RC low pass, these have 6 dB attenuation per octave
Voltage range \$U_{tot} = 5 \text{ V}\$
ripple \$U_{rip}&lt; 0.1\text{ V} = \frac{U_{tot}}{50}\$ at 500 Hz, that's 13 dB suppression of the 5 V peak-to-peak you're putting into the filter
Therefore, you need at least roughly 13/6 octaves separation between PWM frequency and 500 Hz
Therefore, the cut-off frequency of the filter needs to be at least ca 1.1 kHz

You'll have to tell your software guy to rework his firmware, I'm afraid.