Volt spike and flyback diode

Discussion in 'General Electronics Chat' started by MikeA, Nov 4, 2013.

  1. MikeA

    Thread Starter Member

    Jan 20, 2013
    125
    17
    I have a simple PWM circuit with a NPN transistor driving a DC fan. Exactly like in the attached schematic. The issue is I'm getting serious voltage spikes on the 5v.

    This is by design, right? The flyback diode sends the current back to the 5v source?

    The problem is I have other things in the circuit that get their power from the same 5v, and are not liking the voltage spike. :( Any ideas how to fix this? :D
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,547
    2,373
    Place an appropriate sized ferrite choke in series with the motor.
    Also a .5μf capacitor from 5v at the motor to common.
    Max.
     
  3. MikeA

    Thread Starter Member

    Jan 20, 2013
    125
    17
    Choke between 5v and motor (+)?
     
  4. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,547
    2,373
    Yes, if you cannot find a suitable one, toroidal ferrite's are easy to find and easy to wind Max.
     
  5. MikeA

    Thread Starter Member

    Jan 20, 2013
    125
    17
    I think I have a few in the parts bin, small ones though. By suitable you mean it has to exceed the minimum inductance and current rating of the fan? How would I calculate the needed inductance?
     
  6. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,547
    2,373
    The problem is without knowing the exact nature or frequency of the offending spikes, it is a question of trial and error, I usually use a suitably sized enameled wire on a 1.5" dia toroid for a start, but I usually deal with larger motors.
    Max.
     
  7. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    784
    You could feed the motor via a diode to stop the spikes getting back to the main Vcc, a hefty electrolytic for the motor only part of the Vcc should soak up the worst of it. A Shottky-barrier diode has much smaller Vf drop than regular silicon, but you have to watch the PIV - SB diodes start at araund 20V, the spikes could easily be more than that.

    As others have suggested; a choke might help, but its not that simple - a choke is inductance that could produce spikes all by itself, you'd probably be looking at something like a "Pi" type filter with a couple of capacitors as the "uprights".
     
  8. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    No it does not. The fault lies elsewhere, possibly a ground loop.

    Look at this sim. which shows what happens when 2A flowing in an inductor is abruptly turned off. At the instant the NPN turns off (100ms), I(R1), the current that was formerly flowing in R1 just goes to zero. There is no current flowing backwards toward the power supply V1.

    V(b), the voltage at node B jumps up just a bit which happens because the former IR drop across R1 ceases. The voltage at node B never goes above 5V.

    Note how the diode steers the current back into the coil. V(c), the voltage at the bottom of the inductor is clamped one diode drop above 5V, but there is no corresponding current in R1.
     
    • DF52.jpg
      DF52.jpg
      File size:
      221.1 KB
      Views:
      36
    Last edited: Jan 4, 2014
    JohnInTX likes this.
  9. Joster

    Member

    Jun 12, 2013
    95
    0
    syphon off the spike with a diode, charge a cap and dump it into a second bat!
     
  10. crutschow

    Expert

    Mar 14, 2008
    13,014
    3,234
    It may be the stray inductance of the 5V line. The rapid turn-off of the current causes an inductive spike from that inductance that is not suppressed by the diode across the fan (or by any diode placed in series). You might try running the cathode of the diode back to the 5V source rather then just across the fan motor. That way the current in the line stops less abruptly, minimizing the spike.
     
  11. wpri268

    New Member

    Feb 18, 2012
    22
    0
    As is with any switched inductor whether it be a motor, flyback transformer or straight piece of wire it is the leakage inductance creating the spike. V= L di/dt. However there is probably no chance of reducing the leakage L of a small motor. RC snubbers are often used in SMPS to accomplish this task. Though I cant offer any information about their design there is lots to be learned online. Oh, as an afterthought....if you could increase your swithching time the problem wont be as bad.
     
  12. t_n_k

    AAC Fanatic!

    Mar 6, 2009
    5,448
    782
    Are you sure you attached the right sim?
     
    #12 likes this.
  13. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    I fixed it. Look at post #8 again...
     
Loading...