Code Monkey home page Code Monkey logo

experiment-no-7-dc-motor-speed-control-using-arduino's Introduction

Exp-6 DC Motor Speed Control Using Arduino

Date:05/04/2024

Name:SANJAI T

Rollnumber:212222040145

Department:B.E CSE

AIM : To control the speed and the direction of a DC motor using L293D driver ic( H- bridge)

Components Required:

• Arduino UNO board • L293D driver • 12V DC motor • 10K ohm potentiometer • Pushbutton • 12V source • Breadboard • Jumper wires

THEORY

The L293D quadruple half-H drivers chip allows us to drive 2 motors in both directions, with two PWM outputs from the Arduino we can easily control the speed as well as the direction of rotation of one DC motor. (PWM: Pulse Width Modulation). Arduino DC motor control circuit: Project circuit schematic diagram is the one below.

H BRIDGE CIRUCIT INTERFACE

image

The speed of the DC motor (both directions) is controlled with the 10k potentiometer which is connected to analog channel 0 (A0) and the direction of rotation is controlled with the push button which is connected to pin 8 of the Arduino UNO board. If the button is pressed the motor will change its direction directly. The L293D driver has 2 VCCs: VCC1 is +5V and VCC2 is +12V (same as motor nominal voltage). Pins IN1 and IN2 are the control pins where:

As shown in the circuit diagram we need only 3 Arduino terminal pins, pin 8 is for the push button which toggles the motor direction of rotation. Pins 9 and 10 are PWM signal outputs, at any time there is only 1 active PWM, this allows us to control the direction as well as the speed by varying the duty cycle of the PWM signal. The active PWM pin decides the motor direction of rotation (one at a time, the other output is logic 0).

PROGRAM

int in1=5;
int in2=6;
int en=3;

void setup()
{
  pinMode(in1,OUTPUT);
  pinMode(in2,OUTPUT);
  pinMode(en,OUTPUT);
}

void loop()
{
  analogWrite(en,255);
  digitalWrite(in1,LOW);
  digitalWrite(in2,HIGH);
  delay(500);
}

Output:

Screenshot 2024-04-05 160041

Sematic Diagram:

image

Table:

Screenshot 2024-04-05 161555

Graph:

Screenshot 2024-04-05 161538

RESULTS:

Arduino uno interfacing DC motor using L293D driver ic H- bridge is learned and executed

experiment-no-7-dc-motor-speed-control-using-arduino's People

Contributors

vasanthkumarch avatar tsanjaithirumal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.