Connect with us

Converting PWM output into a voltage using low pass filter.

Discussion in 'General Electronics Discussion' started by dinhquochuy, Jul 5, 2013.

  1. dinhquochuy

    dinhquochuy

    5
    0
    Jul 3, 2013
    Hi guys, it's me with my noob-ish questions agains, :D

    I am building a microcontroller controlled regulator circuit, the idea is to use the feed back from the voltage (Through the microcontroller's ADC) to increase or dedrease the output voltage by adjusting the PWM duty cycle. A MOSFET is used as an electrical gate for the battery (such as one in a H-bridge circuit). My battery is 12.6 V and I want a 10V on the output.

    I have tested the circuit and so far it has been working well, the MOSFET opens and closes with a small delay time. The only problem remains averaging the output so that it is smooth and is proportional to the duty cycle.

    I've read that a low-pass filter with a cut-off frequency much lower than PWM's frequency can do this, but my load on the output is a motor which may draw up to 9A when starting, so I do not think a regular resistor may withstand that. :D What should I do?

    Thank you in advance
     
  2. duke37

    duke37

    5,103
    687
    Jan 9, 2011
    The nomal way is to use an inductor. These can be seen in computer power supplies, they are wound on ferrite torroids. the wire should be thick enough to take the maximum average current, the starting current should not be a problem unless the motor is reluctant to start.

    A diode from ground to inductor may be needed, then a capacitor after the inductor to ground.

    Note that a motor has inductance and even though the input voltage varies greatly, the current may not vary much.
     
  3. BobK

    BobK

    7,385
    1,562
    Jan 5, 2010
    Motors are typically driven by a PWM without filtering it to produce a constant voltage. Is there a special reason this will not work for you?

    Bob
     
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    8,694
    1,692
    Nov 17, 2011
  5. dinhquochuy

    dinhquochuy

    5
    0
    Jul 3, 2013
    Yeah, the controlling of motor speed is handled by a separate circuit with a PWM-driven H-bridge
    because this circuit is a regulator so it is supposed to supply the motor with a steady current of 10V :D I think 2 layers of PWM would not work well except when the supply PWM has a much higher frequency right? But as I read from the osciloscope the MOSFET would not respond well to a frequency above 1KHz.
    (Forgive me if any of my assumption is wrong, I'm a newbie)
     
  6. Harald Kapp

    Harald Kapp Moderator Moderator

    8,694
    1,692
    Nov 17, 2011
    Then your driving circuit is not suited to the task. A typical MOSFET switches at much higher frequncies than 1kHz. (e.g. in a switch mode power supply the frequency is typically 50kHz and more).
     
  7. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,264
    Nov 28, 2011
    You need to run the switching converter at a fairly high frequency (50 kHz or more is typical) otherwise the inductor will be too big.

    A normal microcontroller won't be able to generate a finely controlled pulse width at these high frequencies. Also, a microcontroller won't be able to detect and respond to changes in the feedback voltage quickly and accurately enough to give good regulation.

    I would use a dedicated switching supply controller IC. Linear Technology and National Semiconductor (now Texas Instruments) make a range of ICs for this function; many of them include the MOSFET - all you need is an inductor, a catch diode, and the output capacitor.

    You said you want 10V output. That's no problem. If you need to vary the output voltage using the microcontroller, you can modify the feedback network so that a DAC or smoothed PWM output from the micro can vary the regulated output over a moderate range.
     
  8. dinhquochuy

    dinhquochuy

    5
    0
    Jul 3, 2013
    Thank you guys for the suggestions, I will try using the switching regulator IC :D Thanks a bunch ^^
     
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.