Beruflich Dokumente
Kultur Dokumente
The aim of the project is to design a robot which senses fire using fire
sensor .The robot is seamlessly operated utilizing a mobile handset. In order to
successfully execute a given task, control software is necessary that sends and
tracks appropriate orders to the robot. This project presents the design
principles of a general software framework capable to control any real time
robot without any set of feedback devices. A possible implementation of such
a general framework is provided together with experimental arrangement at a
minimal economy.
1. MICROCONTROLLER
2. HT9170B
3. ULN 2003
4. DPDT RELAYS
5. GARE MOTORS
6. MOBILE
7. FIRE SENSOR
1
1.4 Block Diagram:
POWER
SUPPLY
GEAR
89S52 MOTOR1
DTMF ULN2003
DECODE DRIVER
R
HT9170B
GEAR
MOTOR2
FIRE
SENSOR
BUZZER
Figure 1.1 Block diagram of Mobile Based Land Robot with Fire sensor.
2
1.5 Organization of the report:
1.6 Conclusion:
Hence, this chapter gives a complete gist of the project details and the
technology implemented.
3
2.1 Introduction:
In this chapter, all the hardware components that are used including the
microcontroller is explained elaborately. All the specifications and the internal
circuitry of the microcontroller including the functional features are explained
in detail so that the coding can be done accordingly.
2.2 Microcontroller-AT89S52:
4
• Programmable Serial Channel
• Low Power Idle and Power Down 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 contents but freezes the oscillator
disabling all other chip functions until the next hardware reset.
5
2.2.3 Pin Configuration:
VCC
Pin 40 provides Supply voltage to the chip. The voltage source is +5v.
GND
Pin 20 is the grounded.
Port 0
Port 0 is an 8-bit open drain bidirectional I/O port from pin 32 to 39.
As an output port each pin can sink eight TTL inputs. When 1s are written to
port 0 pins, the pins can be used as high-impedance inputs. Port 0 may 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.
6
Port 1
Port 1 is an 8-bit bidirectional I/O port with internal pull-ups from pin
1 to 8. The Port 1 output buffers can sink/source four TTL inputs. When 1s are
written to Port 1 pins they are pulled high by the internal pull-ups and can be
used as inputs. As inputs, Port 1 pins that are externally being pulled low will
source current (IIL) because of the internal pull-ups. Port 1 also receives the
low-order address bytes during Flash programming and 1program verification.
Port 2
Port 2 is an 8-bit bidirectional I/O port with internal pull-ups from pin
21 to 28. 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. As inputs, Port 2 pins that are externally being pulled low
will source current (IIL) because of the internal pull-ups.
Port 2 emits the high-order address byte during fetches from external
program memory and during accesses to external data memory that uses 16-bit
addresses (MOVX @ DPTR). In this application it uses strong internal pull-
ups when emitting 1s. During accesses to external data memory that uses 8-bit
addresses (MOVX @ RI), Port 2 emits 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
Port 3 is an 8-bit bidirectional I/O port with internal pull-ups from pin
10 to 17. The Port 3 output buffers can sink / source four TTL inputs. When 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
AT89C51 as listed below:
7
Table 2.1 Special Features of 89S52
Port 3 also receives some control signals for Flash programming and
programming verification.
RST
Pin 9 is the Reset input. It is active high. Upon applying a high pulse to
this pin, the microcontroller will reset and terminate all activities. A high on
this pin for two machine cycles while the oscillator is running resets the
device.
ALE/PROG
Address Latch is an output pin and is active high. Address Latch
Enable 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 of
1/6 the oscillator frequency, and may be used for external timing or clocking
purposes.
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 microcontroller is in external execution mode.
PSEN
Program Store Enable is the read strobe to external program memory.
When the AT89S52 is executing code from external program memory, PSEN
8
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. EA should be strapped to
VCC for internal program executions. This pin also receives the 12-volt
programming enable voltage (VPP) during Flash programming, for parts that
require 12-volt VPP.
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock
operating circuit.
XTAL2
Output from the inverting oscillator amplifier.
9
Figure 2.4 External Clock Drive Configuration
5. Pulse ALE/PROG once to program a byte in the Flash array or the lock bits.
The byte-write cycle is self-timed and typically takes no more than 1.5
ms. Repeat steps 1 through 5, changing the address and data for the entire
array or until the end of the object file is reached.
2.2.8Ready/Busy:
The progress of byte programming can also be monitored by the
RDY/BSY output signal. P3.4 is pulled low after ALE goes high during
programming to indicate BUSY. P3.4 is pulled high again when programming
is done to indicate READY.
11
2.3 DTMF Receiver- HT9170B:
2.3.1 Features:
• Operating voltage: 2.5V~5.5V
• Minimal external components
• No external filter is required
• Low standby current (on power down mode)
• Excellent performance
• Tristate data output for MCU interface
• 3.58MHz crystal or ceramic resonator
• 1633Hz can be inhibited by the INH pin
• HT9170B:18-pinDIPpackage
12
Table 2.8 Pin Description
13
The HT9170B tone decoder consists of three band pass filters and two
digital decode circuits to convert a tone (DTMF) signal into digital code
output. An operational amplifier is built-in to adjust the input signal. The pre-
filter is a band rejection filter, which reduces the dialing tone from 350Hz to
400Hz. The low group filter filters low group frequency signal output whereas
the high group filter filters high group Frequency signal output. A zero-
crossing detector with follows each filters output hysteretic. When each signal
amplitude at the output exceeds the specified level, it is transferred to full
swing logic signal. When input signals are recognized to be effective, DV
becomes high, and the correct tone code (DTMF) digit is transferred.
The steering control circuit is used for measuring the effective signal
duration and for protecting against drop out of valid signals. It employs the
analog delay by external RC time-constant controlled by EST. The EST pin is
normally low and draws the RT/GT pin to keep low through discharge of
external RC. When a valid tone input is detected, EST goes high to charge
RT/GT through RC.
TACC= TDP+TGTP;
TIR=TDA+TGTA;
Where,
14
TACC: Tone duration acceptable time
TDP: EST output delay time (_L__H_)
TGTP: Tone present time
TIR: Inter-digit pause rejection time
TDA: EST output delay time (_H__L_)
TGTA: Tone absent time
• PABX
• Central office
• Mobile radio
• Remote control
• Remote data entry
• Call limiting
• Telephone answering system
2.4.1 Features:
• High-Voltage Outputs . . . 50 V
15
• Compatible with ULN2800A Series
2.4.2 IC Description:
16
Figure 2.11 Schematic Diagram
2.4.3 Applications:
The applications include relay drivers, hammer drivers, lamp drivers,
display drivers (LED and gas discharge), line drivers, and logic buffers. The
ULN2803A has a 2.7-kΩ series base resistor for each Darlington pair for
operation directly with TTL or 5-V CMOS devices.
2.5 Relays:
17
Figure 2.12 DPDT relay
SPST Relays allow one circuit to switch a second circuit which can be
completely separate from the first. For example a low voltage battery circuit
can use a relay to switch a 230V AC mains circuit. There is no electrical
connection inside the relay between the two circuits; the link is magnetic and
mechanical.
18
Figure 2.14 SPST relay
The relay's switch connections are usually labeled COM, NC and NO:
19
The coil of a relay passes a relatively large current, typically 30mA for
a 12V relay, but it can be as much as 100mA for relays designed to operate
from lower voltages. Most ICs (chips) cannot provide this current and a
transistor is usually used to amplify the small IC current to the larger value
required for the relay coil.
Relay coils produce brief high voltage 'spikes' when they are switched
off and this can destroy transistors and ICs in the circuit. To prevent damage
you must connect a protection diode across the relay coil.
Transistors and ICs (chips) must be protected from the brief high
voltage 'spike' produced when the relay coil is switched off. The diagram
shows how a signal diode (e.g. 1N4148) is connected across the relay coil to
provide this protection. Note that the diode is connected 'backwards' so that it
will normally not conduct. Conduction only occurs when the relay coil is
20
switched off, at this moment current tries to continue flowing through the coil
and it is harmlessly diverted through the diode. Without the diode no current
could flow and the coil would produce a damaging high voltage 'spike' in its
attempt to keep the current flowing.
Relays can switch AC and DC, transistors can only switch DC.
Relays require more current than many chips can provide, so a low
power transistor may be needed to switch the current for the relay's coil.
21
A unit which creates mechanical energy from electrical energy and which
transmits mechanical energy through the gearbox at a reduced speed is a Gear
motor.
A gear head and motor combination is to reduce the speed of the motor to
obtain the desired speed or torque.
22
Initially when sensor is not detecting smoke we have less than 0.7v at the base
of the transistor. If the base voltage is less than 0.7 then the transistor won t
conduct and the output at the collector is logic 1 i.e. +5v. When the sensor
detects smoke than the voltage at the transistor will be high and the transistor
starts conducting and voltage at the collector is logic 0. We will be connecting
the collector output to a buzzer by using one diode. This buzzer will be
ringing when it receives logic 0 i.e. when the sensor detects smoke. In the
transmitting side, the output of smoke sensor is connected to the
microcontroller P3.1 (second pin). Whenever there is no smoke this pin will
read logic 0 initially. When it detects smoke the pin will read logic 1. Then
microcontroller will send the data to the encoder by using port 1 first four
pins. To pin P1.0 we will send logic 1 and the remaining pins will be zero.
This data is send by the microcontroller to the encoder IC, which in turn
encodes the data. The encoded data is transmitted to the transmitter third pin.
From there it will transmit the data with a frequency of 433MHz.In receiving
side, the receiver receives the data and decodes the data by the decoder and
sends that data to the microcontroller. When ever the receiving side
microcontroller receives logic 1 at P1.0 it will make the buzzer on.
2.8 Conclusion:
23
are explained. The relays and the IC of DTMF technology have been
introduced in this chapter.
3.1 Introduction:
In this chapter, the entire circuitry of the project is shown. The design
parameters kept in mind while the circuits are being designed are clearly
explained. Also the chapter includes the main important part of any hardware
project i.e., a power supply, its circuit and its internal circuit components. On
the whole this chapter gives the circuits employed in the whole projects and
their interfacing.
There are many types of power supply. Most are designed to convert
high voltage AC mains electricity to a suitable low voltage supply for
electronics circuits and other devices. A power supply can by broken down
into a series of blocks, each of which performs a particular function. For
example a 5V regulated supply can be shown as below
24
below and the power supplies made from these blocks are described below
with a circuit diagram and a graph of their output:
3.2.1 Transformer:
The low voltage AC output is suitable for lamps, heaters and special
AC motors. It is not suitable for electronic circuits unless they include a
rectifier and a smoothing capacitor. The transformer output is given to the
rectifier circuit.
3.2.2 Rectifier:
A rectifier converts AC to DC, but the DC output is varying. There are
several types of rectifiers; here we use a bridge rectifier.
The Bridge rectifier is a circuit, which converts an ac voltage to dc
voltage using both half cycles of the input ac voltage. The Bridge rectifier
circuit is shown in the figure. The circuit has four diodes connected to form a
bridge. The ac input voltage is applied to the diagonally opposite ends of the
bridge. The load resistance is connected between the other two ends of the
bridge.
For the positive half cycle of the input ac voltage, diodes D1 and D3
conduct, whereas diodes D2 and D4 remain in the OFF state. The conducting
diodes will be in series with the load resistance RL and hence the load current
flows through RL.
25
For the negative half cycle of the input ac voltage, diodes D2 and D4
conduct whereas, D1 and D3 remain OFF. The conducting diodes D2 and D4
will be in series with the load resistance RL and hence the current flows
through RL in the same direction as in the previous half cycle. Thus a bi-
directional wave is converted into unidirectional.
Now the output of the rectifier shown in Figure 3.3 is shown below in Figure
3.4
Smoothing:
26
The smoothing block smoothes the DC from varying greatly to a
small ripple and the ripple voltage is defined as the deviation of the load
voltage from its DC value. Smoothing is also named as filtering.
Filtering is frequently effected by shunting the load with a capacitor. The
action of this system depends on the fact that the capacitor stores energy
during the conduction period and delivers this energy to the loads during the
no conducting period. In this way, the time during which the current passes
through the load is prolonging Ted, and the ripple is considerably decreased.
The action of the capacitor is shown with the help of waveform.
3.2.3 Regulator:
27
Regulator eliminates ripple by setting DC output to a fixed voltage.
Voltage regulator ICs are available with fixed (typically 5V, 12V and 15V) or
variable output voltages. Negative voltage regulators are also available
Many of the fixed voltage regulator ICs has 3 leads (input, output and high
impedance). They include a hole for attaching a heat sink if necessary. Zener
diode is an example of fixed regulator which is shown here.
28
3.3 Complete Circuit diagram employed:
29
Figure 3.9 Complete Circuit Diagram Used.
We use two helical gear motors to rotate the two rear wheels, one for
each. These motors rotate the entire equipment in 4 directions: left, right,
forward and backward directions. We use 2,4,6and 8 from the dialed telephone
key pads for respective direction as the controller receives 0x02,0x04,0x06
and 0x08 from DTMF IC.
As the motors will on and off with help of the relays connected to the
different motors. As we know that relay acts as the switch to on/off the motor.
30
• All the relays used here operate for the 12v dc which microntroller
cannot be used to drive them. Hence we use driver IC ULN2003s to
drive the relays to on the appropriate motors.
• The controller operates for 5v dc and driver IC operates for 12v dc.
Corresponding to the input bits given to the controller, the controller generates
the bits according to the code program we have given and these bits are given
to the driver IC. The driver IC output is given to both the relays and hence
controlling the motor action. Depending on the motors rotation (either clock or
counter clock) the land robot moves in the all four directions.
The smoke sensor senses the smoke and the output of the sensor circuit is
given to the P0.0 pin of controller. Then the buzzer which is connected to the
P0.7gets on and it gives the buzzer sound indicating the smoke.
31
3.6 Conclusion:
This chapter has included the main important part of any hardware
project i.e., a power supply, its circuit and its internal circuit components. On
the whole this chapter has given the circuits employed in the whole projects
and their interfacing
4.1 Introduction:
• Quality:
Robots have the capacity to dramatically improve product quality.
Applications are performed with precision and high repeatability every
time. This level of consistency can be hard to achieve any other way.
• Production:
With robots, throughput speeds increase, which directly impacts
production. Because robots have the ability to work at a constant speed
without pausing for breaks, sleep, vacations, they have the potential to
produce more than a human worker.
• Safety:
Robots increase workplace safety. Workers are moved to supervisory
roles, so they no longer have to perform dangerous applications in
hazardous settings.
• Savings:
Greater worker safety leads to financial savings. There are fewer
healthcare and insurance concerns for employers. Robot also offer
untiring performance which saves valuable time. Their movements are
always exact, so less material is wasted.
32
4.3 Disadvantages of Robot:
• Network:
• Expense:
The initial investment of robots is significant, especially when business
owners are limiting their purchases to new robotic equipment. The cost
of automation should be calculated in light of a business' greater
financial budget. Regular maintenance needs can have a financial toll
as well.
• Expertise:
Employees will require training in programming and interacting with
the new robotic equipment. This normally takestime and financial
output.
4.4 Applications:
Fire Mishaps:
In the event of a fire accident it is better to send the robot, than to send
a human inside the affected area to, either search and rescue a person
or for surveillance purposes. The arm can also be equipped with a fire
extinguisher to put off the fire.
• Bomb Detection:
In the likely event of a bomb alert, this robotic arm can safely go,
detect and diffuse the bomb instead of a human being risking his life.
• In Space Explorations as Land Rover:
Recent Chandryaan moon mission employs such robotic arms (a
complete version of the robot), to survey the geographical and
chemical composition of the surface of the Moon. NASA also has used
such robots in its survey of Mars. The collected samples from the
33
surface are then transported back to the space shuttle, from where other
chemical tests are conducted, and results relayed back to Earth.
• In Coal Mines:
In coal mines it is quite natural that Methane gas leaks occurs. The
robot can be equipped with a Methane gas sensor and warn the
presence of said gas, without exposing humans to the danger.
4.5 Conclusion:
34
REFERENCES:
7. www.8051freeprojectsinfo.com
35
APPENDIX
SOURCE CODE:
#include<reg51.h>
delay(unsigned char);
sbit L_MOTORFORWARD=P1^0;
sbit L_MOTORBACKWARD=P1^1;
sbit R_MOTORFORWARD=P1^7;
sbit R_MOTORBACKWARD=P1^6;
sbit smoke =P0^0;
sbit buzzer=P0^7;
Void main()
{
L_MOTORFORWARD=0;
L_MOTORBACKWARD=0;
R_MOTORFORWARD=0;
R_MOTORBACKWARD=0;
buzzer=0;
while (1)
{
if(smoke==1)
{
buzzer=1;
delay(10);
}
else
{
buzzer=0;
}
//FORWARD
36
if(P2==0xF2)
{
L_MOTORFORWARD=1;
R_MOTORFORWARD=1;
delay(250);
L_MOTORFORWARD=0;
R_MOTORFORWARD=0;
}
//LEFT
if(P2==0xF4)
{
L_MOTORFORWARD=1;
delay(250);
L_MOTORBACKWARD=0;
R_MOTORFORWARD=0;
R_MOTORBACKWARD=0;
}
//RIGHT
if(P2==0xF6)
{
R_MOTORFORWARD=1;
delay(250);
L_MOTORFORWARD=0;
L_MOTORBACKWARD=0;
R_MOTORBACKWARD=0;
}
//BACK
if(P2==0xF8)
{
L_MOTORBACKWARD=1;
37
R_MOTORBACKWARD=1;
delay (250);
L_MOTORBACKWARD=0;
R_MOTORBACKWARD=0;
}
} //while
} //main
//DELAY
delay(unsigned char time)
{
unsigned char i,j;
for(i=0;i<time;i++)
for(j=0;j<1250;j++);
}
38