Electronic – How to suppress voltage spikes caused by USB fan on ATX 5V rail

dc motorfanpower supply

I bought a cheap largish USB fan and plugged it in to the 5V rail on my adapted ATX bench power supply. Immediately, the ATMega328P that is present on the adapted ATX supply started to act erratically. The '328 is there to measure voltages and currents and to drive 7-segment displays and it is powered out of the same 5V rail. (picture and schematics are at the end of the post).

I checked the 5V rail with the oscilloscope (screenshot below) and, to my surprise, the fan was causing the rail voltage to spike up to 6.3V at 160Hz. That's way past the poor '328 absolute maximum 5.5V supply voltage.

Scope screenshot - 5V rail voltage spikes

I know what is causing me problems, but I don't know why or how to fix it. But I thought I should learn something from this. My questions then are:

1. What is likely the cause of those spikes?

My guess is that the problem comes from the inductance of the motor coils. When the commutators loose contact with the brushes, the current through the coils is suddenly interrupted, and according to the inductance formulae \$V = L \dfrac{di}{dt}\$, there's an increase in voltage to counter it. I hazard a guess that the frequency I measured (160Hz) is double the fan RPM (I'm guessing 4,800RPM).

Am I in the right direction? The only thing that doesn't add up is that I think the spike should be negative (same signal as \$ di \$), not positive.

2. Based only on my oscilloscope readings, can I consider that the fan design is flawed? If so, what circuitry is likely missing on the fan, that would otherwise prevent those voltage spikes from happening?

My guess is that the voltage spike is something that all brushed DC motors produce by design, but additional circuitry (possibly filters) are put in place to suppress its effects. But I don't know what these filters would be.

3. How can I improve the design of my adapted ATX bench power supply to protect it from such voltage surges?

Is this a case in which a flyback diode should be applied?


The fan is 1.5W (2.5W start up power). I have two other smallish USB fans (1W) that do not produce any spikes like that.


ATX power supply adapter schematics:

ATX power supply adapter schematics

My adapter plugged to the ATX power supply in the background (they are actually two separate units), and the fans.

Picture of the whole setup

Best Answer

That looks like a nice resonant ring as opposed to noise. Try putting a small LC filter on the fan supply, that should stop any noise from feeding back to the supply. Also on the ATmega, you could apply an LC or small RC filter to again reduce noise entering the system. The scope looks like it is ~500kHz, so something like a 10kHz low pass filter would work well. A sensitive device like an ATmega really should have a dedicated voltage regulator instead of running right off of an ATX supply. Consider bringing 12V into a 5V linear regulator for the ATmega, this will remove any unwanted noise.

Here is a filter equation. You can replace L with R.

$$ f_c = \dfrac{1}{2 \pi \sqrt{LC}} $$