Maker Pro
Maker Pro

PWM to analog voltage

J

Jonas

Jan 1, 1970
0
Hi

I need to convert a PWM signal (1-99% Duty-cycle), amplitude 5V to a
DC voltage 0-5V. How do I do this in the easiest way. If I create a
low-pass filter, how do I choose the correct values for the resistor
and capacitor to get as low ripple as possible?
If this ain't the easiest way, I'm open for suggestions.

Thanks!
 
S

Spehro Pefhany

Jan 1, 1970
0
Hi

I need to convert a PWM signal (1-99% Duty-cycle), amplitude 5V to a
DC voltage 0-5V. How do I do this in the easiest way. If I create a
low-pass filter, how do I choose the correct values for the resistor
and capacitor to get as low ripple as possible?

For a given filter design there's a trade-off between speed of
response and ripple. If you don't care about speed of response you can
(in theory) make the response arbitrarily slow and the ripple
arbitrarily small.

Note that the accuracy and stability of your output voltage will be
limited by the signal levels going into the filter (GIGO). If the
digital signal levels are not good enough you can always switch
between a precision reference and ground from the input signal.
If this ain't the easiest way, I'm open for suggestions.

Easiest, maybe not best.

Best regards,
Spehro Pefhany
 
J

Jamie

Jan 1, 1970
0
in your case i would use a sample and hold circuit.
you specify up to 99%..
using a something like the 4066 as the gating
to charge and high gain op can can be done .
the trialing edge of a squaure wave that you use
from a comparator can be used to for the charge trigure
via a cap into a base transistor circuit that would
perform the gate operation on the 4066 bilateral switch..
P.S.
if you look at intels LM2907 i think?,(frequence to Voltage)
there is an example for a simple and hold...
etc..
also it maybe possible to use the same chip for your project.
 
C

CBarn24050

Jan 1, 1970
0
you should be ok with a CR time 5 times your pwm cycle time..
 
M

mook johnson

Jan 1, 1970
0
Are you designing a 0-5 volt regulator? Typical on them is to use a LC
filter with a minimum load resistor (determined by L) to reduce the ripple
to a specified level. This gives a 2 pole rolloff instead on a single pole.
It also alows you to draw power from the output without much voltage drop
since the inductor can be made with little DCR. With an RC, you have to be
careful about the load impedance. That said, you will never quite get to
5Vdc output with 99% duty cycle and 5 volt amplitude (Vout = Duty Cycle *
amplitue) .

If you are just trying to measure the average PWM percentage over a period
of time you may be able to use an RC but get ready to wait. It lowduty
cycle, your ripple will be at its worst so you need to have a filter that is
slow enough to average that signal. If possible keep the frequency high so
the filtering components are smaller.

The best way to do it is with a micro of some sort and you can get down to
pulse by pulse width measurement. If thats beyond you knowledge range.
Post what you are trying to achive here and we'll help out.
 
Top