Ece Human Detection Report PDF
Ece Human Detection Report PDF
Ece Human Detection Report PDF
org
Seminar report
on
Human Detection
Submitted in partial fulfillment of the requirement for the award of degree
Of Electronics
Preface
I have made this report file on the topic Human Detection, I have tried my best to
elucidate all the relevant detail to the topic to be included in the report. While in the
beginning I have tried to give a general view about this topic.
INTRODUCTION
The advent of new high-speed technology and the growing computer capacity
provided realistic opportunity for new robot controls and realization of new methods of
control theory. This technical improvement together with the need for high performance
robots created faster, more accurate and more intelligent robots using new robots control
devices, new drives and advanced control algorithms.
This Project deals with live personal detection robot is based on 8 bit
Microcontroller. This Robot follows which is drawn over the surface. Here we are using
PIR sensor for detect the which are detect human. The project is mainly used in the
DEBRIS for Earth quake rescue.
Internally it consists of IR sensors. The infrared sensors are used to sense the live
persons. All the above systems are controlled by the Microcontroller. In our project we
are using the popular 8 bit microcontroller.
The Microcontroller is used to control the motors. It gets the signals from the PIR
sensors and it drives the motors according to the sensor inputs. Two DC Gare motors are
used to drive the robot.
www.studymafia.org
HARDWARE REQUIREMENTS
1. POWER SUPPLY
3. DC GARE MOTOR
4. RELAYS
5.PIR SENSOR
www.studymafia.org
BLOCK DIAGRAM :
www.studymafia.org
SRART
INITIALIZE MICROCONTROLLER
INITIALIZE MOTORS
YES
IF PERSON
BUZZER ON
DETECTED
NO
MOTOR ROTATE IN
STOP SPECIFIED DIRECTION
www.studymafia.org
ALGORITHM
Step 1: Start
Step 2: Initialize micro controller
Step 3: Initialize motors
Step 4: Initialize PIR sensor
Step 5: Monitor PIR sensor
Step 6: If person detected
Buzzer on
motor rotates in specified direction
Step 7: Monitor PIR sensor
Step 8: Stop
www.studymafia.org
Introduction to AT89S52
The system requirements and control specifications clearly rule out the use of 16,
32 or 64 bit micro controllers or microprocessors. Systems using these may be earlier to
implement due to large number of internal features. They are also faster and more reliable
but, the above application is satisfactorily served by 8-bit micro controller. Using an
inexpensive 8-bit Microcontroller will doom the 32-bit product failure in any competitive
market place. Coming to the question of why to use 89S52 of all the 8-bit Microcontroller
available in the market the main answer would be because it has 8kB Flash and 256 bytes
of data RAM32 I/O lines, three 16-bit timer/counters, a Eight-vector two-level interrupt
architecture, a full duplex serial port, on-chip oscillator, and clock circuitry.
In addition, the AT89S52 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 contents but freezes the
oscillator, disabling all other chip functions until the next hardware reset. The Flash
program memory supports both parallel programming and in Serial In-System
Programming (ISP). The 89S52 is also In-Application Programmable (IAP), allowing the
Flash program memory to be reconfigured even while the application is running.
By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel
AT89S52 is a powerful microcomputer which provides a highly flexible and cost
effective solution to many embedded control applications.
www.studymafia.org
FEATURES
Compatible with MCS-51 Products
8K Bytes of In-System Programmable (ISP) Flash Memory
Endurance: 1000 Write/Erase Cycles
4.0V to 5.5V Operating Range
Fully Static Operation: 0 Hz to 33 MHz
Three-level Program Memory Lock
256 x 8-bit Internal RAM
32 Programmable I/O Lines
Three 16-bit Timer/Counters
Eight Interrupt Sources
Full Duplex UART Serial Channel
Low-power Idle and Power-down Modes
Interrupt Recovery from Power-down Mode
Watchdog Timer
Dual Data Pointer
-Power-off Flag
www.studymafia.org
PIN DIAGRAM
www.studymafia.org
MEMORIES
Types of memory:
The 8052 have three general types of memory. They are on-chip memory,
external Code memory and external Ram. On-Chip memory refers to physically existing
memory on the micro controller itself. External code memory is the code memory that
resides off chip. This is often in the form of an external EPROM. External RAM is the
Ram that resides off chip. This often is in the form of standard static RAM or flash
RAM.
a) Code memory
Code memory is the memory that holds the actual 8052 programs that is to be run.
This memory is limited to 64K. Code memory may be found on-chip or off-chip. It is
possible to have 8K of code memory on-chip and 60K off chip memory simultaneously.
If only off-chip memory is available then there can be 64K of off chip ROM. This is
controlled by pin provided as EA
b) Internal RAM
The 8052 have a bank of 256 bytes of internal RAM. The internal RAM is found
on-chip. So it is the fastest Ram available. And also it is most flexible in terms of reading
and writing. Internal Ram is volatile, so when 8051 is reset, this memory is cleared. 256
bytes of internal memory are subdivided. The first 32 bytes are divided into 4 register
banks. Each bank contains 8 registers. Internal RAM also contains 256 bits, which are
addressed from 20h to 2Fh. These bits are bit addressed i.e. each individual bit of a byte
can be addressed by the user. They are numbered 00h to FFh. The user may make use of
these variables with commands such as SETB and CLR.
Special Function registered memory:
www.studymafia.org
Special function registers are the areas of memory that control specific
functionality of the 8052 micro controller.
a) Accumulator (0E0h)
As its name suggests, it is used to accumulate the results of large no of
instructions. It can hold 8 bit values.
b) B registers (0F0h)
The B register is very similar to accumulator. It may hold 8-bit value. The b
register is only used by MUL AB and DIV AB instructions. In MUL AB the higher byte
of the product gets stored in B register. In div AB the quotient gets stored in B with the
remainder in A.
c) Stack pointer (81h)
The stack pointer holds 8-bit value. This is used to indicate where the
next value to be removed from the stack should be taken from. When a value is to be
pushed onto the stack, the 8052 first store the value of SP and then store the value at the
resulting memory location. When a value is to be popped from the stack, the 8052
returns the value from the memory location indicated by SP and then decrements the
value of SP.
d) Data pointer
The SFRs DPL and DPH work together work together to represent a 16-bit value
called the data pointer. The data pointer is used in operations regarding external RAM
and some instructions code memory. It is a 16-bit SFR and also an addressable SFR.
e) Program counter
The program counter is a 16 bit register, which contains the 2 byte address, which
tells the 8052 where the next instruction to execute to be found in memory. When the
8052 is initialized PC starts at 0000h. And is incremented each time an instruction is
executes. It is not addressable SFR.
f) PCON (power control, 87h)
The power control SFR is used to control the 8051s power control modes. Certain
operation modes of the 8051 allow the 8051 to go into a type of sleep mode which
consumes much lee power.
The timer control SFR is used to configure and modify the way in which the
8051s two timers operate. This SFR controls whether each of the two timers is running
or stopped and contains a flag to indicate that each timer has overflowed. Additionally,
some non-timer related bits are located in TCON SFR. These bits are used to configure
the way in which the external interrupt flags are activated, which are set when an
external interrupt occurs.
of port 0 is pin P1.0, bit 7 is pin P1.7. Writing a value of 1 to a bit of this SFR will send
a high level on the corresponding I/O pin whereas a value of 0 will bring it to low level
m) P2 (port 2, address 0A0h, bit addressable):
This is a port latch2. Each bit of this SFR corresponds to one of the pins on a
micro controller. Any data to be outputted to port 0 is first written on P0 register. For e.g.,
bit 0 of port 0 is pin P2.0, bit 7 is pin P2.7. Writing a value of 1 to a bit of this SFR will
send a high level on the corresponding I/O pin whereas a value of 0 will bring it to low
level.
n) P3 (port 3, address B0h, bit addressable) :
This is a port latch3. Each bit of this SFR corresponds to one of the pins on a
micro controller. Any data to be outputted to port 0 is first written on P0 register. For e.g.,
bit 0 of port 0 is pin P3.0, bit 7 is pin P3.7. Writing a value of 1 to a bit of this SFR will
send a high level on the corresponding I/O pin whereas a value of 0 will bring it to low
level.
o) IE (interrupt enable, 0A8h):
The Interrupt Enable SFR is used to enable and disable specific interrupts. The
low 7 bits of the SFR are used to enable/disable the specific interrupts, where the MSB
bit is used to enable or disable all the interrupts. Thus, if the high bit of IE is 0 all
interrupts are disabled regardless of whether an individual interrupt is enabled by setting
a lower bit.
I/O ports:
One major feature of a microcontroller is the versatility built into the input/output
(I/O) circuits that connect the 8052 to the outside world. The main constraint that limits
numerous functions is the number of pins available in the 8051 circuit. The DIP had 40
pins and the success of the design depends on the flexibility incorporated into use of
these pins. For this reason, 24 of the pins may each used for one of the two entirely
different functions which depend, first, on what is physically connected to it and, then, on
what software programs are used to program the pins.
PORT 0
Port 0 pins may serve as inputs, outputs, or, when used together, as a bi directional
low-order address and data bus for external memory. To configure a pin as input, 1 must
be written into the corresponding port 0 latch by the program. When used for interfacing
with the external memory, the lower byte of address is first sent via PORT0, latched
using Address latch enable (ALE) pulse and then the bus is turned around to become the
data bus for external memory.
PORT 1
www.studymafia.org
Port 1 is exclusively used for input/output operations. PORTS 1 pin have no dual
function. When a pin is to be configured as input, 1 is to be written into the
corresponding Port 1 latch.
PORT 2
Port 2 maybe used as an input/output port. It may also be used to supply a high
order address byte in conjunction with Port 0 low-order byte to address external memory.
Port 2 pins are momentarily changed by the address control signals when supplying the
high byte a 16-bit address. Port 2 latches remain stable when external memory is
addressed, as they do not have to be turned around (set to 1) for data input as in the case
for Port 0.
PORT 3
Port 3 may be used to input /output port. The input and output functions can be
programmed under the control of the P3 latches or under the control of various special
function registers. Unlike Port 0 and Port 2, which can have external addressing functions
and change all eight-port b se, each pin of port 3 maybe individually programmed to be
used as I/O or as one of the alternate functions. The Port 3 alternate uses are:
INTERRUPTS:
The AT89S52 has a total of six interrupt vectors: two external interrupts (INT0
and INT1), three timer interrupts (Timers0, 1, and 2), and the serial port interrupt. These
interrupts are all shown in Figure 10. Each of these interrupt sources can be individually
enabled or disabled by setting or clearing a bit in Special Function Register IE. IE also
contains a global disable bit, EA, which disables all interrupts at once. Note that Table 5
shows that bit position IE.6 is unimplemented.
Timer 2 interrupt is generated by the logical OR of bits TF2 and EXF2 in register
T2CON. Neither of these flags is cleared by hardware when the service routine is
vectored
to. In fact, the service routine may have to determine whether it was TF2 or EXF2 that
generated the interrupt, and that bit will have to be cleared in software.The Timer 0 and
Timer 1 flags, TF0 and TF1, are set at S5P2 of the cycle in which the timers overflow.
The values are then polled by the circuitry in the next cycle. However, the Timer 2 flag,
TF2, is set at S2P2 and is polled in the same cycle in which the timer overflows.
www.studymafia.org
www.studymafia.org
A transformer steps down high voltage AC mains to low voltage AC. Here we are
using a center-tap transformer whose output will be sinusoidal with 36volts peak to peak
value.
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.
2.2.3 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.
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 R L 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
www.studymafia.org
The varying DC output is suitable for lamps, heaters and standard motors. It is not
suitable for lamps, heaters and standard motors. It is not suitable for electronic circuits
unless they include a smoothing capacitor.
Smoothing or filtering:
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.
2.2.4 Regulator:
Figure
2.7 Regulator
www.studymafia.org
Gearmotors of all types and sizes including single / multiphase, universal, servo,
induction and synchronous types. DC gearmotors are configured in many types and
sizes, including brushless and servo. A DC gearmotor consists of a rotor and a permanent
magnetic field stator and an integral gearbox or gearhead. The magnetic field is
maintained using either permanent magnets or electromagnetic windings. DC motors are
most commonly used in variable speed and torque applications. A DC servomotor has an
output shaft that can be positioned by sending a coded signal to the motor. As the input
to the motor changes, the angular position of the output shaft changes as well.
Servomotors are generally small and powerful for their size, and easy to control.
Common types of DC servomotors include brushless or gearmotor types. Stepper motors
are a class of motors that provide incremental motion, or steps, in response to pulses of
current that alternately change the polarity of the stator poles; step motors do not require
feedback and are sometimes used in "Open Loop," or no-feedback applications.
Important performance specifications to consider when searching for gearmotors include
shaft speed, continuous torque, continuous current, and continuous output power. The
terminal voltage is the design DC motor voltage. The continuous torque is the output
torque capability of the motor under constant running conditions. Continuous current is
the maximum rated current that can be supplied to the motor windings without
www.studymafia.org
overheating. Continuous output power is the mechanical power provided by the motor
output.
Important DC motor specifications to consider include terminal voltage, motor
construction and commutation. The terminal voltage is the design DC motor voltage.
Motor construction choices include permanent magnet, shunt wound, series wound,
compound wound, disc armature, and coreless or slotless. Commutation choices include
brush or brushless.
Important gearing specifications to consider for gearmotors and gearheads
include the gearing arrangement, gearbox ratio, and gearbox efficiency. Gearing
arrangement choices for gearmotors or gearheads include spur, planetary, harmonic,
worm, and bevel. Gearbox ratio is the ratio of input speed to output speed. A ratio
greater than one, therefore, indicates speed reduction, while a ratio less than one indicates
speed increase. Efficiency is the percentage of power or torque that is transferred
through the gearbox. Losses occur due to factors such as friction and slippage inside the
gearbox.
Feedback choices for gearmotors include integral encoder, integral resolver, and
integral tachometer. Other important parameters to consider when specifying gearmotors
include shaft orientation or type and number of shafts, design units, motor shape,
diameter or width, housing length, NEMA frame size, enclosure options and special or
extreme environment construction. Common features include multi-speed, reversible,
integral driver electronics, integral brake, integral clutch, and brake and clutch
combination
www.studymafia.org
RELAY
2.4.1 Overview
A relay is an electrically operated switch. Current flowing through the coil of the
relay creates a magnetic field which attracts a lever and changes the switch contacts. The
coil current can be ON or OFF so relays have two switch position and they are double
throw (changeover) switches.
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.
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) can not provide this current and a transistor is usually used to amplify
the small IC current to the larger value required for the relay coil. The maximum output
current for the popular 555 timer IC is 200mA so these devices can supply relay coils
directly without amplification.
Relays are usually SPDT or DPDT but they can have many more sets of switch
contacts, for example relay with 4 sets of changeover contacts are readily available. Most
relays are designed for PCB mounting but you can solder wires directly to the pins
providing you take care to avoid melting the plastic case of the relay.
The supplier's catalogue should show you the relay's connection. The coil will be
obvious and it may be connected either way round. 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.
The relays switch connections are usually contains COM, NC and NO.
COM = Common, always connect to this; it is the moving part of the switch.
NC = Normally Closed, COM is connected to this when the relay coil is off.
NO = Normally Open, COM is connected to this when the relay coil is on.
Connect to COM and NO if you want the switched circuit to be on when the relay coil is
on.
www.studymafia.org
Connect to COM and NC if you want the switched circuit to be on when the relay coil is
off.
Most relays are SPDT or DPDT which are often described as "single pole changeover"
(SPCO)
Or "double pole changeover"(DPCO).
Relays can switch AC and DC, transistors can only switch DC.
Relays can switch high voltages, transistors cannot.
Relays are a better choice for switching large currents (> 5A).
Relays can switch many contacts at once.
2.5 ULN2003
The driver makes use of the ULN2003 driver IC, which contains an
array of 7 power Darlington arrays, each capable of driving 500mA of current. At
an approximate duty cycle, depending on ambient temperature and number of
drivers turned on, simultaneously typical power loads totaling over 230w can be
controlled.
The device has base resistors, allowing direct connection to any
common logic family. All the emitters are tied together and brought out to a
separate terminal. Output protection diodes are included; hence the device can drive
inductive loads with minimum extra components. Typical loads include relays,
solenoids, stepper motors, magnetic print hammers, multiplexed LED, incandescent
displays and heaters.
www.studymafia.org
Darlington Pair
A Darlington pair is two transistors that act as a single transistor but with a much
higher current gain.
What is current gain?
Transistors have a characteristic called current gain. This is referred to as its
hFE. The amount of current that can pass through the load when connected to a
transistor that is turned on equals the input current x the gain of the transistor (hFE)
The current gain varies for different transistor and can be looked up in the data sheet
for the device. Typically it may be 100. This would mean that the current available to
drive the load would be 100 times larger than the input to the transistor.
plastic lenses. But it's not like there is a 2-D array of sensors in there. There is a single (or
sometimes two) sensors inside looking for changes in infrared energy.
If you have a burglar alarm with motion sensors, you may have
noticed that the motion sensors cannot "see" you when you are outside looking through a
window. That is because glass is not very transparent to infrared energy. This, by the
way, is the basis of a greenhouse. Light passes through the glass into the greenhouse and
heats things up inside the greenhouse. The glass is then opaque to the infrared energy
these heated things are emitting, so the heat is trapped inside the greenhouse. It makes
sense that a motion detector sensitive to infrared energy cannot see through glass
windows.
The above figure (top view) illustrates how the PIR sensors can be
used in the home security system. A PIR sensor can be placed at a corner of the desired
room so that it can sense the motion of the intruder.
www.studymafia.org
CIRCUIT DIAGRAM
3.1 RECEIVER
3.2 TRANSMITTER
www.studymafia.org
CONCLUSIONS
REFERENCES
www.studymafia.org
www.wikipedia.com
www.google.com
www.studymafia.org