Académique Documents
Professionnel Documents
Culture Documents
Project Report
on
CERETIFICATE
Signature
Date: 24, dec, 2010 (Ms. NEHA SINGH)
Lecturer
Deptt.; Electronics and
Communication engg.
ACKNOWLEDGEMENT
We own our debt of gratitude to our project guide Ms. Neha Singh, for her
support, help and valuable guidance during the project tenure. It has been a
distinct honor for us to have worked under his esteemed guidance and has learnt
the art of science from her. It has been proud privilege to have worked under the
stimulatory guidance of an auspicious multifaceted teacher who gave us an
opportunity to do research in this field. Her scientific judgment, constructive
criticism and everlasting concern for betterment, sincerity and devotion have
been the role pillars that have provided us the architectural frame work for
designing this project to its present shape.
ABSTRACT
1. INTRODUCTION……………………………………………………..1
1.1 Block diagram……………………………………………………..2
1.2 Importance of the Research ……………………………………….2
1.3 Contributions of the project……………………………………… 2
2. ROBOTIC ARM………………………………………………………3
2.1 Overview of robotic arm…………………………………………3
2.2 Advantages………………………………………………………4
2.3 Disadvantages…………………………………………………....4
4. SIMULATION RESULTS…………………………………………...24
REFERENCES………………………………………………………..35
LIST OF FIGURES
NAME OF FIGURE PAGE NO.
INTRODUCTION
This project is designed so that students can understand the technology used in
now a day’s. Robotics which is used in most of the developed countries like
Germany, France, and Japan, USA, China etc. These Robots are controlled with
the remote. The Robot is programmed for the specific task. Every task of the
robot is defined; stoppage timing of the robot and angle of rotation between the
two places is defined by the servo motors. This is very wonderful project to
control the working of the robotic arm without wire. We are using these
components in our project which are CPLD, ULN 2003, Servo motor, Remote.
In this project we try to give the same protocol for this type of remote. We are
using CPLD to control all the function as CPU. CPLD controls the rotation of
motor. First the motor is controlled and rotation of motor is specified and
accordingly the different delay for each angle is provided. So this project works
for robotic arm with remote. The motion of the arm is controlled by the Servo
Motor.
1
Block diagram:
IR RECEIVER
CPLD
ROBOTIC ARM
REMOTE
CHAPTER 2
ROBOTIC ARM
Although these do not fall under the category of mobile robotics, the field of
robotics essentially started with arms and end-effectors (devices that attach to
the end of an arm such as grippers, electromagnets etc). Arms and grippers are
the best way for a robot to interact with the environment it is exploring. Simple
robot arms can have just one motion, while more complex arms can have a
dozen or more unique degrees of freedom.
2.2 Advantages
2.3 Disadvantages
CHAPTER 3
Servo motors are types of actuators that rotate to a specific angular position, and
were classically used in more expensive remote controlled vehicles for steering
or controlling flight surfaces. Now that they are used in a variety of
applications, the price of hobby servos has gone down significantly, and the
variety (different sizes, technologies, and strength) has increased.
5
The common factor to most servos is that the majority only rotate about 180
degrees. A hobby servo motor actually includes a DC motor, gearing,
electronics and a rotary potentiometer (which, in essence, measures the angle).
The electronics and potentiometer work in unison to activate the motor and stop
the output shaft at a specified angle. These servos are generally have three
wires: ground, voltage in, and a control pulse. The control pulse is usually
generated with a servo motor controller. A “robot servo“ is a new type of servo
that offers both continuous rotation and position feedback. All servos can rotate
CW and CCW.
6
DC Servo Motor Selection: The first selection approach is to choose a servo
motor large enough for a machine that has already been designed; the second is
to select the best available servo motor with a specific feature and then build the
system around it; and the third is to study servo motor performance and system
requirements and mate the two.
The final servo motor system design is usually the least sophisticated that meets
the performance specifications reliably. Servo motor requirements may include
control of acceleration, velocity, and position to very close tolerances. This says
that the servo designer must define the system carefully, establish the servo
motor's performance specifications, determine critical areas, and set up
tolerances. Only then will the designer be able to propose an adequate
servosystem and choose a servo motor type
3.1.2 7805 IC
Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or
variable output voltages. The maximum current they can pass also rates them.
Negative voltage regulators are available, mainly for use in dual supplies. Most
regulators include some automatic protection from excessive current (over load
protection) and overheating (thermal protection). Many of fixed voltage
regulator ICs has 3 leads. They include a hole for attaching a heat sink if
necessary.
7
Fig 3.2 7805 IC
This is most common voltage regulator that is still used in embedded designs.
LM7805 voltage regulator is a linear regulator made by several manufacturers
like Fairchild, or ST Microelectronics. They can come in several types of
packages. For output current up to 1A there may be two types of packages: TO-
220 (vertical) and D-PAK (horizontal).
8
Fig:3.3 7805 conections
With proper heat sink these LM78xx types can handle even more than 1A
current. They also have Thermal overload protection, Short circuit protection.
If your design won’t exceed 0.1A current you may chose regulator
LM78L05 with smaller packages and lower maximum current up to 0.1A. They
come in three main types of packages SO-8, SOT-89 and TO-92
9
Part Output (V) Input range (V)
LM7805 5 7–25
LM7806 6 8–25
LM7808 8 10.5–25
LM7809 9 11.5–25
LM7810 10 12.5–25
LM7812 12 14.5–30
LM7815 15 17.5–30
LM7818 18 21–33
LM7824 24 27–38
There are negative voltage regulators that work the same way. They are marked
as LM79xx.
10
3.1.3 CPLD
CPLD (Complex Programmable Logic Device) is an arrangement of multiple
SPLD-like blocks on a single chip. Alternative names are enhanced PLD
(EPLD), superPAL, and mega PAL. The CPLD we used is of Spartan2.
The most noticeable difference between a large CPLD and a small FPGA is the
presence of on-chip non-volatile memory in the CPLD. This distinction is
rapidly becoming less relevant, as several of the latest FPGA products also offer
models with embedded configuration memory.
CPLDs were an evolutionary step from even smaller devices that preceded
them, PLAs (first shipped by Signetics), and PALs. These in turn were preceded
by standard logic products that offered no programmability and were
"programmed" by wiring several standard logic chips together.
The main distinction between FPGA and CPLD device architectures is that
FPGAs are internally based on Look-up tables (LUTs) while CPLDs form the
logic functions with sea-of-gates
12
3.1.4 Crystal Oscillator (8MHz)
Quartz crystals are manufactured for frequencies from a few tens of kilohertz to
tens of megahertz. More than two billion (2×109) crystals are manufactured
annually. Most are small devices for consumer devices such as wristwatches,
clocks, radios, computers, and cell phones. Quartz crystals are also found inside
test and measurement equipment, such as counters, signal generators, and
oscilloscopes.
3.1.5 TSOP
Short for Thin Small Outline Package, it's a surface-mount memory packaging
from Intel. Features of the TSOP include the following: JEDEC and EIAJ
standard dimensions, it's the smallest leaded package form factor for flash, 0.5
mm (19.7 mil) lead pitch, reduced total package height, 1.20 mm maximum,
gull wing formed leads, and supports future flash density and feature growth.
15
Fig 3.4 TSOP
3.1.6 RC 5 Protocol
Various remote control systems are used in electronic equipment today. The
RC5 control protocol is one of the most popular and is widely used to control
numerous home appliances, entertainment systems and some industrial
applications including utility consumption remote meter reading, contact-less
apparatus control, telemetry data transmission, and car security systems. Philips
originally invented this protocol and virtually all Philips’ remotes use this
protocol.
Following is a description of the RC5. When the user pushes a button on the
hand-held remote, the device is activated and sends modulated infrared light to
transmit the command. The remote separates command data into packets. Each
data packet consists of a 14-bit data word, which is repeated if the user
continues to push the remote button. The data packet structure is as follows:
• 2 start bits,
• 1 control bit,
• 5 address bits,
• 6 command bits.
16
The start bits are always logic ‘1’ and intended to calibrate the optical receiver
automatic gain-control loop. Next, is the control bit. This bit is inverted each
time the user releases the remote button and is intended to differentiate
situations when the user continues to hold the same button or presses it again.
The next 5 bits are the address bits and select the destination device. A number
of devices can use RC5 at the same time. To exclude possible interference, each
must use a different address. The 6 command bits describe the actual command.
As a result, a RC5 transmitter can send the 2048 unique commands. The
transmitter shifts the data word, applies Manchester encoding and passes the
created one-bit sequence to a control carrier frequency signal amplitude
modulator. The amplitude-modulated carrier signal is sent to the optical
transmitter, which radiates the infrared light. In RC5 systems the carrier
frequency has been set to 36 kHz. Figure 1 displays the RC5 protocol.
The receiver performs the reverse function. The photo detector converts optical
transmission into electric signals, filters it and executes amplitude
demodulation. The receiver output bit stream can be used to decode the RC5
data word. This operation is done by the microprocessor typically, but complete
hardware implementations are present on the market as well. Single-die optical
receivers are being mass produced by a number of companies such as Siemens,
Temic, Sharp, Xiamen Hualian, Japanese Electric and others. Please note that
the receiver output is inverted (log. 1 corresponds to illumination absence).
17
Fig. 3.5 Timing diagrams of RC5 Protocol.
The basics of the protocol are well known. The handset contains a keypad and a
transmitter integrated circuit (IC) driving an IR LED. The command data is a
Manchester coded bit stream modulating a 36 kHz carrier. (Often the carrier
used is 38 kHz or 40 kHz, apparently due to misinformation about the actual
protocol.) The IR signal from the transmitter is detected by a specialized IC
with an integral photo-diode, and is amplified, filtered, and demodulated so that
the receiving device can act upon the received command. RC-5 only provides a
one-way link, with information traveling from the handset to the receiving unit.
18
The command comprises 14 bits:
• A start bit, which is always logic 1 and allows the receiving IC to set the
proper gain.
• A field bit, which denotes whether the command sent is in the lower field
(logic 1 = 0 to 63 decimal) or the upper field (logic 0 = 64 to 127
decimal). The field bit was added later by Philips when it was realized
that 64 commands per device were insufficient. Previously, the field bit
was combined with the start bit. Many devices still use this original
system.
• A control bit, which toggles with each button press. This allows the
receiving device to distinguish between two successive button presses
(such as "1", "1" for "11") as opposed to the user simply holding down
the button and the repeating commands being interrupted by a person
walking by, for example.
• A five-bit system address that selects one of 32 possible systems.
• A six-bit command that (in conjunction with the field bit) represents one
of the 128 possible RC-5 commands.
The 36 kHz carrier frequency was chosen to render the system immune to
interference from TV scan lines. Since the repetition of the 36 kHz carrier is
27.778 μs and the duty factor is 25%, the carrier pulse duration is 6.944 μs.
Since the high half of each symbol (bit) of the RC-5 code word contains 32
carrier pulses, the symbol period is 64 x 27.778 μs = 1.778 ms, and the 14
symbols (bits) of a complete RC-5 code word takes 24.889 ms to transmit. The
code word is repeated every 113.778 ms (4096 / 36 kHz) as long as a key
remains pressed. (Again, please note that these timings are not strictly followed
by all manufacturers, due to a lack of widespread distribution of accurate
information on the RC-5 protocol.)
19
3.2 Design description of Robotic Arm
The servo motor used in our project is VS-1. These servo motors are fixed with
the strips for the design of the arm. The servo motors are fixed in the way that
can work as an arm properly. There are 4 servo motors used. The 1st one is at
the base which is for base movement of 0 to 180 degree. The 2 nd and 3rd motor
is used for the arm movement of 0 to180 degree and the 4th motor is used for
catch the object.
Tsop
21
3.2.1 VLSI implementation of Robotic Arm
The robotic arm is controlled by the CPLD .Coding of the project is designed in
VHDL in the Xilinx software. The VHDL code is designed in 3 stages. In the
first stage the received data is decoded. Which is received from the remote by
the tsop? Then in the second stage the data is processed and a particular output
is generated. And in the 3 stage the servo motors are controlled in a particular
manner by using the generated output. The whole system is controlled by the
remote.
The 8MHz crystal oscillator clock has 0.125uSec in one cycle. We derive the
bode rate of 50Hz which has 0.02 sec time in one cycle. For the operation of
servomotors we have to send the different clocks of different duty cycles
according to the diagram given above.
22
For the 0 degree of the servomotor we generate 0.8ms time cycles means 6400
number of the cycles of the 8MHz clock for high logic ‘1’ and remaining
3993600 cycles remain low logic ‘0’, and assign this clock to motor for 0
degree position.
For the 90 degree of the servomotor we generate 1.52ms time cycles means
12000 number of the cycles of the 8MHz clock for high logic ‘1’ and remaining
3988000 cycles remain low logic ‘0’, and assign this clock to motor for 90
degree position.
For the 180 degree of the servomotor we generate 2.5ms time cycles means
20000 number of the cycles of the 8MHz clock for high logic ‘1’ and remaining
3980000 cycles remain low logic ‘0’, and assign this clock to motor for 180
degree position.
These clocks are assigned to the motors by the CPLD. The CPLD works on the
basis of remote transmitted data. This transmitted data is of 563Hz which is
modulated on the 36KHz frequency and this data is Manchester coded. The data
is sent by the IR waves. These IR waves are detected by the Tsop device and the
data is demodulated by the Tsop itself the Manchester coding remains in the
data. We detect the data from the received data by the coding in the VHDL that
data is then control the servomotors according to the code defined in the VHDL.
23
CHAPTER 4
SIMULATUION RESULTS
24
Output of servomotor when y=’1’
25
CHAPTER 5
26
APPENDIX
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity lcdrec is
Port ( clk : in STD_LOGIC;
m1: out std_logic;
d : out STD_LOGIC_VECTOR (10 downto 0);
y : in STD_LOGIC);
end lcdrec;
architecture Behavioral of lcdrec is
signal clock,clock1,clock2,clock3,clock4,clock5:std_logic:='0';
signal si: std_logic_vector(10 downto 0):="00000000000";
begin
process(clk)
variable c:integer range 0 to 80000000:= 0;
variable t1,t2,t3,t4,t5:integer range 0 to 80000000:= 0;
begin
if clk'event and clk='1' then
c:=c+1;
t1:=t1+1;
t2:=t2+1;
t3:=t3+1;
t4:=t4+1;
t5:=t5+1;
if c=114 then
27
clock<=not clock;
c:= 0;
end if;
if t1>=0 and t1<5000 then
clock1<='1';
elsif t1>=500 and t1<1600000 then
clock1<='0';
end if;
if t2>=0 and t2<72000 then
clock2<='1';
elsif t2>=7200 and t2<16000 then
clock2<='0';
end if;
if t3>=0 and t3<1200 then
clock3<='1';
elsif t3>=12000 and t3<1600000 then
clock3<='0';
end if;
if t4>=0 and t4<16800 then
clock4<='1';
elsif t4>=168000 and t4<16000 then
clock4<='0';
end if;
if t5>=0 and t5<190000 then
clock5<='1';
elsif t5>=19000 and t5<16000 then
clock5<='0';
end if;
if t1=160000 then
t1:=0;
28
end if;
if t2=160000 then
t2:=0;
end if;
if t3=160000 then
t3:=0;
end if;
if t4=160000 then
t4:=0;
end if;
if t5=160000 then
t5:=0;
end if;
end if;
end process;
process(clock,clock1,clock2,clock3,clock4,clock5)
variable p: std_logic_vector(27 downto 0):="00000000000000000000000000";
variable x:integer range 0 to 28 := 0;
begin
if clock'event and clock='1' then
if x=0 then
x:=x+1;
elsif x=1 then
if y='1' then
p(0):='0';
x:=x+1;
end if;
elsif x=2 then
if y='0' then
p(1):='1';
29
x:=x+1;
end if;
elsif x=3 then
p(2):=y;
x:=x+1;
elsif x=4 then
p(3):=y;
x:=x+1;
elsif x=5 then
p(4):= y;
x:=x+1;
elsif x=6 then
p(5):= y;
x:=x+1;
elsif x=7 then
p(6):= y;
x:=x+1;
elsif x=8 then
p(7):= y;
x:=x+1;
elsif x=9 then
p(8):= y;
x:=x+1;
elsif x=10 then
p(9):= y;
x:=x+1;
elsif x=11 then
p(10):= y;
x:=x+1;
elsif x=12 then
30
p(11):= y;
x:=x+1;
elsif x=13 then
p(12):= y;
x:=x+1;
elsif x=14 then
p(13):= y;
x:=x+1;
elsif x=15 then
p(14):= y;
x:=x+1;
elsif x=16 then
p(15):= y;
x:=x+1;
elsif x=17 then
p(16):= y;
x:=x+1;
elsif x=18 then
p(17):= y;
x:=x+1;
elsif x=19 then
p(18):= y;
x:=x+1;
elsif x=20 then
p(19):= y;
x:=x+1;
elsif x=21 then
p(20):= y;
x:=x+1;
elsif x=22 then
31
p(21):= y;
x:=x+1;
elsif x=23 then
p(22):= y;
x:=x+1;
elsif x=24 then
p(23):= y;
x:=x+1;
elsif x=25 then
p(24):= y;
x:=x+1;
elsif x=26 then
p(25):= y;
x:=x+1;
elsif x=27 then
p(26):= y;
x:=x+1;
elsif x=28 then
p(27):= y;
end if;
if x=28 then
x:=0;
end if;
if p(0)='0' and p(1)='1' then
si(0)<=p(6);
si(1)<=p(8);
si(2)<=p(10);
si(3)<=p(12);
si(4)<=p(14);
si(5)<=p(16);
32
si(6)<=p(18);
si(7)<=p(20);
si(8)<=p(22);
si(9)<=p(24);
si(10)<=p(26);
d<=si;
end if;
end if;
if si="11110011101" then
m1<=clock1 ;
elsif si="11111100011" then
m1<=clock2 ;
elsif si="11110010011" then
m1<=clock3;
elsif si="11111110010" then
m1<=clock4;
elsif si="11111101110" then
m1<=clock5;
end if;
end process;
end behavioral;
33
#PACE: Start of PACE I/O Pin Assignments
#PACE: Start of Constraints generated by PACE
#PACE: Start of PACE I/O Pin Assignments
NET "clk" LOC = "p80" ;
NET "d<0>" LOC = "p45" ;
NET "d<10>" LOC = "p63" ;
NET "d<1>" LOC = "p46" ;
NET "d<2>" LOC = "p47" ;
NET "d<3>" LOC = "p48" ;
NET "d<4>" LOC = "p49" ;
NET "d<5>" LOC = "p57" ;
NET "d<6>" LOC = "p58" ;
NET "d<7>" LOC = "p59" ;
NET "d<8>" LOC = "p61" ;
NET "d<9>" LOC = "p62" ;
NET "m1" LOC = "p147" ;
NET "y" LOC = "p142" ;
#PACE: Start of PACE Area Constraints
#PACE: Start of PACE Prohibit Constraints
#PACE: End of Constraints generated by PAC
34
References
[1] J C G Piementel and Hoang le-Hny, “A VHDL-based methodology to
Develop high performance servo drivers”, IEEE 0-7803-6401-5/00.
[2] Eric Monmasson and Marcian N cirstea “FPGA Design methodology for
industrial control systems- A Review”, IEEE trans on industrial
electronics vol-54,no.-4,AUG-2007.
[3] Heui-Wook Kim, Jong-Woo Choi, Seung-Ki SUI, “Accurate Position
Control for AC Servo Motor using Novel Speed Estimator” 0-7803-
3026-9/95, 1995 IEEE.
[4] Joon Hyuk Kang, Chung Hyuk Yim, and Dong I1 Kim, “Robust Position
Control of AC Servo Motors” 0-7803-3026-9/95 1995 IEEE.
[5] Sven Behnke and Michael Schreiber “Digital Position Control for
Analog Servos” Proceedings,IEEE-RAS,Italy,Dec-06.
[6] E. Monmasson, and Y.A. Chapuis “Contributions of FPGAs to the
Control of Electrical Systems, a Review” IEEE Industrial Electronics
Society Newsletter ISSN 0746-1240 VOL. 49, NO. 4 2002.
[7] Dongmei Yu, Qingding Guo and Qing Hu“ Position Control of Linear
Servo System Using Intelligent Feedback Controller” International
Conference on Intelligent Systems Design and Applications (ISDA'06)
0-7695-2528-8/06 © 2006.
[8] VHDL primer (third edition, J. Bhasker).
[9] VHDL programming by example (fourth edition, Douglas L. Perry).
35