Spread the love
Arduino motor control
![arduino tip120 dc motor arduino tip120 dc motor](https://www.officialhrm.com/wp-content/uploads/Tip120-Gif-File..gif)
Arduino tip120 Motor: The current provided by Arduino nano digital pin is not sufficient to run a motor,
That is why we use the Tip120 transistor.
Parts Required:
- Arduino Nano
- Tip120 transistor
- 1N4004 Diode
- 9V Battery
- Wire to connect it all together
TIP122 Transistor Pinout:
![](https://www.officialhrm.com/wp-content/uploads/tip120-Pinout.png)
1N4004 Diod Pinout:
![Diod-pinout](https://www.officialhrm.com/wp-content/uploads/Diod-pinout.png)
the 1n4004 Diod protect from reverse voltage and it’s a good idea to use it in our circuits.
- connect all Parts together
![Wiring Tip120 and Dc Motor](https://www.officialhrm.com/wp-content/uploads/Capture-3.jpg)
Arduino Code:
![Arduino Menu up](https://www.officialhrm.com/wp-content/uploads/uper-1.png)
//Test Code
int Motor = 2; // the number of the Motor pin
void setup() {
//setup code:
pinMode (Motor,OUTPUT);
}
void loop() {
digitalWrite(Motor, HIGH); // turn the Motor on
delay(1000); // wait for a second
digitalWrite(Motor, LOW); // turn the Motor
delay(1000);
}
![Arduino Menu Down](https://www.officialhrm.com/wp-content/uploads/Down-1.png)