You are currently viewing SemiWiki as a guest which gives you limited access to the site. To view blog comments and experience other SemiWiki features you must be a registered member. Registration is fast, simple, and absolutely free so please, join our community today!
I agree with dl324. Remove the potentiometer, connect the lower end of the fan motor to the transistor collector, and use PWM mode on GPIO18 to control fan speed.
Also, you need to see how much current the fan needs, and whether a 2N2222 transistor can handle it.
Hi Eva, there are many ways to average a signal, which will meet your reduce the amount of bouncing around, but also limit the ability to accurately measure short duration spikes. If you want to stay with a non-microprocessor solution, the data sheet shows that the ACS712 has a filter pin (6)...