2nd February 2012 10:17 AM
PWM Signal to LM317 to adjust Voltage Output
Guys can somebody help me to control voltage of the regulator from a PIC pwm frequency?
Most people say generate a PWM signal feed to a low pass filter & feed into an gained opamp & drive a transistor.is this ok?
*Low end can be 1v or 1.25V & high end will be 30V with a resolution 0.5V.
I have rail to rail opamps in my hand & LM317.
Those are my questions.
*What frequency to drive?
*Low pass filter values?
*Whats the gain?
This is a problem for me from a long time----> I still cannot understand what will be happen if I feed a PWM signal to a low pass filter??
Last edited by Suraj143; 2nd February 2012 at 10:19 AM.
2nd February 2012 10:22 AM
Look at the low-pass filter like an integrator.
As for other ways, remember the usual way is used because it works.
2nd February 2012 01:47 PM
A low pass filter removes the AC part of the signal and outputs the average, and gives you DC. From the PIC it probably will give a DC voltage of 0 to 5 volts. (if the VCC=5V)
Originally Posted by Suraj143
2nd February 2012 03:26 PM
If you know the frequency of your pwm from the PIC we can help you calculate the low pass filter.
3rd February 2012 12:59 AM
You are on track
Originally Posted by ronv
Let say I drive 1Khz pulse with a 50% duty cycle.
3rd February 2012 01:33 AM
Here is a neat calculator that you can use. Adjust R & C untill you get the ripple voltage low enough for your needs, then make sure you can live with the response time for a change. Go down the page until you see the PWM calculator.
4th February 2012 02:40 AM
Hi ronv this is the first time doing such an experiment.That's a nice calculator.
I did some calculations.from the blow values.
PWM Frequency = 1Khz
Whats your ideas on this?Does it have too much ripple?
My main task is to generate voltage by PWM.
4th February 2012 02:56 AM
I think I would use something like 10K and 10 Ufd. That way only about 12 mv of ripple.
4th February 2012 03:37 AM
Hi ron your values are superb.I calculated the vout from uC from the values you given.
PWM Freq 1Khz
Ripple (PP)= 12mV ripple
DC (1-100%) Vs V Out
10% = 0.5V
20% = 1V
30% = 1.5V
40% = 2V
50% = 2.5V
60& = 3V
70% = 3.5V
80% = 4V
90% = 4.5V
If I give this Vout to a gained opamp let say the gain is set to 2 & the minimum value will show as 1V.& maximum val will be 10V.
I think this range is not enough.Atleast it must have 1V - 20V range.
Last edited by Suraj143; 4th February 2012 at 03:40 AM.
5th February 2012 03:43 AM
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.
low pass filter,
Electronic Circuits |
Page Time: 0.09959 seconds Memory: 7,670 KB Queries: 17 Templates: 0