Shubham DevkarArbaz Khan
Published © GPL3+

MOTOR Driver L293D FOR DIY ROBOT KITS MADE BY SDTECH ROBOTIC

MOTOR DRIVER L293D FOR DIY ROBOT KITS MADE BY SDTECH ROBOTICS L293D MOTOR DRIVER FOR 5-12V motor

IntermediateFull instructions provided3 hours3,272
MOTOR Driver L293D FOR DIY ROBOT KITS MADE BY SDTECH ROBOTIC

Things used in this project

Hardware components

Dual H-Bridge motor drivers L293D
Texas Instruments Dual H-Bridge motor drivers L293D
×1
Female Header 8 Position 1 Row (0.1")
Female Header 8 Position 1 Row (0.1")
×1
Terminal Block Interface, Terminal Block
Terminal Block Interface, Terminal Block
×1
Male-Header 36 Position 1 Row- Long (0.1")
Male-Header 36 Position 1 Row- Long (0.1")
×1
Arduino Nano R3
Arduino Nano R3
×1
copper clad
×1

Software apps and online services

Arduino IDE
Arduino IDE
Fusion 360
Autodesk Fusion 360

Hand tools and fabrication machines

Drill / Driver, Cordless
Drill / Driver, Cordless

Story

Read more

Schematics

schematics

L293D SDTECH ROBOTICS PCB BOTTOM SIDE

L293D SDTECH ROBOTICS PCB TOP SIDE

L293D SDTECH ROBOTICS

Code

L293d code

Arduino
//L293D
//Motor A
const int motorPin1  = 5;  // Pin 14 of L293
const int motorPin2  = 6;  // Pin 10 of L293
//Motor B
const int motorPin3  = 10; // Pin  7 of L293
const int motorPin4  = 9;  // Pin  2 of L293

//This will run only one time.
void setup(){
 
    //Set pins as outputs
    pinMode(motorPin1, OUTPUT);
    pinMode(motorPin2, OUTPUT);
    pinMode(motorPin3, OUTPUT);
    pinMode(motorPin4, OUTPUT);
    
    //Motor Control - Motor A: motorPin1,motorpin2 & Motor B: motorpin3,motorpin4

    //This code  will turn Motor A clockwise for 2 sec.
    digitalWrite(motorPin1, HIGH);
    digitalWrite(motorPin2, LOW);
    digitalWrite(motorPin3, LOW);
    digitalWrite(motorPin4, LOW);
    delay(2000); 
    //This code will turn Motor A counter-clockwise for 2 sec.
    digitalWrite(motorPin1, LOW);
    digitalWrite(motorPin2, HIGH);
    digitalWrite(motorPin3, LOW);
    digitalWrite(motorPin4, LOW);
    delay(2000);
    
    //This code will turn Motor B clockwise for 2 sec.
    digitalWrite(motorPin1, LOW);
    digitalWrite(motorPin2, LOW);
    digitalWrite(motorPin3, HIGH);
    digitalWrite(motorPin4, LOW);
    delay(2000); 
    //This code will turn Motor B counter-clockwise for 2 sec.
    digitalWrite(motorPin1, LOW);
    digitalWrite(motorPin2, LOW);
    digitalWrite(motorPin3, LOW);
    digitalWrite(motorPin4, HIGH);
    delay(2000);    
    
    //And this code will stop motors
    digitalWrite(motorPin1, LOW);
    digitalWrite(motorPin2, LOW);
    digitalWrite(motorPin3, LOW);
    digitalWrite(motorPin4, LOW);
  
}


void loop(){
  

}

Credits

Shubham Devkar

Shubham Devkar

13 projects • 14 followers
Experienced Electronics engineer, excellent at PCB Designing, control circuit development.circuit designing, hands-on experience with MCUs
Arbaz Khan

Arbaz Khan

7 projects • 2 followers
CTO of STAR (Space Technology and Aeronautical Rocketry) Experienced CTO with a demonstrated history of working in Rocket technology.

Comments