Electronic Circuits and Projects Forum



PWM Signal to LM317 to adjust Voltage Output

123 Last »
  1. #1
    Suraj143 Suraj143 is offline

    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?

    Required range
    *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.

  2. #2
    jpanhalt jpanhalt is offline
    Look at the low-pass filter like an integrator.

    As for other ways, remember the usual way is used because it works.

    John
    0

  3. #3
    ronsimpson ronsimpson is online now
    Quote Originally Posted by Suraj143 View Post
    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??
    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)
    0

  4. #4
    ronv ronv is offline
    If you know the frequency of your pwm from the PIC we can help you calculate the low pass filter.
    0

  5. Thread Starter #5
    Suraj143 Suraj143 is offline
    Quote Originally Posted by ronv View Post
    If you know the frequency of your pwm from the PIC we can help you calculate the low pass filter.
    You are on track

    Let say I drive 1Khz pulse with a 50% duty cycle.
    0

  6. #6
    ronv ronv is offline
    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.

    http://sim.okawa-denshi.jp/en/PWMtool.php
    0

  7. Thread Starter #7
    Suraj143 Suraj143 is offline
    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
    R=3.3K,C=0.1uF

    Whats your ideas on this?Does it have too much ripple?

    My main task is to generate voltage by PWM.
    0

  8. #8
    ronv ronv is offline
    I think I would use something like 10K and 10 Ufd. That way only about 12 mv of ripple.
    0

  9. Thread Starter #9
    Suraj143 Suraj143 is offline
    Hi ron your values are superb.I calculated the vout from uC from the values you given.

    PWM Freq 1Khz
    R=10K
    C=10uF
    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
    100%= 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.
    0
    Last edited by Suraj143; 4th February 2012 at 03:40 AM.

  10. #10
    ronv ronv is offline

    317

    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.
    Attached Images
    0

123 Last »
Tags
Similar Threads
Thread Starter Forum Replies Last Post
Set (Interrupt) PWM signal as output for AT89C51CC01 pshaik 8051/8951 1 22nd July 2012, 07:37 AM
Variable voltage output via LM317 Spadez General Electronics Chat 26 20th October 2010, 09:58 AM
Do I adjust the output voltage of a transformer if I change the input voltage? lvlr General Electronics Chat 3 16th January 2010, 08:12 AM
PWM signal, mixed with a supply voltage? czwalga Electronic Projects Design/Ideas/Reviews 5 25th March 2007, 07:19 AM
voltage output bogdanfirst General Electronics Chat 3 18th July 2003, 06:50 PM
Electronic Circuits  |  Learning Electronics

Join our community with over 100,000 Members! It's free, easy and when you're logged in you have many more features! Click to register.
Page Time: 0.09959 seconds      Memory: 7,670 KB      Queries: 17      Templates: 0