pwm to voltage conversion.

Status
Not open for further replies.
Hi. friends...

i shown one circuit it gives variable output voltage as per the change in input pulse width.
if input pulse width (on time) will increase than output voltage also increases and vice verse.
how it can be?
how should i design this circuit???
 
I assume you have already searched on "PWM to voltage conversion." Look up "low-pass filter."

John
 
Last edited:
As mentioned on the other site, a simple capacitor and resistor will work.

If you want something a more complex: https://www.electro-tech-online.com/custompdfs/2012/04/102501di.pdf (scroll down to page 92)

Finally, if you want some theory and calculations, see this Application Note: https://www.electro-tech-online.com/custompdfs/2012/08/75729603AN-279.pdf

Of course, that note discusses frequency to voltage, which is not what you want. So, skip the comparator and one-shot that make up the input section and focus on the discussion of the integrator.

John
 
Hi,

For speed of response and decent filtering a two stage RC filter works pretty well without requiring any special parts. This kind of filter only requires two resistors and two capacitors.
 
Maybe this link will help hiren.dave more. It even includes calculation of a PWM input (1st order):

**broken link removed**

If he wants to pursue the second order approach, it also includes a calculator for that too:

**broken link removed**

As for reconciling the formulas, perhaps the link I gave made some practical assumptions, such as R2 = 10*R1 and C2 = 0.1*C1.

Do you have a link for your equation?

John
 

Hi John,

No i dont usually have links to my equations because i almost always calculate it out myself using something like nodal equations to start with. But the two formulas are easily checked, especially the one in that previous link because it is so short. Throw a couple resistors and capacitors into a circuit in the two stage configuration and run it in a simulator under AC analysis. Look for the point that is -3db from DC, and note the frequency. It wont be what that formula claims it is.
Do you use LT Spice?

The trick where R2=10*R1 etc. is an approximation to a two stage RC filter with the same resistor and cap values but an isolation stage in between, and i looked at that and that didnt work with the links formula either. I'll take another look at this next.

Ok took another look and yes it appears that if we let R2=R1*A and C2=C1/A and then let A approach infinity we get:
w0=sqrt(sqrt(2)-1)/(R1*C1)

which kinda agrees with the link. So yes he was assuming that R2>>R1 and C2<<C1. That's a typical assumption i guess but should be mentioned in the text somewhere. So strictly speaking he is talking about a disjointed two stage RC passive filter not just a general two stage RC passive filter.

Oh yeah, in the first link they calculate 159Hz for a two stage RC low pass, but then show a graph that indicates the -3db point is close to 60Hz which is a totally different frequency Using the formula i posted i came up with 59.5Hz or close to that.
So they are calculating one frequency and showing a different one on the graph which says that something is wrong there.
 
Last edited:
Yes, I do use LT Spice. My Summers are quite busy, so I kind of turn off my electronics hobby come warm weather. It hurts to do it, but the weather waits for no man. I watch ETO instead of television -- less sex and violence. At least, there is less sex.

As for mentioning the problem in cascading identical filter sections, it is mentioned in that original link:


And of course, Horowitz and Hill mention the same condition on page 41. Thus, I assumed the more rigorous equations given in the references in post #10 had been simplified.

hiren.dave wanted a circuit, so that is what I provided. This same question has been raised by him elsewhere and has gotten effectively the same answers. I also recall the question of converting PWM to voltage being brought up on ETO in the past. The answer is usually, don't make it more complicated than it is. Unfortunately, hiren.dave has not given any more information about the PWM he is using and how he wants to use the converted voltage.

John
 
Last edited:
Hi dave,

You're welcome

Also of concern with these applications of filters is the settling time to a given accuracy.
Here is a picture of the settling times vs the damping factor. The calculation of the damping factor is also shown for reference.
The settling time to a certain accuracy (99 percent, 90 percent, etc.) is the time when a blue line crosses that horizontal line. Several damping factors from 1 to 2 are shown.

P.S. I left a note at the Okawa site stating that the filter center frequency was not correct so maybe he'll fix it.
 
Last edited:
A gated (boxcar) integrator with a S/H on the output will give a fast linear DC output from a PWM signal without using a LP filter or a micro. The integrator charges during the PWM period and its output transferred to the S/H at the end of the period. This represents the PWM average value. The integrator is then reset to zero and the integrate cycle restarts. That will give you a DC output for each PWM cycle which is linear with respect to duty-cycle.

This link shows a circuit (pg. 92).
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…