DC Motor with ardiuno is a simple project which you can carry out on the MEP_ROBO UNO. Here two 12V DC motors are used. The motors rotate clockwise and anticlockwise direction depending on the program.
A DC motor has two leads which when connected to the battery, the motor starts rotating. When the polarity of the leads are interchanged, the motor will rotate in opposite direction.
Without changing the leads connection, the direction of rotation of motors and speed can also be controlled using MEP_ROBO UNO board. In the MEP_ROBO UNO board, the presence of L293D IC makes DC motor interface easy.
L293D IC is a 16 pin IC. Its pin diagram is shown below.
Figure 1: L293D pin diagram
Step1: Procure Components Required
Figure2: Components Diagram
Step2: Write the program in Arduino UNO IDE.
Figure 3: Program
Step3: Connecting the motors to MEP_ROBO UNO board.
Figure 4: Connection Diagram
PIN5 |
PIN7 |
PIN6 |
PIN8 |
MOTOR 1&2 |
HIGH |
LOW |
LOW |
HIGH |
CLOCKWISE |
LOW |
HIGH |
HIGH |
LOW |
ANTI-CLOCKWISE |
Step4: Connect USB cable to the board.
Step5: Download the program to the board.
Step6: Check the Output
The output will be a motor rotating.