Professional Documents
Culture Documents
INTRODUCTION
DEPARTMENT OF IE
1 | Page
V.E.S POLYTECHNIC
1 INTRODUCTION:
Robotics is part of Todays communication. In todays world
ROBOTICS is fast growing and interesting field. It is simplest way for latest technology
modification. Now a days communication is part of advancement of technology, so we
decided to work on ROBOTICS field, and design something which will make human life
simpler in day today aspect. Thus we are supporting this cause.
This project is basic stage of any automatic robot.
This ROBOT has sufficient intelligence to cover the maximum area of provided space. It has
a infrared sensor which are used to sense the obstacles coming in between the path of
ROBOT. It will move in a particular direction and avoid the obstacle which is coming in its
path.
We have used two D.C motors to give motion to the ROBOT. The
construction of the ROBOT circuit is easy and small .The electronics parts used in the
ROBOT circuits are easily available and cheap too.
DEPARTMENT OF IE
2 | Page
V.E.S POLYTECHNIC
BLOCK DIAGRAM
2 Block Diagram:
DEPARTMENT OF IE
3 | Page
V.E.S POLYTECHNIC
2.1 DESCRIPTION:
Basically circuit consist of following blocks:
1)
2)
3)
4)
5)
Sensors
Microcontroller 89V51RD2
Relay Circuit
Motors
Power Supply
OBSTACLE SENSOR:
DEPARTMENT OF IE
4 | Page
V.E.S POLYTECHNIC
DEPARTMENT OF IE
5 | Page
V.E.S POLYTECHNIC
CIRCUIT DIAGRAM
DEPARTMENT OF IE
6 | Page
V.E.S POLYTECHNIC
3 CIRCUIT DIAGRAM
DEPARTMENT OF IE
7 | Page
V.E.S POLYTECHNIC
3.1Explanation:
DEPARTMENT OF IE
8 | Page
V.E.S POLYTECHNIC
Motion
LEFT Wheel
RIGHT Wheel
Forward
Backward
Rotate LEFT
Rotate RIGHT
Motor Working
DEPARTMENT OF IE
9 | Page
V.E.S POLYTECHNIC
DEPARTMENT OF IE
10 | P a g e
V.E.S POLYTECHNIC
PCB LAYOUT
DEPARTMENT OF IE
11 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
12 | P a g e
V.E.S POLYTECHNIC
4.1 BASCOM-8051
BASCOM-8051 is the Windows BASIC COMPILER for the 8051 family. It
is designed to run on W95/W98/NT/W2000 and XP.
Key Benefits: Structured BASIC with labels.
Structured programming with IF-THEN-ELSE-END IF, DO-LOOP,
WHILE-WEND, SELECT- CASE.
Fast machine code instead of interpreted code.
Variables and labels can be as long as 32 characters.
Bit, Byte, Integer, Word, Long, Single and String variables.
Compiled programs work with any 8051 uP such as AT89C1051,
AT89C2051, 8031, 8032, 8051, 8052, 80552, 80535 and 80537 m
Processors.
Statements are highly compatible with Microsofts VB/QB.
Special commands for LCD-displays , I2C chips and 1WIRE chips.
Integrated terminal emulator with download option.
Integrated simulator for testing.
Integrated flash programmer and support for SPI, PG2051, PG302,
SE512, SE514, TAFE. (hardware can be purchased separately)
Editor with statement highlighting.
Context sensitive help.
The following statements are supported:Decision and structures:
IF, THEN, ELSE, ELSEIF, END IF, DO, LOOP, WHILE, WEND, UNTIL, EXIT
DO, EXIT WHILE, FOR, NEXT, TO, DOWNTO, STEP, EXIT FOR, ON ..
GOTO/GOSUB, SELECT, CASE.
Input and output:
PRINT, INPUT, INKEY, PRINTHEX, INPUTHEX, LCD, UPPERLINE,
DEPARTMENT OF IE
13 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
14 | P a g e
V.E.S POLYTECHNIC
Compiler directives:
$INCLUDE, $NOINIT, $BAUD and $CRYSTAL, $OBJ, $SERIALINPUT,
$SERIALOUTPUT, $ROMSTART, $RAMSIZE, $RAMSTART, $MONSTART,
$IRAMSTART, $DEFAULT XRAM, $ASM-$END ASM, $LCD.
Conditional compilation:
#IF, #ELSE, #ENDIF
String manipulation:
STRING, SPACE, LEFT, RIGHT, MID, VAL, HEXVAL, LEN, STR, HEX, LCASE,
UCASE
To make a program takes just a few steps:
Write the program in BASIC
Compile it to fast machine binary code
Test the result with the integrated simulator (with additional
hardware you can simulate the hardware too)
Program the chip with one of the integrated programmers.
(hardware must be purchased separately)
DEPARTMENT OF IE
15 | P a g e
V.E.S POLYTECHNIC
The simulator let you test your program before writing it to the uC.
DEPARTMENT OF IE
16 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
17 | P a g e
V.E.S POLYTECHNIC
When you are done with the simulator it is time to program the chip using one of the
supported programmer drivers.
RUNNING BASCOM-8051
DEPARTMENT OF IE
18 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
19 | P a g e
V.E.S POLYTECHNIC
EXPRESS SCH
DEPARTMENT OF IE
20 | P a g e
V.E.S POLYTECHNIC
Designing 2 or 4 layer boards using the Express PCB program is very simple. Start by
inserting the component footprints, and then drag them into position. Next, connect the
pins by drawing the traces.
If you link your schematic file to the PCB, the Express PCB program will highlight
the pins that should be wired together in blue.
We recommend that you begin your project by drawing a schematic. While not
required, it will save you time when designing your PCB.
Drawing a schematic with the Express SCH program is as easy as placing the
components on the page and wiring the pins together.
The schematic can then be linked to your PCB file, so that the PCB knows what
needs to be connected together.
P.C.B. is printed circuit board which is of insulating base with layer of thin
copper-foil.
DEPARTMENT OF IE
21 | P a g e
V.E.S POLYTECHNIC
The circuit diagram is then drawn on the P. C. B. with permanent marker and then
it is dipped in the solution of ferric chloride so that unwanted copper is removed
from the P.C.B., thus leaving components interconnection on the board.
The specification of the base material is not important to know in most of the
application, but it is important to know something about
The resistance of copper foil will have an affect on the circuit operation.
resistivity,
While designing a layout, it must be noted that size of the board should be as
small as possible.
DEPARTMENT OF IE
can be made.
22 | P a g e
V.E.S POLYTECHNIC
from one another and neither one should ignore the fact that some component
reed ventilation, which considerely the dimension of the relay and transformer in
view of arrangement, the bolting arrangement is also considered.
The layout is first drawn on paper then traced on copper plate which is finalized
with the pen or permanent marker which is efficient and clean with etching.
The resistivity also depends on the purity of copper, which is highest for low
purity of copper. The high resistance path are always undesired for soldered
connections.
The most difficult part of making an original printed circuit is the conversion
from, theretical circuit diagram into wiring layout. without introducing cross over
and undesirable effect.
The board used for project has copper foil thickness in the range of 25 40 75
microns.
It is necessary to design copper path extra-large. There are two main reasons for
this,
i)
ii)
DEPARTMENT OF IE
23 | P a g e
V.E.S POLYTECHNIC
The first function is to connect the components together in their right sequence
with minimum need for interlinking i.e. the jumpers with wire connections.
It must be noted, that when layout is done, on the next day it should be dipped in
the solution and board is move continuously right and left after etching perfectly
the board is cleaned with water and is drilled.
After that holes are drilled with 1 mm or 0.8 mm drill. Now the marker on the P.
C. B. is removed.
The Printed Circuit Board is now ready for mounting the components on it.
4.5 SOLDERING :
For soldering of any joints first the terminal to be soldered are cleaned to remove
oxide film or dirt on it. If required flux is applied on the points to be soldered.
Now the joint to be soldered is heated with the help of soldering iron. Heat
applied should be such that when solder wire is touched to joint, it must melt
quickly.
The joint and the soldering iron is held such that molten solder should flow
smoothly over the joint.
When joint is completely covered with molten solder, the soldering iron is removed.
In case of dry solder joint, a air gap remains in between the solder matenal and the
joint. It means that soldering is improper. This is removed and again soldering is
done.
DEPARTMENT OF IE
24 | P a g e
V.E.S POLYTECHNIC
COMPONENT USED
DEPARTMENT OF IE
25 | P a g e
V.E.S POLYTECHNIC
Microcontroller
Power Supply unit
Motors
IR Sensors
26 | P a g e
V.E.S POLYTECHNIC
5.1.3 Features:
Compatible with MCS-51 Products
DEPARTMENT OF IE
27 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
28 | P a g e
V.E.S POLYTECHNIC
Pin Description:
VCC 40:
Supply voltage.
GND 20:
Ground.
Port 0 (32-39):
Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin can sink
eight TTL inputs. When 1sare written to port 0 pins, the pins can be used as high impedance
inputs. Port 0 can also be configured to be the multiplexed low order address/data bus during
accesses to external program and data memory. In this mode, P0 has internal pull-ups. Port 0
also receives the code bytes during Flash Programming and outputs the code bytes during
program verification. External pull-ups are required during program verification
Port 1 (1-8):
DEPARTMENT OF IE
29 | P a g e
V.E.S POLYTECHNIC
Port 2 (21-28):
Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output buffers
can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by
the internal pull-ups and can be used as inputs. Port 2 emits the high-order address byte
during fetches from external program memory and during accesses to external data memory
that use 16-bit addresses (MOVX @DPTR). In this application, Port 2 uses strong internal
pull-ups when emitting 1s. During accesses to external data memory that use 8-bit addresses
(MOVX @ RI), Port 2emits the contents of the P2 Special Function Register. Port 2 also
receives the high-order address bits and some control signals during Flash programming and
verification
Port 3 (10-17):
Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers
can sink/source four TTL inputs. When 1s are writ 1s are written to Port 3 pins, they are
pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are
externally being pulled low will source current (IIL) because of the pull-ups. Port 3 also
serves the functions of various special features of the AT89S52, as shown in the following
table.
Port 3 also receives some control signals for Flash programming and verification.
DEPARTMENT OF IE
30 | P a g e
V.E.S POLYTECHNIC
RST
Reset input. A high on this pin for two machine cycles while the oscillator is running
resets the device.
ALE/PROG
Address Latch Enable (ALE) is an output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse input (PROG) during
Flash programming. In normal operation, ALE is emitted at a constant rate of1/6 the
oscillator frequency and may be used for external timing or clocking purposes. Note,
however, that one ALE pulse is skipped during each access to external data Memory. If
desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set,
ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly
pulled high. Setting the ALE-disable bit has no effect if the micro controller is in external
execution mode.
PSEN
Program Store Enable (PSEN) is the read strobe to external program memory. When the
AT89S52 is executing code from external program memory, PSEN is activated twice each
machine cycle, except that two PSEN activations are skipped during each access to external
data memory.
EA/VPP
External Access Enable. EA must be strapped to GND in order to enable the
device to fetch code from external program memory locations starting at 0000H up to
FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on
reset. A should be strapped to VCC for internal program executions. This pin also receives
the 12-voltProgramming enables voltage (VPP) during Flash programming.
DEPARTMENT OF IE
31 | P a g e
V.E.S POLYTECHNIC
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2
Output from the inverting oscillator amplifier.
Oscillator Characteristics:
XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier that can
be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz crystal or
ceramic resonator may be used. To drive the device from an External clock source, XTAL2
should be left unconnected while XTAL1 is driven.
Oscillator Connections
Special Function Register (SFR) Memory:
Special Function Registers (SFR s) are areas of memory that control specific
functionality of the 8051 processor. For example, four SFRs permit access to the 8051s 32
input/output lines. Another SFR allows the user to set the serial baud rate, control and access
timers, and configure the 8051s interrupt system.
Accumulator: The Accumulator, as its name suggests is used as a general register to
accumulate the results of a large number of instructions. It can hold 8-bit (1-byte) value and
is the most versatile register.
The R registers: The R registers are a set of eight registers that are named R0, R1. Etc.
up to R7. These registers are used as auxiliary registers in many operations.
DEPARTMENT OF IE
32 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
33 | P a g e
V.E.S POLYTECHNIC
Timer 2:
Timer 2 is a 16bit
Timer /
Counter that can
operate as either
a timer or an
event counter. The
type of operation is
selected by bit
C/T2 in the SFR T2CON. Timer 2 has three operating Modes : capture , auto-reload
( up or down Counting ) , and baud rate generator . The modes are selected by bits in
T2CON. Timer2 consists of two 8-bit registers, TH2 and TL2. In the Timer function, the
TL2 register is incremented every machine cycle. Since a machine cycle consists of 12
oscillator periods, the count rate is 1/12 of the oscillator frequency.
In the Counter function , the register is incremented in response to a 1-to-0
transition at its corresponding external input pin , T2 .When the samples show a high
in one cycle and a low in the next cycle, the count is incremented . Since two
machine cycles (24 Oscillator periods ) are required to recognize 1-to-0 transition ,
the maximum count rate is 1 / 24 of the oscillator frequency . To ensure that a
given level is sampled at least once before it changes , the level should be held
for at least one full machine cycle.
DEPARTMENT OF IE
34 | P a g e
V.E.S POLYTECHNIC
5.2.1 Transformer
A transformer is a device that transfers electrical energy from one circuit to another through
inductively coupled conductorsthe transformer's coils. A varying current in the first or
primary winding creates a varying magnetic flux in the transformer's core, and thus a varying
magnetic field through the secondary winding. This varying magnetic field induces a varying
electromotive force (EMF) or "voltage" in the secondary winding. This effect is called
mutual induction.
Transformer is a device that converts the one form energy to another form of energy like a
transducer.
DEPARTMENT OF IE
35 | P a g e
V.E.S POLYTECHNIC
Figure: Transformer
DEPARTMENT OF IE
36 | P a g e
V.E.S POLYTECHNIC
5.2.3Transformer Working
A transformer consists of two coils (often called 'windings') linked by an iron core, as shown
in figure below. There is no electrical connection between the coils, instead they are linked
by a magnetic field created in the core.
37 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
38 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
39 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
40 | P a g e
V.E.S POLYTECHNIC
supply voltage (230-240V in the UK or 115-120V in some countries) to a safer low voltage.
The standard mains supply voltages are officially 115V and 230V, but 120V and 240V are the
values usually quoted and the difference is of no significance in most cases.
DEPARTMENT OF IE
41 | P a g e
V.E.S POLYTECHNIC
Most mains transformers have two separate secondary coils (e.g. labeled 0-9V, 0-9V) which
may be used separately to give two independent supplies, or connected in series to create a
centre-tapped coil (see below) or one coil with double the voltage.
Some mains transformers have a centre-tap halfway through the secondary coil and they are
labeled 9-0-9V for example. They can be used to produce full-wave rectified DC with just
two diodes, unlike a standard secondary coil which requires four diodes to produce full-wave
rectified DC.
Audio Transformers
Audio transformers are used to convert the moderate voltage, low current output of an audio
amplifier to the low voltage, high current required by a loudspeaker. This use is called
'impedance matching' because it is matching the high impedance output of the amplifier to
the low impedance of the loudspeaker.
42 | P a g e
V.E.S POLYTECHNIC
...where Vp is the primary (input) voltage, Vs is the secondary (output) voltage, Np is the
number of turns on the primary coil, and Ns is the number of turns on the secondary coil.
5.2.6 Diodes
Diodes allow electricity to flow in only one direction. The arrow of the circuit symbol shows
the direction in which the current can flow. Diodes are the electrical version of a valve and
early diodes were actually called valves.
DEPARTMENT OF IE
43 | P a g e
V.E.S POLYTECHNIC
5.2.7 Rectifier
The purpose of a rectifier is to convert an AC waveform into a DC waveform (OR) Rectifier
converts AC current or voltages into DC current or voltage. There are two different
rectification circuits, known as 'half-wave' and 'full-wave' rectifiers. Both use components
called diodes to convert AC into DC.
The Half-wave Rectifier
The half-wave rectifier is the simplest type of rectifier since it only uses one diode, as shown
in figure 1.
44 | P a g e
V.E.S POLYTECHNIC
Half-Wave Rectification
While the output of the half-wave rectifier is DC (it is all positive), it would not be suitable
as a power supply for a circuit. Firstly, the output voltage continually varies between 0V and
Vs-0.7V, and secondly, for half the time there is no output at all.
The Full-wave Rectifier
The circuit in figure 3 addresses the second of these problems since at no time is the output
voltage 0V. This time four diodes are arranged so that both the positive and negative parts of
the AC waveform are converted to DC. The resulting waveform is shown in figure 4.
DEPARTMENT OF IE
45 | P a g e
V.E.S POLYTECHNIC
Full-Wave Rectifier
46 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
47 | P a g e
V.E.S POLYTECHNIC
5.2.9Voltage Regulator
A voltage regulator is an electrical regulator designed to automatically maintain a constant
voltage level. It may use an electromechanical mechanism, or passive or active electronic
components. Depending on the design, it may be used to regulate one or more AC or DC
voltages. There are two types of regulator are they.
Positive Voltage Series (78xx) and
Negative Voltage Series (79xx)
78xx:78 indicate the positive series and xxindicates the voltage rating. Suppose 7805
produces the maximum 5V.05indicates the regulator output is 5V.
79xx:78 indicate the negative series and xxindicates the voltage rating. Suppose 7905
produces the maximum -5V.05indicates the regulator output is -5V.
These regulators consists the three pins there are
Pin1: It is used for input pin.
Pin2: This is ground pin for regulator
Pin3: It is used for output pin. Through this pin we get the output.
Figure: Regulator
DEPARTMENT OF IE
48 | P a g e
V.E.S POLYTECHNIC
Voltage
LM7805
+ 5 volts
LM7809
+ 9 volts
LM7812
+ 12 volts
LM7905
- 5 volts
LM7909
- 9 volts
LM7912
- 12 volts
LM78
05 Integrated Circuit Internal Schematic - Fairchild Semiconductors
The "LM78XX" series of voltage regulators are designed for positive input. For
applications requiring negative input the "LM79XX" series is used.
DEPARTMENT OF IE
49 | P a g e
V.E.S POLYTECHNIC
How it Works:
The transformer drops the 240 volt 'mains' voltage to 8.5 volts. The diode 'bridge'
rectifies the 8.5 volts AC from the output side of the power transformer into DC. The
2500uF capacitor helps to maintain a constant input into the regulator.
All of the interfaces described on this site have protection diodes connected into the
power supply circuit to prevent damage due to incorrect polarity. Generally a
1N4004, 1 amp power diode is connected in series with the power supply. If the
supply is connected the wrong way around, the regulator will be protected from
damage.
DEPARTMENT OF IE
50 | P a g e
V.E.S POLYTECHNIC
A Protection Diode
on the power supply
input line.
InputVoltage:
As a general rule the input voltage should be limited to 2 to 3 volts above the output
voltage. The LM78XX series can handle up to 30 volts input, but the power
difference between the input voltage/current ratio and output voltage/current ratio
appears as heat. If the input voltage is unnecessarily high the regulator will get very
hot. Unless sufficient heat-sinking is provided the regulator will shut down.
The output current of a power supply based on a Voltage Regulator can be increased
using a power transistor such as the 2955 series. These transistors can pass several
amps quite safely.
51 | P a g e
V.E.S POLYTECHNIC
Some regulators are designed to produce a regulated voltage as low as 1.7 volts, for
example the LM317. This type of regulator is ideal to use in 'variable' power supplies
able to provide 1 amp regulated DC at voltages ranging from 1.7 to around 40 volts.
The interfaces described on this site are based on either 5 volt, or 12 volt integrated
circuits. They use either LM7805, or LM7812 regulators.
5.3 DC MOTOR:
DEFINITION
Motor is a device that creates motion, not an engine; it usually refers to either an electrical
motor or an internal combustion engine.
It may also refer to:
DEPARTMENT OF IE
52 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
53 | P a g e
V.E.S POLYTECHNIC
Advantages
Simple Design
Low Cost
DEPARTMENT OF IE
54 | P a g e
V.E.S POLYTECHNIC
Reliable Operation
DC Motors
The brushed DC motor is one of the earliest motor designs. Today, it is the motor of choice in
the majority of variable speed and torque control applications.
Advantages
Permanent magnets
Electro-magnetic windings
If the field is created by permanent magnets, the motor is said to be a "permanent magnet DC
motor" (PMDC). If created by electromagnetic windings, the motor is often said to be a
DEPARTMENT OF IE
55 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
56 | P a g e
V.E.S POLYTECHNIC
57 | P a g e
V.E.S POLYTECHNIC
Expensive to produce
Physically larger
High maintenance
Dust
DEPARTMENT OF IE
58 | P a g e
V.E.S POLYTECHNIC
Principle
When a rectangular coil carrying current is placed in a magnetic field, a torque acts on the
coil which rotates it continuously.
When the coil rotates, the shaft attached to it also rotates and thus it is able to do mechanical
work.
Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator, commutator, field
magnet(s), and brushes. In most common DC motors (and all that BEAMers will see), the
external magnetic field is produced by high-strength permanent magnets 1. 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)
rotate 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, commentator 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 commentator 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.
DEPARTMENT OF IE
59 | P a g e
V.E.S POLYTECHNIC
In real life, though, DC motors will always have more than two poles (three is a very
common number). In particular, this avoids "dead spots" in the commutator. You can imagine
how with our example two-pole motor, if the rotor is exactly at the middle of its rotation
(perfectly aligned with the field magnets), it will get "stuck" there. Meanwhile, with a twopole motor, there is a moment where the commutator shorts out the power supply (i.e., both
brushes touch both commutator contacts simultaneously). This would be bad for the power
supply, waste energy, and damage motor components as well. Yet another disadvantage of
such a simple motor is that it would exhibit a high amount of torque "ripple" (the amount of
torque it could produce is cyclic with the position of the rotor).
DEPARTMENT OF IE
60 | P a g e
V.E.S POLYTECHNIC
Commutator
A commutator is used to reverse the direction of flow of current. Commutator is a copper
ring split into two parts C1 and C2. The split rings are insulated form each other and mounted
on the axle of the motor. The two ends of the coil are soldered to these rings. They rotate
along with the coil. Commutator rings are connected to a battery. The wires from the battery
are not connected to the rings but to the brushes which are in contact with the rings.
Brushes
Two small strips of carbon, known as brushes press slightly against the two split rings, and
the split rings rotate between the brushes.
DEPARTMENT OF IE
61 | P a g e
V.E.S POLYTECHNIC
Direction of rotation
2. Motor Speed
3. Motor Torque
4. Motor Start and Stop
Direction of Rotation
A DC Motor has two wires. We can call them the positive terminal and the negative terminal,
although these are pretty much arbitrary names (unlike a battery where these polarities are
vital and not to be mixed!). On a motor, we say that when the + wire is connected to +
terminal on a power source, and the - wire is connected to the - terminal source on the same
power source, the motor rotates clockwise (if you are looking towards the motor shaft). If
you reverse the wire polarities so that each wire is connected to the opposing power supply
terminal, then the motor rotates counter clockwise. Notice this is just an arbitrary selection
and that some motor manufacturers could easily choose the opposing convention. As long as
you know what rotation you get with one polarity, you can always connect in such a fashion
that you get the direction that you want on a per polarity basis.
DEPARTMENT OF IE
62 | P a g e
V.E.S POLYTECHNIC
DC Motor rotation has nothing to do with the voltage magnitude or the current
magnitude flowing through the motor.
DC Motor rotation does have to do with the voltage polarity and the direction of the
current flow.
DC Motor Speed
Whereas the voltage polarity controls DC motor rotation, voltage magnitude controls motor
speed. Think of the voltage applied as a facilitator for the strengthening of the magnetic field.
In other words, the higher the voltage, the quicker will the magnetic field
become strong. Remember that a DC motor has an electromagnet and a series of permanent
magnets. The applied voltage generates a magnetic field on the electromagnet portion. This
electromagnet field is made to oppose the permanent magnet field. If the electromagnet field
is very strong, then both magnetic entities will try to repel each other from one side, as well
as atract each other from the other side. The stronger the induced magnetic field, the quicker
will this separation/attaction will try to take place. As a result, motor speed is directly
proportional to applied voltage.
DEPARTMENT OF IE
63 | P a g e
V.E.S POLYTECHNIC
Motor Torque
In the previous segment I kind of described speed as having to do with the strength of the
magnetic field, but this is in reality misleading. Speed has to do with how fast the magnetic
field is built and the attraction/repel forces are installed into the two magnetic structures.
Motor strength, on the other hand, has to do with magnetic field strength. The stronger the
electromagnet attracts the permanent magnet, the more force is exerted on the motor load.
Per example, imagine a motor trying to lift 10 pounds of weight. This is a force that when
multiplied by a distance (how much from the ground we are lifting the load) results in
WORK. This WORK when exerted through a predetermined amount of time (for how long
we are lifting the weight) gives us power. But whatever power came in, must come out as
energy cannot be created or destroyed. So that you know, the power that we are supplying to
the motor is computed by
P = IV
Where P is power, I is motor current and V is motor voltage
Hence, if the voltage (motor speed) is maintained constant, how much load we are moving
must come from the current. As you increase load (or torque requirements) current must also
increase.
DEPARTMENT OF IE
64 | P a g e
V.E.S POLYTECHNIC
Motor Loading
One aspect about DC motors which we must not forget is that loading or increase of torque
cannot be infinite as there is a point in which the motor simply cannot move. When this
happens, we call this loading Stalling Torque. At the same time this is the maximum
amount of current the motor will see, and it is refer to Stalling Current. Stalling deserves a
full chapter as this is a very important scenario that will define a great deal of the controller
to be used. I promise I will later write a post on stalling and its intricacies.
65 | P a g e
V.E.S POLYTECHNIC
5.4 IR SENSOR
This sensor is a short range obstacle detector with no dead zone. It has a reasonably narrow
detection area which can be increased using the dual version. Range can also be increased by
increasing the power to the IR LEDs or adding more IR LEDs
The photo below shows my test setup with some IR LED's (dark blue) as a light source and
two phototransistors in parallel for the receiver. You could use one of each but I wanted to
spread them out to cover a wider area. This setup works like a FritsLDR but with IR. It has a
range of about 10-15cm (4-6 inches) with my hand as the object being detected.
DEPARTMENT OF IE
66 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
67 | P a g e
V.E.S POLYTECHNIC
Features
Modulated IR transmitter
Indicator LED
DEPARTMENT OF IE
68 | P a g e
V.E.S POLYTECHNIC
Proximity Sensor
5.5 Relay
A relay is an electrically operated switch. Many relays use an electromagnet to operate a
switching mechanism, but other operating principles are also used. Relays find applications
where it is necessary to control a circuit by a low-power signal, or where several circuits
must be controlled by one signal. The first relays were used in long distance telegraph
circuits, repeating the signal coming in from one circuit and re-transmitting it to another.
Relays found extensive use in telephone exchanges and early computers to perform logical
operations. A type of relay that can handle the high power required to directly drive an
electric motor is called a contactor. Solid-state relays control power circuits with no moving
parts, instead using a semiconductor device to perform switching. Relays with calibrated
operating characteristics and sometimes multiple operating coils are used to protect electrical
circuits from overload or faults; in modern electric power systems these functions are
performed by digital instruments still called "protection relays
DEPARTMENT OF IE
69 | P a g e
V.E.S POLYTECHNIC
A simple electromagnetic relay consists of a coil of wire surrounding a soft iron core,
an iron yoke, which provides a low reluctance path for magnetic flux, a movable iron
armature, and a set, or sets, of contacts; two in the relay pictured. The armature is hinged to
the yoke and mechanically linked to a moving contact or contacts. It is held in place by a
spring so that when the relay is de-energized there is an air gap in the magnetic circuit. In this
condition, one of the two sets of contacts in the relay pictured is closed, and the other set is
open. Other relays may have more or fewer sets of contacts depending on their function. The
relay in the picture also has a wire connecting the armature to the yoke. This ensures
continuity of the circuit between the moving contacts on the armature, and the circuit track
on the printed circuit board (PCB) via the yoke, which is soldered to the PCB.
When an electric current is passed through the coil, the resulting magnetic field attracts the
armature, and the consequent movement of the movable contact or contacts either makes or
breaks a connection with a fixed contact. If the set of contacts was closed when the relay was
de-energized, then the movement opens the contacts and breaks the connection, and vice
versa if the contacts were open. When the current to the coil is switched off, the armature is
returned by a force, approximately half as strong as the magnetic force, to its relaxed
position. Usually this force is provided by a spring, but gravity is also used commonly in
industrial motor starters.
When the coil is energized with direct current, a diode is often placed across the coil to
dissipate the energy from the collapsing magnetic field at deactivation, which would
otherwise generate a voltage spike dangerous to circuit components. Some automotive relays
DEPARTMENT OF IE
70 | P a g e
V.E.S POLYTECHNIC
RELAY CIRCUIT
Description
DEPARTMENT OF IE
Qty.
Price
71 | P a g e
V.E.S POLYTECHNIC
Transformer 12-0-12V,750mA
Diode 1N4007
Capacitor1000uF,25V
Voltage regulator IC 7805
Capacitor 1uF
LED
Resistors
Disc capacitors
IC Base
PCB
Wires
Solder wire
Cabinet
Mains cord
Transistor BC548
Photodiode
6v DC Relay
DC Reduction Gear Motor
IC ULN2803
Crystal Oscillator
IC 89C51
IR Sensor
DEPARTMENT OF IE
1
4
1
1
7
6
15
5
1
1
3mtr
1
1
1
5
4
4
4
1
1
1
6
35
4
5
10
7
6
5
5
10
80
25
25
150
10
15
10
20
440
60
50
12
72 | P a g e
V.E.S POLYTECHNIC
SOFTWARE
DEVELOPMENT
6 SOFTWARE DEVELOPMENT
6.1 Coding :
P1 = 255
P2 = 0
DEPARTMENT OF IE
73 | P a g e
V.E.S POLYTECHNIC
6.2 FLOWCHART
DEPARTMENT OF IE
74 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
75 | P a g e
V.E.S POLYTECHNIC
TESTING AND
TROUBLESHOOTING
DEPARTMENT OF IE
76 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
77 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
78 | P a g e
V.E.S POLYTECHNIC
Test Equipment:
Multimeter - almost essential for all but the absolute beginner. See the tools section for more
information.
Power Supply - Also very useful for powering circuits that you are testing. One with a
variable voltage up to at least 12V is best. The current rating doesn't need to be that high, 1A
maximum is fine for most jobs. If you can afford it then one with an adjustable current limit
is useful - set right it can prevent damage to an incorrect circuit, rather than frying it
instantly!
Oscilloscope - Quite expensive and not really worth it for all but the advanced constructor.
Nonetheless a very useful piece of test equipment, especially on audio circuits. There are
some cheaper PC based alternatives, and some hand - held 'scopes now, although I haven't
tried them.
DEPARTMENT OF IE
79 | P a g e
V.E.S POLYTECHNIC
APPLICATION
DEPARTMENT OF IE
80 | P a g e
V.E.S POLYTECHNIC
8 APPLICATIONS
1)
This logic has been specially designed for vaccum cleaner. By using heavy rating
motors ,strong mechanical structure and using highly sensitive obstacle sensors, it
efficiently work as vaccum cleaner.
concealed paths. This robot can effectively sense the obstacles and find out correct
path.
3) With proper programming we can use it as a weight lifter.
4) Obstacle sensing robot can be applied at the toys where small children will play.
5) It can used for the army application we can add a cam to it.
6) We can apply number pairs of IR pairs for the safe direction control of the robot.
DEPARTMENT OF IE
81 | P a g e
V.E.S POLYTECHNIC
BIBLIOGRAPHY
DEPARTMENT OF IE
82 | P a g e
V.E.S POLYTECHNIC
9 BIBLIOGRAPHY
Muhammad Ali Mazidi, Janice Gillispi Mazidi and Rolin D. McKinlay The 8051
Microcontroller and Embedded Systems: Using assembly and C 2nd Edition, Delhi:
Pearson Prentic Hall, 2006.
FIM10_application_guidev1.0
www.datasheetarchives.com8051
www.en.wikipedia.org/wiki/Fingerprint_recognition
www.8051projects.info/proj.asp
www.howstuffworks.com
DEPARTMENT OF IE
83 | P a g e
V.E.S POLYTECHNIC
FUTURE ASPECTS
DEPARTMENT OF IE
84 | P a g e
V.E.S POLYTECHNIC
10 FUTURE ASPECTS
We can extend this project with wireless technology by IR (or) RF (or) ZIGBEE.
This robot can be used for pick and place the required object by giving directions to
the robot but IR pair should be replaced depending upon the application
Adding a Camera:
If the current project is interfaced with a camera (e.g. a Webcam) robot can be driven
beyond line-of-sight & range becomes practically unlimited as networks have a very
large range.
DEPARTMENT OF IE
85 | P a g e
V.E.S POLYTECHNIC
APPENDIX
DEPARTMENT OF IE
86 | P a g e
V.E.S POLYTECHNIC
MICROCONTROLLER 89S51
The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K
bytes of In-System Programmable Flash memory. The device is manufactured using
Atmels high-density nonvolatile memory technology and is compatible with the indus- trystandard 80C51 instruction set and pinout. The on-chip Flash allows the program memory to
be reprogrammed in-system or by a conventional nonvolatile memory pro- grammer. By
combining a versatile 8-bit CPU with In-System Programmable Flash on a monolithic chip,
the Atmel AT89S51 is a powerful microcontroller which provides a highly-flexible and
cost-effective solution to many embedded control applications.
The AT89S51 provides the following standard features: 4K bytes of Flash, 128 bytes of
RAM, 32 I/O lines, Watchdog timer, two data pointers, two 16-bit timer/counters, a fivevector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and
clock circuitry. In addition, the AT89S51 is designed with static logic for operation down
to zero frequency and supports two software selectable power saving modes. The Idle
Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt
system to continue functioning. The Power-down mode saves the RAM con- tents but
freezes the oscillator, disabling all other chip functions until the next external interrupt or
hardware reset.
DEPARTMENT OF IE
87 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
88 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
89 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
90 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
91 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
92 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
93 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
94 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
95 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
96 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
97 | P a g e
V.E.S POLYTECHNIC
DEPARTMENT OF IE
98 | P a g e
V.E.S POLYTECHNIC