Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PWM Signal to LM317 to adjust Voltage Output

Status
Not open for further replies.
You need a gain of about 5.75.

It won't be exact because the output of the 317 is 1.25 volts above the adjust pin. So.... You will have to make this adjustment in your micro program I think.

Ive been trying to find this lm317 in my lt spice library. Where is it?
 
You could make the op amp into a second-order active filter for better suppression of the ripple.

I need to totally suppress that ripple. I need my microcontroller to set a stable DC voltage for a VCO. I was thinking of using a diode and a follow on tank circuit to hold the voltage. Do you think that would work? I don't know how to setup an active filter with an OPAMP.
 
Certainly you can use an LC filter to suppress the ripple (but of course you can never get it to zero, just to some arbitrarily low value).

But I don't understand the purpose of the diode. :confused: That would cause it to charge to the peak voltage of the PWM, not the average voltage that you want.

An easy way to design active filters is with the free FilterPro software from TI.
 
Last edited:
FilterLab from Microchip

I need to totally suppress that ripple. I need my microcontroller to set a stable DC voltage for a VCO. I was thinking of using a diode and a follow on tank circuit to hold the voltage. Do you think that would work? I don't know how to setup an active filter with an OPAMP.

I have been using FilterLab from Microchip for the last 3 or 4 years with good results.
 
Using a filter capacitor to get smooth control voltage will result in slow response to voltage changes. Even when immediately shutting off the control voltage, the output voltage will drop only as fast as the filter capacitor gets emptied. This may be a problem, if you want to have short-circuit protection or current limiting function in your power supply.
 
If you need precise control you might consider a D to A instead of PWM. Click on post 19 for a 2nd order calculator.
 
Hi,


For an RC low pass filter excited by a pulse input wave after a time t more than 5 RC time constants the ripple voltage peak to peak is:
Vpp=Vs*(e^(a*t)-1)*(e^(a*T)-1)/(e^(a*T+a*t)-1)
where
a=R*C
t=pulse time high (where pulse amplitude is equal to Vs)
T=pulse time low (where pulse amplitude is equal to 0 volts)
Vs=charging source voltage
e=2.71828...

and the response time is 4 to 5 RC time constants depending on required accuracy.

Example:
Vs=5,R=1, C=1,t=0.1,T=0.2

so:
a=R*C=1
Vpp=0.3328 to four significant figures.
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top