DC Motor Interfacing With Arduino Using MEPUNO Development Board

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.

                  L293D

                                                                            Figure 1: L293D pin diagram

Procedure

Step1: Procure Components Required

  • MEP_ROBO Board with ATMEGA 328 IC
  • USB Cable
  • Computer with Arduino software
  • DC Motor(2)
  • Breadboard
  • Connecting wires (4)

                         Components Diagram

                                                                                             Figure2: Components Diagram

Step2: Write the program in Arduino UNO IDE.

program

                                                                         Figure 3: Program

Step3: Connecting the motors to MEP_ROBO UNO board.

              connection diagram

                                                                                               Figure 4: Connection Diagram

  • Connect the motor to the berg male strip provided on the board.
  • In the MEP_ROBO UNO board connect one motor to pin 5 and pin 7 and other motor to pin 6 and pin 8.

PIN5

PIN7

PIN6

PIN8

MOTOR 1&2

HIGH

LOW

LOW

HIGH

CLOCKWISE

LOW

HIGH

HIGH

LOW

ANTI-CLOCKWISE

  • Provide Vcc of 5V and 12V to drive motors.

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.

Related Items