Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various...

21
Automatic Washroom Light Switch [REPORT FILE] SUBMITTED BY- TABISH KAREEEM (177/EC/13) SHOBHIT ARORA (165/EC/13)

Transcript of Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various...

Page 1: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

Automatic Washroom Light Switch [REPORT FILE]

SUBMITTED BY-

TABISH KAREEEM (177/EC/13)

SHOBHIT ARORA (165/EC/13)

Page 2: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 1

SYNOPSIS

PROBLEM STATEMNT-

The project was developed keeping in mind the problem of wastage of electricity. This project

has numerous applications like “washroom light switch” which should light up entering the

washroom and should turn off on leaving the washroom. We have used PIR sensor to detect

human presence and depending on the output of PIR sensor, the green led will glow up if any

human is present in the room and it will remain off if no human is present in the room. The time

elapsed for which human is present in the room is simultaneously displayed on the LCD screen.

DESCRIPTION OF THE PROJECT-

The main aim of our project is to detect human presence and control the switching of light using

the PIR sensor. Our 8085 project uses PIR sensor to detect human presence. We have used LCD

to display the time elapsed during which any human was present in the room. We have used

8255 with LCD to display the output time. The project works with output of PIR sensor. The

output of the PIR sensor is connected to the SID pin of the microprocessor 8085. When PIR

sensor detects any human activity in its range, the output of the PIR sensor goes high and

simultaneously the counter starts. The counter is adjusted to display the time in seconds.

Counter continuously keeps on running till there is some human activity. When no human is in

the room, the counter stops and the LCD displays the time by which room was occupied.

Page 3: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 2

CONTENTS - S. NO.

TOPIC

PAGE NO.

1.

Acknowledgement

3

2. Introduction 4 3. Components Required 5 4. Flow Chart 6 5. Schematic details 7 6. Schematic 13 7. Board Layout 14 8. Gist of code 15 9. Board Picture 18 10. Tools used 19 11. Conclusion and

bibliography 20

Page 4: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 3

ACKNOWLEDGEMENT -

This is to acknowledge the invaluable contribution made by Prof Dhananjay Gadre without whose guidance and initiative the project would not have been successfully completed. We further express our gratitude for helping us at each stage of the project. Furthermore we thank you for providing the necessary support and access to necessary facilities which enabled us to work comfortably on our project. We would also like to express our gratitude to the members of the Microprocessors lab for their patience which played a major role in the successful completion of our project.

We would also like to thank www.pcbpower.com for precise manufacture and

timely delivery of the project board.

Page 5: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 4

INTRODUCTION-

The Automatic washroom light switch has various applications. It can be used to

save energy when not in used and also in various light switching applications. We

have used a human detecting device to check whether human is present in the

room and switching operation is controlled depending on the output of the device.

In this project, the device we have used is PIR (Passive Infrared Sensor) which is an

electronic sensor that measures infrared (IR) light radiating from objects in its

field of view. PIR sensor is mainly used as motion detectors. PIR sensor detects any

change in heat, and whenever it detects any change, its output PIN becomes

HIGH.

Our 8085 microprocessor project detects the output of the PIR sensor at the SID

pin (5th pin). If the output of the PIR sensor is high, then it means that any human

activity is currently going on inside the room and the SOD pin displays the

changes currently occurring at the SID pin, thus the SOD pin also displays the

output high. Consequently, the LED attached at the SOD pin lights up when there

is any human activity inside the room. If the output of the PIR sensor is low, this

indicates no human activity in the room, thus the SOD pin indicates LOW output

level and the LED also does not light up.

Page 6: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 5

COMPONENTS REQUIRED –

Component Name Quantity Model No.

8085 Microprocessor

1

8085uP

NOT Gate IC 1 74HC04N RAM 32K 1 62256 EEPROM 32K 1 28C256 Latch 1 74HCT573N Decoder 1 74HCT138N LED’s 2 Crystal 4MHz 1 Resistors - 330, 220,10k Capacitors - 0.1uF, 22uF, 10uF

LCD 1

8255 1 8255

Page 7: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 6

FLOWCHART-

Page 8: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 7

SCHEMATIC DETAILS –

The schematic contains the following components –

1. 8085 MICROPROCESSOR –

Page 9: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 8

2. 8255 -

The 8255 has 24 input/output pins in all.[5] These are divided into three 8-bit ports (Port A, Port B, Port C).[6] Port A and port B can be used as 8-bit input/output ports. Port C can be used as an 8-bit input/output port or as two 4-bit input/output ports or to produce handshake signals for ports A and B.

The three ports are further grouped as follows:

1. Group A consisting of port A and upper part of port C.

2. Group B consisting of port B and lower part of port C.

Eight data lines (D0 - D7) are available (with an 8-bit data buffer) to read/write

data into the ports or control register under the status of the RD (pin 5) and WR (pin 36), which are active low signals for read and write operations respectively. The address lines A1 and A0 allow to successively access any one of the ports or the control register as listed below:

Page 10: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 9

A1 A0 Port selected

0 0 port A

0 1 port B

1 0 port C

Page 11: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 10

1 1 control register

The control signal chip select CS (pin 6) is used to enable the 8255 chip. It is an active low signal, i.e., when CS = '0', the 8255 is enabled. The RESET input (pin 35) is connected to the RESET line of system like 8085, 8086, etc., so that when the system is reset, all the ports are initialized as input lines. This is done to prevent 8255 and/or any peripheral connected to it, from being destroyed due to mismatch of ports. As an example, consider an input device connected to 8255 at port A. If from the previous operation, port A is initialized as an output port and if 8255 is not reset before using the current configuration, then there is a possibility of damage of either the input device connected or 8255 or both since both 8255 and the device connected will be sending out data.

The control register or the control logic or the command word register is an 8-bit register used to select the modes of operation and input/output designation of the ports.

3. LCD -

LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and circuits. These modules are preferred over seven segments and other multi segment LEDs. The reasons being: LCDs are economical; easily programmable; have no limitation of displaying special & even custom characters (unlike in seven segments), animations and so on.

A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command and Data.

The command register stores the command instructions given to the LCD. A command is an instruction given to LCD to do a predefined task like initializing it,

Page 12: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 11

clearing its screen, setting the cursor position, controlling display etc. The data register stores the data to be displayed on the LCD. The data is the ASCII value of the character to be displayed on the LCD. Click to learn more about internal structure of a LCD.

4. MEMORY –

32K of EEPROM is used. The memory addresses are from the range

0000H to 7FFFH. 32K of RAM is used. The memory addresses

range is from 8000H to FFFFH.

Page 13: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 12

Page 14: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 13

Page 15: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 14

BOARD LAYOUT –

Page 16: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 15

GIST OF CODE -

Page 17: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 16

Page 18: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 17

Page 19: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 18

BOARD PICTURE -

Page 20: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 19

TOOLS USED – Various tools (Hardware and software) were used during the course of project development and designing:- Software tools:-

- Eagle 7.3.0 for schematic and board layout.

- 8085 simulator IDE by OshonSoft

- EEPROM Programmer Hardware tools:-

- EEPROM Programmer board.

- Soldering Iron

- Solder

- Multimeter

- +5V DC Supply Power

- Cutter, tweezers, hand files.

Page 21: Automatic Washroom Light Switch - 8085 Projects · The Automatic washroom light switch has various ... A 16x2 LCD display is very basic module and is ... In this LCD each character

PAGE 20

CONCLUSION – 8085 project taught us a lot about hardware, software and debugging. It helped us develop a deep understanding of 8085 microprocessor and introduced us to understand various aspects of PCB fabrication.

Overall it was good learning experience and we thank D.V Gadre Sir for providing

us with this opportunity.