I am currently doing a simple uni project where i want the distance read by an ultrasonic sensor to control the speed of a dc 5v fan. I have attached a schematic of how i think i can link the ultrasonic sensor and fan components in order to achieve my main goal. Please tell me if this circuit is right or wrong and give some helpful feedback, thank you!
1
It's wrong.
A fan is a motor. A motor is a power hungry inductive device.
Just like any other motor or similar device (such as a relay or solenoid) you cannot drive it directly from the Arduino. Instead you need (at the very least) a transistor to switch a higher current and a diode to absorb back EMF.
-
Thank you for telling me it was wrong. Would like to know where i could possibly plop this transistor and diode. – D.Campagnaro May 6 '17 at 14:01
-
1The same way as you would for any other inductive device such as a relay (like I am sure I mentioned). There's a billion and one tutorials telling you how (and that's not an overstatement). – Majenko♦ May 6 '17 at 14:02