Arduino - Interfacing DC Motor Servo And Stepper
Arduino - DC Motor In this chapter, we will interface different types of motors with the Arduino board (UNO) and show you how to connect the motor and drive it from your board. There are three different type of motors − DC motor Servo motor Stepper motor A DC motor (Direct Current motor) is the most common type of motor. DC motors normally have just two leads, one positive and one negative. If you connect these two leads directly to a battery, the motor will rotate. If you switch the leads, the motor will rotate in the opposite direction. Warning − Do not drive the motor directly from Arduino board pins. This may damage the board. Use a driver Circuit or an IC. We will divide this chapter into three parts − Just make your motor spin Control motor speed Control the direction of the spin of DC motor Components Required You will need the following components − 1x Arduino UNO board 1x PN2222 Transistor 1x Small 6V DC Motor 1x 1N4001 diode 1x 270 Ω