Go Down

Topic: Current monitor for fan running with PWM through FET (Read 1 time) previous topic - next topic


I am running 12V fan with FET transistor through digital pin with PWM (analogWrite). I wanna be able to know, when the fan stops because of failure (for example, if i would hold the fan with my arm the system must notice that).

I tried with LM324 current monitor through analog port but without luck. http://weber.fi.eu.org/blog/images/current_monitor.png

Have got any idea, how to do that?


Either high side current measurement or use a small resistor on the source of the mosfet and measure the voltage over it - a little simpler.


I tried this with 0,1 and 0,22 ohm resistor but difference in voltage when fan was running normal and when i hold them with hand was almost negligible. I am running fan with three PWM states: 50%, 75% and 100%. Can you be more specific, where to measure and how to se the difference?


How much current does the fan take? The ADC has a resolution of just under 5mV using the default analog reference; so if you choose the value of resistor in series with the mosfet source so that it drops 50mV or 100mV when the fan is operating normally, you will easily be able to detect it - but only if you read it while the mosfet is turned on.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.


The resistor value is a function of the current and the capabilities of your measurement instruments.

If you were to use low-side measurements, put your current sensing resistor on the source. Also put a low-pass filter on it, like 10k / 0.1uf capacitor and measure the voltage over the capacitor - the values of the resistor / capacitor depends on your pwm frequencies.

That approach assumes that you cannot synchronize the current sensing with pwm output. If you can, you don't need the low-pass filter - you then have cycle-by-cycle current control of the pwm.

Go Up