Electrical – How to filter a PWM current source

analogcurrent-sourcefilterpwm

I am using the LMD18200 H-bridge to drive a DC motor using a 20kHz PWM signal. This chip has a current sensing output which produces a current of about 377uA per Ampere flowing through the motor (recirculating currents are ignored). I would like to read this output at around 100Hz using a 3.3v ADC.

How can I simply and efficiently smooth out the current sense output ?

I know how to use a low pass RC (or RL) filter to smooth out a voltage source but I am not totally sure of how such a filter would behave in presence of a current source. Any help would be much appreciated.

Best Answer

Since you said you are familiar with the simple RC filter applied to voltage. One approach would be to consider the equivalent circuits below:

schematic

simulate this circuit – Schematic created using CircuitLab

The two circuits inside the two boxes are equivalent. So choose R1 to get the voltage range that you want. Now you can add C1 to form a familiar RC filter on the voltage.