1. Welcome to our site! Electro Tech is an online community (with over 100,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

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by Suraj143, Feb 2, 2012.

  1. Suraj143

    Suraj143 Active Member

    Joined:
    Jan 11, 2007
    Messages:
    1,411
    Likes:
    1
    Location:
    South Mald Isld
    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: Feb 2, 2012
  2. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    4,212
    Likes:
    335
    Location:
    Cleveland, OH, USA
    Look at the low-pass filter like an integrator.

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

    John
  3. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    4,284
    Likes:
    422
    Location:
    Loveland, CO USA
    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)
  4. ronv

    ronv Well-Known Member Most Helpful Member

    Joined:
    May 30, 2010
    Messages:
    4,324
    Likes:
    445
    Location:
    Tucson, AZ. USA
    If you know the frequency of your pwm from the PIC we can help you calculate the low pass filter.
  5. Suraj143

    Suraj143 Active Member

    Joined:
    Jan 11, 2007
    Messages:
    1,411
    Likes:
    1
    Location:
    South Mald Isld
    You are on track :)

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

    ronv Well-Known Member Most Helpful Member

    Joined:
    May 30, 2010
    Messages:
    4,324
    Likes:
    445
    Location:
    Tucson, AZ. USA