Acclerometer based gesture controlled robotic arm project ppt
Robotic Arm- Project Report
-
Upload
hamza-akram -
Category
Documents
-
view
576 -
download
6
description
Transcript of Robotic Arm- Project Report
-
Digital
Robotic Arm Microprocessor System Project Report
-
For our parents with whose support and effort we were
able to carry out this project successfully
-
Table of Contents
Coding and Design ..1
1. Code ..1
2. Block Diagram .7
3. Work Division7
Design..3
1. Logic Design8
2. Simulation8
Hardware and Components..10
1. Details of Components.10
-
Microprocessor Systems
Robotic Arm Page 1
Coding and Design
1.1 Code:
# include
# include
# include
# define register ren
sbit prec=P0^7;
sbit MTR_up=P1^0;
sbit MTR_down=P1^1;
sbit MTR_left=P1^2;
sbit MTR_right=P1^3;
sbit MTR_grab=P1^4;
sbit MTR_leave=P1^5;
sbit MTR_claw_c=P1^6;
sbit MTR_claw_a=P1^7;
sbit rs=P0^0;
sbit rw=P0^1;
sbit en=P0^2;
sbit D0 = P2^0;
sbit D1 = P2^1;
sbit D2 = P2^2;
sbit D3 = P2^3;
sbit D4 = P2^4;
sbit D5 = P2^5;
sbit D6 = P2^6;
sbit busy = P2^7;
void MSDelay(unsigned int);
void serial_int();
void lcdcmd(unsigned char value);
void lcddata(unsigned char value);
void lcdready();
void main(void)
{
char ren;
int a,b,c,d ;
serial_int();
prec=1;
-
Microprocessor Systems
Robotic Arm Page 2
MTR_up=0;
MTR_down=0;
MTR_left=0;
MTR_right=0;
MTR_grab=0;
MTR_leave=0;
MTR_claw_c=0;
MTR_claw_a=0;
lcdcmd(0x38);
lcdcmd(0x0E);
lcdcmd(0x01);
lcdcmd(0x06);
lcdcmd(0x80);
for(d=1;d
-
Microprocessor Systems
Robotic Arm Page 3
RI=0;
lcdcmd(0XC0);
if(a==0X77)
{
MTR_up=1;
lcddata('U');lcddata('P');lcddata('.');lcddata('.');lcddata('
');
lcdcmd(0xC0);
MSDelay(b);
c++;
}
if(a==0X73)
{
MTR_down=1;
lcddata('D');lcddata('O');lcddata('W');lcddata('N');lcddata('
');
lcdcmd(0xC0);
MSDelay(b);
c++;
}
if(a==0X61)
{
MTR_left=1;
lcddata('L');lcddata('E');lcddata('F');lcddata('T');lcddata('
');
lcdcmd(0xC0);
MSDelay(b);
c++;
}
if(a==0X64)
{
MTR_right=1;
lcddata('R');lcddata('I');lcddata('G');lcddata('H');lcddata('T')
;
lcdcmd(0xC0);
MSDelay(b);
MTR_right=0;
c++;
}
if(a==0X67)
{
-
Microprocessor Systems
Robotic Arm Page 4
MTR_grab=1;
lcddata('G');lcddata('R');lcddata('A');lcddata('B');lcddata('
');
lcdcmd(0xC0);
MSDelay(b);
c++;
}
if(a==0X6C)
{
MTR_leave=1;
lcddata('D');lcddata('R');lcddata('O');lcddata('P');lcddata('
');
lcdcmd(0xC0);
MSDelay(b);
MTR_leave=0;
c++;
}
if(a==0X63)
{
MTR_claw_c=1;
lcddata('C');lcddata('s');lcddata('p');lcddata('i');lcddata('n')
;
lcdcmd(0xC0);
MSDelay(b);
c++;
}
if(a==0X76)
{
MTR_claw_a=1;
lcddata('A');lcddata('S');lcddata('p');lcddata('i');lcddata('n')
;
lcdcmd(0xC0);
MSDelay(b);
MTR_claw_a=0;
c++;
}
else
{
MTR_up=0;
MTR_down=0;
-
Microprocessor Systems
Robotic Arm Page 5
MTR_left=0;
MTR_right=0;
MTR_grab=0;
MTR_leave=0;
MTR_claw_a=0;
MTR_claw_c=0;
if(c==0)
{
lcddata('E');lcddata('r');lcddata('r');lcddata('o');lcddata('r')
;
lcdcmd(0xC0);
MSDelay(10000);
}
}
}
}
void serial_int()
{
TMOD=0x20;
TH1=0xFD;
SCON=0x50;
TR1=1;
}
void lcdcmd(unsigned char value)
{
lcdready();
P2=value;
rs=0;
rw=0;
en=1;
MSDelay(1);
en=0;
return;
}
void lcddata(unsigned char value)
{
-
Microprocessor Systems
Robotic Arm Page 6
lcdready();
P2=value;
rs=1;
rw=0;
en=1;
MSDelay(1);
en=0;
return;
}
void lcdready()
{
busy=1;
rs=0;
rw=1;
while (busy==1)
{
en=0;
MSDelay(1);
en=1;
}
return ;
}
void MSDelay(unsigned int value)
{
unsigned int x,y;
for(x=0;x
-
Microprocessor Systems
Robotic Arm Page 7
1.2 Block Diagram:
Figure 1: Block Diagram
1.3 Work Division:
Proteus Design and
Programming
Hardware and
Programming
Hardware and
Circuit Patching
-
Microprocessor Systems
Robotic Arm Page 8
Proteus Design and Simulation
Design:
Simulation(Precision is set as high ) : Vertical UP Motion:
-
Microprocessor Systems
Robotic Arm Page 9
Horizontal Left Motion:
Grab Motion of the Claw:
Other specified functions are also performed in a similar way.
-
Microprocessor Systems
Robotic Arm Page 10
Hardware Components
1) Microcontroller 89C5
2) LCD
3) 4-DC motors
4) RS-232 USB to Serial Converter
5) 10k Resistors
6) 2-L293D Motor Drivers
7) 2-Bread Boards
8) Max-232
9) Capacitors
10) NOT-Gate
11) Wires
12) LCD headers
Details of Components used:
a) RS-232 USB to serial Converter:
This is the main input device used to serially connect laptop or computer with the
microcontroller. The w,a,s,d buttons are used to control directions while g,l are used to
control grab and leave action of the hand .The c and v keys are used to control
clockwise and counter-clockwise action of the claw.
-
Microprocessor Systems
Robotic Arm Page 11
b) LCD:
An LCD will be used to display the instruction given to the robot as well as the precision
mode it is working in
c) Microcontroller (8051):
The instructions sent through the keyboard will be received by the microcontroller which
will then drive the respective motor depending upon the instruction .
-
Microprocessor Systems
Robotic Arm Page 12
d) MAX-232:
Max 232 is used to convert RS-232s signal to TTL voltage level that are acceptable by
the micro- controller.
e) L293D Motor Driver:
Motor Driver is used to drive the motors clockwise or anticlockwise depending upon the
input and also supply voltage to drive the motors.
-
Microprocessor Systems
Robotic Arm Page 13
f) DC motors:
DC motors were used to control the motion of the robot.