Introduction: LAB( L293D + ARDUINO CHIP + BREADBOARD )

In this Instructables, I will explain the concept behind the LAB rc car & hopefully provide enough information to build this efficiently.

Step 1: Objective

Lets build remote controlled robotic car from scratch.

Step 2: Parts Required

Breadboard

Atmega328p-pu [ Arduino Uno Chip ]

L293D [ Motor Driver IC ]

IR Receiver

7805

10uF x 2 Capacitor

IN 4007 Diode

9v x 2 Battery

22pF x 2 Capacitor

16mhz Oscillator

10k resistor

220 ohm resistor

DC Motor x 2

Chassis

Some Wires

Step 3: Breadboard Arduino

Prepare Arduino on breadboard & atmega328p-pu micro-controller using the following layout.

Step 4: Breadboard L293D

Enable 1,2 ---> +5v

Enable 3,4 ---> +5v

VCC1 ---> +5v

VCC2 ---> +9v to +12v

GND --- > GND

INPUT 1 ---> D7

INPUT 2 ---> D8

INPUT 3 ---> D9

INPUT 4 ---> D10

OUTPUT 1 ----> DC Motor A Red Wire

OUTPUT 2 ----> DC Motor A Black Wire

OUTPUT 3 ----> DC Motor B Red Wire

OUTPUT 4 ----> DC Motor B Black Wire

Step 5: IR Reciever

Out ---> D4

Step 6: Arduino Programming

#include<IRremote.h>

int rightforward=8,rightbackward=7,leftforward=10,leftbackward=9;

int RECV_PIN=4,decode;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{

pinMode(leftforward,OUTPUT); pinMode(leftbackward,OUTPUT);

pinMode(rightforward,OUTPUT); pinMode(rightbackward,OUTPUT);

irrecv.enableIRIn();

}

void loop()

{

if(irrecv.decode(&results))

{

decode=results.value;

Serial.println(decode);

switch(decode)

{

case -10201: moveforward(); break;

case -4081 : movebackward(); break;

case 12495 : moveleft(); break;

case 28815 : moveright(); break;

case -20401: stop();

}

delay(500);

irrecv.resume();

}

}

void moveforward()

{

digitalWrite(leftforward,HIGH);

digitalWrite(rightforward,HIGH);

digitalWrite(leftbackward,LOW);

digitalWrite(rightbackward,LOW);

}

void movebackward()

{

digitalWrite(leftforward,LOW);

digitalWrite(rightforward,LOW);

digitalWrite(leftbackward,HIGH);

digitalWrite(rightbackward,HIGH);

}

void moveleft()

{

digitalWrite(leftforward,LOW);

digitalWrite(rightforward,HIGH);

digitalWrite(leftbackward,LOW);

digitalWrite(rightbackward,LOW);

}

void moveright()

{

digitalWrite(leftforward,HIGH);

digitalWrite(rightforward,LOW);

digitalWrite(leftbackward,LOW);

digitalWrite(rightbackward,LOW);

}

void stopnow()

{

digitalWrite(leftforward,LOW);

digitalWrite(rightforward,LOW);

digitalWrite(leftbackward,LOW);

digitalWrite(rightbackward,LOW);

}

From here u can download IRremote library files.

Step 7: Conclusion

Here by I hav completed RC car project from scratch using LAB.

LAB : L293D MOTOR DRIVER + ATMEGA328P + BREADBOARD

Comments

author
tomatoskins (author)2015-12-23

Really cool concept! Any plans on making anything RC out of this?

About This Instructable

2,472views

27favorites

More by it world:LAB( L293D + ARDUINO CHIP + BREADBOARD )
Add instructable to: