You are on page 1of 18

DESIGN PROJECT

Smart Lighting System

EEE/INSTR F241 – Microprocessor Programming & Interfacing


BITS- Pilani Goa Campus

Group No. 13
Pragnesh Patel 2016A3PS0183G

Baibhav Phukan 2016A3PS0186G

Govind Ramchandran 2016A3PS0190G

Mahima Venu 2016A3PS0191G

Kaushik Gaikwad 2016A3PS0198G


P14. System to be designed Smart Lighting System Description:
This is a lighting system for a conference room. As the seats get filled the light should
be turned on. The rows are filled from row1 onwards. There are 4 lights per row. As
each row begins to get filled the lights get turned on. As each row empties completely
the light gets turned off. You can assume there are at least 5 rows. Entry to the
auditorium is restricted to a certain point of time. Exit can be at at point of time.
Assumptions made:

1. Entry is limited to the first 15 minutes.


2. Exit is allowed any point of time after the first 15 minutes.
3. There is just one door through which people can enter or exit.
4. The total number of rows in the conference room is 5. In each row, a maximum
of 8 people can be seated.
5. When the people enter the room, they will occupy the rows in the serial order.
Row 1 is filled first, followed by row 2, row 3, and so on.
6. At any given time, only one person can enter the room or exit from any of the
rows.
7. After the first 15 minutes, a person from any row can exit the room.
8. Any person will not be making any transitions between rows inside the room.

Specifications:

1. There is an IR proximity sensor present at the gate and at every row.

2. When a person passes by, the sensor gives a 5 V pulse (logic 1) or remains 0.

3. The sensor is connected to the 8259 chip which, on receiving the logic 1 signal,
raises an interrupt.
1. The
the voltage
output from
of 8255A
5V tochip
12V.is connected to a voltage amplifier which amplifies
4. The DC relay is connected to 4 LED tube lights connected in parallel and a
230V AC Power supply.

5. When a person sits in a row, all the lights corresponding to that row are
switched on automatically.

Components Used and quantity:

1. Microprocessor 8086 -1
2. Decoder 74LS138 -1
3. Programmable Peripheral Interface 8255A -1
4. Infrared Sensor – SB612A PIR Module-6
5. DC Relay RJ1S-C-D5 – 5
6. Octal Latch 74LS373 - 3
7. Bidirectional Buffer 74LS245 -2
8. Unidirectional Buffer 74LS244 - 1
9. Clock generator 8284A -1
10. ROM 2716 -4
11. RAM 6116 -2
12. AND 7408 - 2 ICs
13. OR 7432 - 1 IC
14. NOT 7404 -1 IC
15. Led Tube Light Syska LED light SSK-T5-22W-6500K 4 per row-20 in total
16. 5V Battery (For Vcc)
Memory Interfacing: (Using I/O mapped I/O)

ROM chip used: 2716 (2K)


8K ROM divided in two parts:
ROM 1: 00000h - 00FFFh
ROM2: FF000h - FFFFFh
RAM chip used: 6116(2K)
4K RAM: 02000h - 02FFFh

I/O Interfacing: (Using I/O mapped I/O)

Mapping of 8255:
Port A: 00h
Port B: 02h
Port C: 04h
Control Register: 06h

Mapping of 8253:
Counter 0: 08h
Counter 1: 0Ah
Counter 2: 0Ch
Control Register: 0Eh

Mapping of 8259:
Address 0: 10h
Address 1: 12h
User Guide

Light automation is a growing trend. Smart lighting is a lighting technology


designed for energy efficiency. This may include high efficiency fixtures and
automated controls that make adjustments based on conditions such as
occupancy or daylight availability.

Our system mainly focuses on reducing the human effort of manually


switching the lights on/off. It senses the movement of a person and makes
use of this as a trigger for the lights. Smart lighting is a good way which
enables to minimize and save power.

With our system, you can light a room simply by walking in. We have
implemented this inside a conference room, although its scope is vaster.
There are rows and lights right above them. As soon as people keep entering
the conference room, the lights glow, but only an optimal amount of lights are
used depending upon the current capacity of the room. This is done to save
energy and prevent consumption.

The same concept has been used while exiting of the entrants. When a row
gets completely empty, the lights right above them are turned off and
subsequently so. Eventually all the lights go off when all the people leave.
This way one does not have to worry about turning the lights off and
appointing a staff to look after it.
Firmware Flowchart

Start

For the
first 15
mins

Initialize
code, data
and stack
segments

Initialize
the
control
register of
8255

Initialize
8253 to
generate
the entry-
exit time
Initialize
8259
according
to
interrupts
used in
design

X
No

Wait for
entry Yes Raise IR0 to the
sensor microprocessor
to go
high

Is
output
A
High?
A

Increment count

If count
greater
than 8

NO
YES

Glow the 4 tube


lights of row 1 X

If count
greater
than 8
If count
greater
than 16

Glow the 4 tube Row 1 = 8


lights of row 2
NO

B
Move count 8 to
row 2 X

B
If count
greater
than 24

YES
NO

Glow the 4 tube Row 1 = 8


lights of row 3
NO

Row 2 = 8

Move count 16 to
Row 3 X

If count
greater
than 32
If count
greater
than 32

YES
NO

Glow the 4 tube Row 1 = 8


lights of row 4
NO

Row 2 = 8

Row 3 = 8

Move count 24 to
Row 3
X
C
C

Glow the 4 tube


lights of row 5 Row 1 = 8

Row 2 = 8

Row 3 = 8

Row 4 = 8

Move count 32 to
Row 5 X
After 15 minutes
After
15

Check if
Corresponding ISR
person
branched
exits
from
any
row

IR1 = IR2 = IR3 = IR4 = IR5 =


1 1 1 1 1

1 2 3 4 5
Decrement count
1
Of Row 1

Check NO
if Row After
1 is 15 min
empty

YES

Switch off 4 lights


of Row 1
`

Decrement count
2
Of Row 2

Check NO
if Row After
2 is 15 min
empty

YES

Switch off 4 lights


of Row 2
Decrement count
3
Of Row 3

Check NO
if Row After
3 is 15 min
empty

YES

Switch off 4 lights


of Row 3
Decrement count
4
Of Row 4

Check NO
if Row After
4 is 15 min
empty

YES

Switch off 4 lights


of Row 4
Decrement count
5
Of Row 5

Check NO
if Row After
5 is 15 min
empty

YES

Switch off 5 lights


of Row 5

You might also like