Spread the love
Arduino motor control
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:
1N4004 Diod Pinout:
the 1n4004 Diod protect from reverse voltage and it’s a good idea to use it in our circuits.
- connect all Parts together
Arduino Code:
//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);
}