Interfacing DC Motor with Arduino Uno Program with Component Connection

Objective:

         To control the rotation direction and to stop/start the DC motor by Arduino Uno

Components Required

  • Arduino Uno
  • Direct Current (DC) Motor

Connection Diagram

Program

int MotorPin1=4, MotorPin2=5;

void setup()

{

pinMode(MotorPin1, OUTPUT);

pinMode(MotorPin2, OUTPUT);

}

void loop()

{

digitalWrite(MotorPin1,HIGH);

digitalWrite(MotorPin3,LOW);

delay(5000);

digitalWrite(MotorPin1,LOW);

digitalWrite(MotorPin3,HIGH);

delay(5000);

}

Working

         The DC motor has two terminals. To make it run we must supply a HIGH voltage to one terminal and the LOW voltage to the other terminal. The current flowing from HIGH voltage to LOW voltage through the armature of the coil. It produces Electro-Magnetic field and deflects with the permanent magnets inside the DC motor there by rotating in one direction. If we change the polarity of DC motor terminals it starts to rotate in opposite direction. To make it stop supply both terminals of the DC motor to same voltage (Both HIGH / Both LOW)

Output

DC motor starts to rotate in alternate directions.

Temperature Measurement using LM35 and Arduino Program with Component Connection
Temperature Measurement using DHT11and Arduino Program with Component Connection

Leave a Reply

Your email address will not be published. Required fields are marked *

Navigation

My Cart

Close
Viewed

Recently Viewed

Close

Great to see you here !

Your personal data will be used to support your experience throughout this website, to manage access to your account, and for other purposes described in our privacy policy.

Already got an account?

Quickview

Close

Categories