PWM to get steady DC voltage - Ringing

Discussion in 'Embedded Systems and Microcontrollers' started by atferrari, Jun 17, 2009.

  1. atferrari

    Thread Starter AAC Fanatic!

    Jan 6, 2004
    I am trying to obtain a reasonable clean voltage using the power control PWM module from the PIC 18F4431.

    With a PWM frequency of 42 KHz, I get less than 2 mV of nosie but ringing, coincident with leading / trailing edges is quite pronounced, with peaks of +10 / -6 mV.

    The (two pole) filter has R = 1K and C = 10 uF.

    My questions:

    a) How could I reduce if not eliminate the ringing? My intention was to use it as a variable voltage reference.

    b) Tried capacitors of all kinds I have handy but result stays the same.

    c) Should I consider using a DAC instead?

    Gracias for any replies.
  2. lmartinez

    Active Member

    Mar 8, 2009
    Estimado: Agustin

    Can you please post your schematic of your circuit? It would be helpful for the forum members to help you? Thank you
  3. StayatHomeElectronics

    AAC Fanatic!

    Sep 25, 2008
    A 10mV signal is really not that big when you consider the digital signal (PWM) was probably 5V.

    Is this circuit on a breadboard or on a pcb? Grounding can be an issue when trying to get small signal levels. Try putting a 10uF capacitor, in parallel with a 0.1 uF ceramic capacitor, near the power and ground pins of the PIC. Use the capacitors near each power pin.

    The PWM output might need help driving the filter capacitors. Try a unity gain opamp between the PWM and the filters. Use capacitors near the power pins here as well... Or, maybe, increase the resistance you have between the PWM and filter cap.

    A DAC may eliminate the problem since you will set it and let it stabilize without any additional inputs like the constantly running PWM.
  4. atferrari

    Thread Starter AAC Fanatic!

    Jan 6, 2004
    Oh yes, it is! The point here is not where it comes from but what I need.

    Being a reference voltage I need it clean, well... with no more than the stated noise I already get.

    If used as a Vref for a variable power supply where it is amplified up to 5 or 6 times, peaks of +10 / -6 mV do mean a lot.

    I have to redesign the ground part of all this. Probing the ground itself shows some ringing. Bad sign.