Power leaking from fan supply to arduino?

Hi,

I have a simple 12V 4-pin computer fan which I can control using PWM. The fan speed does not go below 1000rpm so I am using a TIP120 to stop the fan when I need it to go below 1000rpm. I have also tried the switching off with a MOSFET and both the circuits work. I have provided both the circuits below. The issue is that by accident I unpowered the arduino supply (I was supplying it using USB) and I saw that the arduino was still powered on!!!! I guess the supply from the fan is somehow leaking to power the Arduino. Is this normal? If not, what might be happening? Thank you in advance for your help.

I would venture to say that is definitely not normal, although I wouldn't have any earthly idea why.

I mean the only thing I could guesstimate (keep in mind I have very limited electronics experience) is that some property of fan and/or transistor are interacting and allowing some current to flow and light up some LEDs on Arduino board etc.

When you remove power does the Arduino still function as normal and run its code or does it stop doing what its supposed to do and just like light up LEDs?

When you unplugged Arduino was the fan running or stopped? And when you unplug the Arduino does the PWM continue on or stop?

As an aside I believe on 4 pin fans a specific pin is dedicated to controlling fan speed. So you might be able to simply control speed using control pin and driving pwm into that.

You may need a npn transistor though so you can push 5V pwm arduino outputs to 12V pwm.

Answers to questions asked above:
When you remove power does the Arduino still function as normal and run its code or does it stop doing what its supposed to do and just like light up LEDs? - Sometimes yes, sometimes no

When you unplugged Arduino was the fan running or stopped? And when you unplug the Arduino does the PWM continue on or stop? - When Fan stops, no power is supplied to arduino. when fan runs, power is supplied to arduino.

I am able to control fan speed with PWM on the fan PWM pin but the only issue is that it does not come below 1k RPM (specs say that too). I only need the transistor to switch it off when I try to set speed to < 1000rpm.

There are small protection diodes built in the pins, that sometimes allow "back powering" to occur. However, the fix would be a diode on the signal pin. That's effectively what you get with a TIP120 already with the diode junction in the BJT.

You could try adding another diode between the pin and base to see if it helps. The 0.7 voltage drop shouldn't be enough to cause problems turning on the TIP120.

Is it possibly because of the inductive properties of the motor? I want to reiterate I am not expert but from my understanding inductors do whatever possible to keep current flowing when you switch them off (including jacking up the voltage for a brief time) so maybe voltage is spiking, pushing through transistors and going into Arduino digital pin or ground and either powering circuit or bouncing ground or something like that.

That might explain why power is only fed back when fan is spinning.

When Fan stops, no power is supplied to arduino. when fan runs, power is supplied to arduino.

If you remove the motor and just put a resistor (say 1K) does it behave as expected.

The whole approach is wrong.

You are connecting signals to the fan controller, and also using a low-side power switch on the fan (disconnecting its ground).

You can't do that, you have to use high-side switching. This means a PNP or p-channel switch on the +ve supply to the fan, leaving the ground permanently in common with the Arduino ground.

What was happening is that when the switch was off the fan controller got its "ground" direct from the PWM signal pin, which simulatenously was providing power to the Arduino, and possible damaging the Arduino itself. You should test that the PWM pin still works properly.

You failed to include all the connections in your fritz sketch, confusing people a lot, its only worth posting a circuit if its the actual circuit in question, really... Fritzing isn't the best tool for this, a photo of a hand sketch is often much better :)

Fritzing isn't the best tool for this, a photo of a hand sketch is often much better

I quite like Fritzing, but yesterday I downloaded Eagle and got to grips with it in no time. You choose the free version at install time, and although there are limitations I personally will never get anywhere near those. I'd urge everyone to look at it.....

MarkT: Fritzing isn't the best tool for this, a photo of a hand sketch is often much better :)

Fritzing "diagrams" would be far more useful if people posted the Fritzing file, instead of a picture. However, no one that uses Fritzing does.