Automatic Room Light Controller With Bidirectional Visitor Counter

April 2, 2018 | Author: amysure1 | Category: Microcontroller, Flash Memory, Relay, Electronic Circuits, Manufactured Goods


Comments



Description

CHAPTER :- 1 Project Overview[1] 1. Introduction Of Project 1.1 Project Definition: Project title is ―AUTOMATIC ROOM LIGHT CONTROLLER WITH BIDIRECTIONAL VISITOR COUNTER ―. The objective of this project is to make a controller based model to count number of persons visiting particular room and accordingly light up the room. Here we can use sensor and can know present number of persons. In today’s world, there is a continuous need for automatic appliances with the increase in standard of living, there is a sense of urgency for developing circuits that would ease the complexity of life. Also if at all one wants to know the number of people present in room so as not to have congestion. This circuit proves to be helpful. [2] 1.2 Project Overview This Project ―Automatic Room Light Controller with Visitor Counter using Microcontroller is a reliable circuit that takes over the task of controlling the room lights as well us counting number of persons/ visitors in the room very accurately. When somebody enters into the room then the counter is incremented by one and the light in the room will be switched ON and when any one leaves the room then the counter is decremented by one. The light will be only switched OFF until all the persons in the room go out. The total number of persons inside the room is also displayed on the seven segment displays. The microcontroller does the above job. It receives the signals from the sensors, and this signal is operated under the control of software which is stored in ROM. Microcontroller AT89S52 continuously monitor the Infrared Receivers, When any object pass through the IR Receiver's then the IR Rays falling on the receiver are obstructed , this obstruction is sensed by the Microcontroller [3] 2 BLOCK DIAGRAM AND ITS DESCRIPTION [4] .CHAPTER :. 1 Basic Block Diagram [5] . 2.1 Basic Block Diagram Enter Enter Sensor Signal Conditioning Exit Exit Sensor Signal Conditioning Power Supply A T 8 9 S 5 2 Relay Driver Light Fig.2. By combining a versatile 8-bit CPU with Flash on a monolithic hip. Relay driver circuit 1. The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the MCS-51TM instruction set and pin out. The main function of this block is to provide the required amount of voltage to essential circuits. Entry and Exit sensor circuit 3. Power Supply 2. To get the +5V dc power supply we have used here IC 7805. the Atmel AT89S52 is a powerful [6] . Mainly this block diagram consist of the following essential blocks. The main intention of this block is to sense the person. +12V is given to relay driver. Enter and Exit Circuits:This is one of the main part of our project. 89S52 Microcontroller:It is a low-power. which provides the +5V dc regulated power supply. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. 1. high performance CMOS 8-bit microcontroller with 8KB of Flash Programmable and Erasable Read Only Memory (PEROM). AT 89S52 micro-controller 4. 2. +12 voltage is given.2. For sensing the person and light we are using the light dependent register (LDR).2 Block Diagram Description The basic block diagram of the bidirectional visitor counter with automatic light controller is shown in the above figure. By using this sensor and its related circuit diagram we can count the persons. 3. Power Supply:Here we used +12V and +5V dc power supply. 4. Because of this appropriate device is selected and it do its allotted function. which we are further energizing the particular relay. [7] .Microcontroller. One relay driver circuit we are using to control the light. In this block mainly we are using the transistor and the relays. Output signal from AT89S52 is given to the base of the transistor. Relay Driver Circuit:This block has the potential to drive the various controlled devices. which provides a highly flexible and cost effective solution so many embedded control applications. 3 SCHEMATIC DIAGRAM [8] .CHAPTER :. 3.1 Transmitter circuit [9] .Transmission Circuit:- Fig. 2 Receiver circuit [10] . 3.Receiver Circuit:- Fig. 3 Transmitter circuit This circuit diagram shows how a 555 timer IC is configured to function as a basic monostable multivibrator. It is also known as a 'one-shot'. It got its name from the fact that only one of its output states is stable. but returns to its original state after a certain time delay. 1. Receiver Circuit (Sensors) 1. [11] . CIRCUIT DESCRIPTION: There are two main parts of the circuits. Transmission Circuit: Fig. Transmission Circuits (Infrared LEDs) 2. A monostable multivibrator is a timing circuit that changes state once triggered. 3. the flip-flop is triggered once again. i. around 1. This circuit. IR Transmission circuit is used to generate the modulated 36 kHz IR signal.In this circuit. At the same time. The IC555 in the transmitter side is to generate 36 kHz square wave. t=R1C1. produces a pulse at pin 3 whose width t is just the product of R1 and C1. [12] . the flip-flop brings the output (pin 3) level to 'high'. allowing C1 to charge up through R1. a negative pulse applied at pin 2 triggers an internal flipflop that turns off pin 7's discharge transistor. this time making the pin 3 output 'low' and turning on pin 7's discharge transistor. Adjust the preset in the transmitter to get a 38 kHz signal at the o/p. in effect. When capacitor C1 as charged up to about 2/3 Vcc.4K we get a 38 kHz signal.e. which discharges C1 to ground.. Then you point it over the sensor and its o/p will go low when it senses the IR signal of 38 kHz. CL100 is to trigger the IC555 which is configured as monostable multivibrator. [13] .LTS 542 (Common Anode) is used for 7-Segment display.2. I.e. And when counter will be 00 that time Relay will be turned off.4 Receiver circuit The IR transmitter will emit modulated 38 kHz IR signal and at the receiver we use TSOP1738 (Infrared Sensor). Port 2 is used for the Relay Turn On and Turn off Purpose. Receiver Circuit: Fig. Reset button will reset the microcontroller. And that time Relay will get Voltage and triggered so light will get voltage and it will turn on. 3. around 1 second. Port 0 is used for the 7-Segment display purpose. Input is given to the Port 1 of the microcontroller. The output goes high when the there is an interruption and it return back to low after the time period determined by the capacitor and resistor in the circuit. 4 HARDWARE DESIGN & DESCRIPTIONS [14] .CHAPTER :. 4.1 Snap of the entire circuit [15] .Hardware Design:- Infrared Sensor TSOP1738 Microcontroller AT89S52 Timer IC 555 7-Segment Display Relay Fig. In the process of troubleshooting I found the circuit aptly soldered and connected and hence came to conclusion that there was error in programming section which was later rectified and the desired results were obtained.4. Then I programmed the microcontroller using KEIL software using hex file. After completion of the soldering process I tested the circuit. After completion of the designing circuit I prepared the layout. Still the desired output was not obtained and so troubleshooting was done. Then soldering process was done. Dip trace is a circuit designing software.1 Procedure Followed While Designing: In the beginning I designed the circuit in DIPTRACE software. [16] . CL 100  7-Segment Display [17] .4. 500 mA  Preset – 4.33pF  Reset button switch  Rectifier diode – IN4148  Transistor – BC 547.7K  Disc capacitor – 104.2 List of Components: Following is the list of components that are necessary to build the assembly of the Digital Speedometer Cum Odometer:  Microcontroller – AT89S52  IC – 7805  Sensor – TSOP 1738 (Infrared Sensor)  Transformer – 12-0-12. and interrupt system to continue functioning. onchip oscillator.tents but freezes the oscillator.3 Description of Components 4. two data pointers. three 16-bit timer/counters. timer/counters. The Power-down mode saves the RAM con. [18] .1 Microcontroller AT89S52: The AT89S52 is a low-power. 256 bytes of RAM. The Idle Mode stops the CPU while allowing the RAM. a six-vector two-level interrupt architecture. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory pro. the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications.4.3. serial port. Watchdog timer. high-performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. 32 I/O lines. In addition. The AT89S52 provides the following standard features: 8K bytes of Flash.grammar. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip. disabling all other chip functions until the next interrupt or hardware reset. The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the Industry-standard 80C51 instruction set and pin out. and clock circuitry. the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. a full duplex serial port.  32 Programmable I/O lines.  Power range: 4V – 5.5V  Endurance : 1000 Writes / Erase cycles  Fully static operation: 0 Hz to 33 MHz  Three level program memory lock  Power off flag  Full duplex UART serial channel  Low power idle and power down modes  Interrupt recovery from power down modes  256 KB internal RAM  Dual data pointer [19] .  8 Interrupt sources.  16 bit Timer/Counter—3.FEATURES: 8 KB Reprogrammable flash. 4.3.. supporting all major transmission codes. is the standard IR remote control receiver series.2 TSOP1738 (INFRARED SENSOR) Fig.. the epoxy package is designed as IR filter. Features:          Photo detector and preamplifier in one package Internal filter for PCM frequency Improved shielding against electrical field disturbance TTL and CMOS compatibility Output active low Low power consumption High immunity against ambient light Continuous data transmission possible (up to 2400 bps) Suitable burst length .10 cycles/burst [20] .4.2 Infrared Sensor Description: The TSOP17. – Series are miniaturized receivers for infrared remote control systems. PIN diode and preamplifier are assembled on lead frame. The demodulated output signal can directly be decoded by a microprocessor. TSOP17. Block Diagram: Fig. 4.3 Block Diagram of TSOP 1738 Application Circuit: Fig.4 Application circuit [21] . 4. the time is precisely controlled by one external resistor and capacitor. 4.4. Additional terminals are provided for triggering or resetting if desired.005% per °C Normally on and normally off output Available in 8-pin MSOP package [22] . and the output circuit can source or sink up to 200mA or drive TTL circuits.5 Timer IC(555) Description: The LM555 is a highly stable device for generating accurate time delays or oscillation.3 555 ( TIMER IC): Fig. The circuit may be triggered and reset on falling waveforms. the free running frequency and duty cycle are accurately controlled with two external resistors and one capacitor. In the time delay mode of operation. For astable operation as an oscillator. Features:          Direct replacement for SE555/NE555 Timing from microseconds through hours Operates in both astable and monostable modes Adjustable duty cycle Output can source or sink 200 mA Output and supply TTL compatible Temperature stability better than 0.3. which are made from GaAsP on GaP substrate.52 inch digit height single digit seven-segment display.3. and has a red face and red segment. This device utilizes Hi-eff.4 LTS 542 (7-Segment Display) Description: The LTS 542 is a 0. Red LED chips.6 7 Segment [23] . 4. Fig.Applications:        Precision timing Pulse generation Sequential timing Time delay generation Pulse width modulation Pulse position modulation Linear ramp generator 4. 52 Inch Digit Height  Continuous Uniform Segments  Low power Requirement  Excellent Characters Appearance  High Brightness & High Contrast  Wide Viewing Angle [24] .Features:  Common Anode  0. 6. 24V Thermal Overload Protection Short Circuit Protection Output Transistor Safe Operating Area Protection [25] . making it essentially indestructible. Although designed primarily as fixed voltage regulators. 8.4. 15.5 LM7805 (Voltage Regulator) Fig. Features:      Output Current up to 1A Output Voltages of 5.7 Voltage Regulator Description: The KA78XX/KA78XXA series of three-terminal positive regulator are available in the TO-220/D-PAK package and with several fixed output voltages. thermal shut down and safe operating area protection.3. these devices can be used with external components to obtain adjustable voltages and currents. making them useful in a wide range of applications. 4. 10. 9. Each type employs internal current limiting. 12. they can deliver over 1A output current. If adequate heat sinking is provided. 18. [26] . LED L2 indicates relay on. 4.8 Relay A single pole dabble throw (SPDT) relay is connected to port RB1 of the microcontroller through a driver transistor.4. the relay operates. The relay is used to operate the external solenoid forming part of a locking device or for operating any other electrical devices.3. The relay requires 12 volts at a current of around 100ma. Normally the relay remains off. As soon as pin of the microcontroller goes high. When the relay operates and releases. Diode D2 is the standard diode on a mechanical relay to prevent back EMF from damaging Q3 when the relay releases.6 RELAY CIRCUIT: Fig. which cannot provide by the microcontroller. So the driver transistor is added. CHAPTER :.5 SOFTWARE DESIGN [27] . 7 Flow Chart [28] . 4.FLOW CHART: Fig. And if it is interrupted then the microcontroller will decrement the count. And light will be turn off.  If the sensor 2 is interrupted first then the microcontroller will look for the sensor 1. If the sensor 1 is interrupted first then the microcontroller will look for the sensor 2. [29] . And if it is interrupted then the microcontroller will increment the count and switch on the relay. if it is first time interrupted.  When the last person leaves the room then counter goes to 0 and that time the relay will turn off. 6 TESTING AND RESULTS [30] .CHAPTER :. There we got over first trouble. That is easy for me but when we turn toward the main circuit. We also had some soldering issues which were resolved using continuity checks performed on the hardware. [31] . And also the software problem. like component selection.with the help of the solder we made the necessary paths. which we faced. And also the software problem.Testing And Results We started our project by making power supply.also the circuit part around the IC7805 were completely damaged. like component selection. So we replaced the IC7805. then refer the data books and other materials related to its. which components is better than other and its feature and cost wise a We started our project by making power supply. We had issues with better or correct result. which I desired. there are many problems and issues related to it. After getting 9V from the transformer it was not converted to 5V and the circuit received 9V. We started testing the circuit from the power supply. I also had some soldering issues which were resolved using continuity checks performed on the hardware. which we desired. there are many problems and issues related to it. which are I faced. That is easy for me but when I turn toward the main circuit. As the solder was shorted IC 7805 got burnt. which components is better than other and its feature and cost wise also.. I had issues with better or correct result. 7 FUTURE EXPANSION [32] .CHAPTER :. FUTURE EXPANSION  By using this circuit and proper power supply we can implement various applications Such as fans. tube lights.  By modifying this circuit and using two relays we can achieve a task of opening and closing the door. [33] . etc. 8 APPLICATION. ADVANTAGES & DISADVANTAGES [34] .CHAPTER :. ADVANTAGES & DISADVANTAGES  Application o For counting purposes o For automatic room light control  Advantages o Low cost o Easy to use o Implement in single door  Disadvantages o It is used only when one single person cuts the rays of the sensor hence it cannot be used when two person cross simultaneously. [35] .APPLICATION. CHAPTER :.8 BIBILOGRAPHY [36] . com [37] .Bibliography  Reference Books  Programming in ANSI C: E BALAGURUSAMY  The 8051microcontroller and embedded systems: MUHAMMAD ALI MAZIDI JANICE GILLISPIE MAZIDI  The 8051 microcontroller: KENNETH J. AYALA  Website   www.com www.8051.datasheets4u.
Copyright © 2024 DOKUMEN.SITE Inc.