Anda di halaman 1dari 28

LED WITH HUMAN SENSOR Mini Project report submitted in partial fulfillment of the requirements For the award

of the degree of

BACHELOR OF TECHNOLOGY IN ELECTRICAL AND ELECTRONICS ENGINEERING By SAINADH KARNATI KIREETI.Y CHANAKYA REDDY.B (08241A0295) (08241A0271) (08241A0262)

Department of Electrical and Electronics Engineering

GOKARAJU RANGARAJU INSTITUTE OF ENGINEERING AND TECHNOLOGY BACHUPALLY, HYDERABAD-72 2008-2012

GOKARAJU RANGARAJU INSTITUTE OF ENGINEERING AND TECHNOLOGY Hyderabad, Andhra Pradesh.

DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING

CERTIFICATE This is to certify that the mini-project report entitled LED WITH HUMAN SENSOR that is being submitted by SAINADH.K, KIREETI.Y, CHANAKYA REDDY.B in

partial fulfilment for the award of the Degree of Bachelor of Technology in Electrical and Electronics Engineering to the Jawaharlal Nehru Technological University is a record of bonafide work carried out by them under my guidance and supervision. The results embodied in this project report have not been submitted to any other University or Institute for the award of any Graduation degree. Mr.P.M.Sarma HOD, GRIET Hyderabad Mr. Chakravarthy External Examiner EEE Associate Professor Dept. of EEE GRIET

ACKNOWLEDGEMENT This is to place on record my appreciation and deep gratitude to the persons without whose support this project would never seen the light of day. I wish to express my propound sense of gratitude to Mr. P. S. Raju, Director, G.R.I.E.T for his guidance, encouragement, and for all facilities to complete this project. I also express my sincere thanks to Mr.P.M.Sarma, Head of the Department, G.R.I.E.T and for extending their help. I have immense pleasure in expressing my thanks and deep sense of gratitude to my guide Ms.Sapna, Assistant Professor, Department of Electrical and Electronics Engineering, G.R.I.E.T for his guidance throughout this project. Finally I express my sincere gratitude to Mr. Satish kumar, Assistant Professor, Department of Electrical and Electronics Engineering, G.R.I.E.T and all

the members of faculty and my friends who contributed their valuable advice and helped to complete the project successfully.

SAINADH.K KIREETI.Y CHANAKYA REDDY.B

(08241A0295) (08241A0271) (08241A0222)

CONTENTS 1.Introduction 2.Flow diagram -Power supply -connecting to micro controller through amplifier circuit -Human sensor -Display unit(LED) 3.Description of hardware and its components -Human sensor -Voltage Regulator circuit

-Amplifier circuit -Crystal oscillator circuit -AT89C51 -Display unit 4. Software codes 5.Schematic connections 6. Hardware implementation 7. Conclusion 8.Appendix-1 Chapter 1 INTRODUCTION If we take a look at present day scenario, due to lot of security issues there is a need of strong security system in which sensors play an important role. A human sensor is also called Passive infrared sensor.

Passive infrared sensors do not have to actively generate their own energy to take infrared readings, which makes them very affordable compared to other types of security systems. As long as there are an adequate number of sensors placed throughout the property, PIR-based

security systems can reliably provide comprehensive coverage. As long as your passive infrared security systems are properly maintained, it can give you many years of coverage. One important thing to keep in mind, if you own security systems with PIR sensor components, is to make sure the cylindrical covering is not compromised. This protects the sensor from interference, namely from infrared reading on dust and other small objects. The sensor may send back erroneous data to the security systems, causing a false alarm if there is damage to sensor cover.

CHAPTER-2 FLOW DIAGRAM

POWER SUPPLY HUMAN SENSOR

MICROCONTROLLER CIRCUIT

LED

REGULATED POWER SUPPLY A regulated power supply is one that controls the output voltage or current to a specific value; the controlled value is held nearly constant

despite variations in either load current or the voltage supplied by the power supply's energy source.

AMPLIFIER CIRCUIT The amplifier circuit amplifies the signal received by the IR pair. The microcontroller needs 4-5 volts to respond to a signal. This is achieved by the amplifier circuit. It is a simple connection of transistor in Common emitter connection. The circuit amplifies the received signal which is of order V to 4-5 volts. MICROCONTROLLER CIRCUIT:

The microcontroller is embedded with a C program. It is designed in such a way that whenever it receives the signal from amplifier circuit it transmits the signal to LED. HUMAN SENSOR The HUMAN SENSOR, also called a passive infrared (PIR) sensor, detects movement of infrared light sources at 7 to 14 m. People emit infrared radiation from 8 to 14 m, which makes this an excellent sensor for detecting human movement. Two infrared detector pixels allow the detector to filter out changes affecting the whole sensing area, like weather or light. DISPLAY UNIT The Display unit in this panel is LED bulb. It displays the signal coming from Micro controller.

CHAPTER-3 DESCRIPTION OF HARDWARE

HUMAN SENSOR: Passive infrared sensors work by measuring incoming infrared energy. They do not emit energy themselves, which is why they are called "passive." Infrared energy is released when heat is created. Humans and animals both release infrared energy. Passive infrared sensors (sometimes called pyroelectric detectors) detect this energy and measure it against previous, or standard, levels. In this manner, they can monitor changes in the environment. On average, humans emit 9 to 10 micrometers of infrared energy.

Passive infrared sensors are used in the motion detectors that are commonly used for security reasons by businesses and residential home owners.

Photo Detectors

Passive infrared sensors are made to detect infrared energy emissions of 8 to 12 micrometers. The tool they use to detect these energy levels is called a photo detector. A photo detector takes incoming light and measures its wavelengths, or levels of infrared energy. A mirror within the sensor is what is used to capture the energy, which is then projected onto a computer chip. As the subject emitting the energy moves, the hot spot on the chip moves also, which allows the computer chip to monitor and measure the variations and speeds of the infrared energy being emitted.

The level amounts are then converted into an electrical current, which is sent through a minuscule computer contained in the sensor. The computer determines if these levels are standard levels for the supervised area or if they vary widely from normal levels. If there are large variations in the levels, the computer may trigger an alarm, which is how many home security systems work. In fact, normal human movement can release enough variation in a supervised area to trigger such an alarm in most cases. Most passive infrared sensors will ignore any smaller emissions or slower variations in the emissions as those are usually caused by the movement of animals or by the slow rise of heat in the environment during the day. Motion Detectors

It is common for passive infrared sensing systems to be combined with a photo-sensor detector. These motion detectors are often located near the entrance to many businesses. They consist of a light sensor in the form of a laser beam. When the beam of light is blocked, such as when a person walks through it, the infrared sensor will notice a drop in the light emission and alert a nearby control box. The control box will then react accordingly. This reaction can be something as simple as emitting a soft tone to alert shopkeepers that someone has entered the store. The reaction might trigger an alarm, as in cases where the light beam is used to monitor and protect an area such as in a museum.

VOLTAGE REGULATOR CIRCUIT:

This circuit accepts an unregulated voltage input (i.e., a fluctuating input voltage), and provides a regulated voltage output (a stable output voltage that remains at or very close to its intended output level). The unregulated input voltage must be higher than the desired output level by a sufficient margin in order to achieve 'effective' regulation. The zener diode Vz acts as a voltage reference for the circuit, and is fed into the non-inverting input of the operational amplifier. The voltage divider formed by R1 and RF sets the voltage level of the inverting input of the op amp, which is basically a feedback from the circuit output to the op amp. The NPN transistor is used to boost the output current of the circuit. The voltage at the non-inverting input of the op amp is pegged at the zener voltage, while the voltage at the inverting input is always a fraction of the output voltage as defined by RF and R1. When the output exceeds the set level, the inverting input voltage exceeds that of the non-inverting input, causing the output of the op-amp to go 'low'. This turns off the NPN transistor, causing the output voltage to dip. When the output goes below the set level, the reverse happens, i.e., the op-amp's output goes 'high', causing the NPN transistor to turn on and pull the voltage up.

Thus, this circuit works by turning off the transistor when the output voltage is too high and turning it on when the output is too low. This balancing act happens continuously, with the circuit reacting instantaneously to deviations in the output voltage. Resistor RF is adjusted to set the desired output voltage of the circuit. The zener diode needs to be replaced by a voltage reference IC if a more stable and more precise output is required. AMPLIFYING CIRCUIT:

Amplifier Circuit The amplifier consists of a npn transistor connected in Common emitter mode. It is used as an interface between the sensors set and the microcontroller circuit. It amplifies the signal received from the sensor set and gives the amplified output to the microcontroller.

CRYSTAL OSCILLATOR CIRCUIT: A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters and receivers. The most common type of piezoelectric resonator used is the quartz crystal, so oscillator circuits designed around them became known as "crystal oscillators."

Quartz crystals are manufactured for frequencies from a few tens of kilohertz to tens of megahertz. More than two billion (2109) crystals are manufactured annually. Most are used for consumer devices such as wristwatches, clocks, radios, computers, and cellphones. Quartz crystals are also found inside test and measurement equipment, such as counters, signal generators, and oscilloscopes.

MICROCONTROLLER - AT89C51

Microcontroller AT89C51

The 8051 microcontroller generic part number actually includes a whole family of microcontrollers that have numbers ranging from 8031 to 8751. The block diagram of the 8051 shows all of the features unique to microcontrollers: 1. Internal ROM and RAM 2. I/O ports with programmable pins 3. Timers and counters 4. Serial data communication The block diagram also shows the usual CPU components program counter, ALU, working registers, and the clock circuits. The 8051 architecture consists of these specific features: 1. 8 bit CPU with registers A and B 2. 16 bit PC &data pointer (DPTR) 3. 8 bit program status word (PSW) 4. 8 bit stack pointer(SP) 5. Internal ROM or EPROM (8751)of 0(8031)to 4k(8051) 6. Internal RAM of 128 bytes. 7. 4 register banks , each containing 8 registers

8. 80 bits of general purpose data memory 9. 32 input/output pins arranged as four 8 bit ports:P0-P3 10. Two 16 bit timer/counters:T0-T1 11. Two external and three internal interrupt sources 12. Oscillator and clock circuits

BLOCK DIAGRAM OF 8051:

PIN DIAGRAM OF 8051:

PIN DESCRIPTION: VCC: Supply voltage (all packages except 42-PDIP). GND: Ground (all packages except 42-PDIP; for 42-PDIP GND connects only the logic core and the embedded program memory).

VDD: Supply voltage for the 42-PDIP which connects only the logic core and the embedded program memory. PWRVDD: Supply voltage for the 42-PDIP which connects only the I/O Pad Drivers. The application board MUST connect both VDD and PWRVDD to the board supply voltage. PWRGND: Ground for the 42-PDIP which connects only the I/O Pad Drivers. PWRGND and GND are weakly connected through the common silicon substrate, but not through any metal link. The application board MUST connect both GND and PWRGND to the board ground. Port 0: 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 1s are 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: Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. 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 verification. Port P1.5 P1.6 P1.7 Pin Alternate Functions MOSI (used for In-System Programming) MISO (used for In-System Programming) SCK (used for In-System Programming)

Port 2: 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. 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 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 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 bi-directional I/O port with internal pull-ups. 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 receives some control signals for Flash programming and verification. Port 3 also serves the functions of various special features of the AT89S51, as shown in the following table. Port Pin P3.0 P3.1 P3.2 P3.3 P3.4 P3.5 P3.6 P3.7 Alternate Functions RXD (serial input port) TXD (serial output port) INT0 (external interrupt 0) INT1 (external interrupt 1) T0 (timer 0 external input) T1 (timer 1 external input) WR (external data memory write strobe) RD (external data memory read strobe)

RST: Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. This pin drives High for 98 oscillator periods after the Watchdog times out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default state of bit DISRTO, the RESET HIGH out feature is enabled. 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 of 1/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 microcontroller is in external execution mode. PSEN: Program Store Enable (PSEN) is the read strobe to external program memory. When the AT89S51 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. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming. XTAL1: Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2: Output from the inverting oscillator amplifier

DISPLAY UNIT: A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in many devices and are increasingly used for other lighting. Introduced as a practical electronic component in 1962, early LEDs emitted low-intensity red light, but modern versions are available across the visible, ultraviolet and infrared wavelengths, with very high brightness. When a light-emitting diode is forward biased (switched on), electrons are able to recombine with electron holes within the device, releasing energy in the form of photons. This effect is called electroluminescence and the color of the light (corresponding to the energy of the photon) is determined by the energy gap of the semiconductor. An LED is often small in area (less than 1 mm2), and integrated optical components may be used to shape its radiation pattern. LEDs present many advantages over incandescent light sources including lower energy consumption, longer lifetime, improved robustness, smaller size, faster switching, and greater durability and reliability. LEDs powerful enough for room lighting are relatively expensive and require more precise current and heat management than compact fluorescent lamp sources of comparable output.

PARTS OF LED:

CHAPTER-4 SOFTWARE CODE #include<reg51.h> sbit rled=p2^0; void delay(void) { int i; for(i=0;i<141;i++) { TMOD=0X01; THO=0X00;

TLO=0X00; TRO=1; } } void ex0() interrupt 0 { rled=1; delay(); rled=0; } void main() { IE=0X81; IP=0X01; ITO=1; rled=0; while(1); }

CHAPTER-5 SCHEMATIC CONNECTIONS

CHAPTER-6 HARDWARE IMPLEMENTATION

CHAPTER-6 CONCLUSION AND SCOPE OF FUTURE By the end of this project 1) Connections and testing in Proteus is studied. 2) Coding and compiling of a C program in Keil u Vision software is studied.

3) Hardware implementation by connecting Schematic and making Board layout EAGLE is done successfully. 4) The hardware kit is tested successfully by embedding the C program Hex file in the AT89C51 Microcontroller. 5) The operation of microcontroller is analysed in simulation and practically.

Chapter-7 Appendix-1

APPENDIX-2 SOFTWARE USED PROTEUS It is used for the real time simulation of the Circuits involving complex ICs, Microcontrollers, Electromechanical devices etc. System components ISIS Schematic Capture - a tool for entering designs. PROSPICE Mixed mode SPICE simulation - industry standard SPICE3F5 simulator combined with a digital simulator.

ARES PCB Layout - PCB design system with automatic component placer, rip-up and retry auto-router and interactive design rule checking. VSM - Virtual System Modeling lets co simulate embedded software for popular microcontrollers alongside hardware design. System Benefits Integrated package with common user interface and fully context sensitive help.

Anda mungkin juga menyukai