I would like to move using 12V fan using Arduino and transistor only when I push the tactile switch. So, the electricity schematic I am currently thinking is attached. the specifications and the code are as follows. Is it correct? if not, please let me know where my error is and how I should modify.
Hint: to test the program logic, you don't need to connect a motor or the transistor. Just use a current limiting resistor and an LED to indicate "motor on/off".
jremington:
Looks OK to me. What happens when you try it?
Hint: to test the program logic, you don't need to connect a motor or the transistor. Just use a current limiting resistor and an LED to indicate "motor on/off".
I tried to build the electricity schematic but unfortunately it doesn't work. Perhaps, there might be some problems in the electricity schematic. please let me know where my error are and how I should modify. By the way, I used just a rectifier diode not LED to protect transistor from counter electromotive force DC fan motor generates. In addition, I decided to use 8 dry cell battery to supply 12V.