Professional Documents
Culture Documents
Group No. 13
Pragnesh Patel 2016A3PS0183G
Specifications:
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.
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)
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
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
If count
greater
than 8
If count
greater
than 16
B
Move count 8 to
row 2 X
B
If count
greater
than 24
YES
NO
Row 2 = 8
Move count 16 to
Row 3 X
If count
greater
than 32
If count
greater
than 32
YES
NO
Row 2 = 8
Row 3 = 8
Move count 24 to
Row 3
X
C
C
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
1 2 3 4 5
Decrement count
1
Of Row 1
Check NO
if Row After
1 is 15 min
empty
YES
Decrement count
2
Of Row 2
Check NO
if Row After
2 is 15 min
empty
YES
Check NO
if Row After
3 is 15 min
empty
YES
Check NO
if Row After
4 is 15 min
empty
YES
Check NO
if Row After
5 is 15 min
empty
YES