Transient spikes from PWM

Discussion in 'General Electronics Chat' started by gusmas, Jan 17, 2013.

  1. gusmas

    Thread Starter Active Member

    Sep 27, 2008
    239
    0
    Hi

    I am currently using a PWM signal from a arduino uno board to switch my N channel mosfet. I have the driver circuit working and everything, my issue seems to be with a actual PWM signal.

    The PWM signal from the arduino comes with a high voltage spike (transient) for every low to high transition and high to low transition. Now I have read snubbers circuits can be used to decrease the amplitude of the transient response?

    any comments are more than welcome!!

    The attached pictures is at the output of the arduino uno board.
     
  2. BillO

    Well-Known Member

    Nov 24, 2008
    985
    136
    You could try putting a small resistor between the Arduino and the gate of the mosfet. Put it as close to the Arduino as possible. Maybe 4.7K or so.
     
  3. gusmas

    Thread Starter Active Member

    Sep 27, 2008
    239
    0
    OK think I will quickly draw up my circuit. Will be easier.
     
  4. gusmas

    Thread Starter Active Member

    Sep 27, 2008
    239
    0
    I measured the PWM signal without connecting it to the circuit and it yielded the same results.
     
  5. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    It's ringing caused by a mismatched impedance on the line.

    A capacitor from the PWM pin to ground will help some, though choose one too big and you'll start adversely affecting your signal.
     
  6. gusmas

    Thread Starter Active Member

    Sep 27, 2008
    239
    0
    So technically that means the PWM signal is fine, just the scope probe that is not matched 100% to 20kHz?

    awesome! can you maybe indicate what would be to big for 20kHz pwm signal?
     
  7. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    trial and error will give you that....I've used 0.1uF before with good results...
     
  8. gusmas

    Thread Starter Active Member

    Sep 27, 2008
    239
    0
    I am assuming electrolyte capacitors?, read some notes that ceramic caps not good for filtering
     
  9. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    I've never compared them side-by-side, but that sounds reasonable.
     
  10. BillO

    Well-Known Member

    Nov 24, 2008
    985
    136
    Not true. Ceramic caps are great for filtering, especially at higher frequencies.

    Also, this should not be being caused by your scope probe at 20kHz, unless it's a really, really bad scope probe. It would have to be designed to do this badly.

    You say you get this behavior if all your circuitry is fully disconnected from the Arduino?
     
    Last edited: Jan 17, 2013
    tshuck likes this.
  11. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Do you have the probe ground wire connected to ground? If so, are you sure it's not broken? A missing scope ground will result in severe overshoot and ringing.
     
  12. gusmas

    Thread Starter Active Member

    Sep 27, 2008
    239
    0
  13. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Did you see post #11?
     
  14. gusmas

    Thread Starter Active Member

    Sep 27, 2008
    239
    0
    yep! you posted when i was busy replying to post nr10. :) I think its the probe will check tomorrow :).
     
  15. MrChips

    Moderator

    Oct 2, 2009
    12,440
    3,360
    What is the GROUND clip on your scope probe connected to?
     
  16. gusmas

    Thread Starter Active Member

    Sep 27, 2008
    239
    0
    to the ground of the arduino @ mrchips
     
  17. MrChips

    Moderator

    Oct 2, 2009
    12,440
    3,360
    As RonH says, do you know that the ground clip is not broken? This is a common problem with scope probes.
     
  18. gusmas

    Thread Starter Active Member

    Sep 27, 2008
    239
    0
    Mornings!!

    I used a new probe (600MHz) this morning and it yielded the same results. I even adjusted the the probe with a flat screw driver at the BNC connector as stated in the probe manual. yet still getting those spikes. I think I can say with certainty that it is not my circuit because I used a signal generator as well and got the same results as from the arduino uno without connecting it to my circuit.

    Is that a fair analogy?
     
  19. BillO

    Well-Known Member

    Nov 24, 2008
    985
    136
    Your explanation is clear, but those spikes have to be coming from some inductance somewhere. I'll be in my lab today, so I'll get out an Uno and check it, but this is not something I recall seeing before. To be honest, it's also something I have never looked for before.

    One more question from me. What pin is it, and have you tried a different pin?

    I guess that was technically two questions.
     
  20. gusmas

    Thread Starter Active Member

    Sep 27, 2008
    239
    0
Loading...