Professional Documents
Culture Documents
REPORT
on
BY:
CHETNA SACHDEVA
Next, I thank Mr. Amit and Mr. Vimal, workshop assistants at PLC
Institute of Electronics for the vital practical assistance they rendered. I
am thankful to them especially for their consummate help in arranging
whatever I required for the project.
Date:
INTRODUCTION
I have used 8051 microcontroller for my project, the very basic one.
Atmel’s AT89S52 is the most widely used in this category. This has
been used in my project.
TABLE OF CONTENTS
3. INTRODUCTION TO PROJECT
5. ELECTRONICS STRUCTURE
5.1 8051 Microcontroller Module
5.2 DTMF Module
5.3 H-Bridge Module
6. SOFTWARE STRUCTURE
6.1 Installation and Usage of IDE software
6.2 Installation and Usage of PLC Burner
6.3 Program Code
6.4 Hardware Tools Used for Installation
7. BIBLIOGRAHY
EMBEDDED SYSTEMS
Robot
A robot is a virtual or mechanical artificial agent. In practice, it is
usually an electro-mechanical machine which is guided by computer or
electronic programming, and is thus able to do tasks on its own. Another
common characteristic is that by its appearance or movements, a robot
often conveys a sense that it has intent or agency of its own. In simple
terms, it is a machine associated with mechanical motion.
For example, washing machine, bikes, CD-ROM of a PC etc. are all
robots.
Robotics
The study of robots is robotics. Technically, robotics is the engineering
science and technology of robots, and their design, manufacture,
application, and structural disposition. Robotics is related to
electronics, mechanics, and software. Therefore, it is sometimes termed
as Mechatronics.
Automation
Automation is the use of technologies to reduce the need for human
work in the production of goods and services. Robotics is one of the
many ways to achieve this. The use of robots offers many advantages
such as reduced risk, increased accuracy and increased productivity.
MICROPROCESSOR VS
MICROCONTROLLER
Interrupt 6 6 8 6 6 6
Sources
Timers 2 2 3 2 2 2
Serial Port 1 1 1 1 1 1
PIN DESCRIPTION
PIN 9: PIN 9 is the reset pin which is used to reset the microcontroller’s
internal registers and ports upon starting up.
PINS 18 & 19: 8051 has a built-in oscillator amplifier. Hence, we need
to only connect a crystal at these pins to provide clock pulses to the
circuit.
PIN 40 and 20: Pins 40 and 20 are VCC and Ground respectively. The
8051 chip needs +5V, 500mA to function properly.
PIN 29: It is called PSEN. This is "program select enable". This pin is
used for parallel programming.
PIN 30: PIN 30 is called ALE (address latch enable), which is used
when multiple memory chips are connected to the controller and only
one of them needs to be selected. This pin is high when address needs to
be given to ports P0 and P2, otherwise for data it is kept low.
Ports
There are four 8-bit ports: P0, P1, P2 and P3.
PORT P1 (Pins 1 to 8): The port P1 is a general purpose input/output
port which can be used for a variety of interfacing tasks. The other ports
P0, P2 and P3 have dual roles or additional functions associated with
them based upon the context of their usage.
PORT P3 (Pins 10 to 17): PORT P3 acts as a normal I/O port, but Port
P3 has additional functions such as, serial transmit and receive pins, 2
external interrupt pins, 2 external counter inputs, read and write pins for
memory access.
8051 Module
Wheel
H-Bridge
Module
DTMF Cellphone
Module
LIST OF COMPONENTS AND TOOLS
S.No. Tool
1. Drilling Machine
2. Screw Driver
3. Hammer
Chassis
The sheet used for switches in household switching boards has
been used as the chassis of the robot.
The height of the robot is so adjusted that the wheels uniformly
touch the ground in order to make a smooth moving.
Wheels
The wheels are mechanically connected to the D.C. motors in
order to make the robot move.
The wheels are made up of rubber in order to increase the friction.
Clamps
The clamps are used in order to hold the D.C. motors. The clamps
provide efficient grip to the motors so that motors do not change
position while the robot is moving.
SELECTION OF MATERIAL
DESCRIPTION OF A MOTOR
In any electric motor, operation is based on simple
electromagnetism. A current-carrying conductor generates a
magnetic field; when this is then placed in an external magnetic
field, it will experience a force proportional to the current in the
conductor, and to the strength of the external magnetic field.
Every DC motor has six basic parts -- axle, rotor (or armature),
stator, commutator, field magnet(s), and brushes. In most common
DC motors), the external magnetic field is produced by high-
strength permanent magnets1. The stator is the stationary part of
the motor -- this includes the motor casing, as well as two or more
permanent magnet pole pieces. The rotor (together with the axle
and attached commutator) rotates with respect to the stator. The
rotor consists of windings (generally on a core), the windings
being electrically connected to the commutator. The above
diagram shows a common motor layout -- with the rotor inside the
stator (field) magnets.
The geometry of the brushes, commutator contacts, and rotor
windings are such that when power is applied, the polarities of the
energized winding and the stator magnet(s) are misaligned, and the
rotor will rotate until it is almost aligned with the stator's field
magnets. As the rotor reaches alignment, the brushes move to the
next commutator contacts, and energize the next winding. Given
our example two-pole motor, the rotation reverses the direction of
current through the rotor winding, leading to a "flip" of the rotor's
magnetic field, driving it to continue rotating.
SPECIFICATION OF DC MOTOR
The electrical actuators used in the project are Geared DC Motors.
Their specification is as under.
7805 Voltage
LED
Regulator
Pin
10 microF Connectors
Capacitors (Port0)
Port1
10K
Resistor
Port2
Port3
CIRCUIT DIAGRAM
LIST OF COMPONENTS
S.No. Tool/Material
1. Soldering Machine
2. Solder Wire (flux)
3. Cutter
4. Tin Wire
TESTING AND DEBUGGING
This module was tested using the I/O Cards, USB Cables and PLC
Burner Kit. The following problems were faced during the course of
testing and were corrected accordingly.
1. On providing ground, the supply was getting OFF. This was due
to short-circuiting, which was removed using soldering machine.
2. Some ports were not showing any response on the I/O Cards.
This was due to short-circuiting of port pins, which was removed.
After the removal of above problems, the module worked properly and
was ready to be used in the project.
DTMF MODULE
This module has been used to decode the signals received from the
cellphone and to pass these decoded signals to the 8051 module,
which then acts accordingly. Further description of the module is as
follows.
BRIEF DESCRIPTION
Dual-tone multi-frequency (DTMF) signaling is used for
telecommunication signaling over analog telephone lines in the
voice-frequency band between telephone handsets and other
communications devices and the switching center. DTMF, also
known as touch-tone, are the audible sounds you hear when you
press keys on your phone.
The DTMF keypad is laid out in a 4 X 3 matrix, with each row
representing a low frequency, and each column representing a high
frequency. Pressing a single key (such as ‘1’) will send a
sinusoidal tone for each of the two frequencies (697 and 1209
hertz (Hz)). The multiple tones are the reason for calling the
system multifrequency. These tones are then decoded by the
switching center to determine which key was pressed.
LEDs
Resistors
1K Resistors IC8870
on
18 Pin IC Base
CIRCUIT DIAGRAM
LIST OF COMPONENTS
S.No. Tool/Material
1. Soldering Machine
2. Solder Wire (flux)
3. Cutter
4. Tin Wire
TESTING AND DEBUGGING
This module was tested using a cellphone, whose earphones were
connected to the two input pins of the module. The following problems
were faced during the course of testing and were corrected accordingly.
1. Initially, on giving power supply the LED was not glowing and
I inferred that module is not receiving power. But later on it was
found that LED was defective, which was thus changed.
2. The module was not decoding the signals sent to it. It was due to
a missing connection and minor short-circuiting. It was corrected.
After the removal of above problems, the module worked properly and
was ready to be used in the project.
H-BRIDGE MODULE
BRIEF DESCRIPTION
An H-bridge is an electronic circuit which enables a voltage to be
applied across a load in either direction. These circuits are often used in
robotics and other applications to allow DC motors to run forwards and
backwards. H-bridges are available as integrated circuits, or can be built
from discrete components.
10K
Resistors
Pin
Connectors
Control Inputs
Motor
Inputs IC L293D
On
16 Pin IC Base
CIRCUIT DIAGRAM
S.No. Tool/Material
1. Soldering Machine
2. Solder Wire (flux)
3. Cutter
4. Tin Wire
TESTING AND DEBUGGING
This module was tested using DC Motors. The following problems were
faced during the course of testing and were corrected accordingly.
1. The module was not able to drive the motors as there was a
wrong connection, which was corrected by removing the soldering
first and then inserting a jumper.
After the removal of the above problem, the module worked properly
and was ready to be used in the project.
ASSEMBLING AND WORKING
All the above described modules are assembled to get the final project.
The final circuit diagram is as shown below.
WORKING OF THE ROBOT
3. In the course of the call, when a key is pressed the corresponding tone
is heard at the cellphone attached to the robot. This tone is sent to
DTMF Decoder(IC 8870) for decoding.
4. The decoded signals from this module are sent to 8051 module
(AT89S52) for interpretation. The microcontroller takes the decision on
this basis and passes signals to the motor driver circuit (L293D) to make
the motors turn accordingly.
5. The motors turn based on the signals received from the 8051 module
and thus, the robot moves in the desired direction with the help of
wheels attached to the motors.
FLOWCHART
START
A P3
MOVE
CMP with
BACKWARD
“08” DD
CMP with
MOVE LEFT
“04”
CMP with
“05” STOP
INPUT/OUTPUT PIN DESCRIPTION
Port3 has been used as the Input Port and Port0 as the Output Port
in the project. Five pins of port3 (from P3.0 to P3.4) are required
to receive signals from the DTMF decoder. Four pins of port0
(from P0.0 to P0.3) are required to pass interpreted signals to the
motor driver circuit.
Port3 receives the decoded signals from DTMF Decoder and the
microcontroller interprets them and sends the output signals to
Port0. The motor driver circuit receives signals from this port and
accordingly controls the rotation of motors and wheels leading to
the desired movement of the robot.
The signals received at the input port as per the desired movement
of the robot and the signals passed onto the output port based on
the interpretation are depicted in the table below.
1: Low
PROGRAM
ORG 00H
CJNE A,#11110010B,NXT
AJMP FWD
SOFTWARE TOOLS
1. 8051IDE
2. PLCIE Burner
Plc_8051.exe
1. Open the contents of the CD. The following window will appear.
2. Double click on 8051. The following window will be displayed.
1
3
2
2
1
5
3
4
1. Window 1 is the main window where the program is written.
2. Window 2 shows the output window, which on the execution of the
program shows the errors occurred, warnings encountered and other
similar data. This is selected by pointing to ‘view’ ‘output’.
3. Window 3 shows the registers used along with their values. For
dynamic variation of these values and reflecting their values in the
memory, one needs to ‘Simulate’. This is selected by pointing to
‘view’ ‘Registers’.
4. Window 4 shows Port Window which shows the values acquired by
the ports. This window is also useful when simulating. This is
selected by pointing to ‘view’ ‘Ports’.
5. Window 5 shows the values of important internal variables including
Timers, TMOD, IE etc.
1. File 1 is a .ASM file and is the file in which you have written your
program.
2. File 2 is a .HEX file
3. File 3 is a shortcut to the .ASM file
4. File 4 is a .LST which contains all the commands, important
definitions of the labels and the addresses of each command.
PLC BURNER 51
1. I/O Cards(2)
Reset Switch
Power Section
ISP
LCD
Interface
USB
Input
BIBLIOGRAPHY