PDA

View Full Version : 2nd order Low-pass passive RC filter on PWM



munromh
- 28th January 2009, 17:40
I have working a PWM output driving the input of a 0 to 200mV digital panel meter, but would like some input/review of the filter. I'm running the uP @ 4MHz, the PWM at 3.9kHz with 10 bit resolution and it seems to run just fine for my application but I'm not sure if I can improve on the RC filter, it was basically pulled from the net and I can't seem to find a good online design program to help.

I found by trial and error that the 1.46M voltage divider load worked well, any advantage / disadvantage to going higher?

Any comments would be appreciated.

http://www.soundunderwatersurvey.com/Downloads/Web_references/PWM Filter.jpg

mat janssen
- 28th January 2009, 19:36
If you take a longer RC time, the ripple voltage will be smaller, but the time when the DC outputvoltage is stable is than longer.

mister_e
- 28th January 2009, 20:00
Well higher impedance voltage divider may help or screw your reading depending at least of your instrument input impedance.

However higher impedance of your voltage divider, the less you alter the RC filter.

Personally, i would avoid a too high impedance to the instrument, maybe refine the whole design with a buffer in between.

Some instruments also have their own low pass filter at the input, so I would compare a DVM reading with. Not as this sure that you really need to go crazy in your PWM filtering. First order might work as well.

amgen
- 29th January 2009, 08:49
did you try just using the 1 micro farad across the 46k ohm ?

munromh
- 29th January 2009, 12:27
depending at least of your instrument input impedance.

The input impedance is 1000M, pretty darn high.


Some instruments also have their own low pass filter at the input

Ahhhh, yes. I tried just connecting the PWM across the voltage divider and it looks great. I looked at the block diagram of the DPM and there is a filter on the input.


did you try just using the 1 micro farad across the 46k ohm ?

Looks like that might not be necessary.

http://www.soundunderwatersurvey.com/Downloads/Web_references/DMS20LCD.jpg

mister_e
- 29th January 2009, 17:33
Life is easier than we think sometime huh? :D

Glad to know it's working as expected now.

Enjoy!

munromh
- 29th January 2009, 19:03
Life is easier than we think sometime huh? :D

And I just keep trying to make it harder. That's what happens when we don't look at the big picture and get lost in the trees.

Still, it should be harder then that .... shouldn't it :)

Thanks,
Mark