-2

To convert a PWM signal to a DC voltage it must be filtered with a low pass filter. How can you know which cut-off frequency should be used and how do you calculate the values for the resistor and capacitor belonging to that cut-off frequency. I do know that the cut-off frequency needs to be much higher/lower in comparison to the PWM signal, for example a factor 100 lower/higher.

enter image description here

closed as off-topic by VE7JRO, Juraj, sempaiscuba, Greenonline, jose can u c Apr 5 at 15:10

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about Arduino, within the scope defined in the help center." – VE7JRO, Juraj, sempaiscuba, Greenonline, jose can u c
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    arduino.stackexchange.com/tour – Juraj Mar 18 at 11:02
  • program the cut-off based on how fast you need to change set voltage, not by PWM frequency. If you need to adjust in 100ms, aim for that, and you won't be disappointed. Also, you can use a 2nd stage to drastically improve the smoothing at a given resistor size, which can help response times by using a higher-frequency cut-off but still getting enough smoothing. – dandavis Mar 18 at 17:48
  • Note also this will not work exactly as expected depending on how much current is sink on Uout – Julien Mar 20 at 13:01
2

The PWM frequency on the Arduino is about 500Hz by default, so you want your -3dB frequency to be below that. How far below? That's subjective. Lower gives a smoother output but a lower response speed. Since you want DC out then you can afford to go very low, unless you need it to respond to changes in the set point quickly.

Not the answer you're looking for? Browse other questions tagged or ask your own question.