Anda di halaman 1dari 45

MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

CONTENTS

Page No.

1 Introduction 1

2 Block Diagram 2

2. 1 Basic Block Diagram 2

2. 2 Power Supply diagram 2

3 Block Diagram Description 3

3. 1 Power Supply 3

3. 2 Entry & Exit Sensor Circuit 4

3. 3 AT 89C51 Microcontroller 4

3. 4 Relay Driver Circuit 6

3. 5 Display Unit 6

3. 6 Motor & Its Driving Circuit 7

4 Circuit Diagram 9

4.1 Main Circuit Diagram 9

4.2 IR Transmitter Circuit 10

4.3 Power Supply 11

5 Working Of The System 12

6 Components List 14

7 Circuit Description 15

1
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

7. 1 Transmitter Circuit 15

7. 2 AT 89C51 Microcontroller 15

7. 3 Receiver Circuit 16

7. 4 Display Unit 17

7. 5 Motor Unit 17

7. 6 Relay Unit 18

8 PCB Layout 19

9 PCB Fabrication 20

10 Flow Chart 22

11 Program 23

12 Advantages 37

13 Disadvantage 38

14 Application 39

15 Conclusion 40

16 Bibliography 41

A1 Appendix 42

1. Introduction

Intelligent Conference Hall is a set up with automatic door


opening and room light controller along with visitor counter using a
Microcontroller. This is a reliable circuit that takes over the task of controlling the
door and room devices as well us counting number of persons in the room. The

2
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

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 ATMEL 89C51 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 and hence the door opens with the help of motor attached to it
along with incrementing the no. of persons shown in the display by one. Now the
devices in the room start operating. When any one comes to leave the room the
same happens along with decrementing the count shown in the display, and when
all the persons in the room comes to leave i.e., when the count becomes zero in the
seven segment display all the devices comes to OFF state. This circuit with a much
more improvement can be used in practical life in conference halls, bathrooms etc.

2. BLOCK DIAGRAM

2.1 Basic Block Diagram


Microcontroller
Atmel 89C51

Motor driver
Sensor 1 3 for door
DEPARTMENT OF E&C MZC,accessing
KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

Device
switching unit
Sensor 2

Display unit
Power supply
for all units

Fig. 2.1

2.2 Power Supply Diagram

230V
AC +5V
TRANSFORMER RECTIFIER FILTER REGULATOR +12V
GND

Fig. 2.2

3. Block Diagram Description

The basic block diagram of the bidirectional visitor


counter with automatic light controller is shown in the above figure. Mainly this
block diagram consists of the following essential blocks.
1. Power Supply
2. Entry and Exit sensor circuit(Sensor 1 & Sensor 2)
3. AT 89C51 micro-controller

4
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

4. Relay Unit
5. Display unit
6. Motor & Its Driver Circuit For Door Opening

3.1 Power Supply

Here we used +12V and +5V dc power supply. The main


function of this block is to provide the required amount of voltage to essential
circuits. +12V is given to relay driver and motor whereas +5V is provided for
Microcontroller, Sensors, IC’s and for the display unit. IC 7805 & 7812 are used
here, which provides the +5V and +12V dc regulated power supply respectively.

A block diagram containing the parts of a


typical power supply is shown in fig 2.2. The ac voltage, typically 120 V rms, is
connected to a transformer, which steps that ac voltage down to the level for the
desired dc output. A diode rectifier then provides a full-wave rectified voltage that
is initially filtered by a simple capacitor filter to produce a dc voltage. This
resulting dc voltage usually has some ripple or ac voltage variation. A regulator
circuit can use this dc input to provide a dc voltage that not only has much less
ripple voltage but also remains the same dc value even if the input dc voltage varies
somewhat, or the load connected to the output dc voltage changes. This voltage
regulation is usually obtained using one of a number of popular voltage regulator
IC units. The regulated voltage is provided for the working of the circuit.

Transformer Rectifier Filter IC regulator Load

Fig 3.1.1

5
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

3.2 Enter and Exit Circuits (Sensor 1&2)

This is one of the main parts of our project. The


main intention of this unit is to sense the person. For sensing the person entering or
exiting the conference hall we are using the light dependent resistor (LDR) in the
transmission section and in the receiver end we set up a circuit using TSOP which
is connected to the microcontroller. Both at the transmitter and receiver end 555 is
used which works in the monostable mode. By using these sensors the
microcontroller senses any obstruction. On sensing any obstruction on sensor1 it in
forms the microcontroller which then opens the door and waits for the obstruction
in sensor2, on conforming the obstruction in sensor2 the counter will be count one
up and vice versa happens in the latter case. It is powered by the regulated output
from 7805 IC.

3.3 AT 89C51 Microcontroller


It is a low-power, high performance CMOS 8-bit
microcontroller with 8KB of Flash Programmable and Erasable Read Only Memory
(PEROM). The device is manufactured using Atmel’s high-density nonvolatile
memory technology and is compatible with the MCS-51 TM instruction set and pin
out. The on-chip Flash allows the program memory to be reprogrammed in-system
or by a conventional nonvolatile memory programmer. By combining a versatile 8-
bit CPU with Flash on a monolithic hip, the Atmel AT89S52 is a powerful. In this
system port 3 is us as input port and port 1 is used as output port.
Microcontroller, which provides a highly flexible
and cost effective solution so many embedded control applications.

FEATURES OF MICROCONTROLLER

Design with micro-controllers has the following feature:-

6
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

i) As all the peripherals are integrated into a single chip, the overall system cost is
very low.
ii) The product is of a small size as compared to the Digital based systems and is thus
very handy.
iii) The system design requires very little efforts and is easy troubleshoot and maintain.
iv) As the peripherals are integrated with a microcontroller, the system is more reliable.
v) Though a µC have on-chip RAM, ROM and I/O ports, additional RAM, ROM I/O
ports may be interfaced externally, if required.
vi) The Micro-controllers with on-chip ROM provide a software security feature which
is not available with micro-processor based systems using ROM/EPROM.
vii) All these features are available in a 40 pin package as in an 8-bitprocessor.
The AT 89C51 is an 8-bit micro-controller with four ports (32
I/O lines) two - 16 bit timers/counters, on chip oscillator and clock circuitry. The
ATMAL 89C51 is designed to use in a sophisticated real - line instrumentation and
industrial control.

The special Features of 89C51 are;

1. Clock frequency 12 MHz


2. Program memory security
3. 4 KB ROM/EPROM
4. 128 KB RAM
5. 32- I/O lines (4-numbers of 8-bit ports)
6. Two 16-bit timer/counters
7. Programmable Full-Duplex serial channel
8. Boolean processor
9. 4 ms multiply and divide

3.4 Relay Driver Circuit

The relay driver circuit consists of a switching transistor and


a relay. Relay is an electromagnetic switch. It has one common point and one
normally open (N/O) and one normally close (N/C) contact.This block has the

7
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

potential to drive the various controlled devices. In this block mainly we are using
the transistor and the relays. One relay driver circuit we are using to control the
light. Output signal from AT89C51 is given to the base of the transistor, which we
are further energizing the particular relay, because of this appropriate device is
selected and it do its allotted function. Port 3 is used for the Relay Turn On and
Turn off Purpose. Relay is driven by 12V supply.

3.5 Display Unit

The display section is used to display the output from the


microcontroller i.e. the count of the persons inside the conference hall. The display
section contain 7-segment display unit. The display circuit consists of three S4301B
common Cathode display. The output of µC from port 1 is connected to the
a,b,c,d,e,f,g of the three 7- segment of display provided. It is switched into action
by the port 3 via. a transistor. The display can show up to 999, but here as it is used
for a conference hall we use to display only up to a count of 199. The display
common point 3, 8 is connected to + 5V. The 220 ohm resistors are used for current
limiting applications.
A single byte can encode the full state of a 7-segment-display. The
most popular bit encodings are gfedcba and abcdefg - both usually assume 0
is off and 1 is on. This table gives the hexadecimal encodings for displaying the
digits 0 to 9:

Digi
gfedcba abcdefg a b c d e f g
t

0 0x3F 0x7E on on on on on on off

of
1 0x06 0x30 off on on off off off
f

8
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

of of
2 0x5B 0x6D on on on on on
f f

of
3 0x4F 0x79 on on on on off on
f

4 0x66 0x33 off on on off off on on

5 0x6D 0x5B on off on on off on on

6 0x7D 0x5F on off on on on on on

of
7 0x07 0x70 on on on off off off
f

8 0x7F 0x7F on on on on on on on

9 0x6F 0x7B on on on on off on on

3.6 Motor & Its Driver Unit

This section consists of a DC Motor and a LM 293 IC.


The L293 is a quadruple high-current half-H driver. The L293 is designed to
provide bidirectional drive currents of up to 1 A at voltages from 4.5 V to 36 V.
L293 are designed to drive inductive loads such as relays, solenoids, dc and bipolar
stepping motors, as well as other high current/high-voltage loads in positive-supply
applications. The L293 is characterized for operation from 0°C to 70°C. It has four
op-amps which can drive up to four motors and also can work as bidirectional DC
motor control. This device is driven by the output from port 3 of the micro
controller. It is powered by +5V. Here in this case we work this as a bidirectional

9
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

DC motor control IC as shown in the fig. This IC drives the motor in both direction
for opening and closing of the door. Motor is driven by +12V supply voltage.

Fig 3.6.1

4. CIRCUIT DIAGRAM

4.1 Main Circuit Diagram

10
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

Fig 4.1
4.2 IR Transmitter Circuit

11
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

Fig. 4.2 Transmitter circuit

12
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

4.3 Power Supply

VIN VOUT
2.2k

1 7805 3

2
6
10uf
470uf

230v, +
50Hz

VIN VOUT
2.2k

1 7812 3

+
2

22uf

Fig. 4.3 Power Supply

13
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

5. WORKING OF THE SYSTEM

The power supply provides regulated D.C


voltage to the circuit where +5V is given to the µC, L293, LM555D and common
cathode display and +12 is given to the relay and motor. At first Reset the micro-
controller, for this capacitor connected in the 9th (RESET) pin should charge and
discharge and this change take place through R3 resistor. Due to this discharge high
pulse is applied to RESET pin and thus micro-controller resets. The transmitter
emits IR rays which fall on the TSOP at the receiver. As soon as a person cut the
transmitted IR rays, the rays falling in the receiver i.e. TSOP 1738 gets interrupted
and its O/P goes high which is connected to a 555 IC .The O/P from the 555 is
connected to the port 3 of the micro controller. In both transmitter and receiver
section 555 is configured to function in monostable mode.
Transmission circuit is used to generate the
modulated 36 kHz IR signal. Now we adjust the preset in the transmitter to get a 38
kHz signal at the O/P and at around 1.4K we get a 38 kHz signal. This signal is
projected into the TSOP embedded in the receiver circuit.
The output goes high when the there is an
interruption in the IR falling on the TSOP and it return back to low after the time
period determined by the capacitor and resistor in the circuit i.e. around 3 second.
The output from the TSOP is connected to the trigger pin2 of the 555 IC via.
SL100 transistor. SL100 is to trigger the IC 555 which is configured as monostable
multivibrator. In the monostable mode, the 555 timer acts as a “one-shot” pulse
generator. The pulse begins when the 555 timer receives a signal at the trigger input
from TSOP that falls below a third of the voltage supply. The width of the pulse is
determined by the time constant of an RC network, which consists of
a capacitor (C) and a resistor (R). The pulse ends when the charge on the C equals
2/3 of the supply voltage i.e. when TSOP O/P goes low.  Output of 555 IC is given
to the Port 3 of the microcontroller. As a person cuts both the sensors in forward
direction the counter gets incremented by one or if it occurs in opposite direction
the counter gets decremented by one. The output of the counting is displayed in the

14
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

Common Cathode display provided which is connected to port1 of the


microcontroller. It displays up to a count of 199.
The microcontroller does the rest with the program
written on it. The program is written according to the algorithm developed, which is
given below,

Algorithm

1) Start
2) Check Sensor 1(S1) or Sensor 2(S2) is high
3) If S1 or S2 is high open the door
4) Check which sensor is high, if S1 is high wait for S2 to become high, go to STEP 6
5) Else, if S2 is high wait for S1 to become high, go to STEP 9
6) If S2 is high, count increment & switch ON the room devices
7) Delay, door close, go to STEP 1.
8) If S1 is not high, no changes, delay, door close, go to STEP 1.
9) If S1 is high, count decrement, if count= =0, room devices off, delay, door close, go
to STEP 1.
10) If else S1 is low, no change, delay, door close.

In case if a person holds in the position between the


transmitter and receiver the door stays in the opened position, since the O/P of
TSOP goes high. Also, if a person obstructs the first sensor and does not cut the
second one the door opens at the time of interruption and closes as soon as he
leaves without a change in the counting output.
The motor is provided for the purpose of opening and closing of the
door. It is controlled using a L293 IC which is capable of working it in both
directions. The IC L293 is driven by the O/P from the port 3 of the microcontroller.
The IC is powered by regulated +5V from 7805 IC and motor is driven by +12V.

15
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

6. COMPONENTS LIST

 Microcontroller – AT89S52

 IC – 7805 , LM555D

 IR LED

 Sensor – TSOP 1738 (Infrared Sensor)

 Transformer – 6-0-6, 1 A

 Resistors

 Capacitor – (1000 µF,47 µF,1 µF),25V

 Disc capacitor – 0.1µF

 Relay Driver - (12V,1A)

 Rectifier diode – IN4007,1N4148

 Transistor – BC 547, SL 100

 7-Segment Display – S4301B

 Motor driver – L293

 DC Motor

16
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

7. CIRCUIT DESCRIPTION

7.1 TRANSMITTER CIRCUIT


The transmitter circuit is framed using two main
components:-
1. 555 timer IC is configured to function as a basic monostable multivibrator.
2. IR LED to emit IR rays at 38 kHz.
A monostable multivibrator is a timing circuit that
changes state once triggered, but returns to its original state after a certain time delay.
It got its name from the fact that only one of its output states is stable. It is also
known as a 'one-shot’. In this circuit, a negative pulse applied at pin 2 triggers an
internal flip-flop that turns off pin 7's discharge transistor, allowing C4 to charge up
through R12. At the same time, the flip-flop brings the output (pin 3) level to 'high'.
When capacitor C4 as charged up to about 2/3 Vcc, the
flip-flop is triggered once again, this time making the pin 3 output 'low' and turning
on pin 7's discharge transistor, which discharges C4 to ground. This circuit, in effect,
produces a pulse at pin 3 whose width t is just the product of R12 and C4, i.e.,
t=R12C4. IR Transmission circuit is used to generate the modulated 36 kHz IR
signal. The IC555 in the transmitter side is to generate 36 kHz square wave. Adjust
the preset in the transmitter to get a 38 kHz signal at the O/P around 1.4K we get a
38 kHz signal. Then you point it over the sensor and its O/P will go low when it
senses the IR signal of 38 kHz. +5V is connected to the Reset pin 4 and 1N4148 is
provided to introduce a delay in between ON & OFF time.

7.2 AT 89C51 MICROCONTROLLER

The AT 89C51 is an 8-bit microcontroller with four ports (32


I/O lines), two 16-bit timers/counters, on chip oscillator and clock circuitry. Power-
on-reset is achieved by connecting a 10µF capacitor and a 10K resistor to Pin 9
(Reset) of the Micro-controller. During reset condition, program counter of the micro

17
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

controller is initialized as ‘0000H’. Hence the micro-controller must reset as soon as


the circuit is switched on because the starting address of the program in the memory
is 0000H. This requirement ends in the application of a POWER ON RESET circuit.
For this the Reset pin must keep in logic High level for
some time and this logic high level must be removed after sometime. An RC network
can satisfy this requirement. The R-C network is connected across the power supply
rails. And the mid-point of the RC network is connected to the RESET pin of the
micro-controller. For manual Reset Function push switches are connected across
positive rail RESET pin. The timing clock is generated with the help of a crystal. The
both ends of the crystal are connected to the X1 and X2 pins [18 and 19] of the AT
89C51.Typically, a quartz crystal and capacitors are employed. The crystal frequency
is the basic internal clock of frequency of the micro-controller. The manufactures
make available 89C51 designs that can run at specified maximum and minimum
frequencies, typically 1MHZ to 16MHZ. Minimum frequencies imply that some
internal memories are dynamic and must always operate above a minimum frequency
or data will be lost. Serial data communication needs often dictate the frequency of
the oscillator. The time to execute a particular instruction is than found by
multiplying C by 12 and dividing the product by crystal frequency.

Tinst = ¿C x 12d)÷(Crystal frequency )

In this crystal, two disc capacitors are


connected in series with ground. These capacitors are used to initial resonance circuit
for crystals are used for noise free oscillations of crystal. Each oscillation produced
in this way will reach each register and then to the EPROM. At the time of each
oscillation, data’s included in each register (software program) will active.

7.3 RECEIVER CIRCUIT

The receiver circuit is framed using two main


components:-

18
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

1. 555 IC working in monostable mode.


2. TSOP 1738 working as IR receiver.
The IR transmitter will emit modulated 38 kHz IR signal and at
the receiver we use TSOP1738 (Infrared Sensor). The output goes high when the
there is an interruption in the rays falling on TSOP and it return back to low after the
time period determined by the capacitor (C10) and resistor (R14) in the circuit. That
is around 3 second. SL100 is used to trigger the 555 which is configured as
monostable multivibrator. The collector of the SL100 transistor is connected to the
pin 2 of 555.
Output of 555 IC is given to the Port 3 of the microcontroller.

7.4 DISPLAY UNIT

The display unit is composed of three 7-


Segment LED display. It works according to the output from the port 1 of the 89C51.
It is powered by +5V from the regulated power supply provided by 7805 IC. The
VCC to the 7-Segment display is connected through a transistor BC547 and through
the resistors (R4, R5, and R6 for the corresponding display) which are connected to
the collectors of the transistors. The emitter of the transistor is connected to the point
taken from the internally shortened pins 3 & 8. Port3 is connected to the base of the
transistor through the resistors (R7, R8, and R9 for corresponding display). The
transistor here serves as a switch.

7.5 MOTOR UNIT

The motor section is composed of two main


components:-
1. L 293 IC
2. DC Motor

19
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

L293 IC is capable of driving the motors at a time. Here it is


used to drive the motor provided in both directions. The output from port 3 of the
microcontroller is connected to the IC. Pin 4, 5, 12, 13 are grounded. The 1N4007
diodes are provided to prevent the back EMF generated. 9V DC motor is used here
which is powered by +12V supply. According to the events in the transmitter and
receiver section the motor is driven by the IC according to the instructions of µC.

7.6 RELAY UNIT

The relay is connected with a +12V power supply. The O/P from port
3 of the microcontroller is connected to the base of the transistor BC547. The emitter
of the transistor is grounded. When the base of the transistor goes high its O/P goes
high, switching the relay. 1N4007 diode is provided to prevent the back EMF of the
circuit. The relay switches the room devices ON or OFF. It switches on even if a
single person resides inside the room and if all the persons leave the room, it
switches OFF all the room devices.

20
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

8. PCB LAYOUT

21
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

9. PCB FABRICATION

Designing of PCB is a major step in the


production of PCB is a major. It forms a distinct factor in electronic performance
and reliability. The productivity of a PCB, its assembly and service ability also
depends on the design. The designing of a PCB consists of designing of the layout
followed by the preparation of the artwork. The layout should include all the
relevant aspects an details of the PCB design while the art work preparation brings
it to the form required for the production process. The layout x can be designed
with the help of any one of the standard layout edition software’s such as Eagle,
Orcad or Edwin XP. Hence a concept, clearly defining all the details of the circuits
and partly of the equipment, is a perquisite and the actual layout can start.
Depending on the accuracy required, the artwork might be produced a 1:1 or 2:1
even 4:1 scale. It is best prepared on a 1:1 scale.

PCB fabrication involves the following steps:-

22
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

a) First the layout of the PCB is generated using the software ORCAD. First step
involves drawing the circuit CIS which is a section of ORCAD. Then the layout is
obtained using layout plus. This layout is printed on a paper.

b) This printed layout is transferred to a Mylar sheet and touched with black ink.

c) The solder side of the Mylar sheet is placed on the shining side of the copper board
and is placed in a frame. It is than exposed to sunlight, with the Mylar sheet facing
the sunlight.

d) The exposed copper board is put in hydrogen peroxide solution. It is then put in hot
water; shook till unexposed region becomes transparent.
e) This is put in cold water and then the rough side is struck in to the skill screen. This
is then pressed and dried well.

f) The plastic sheet of the five - star is removed leaving the pattern on the screen.

g) A copper clad sheet is cut to the size and cleaned. This is then placed under the
screen.

h) Acid resist ink is spread on the screen, So that the pattern of the tracks and pad is
obtained on the copper clad sheet. It is dried.

i) The dried sheet is then etched using ferric chloride solution till all the unwanted
copper is etched away.

j) The unwanted resist ink is removed using sodium hydroxide solution, holes are
then drilled.

23
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

k) The components are soldered neatly on the board without dry soldering.

10. FLOW CHART

24
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

Start

Sensor
1==0,Sensor
2==0

If Sensor 1 NO
or Sensor 2 Door Closed
is HIGH

YES

Door Closed Door Open Delay

NO
If Sensor If Sensor
1== HIGH 2==HIGH

YES YES

NO
NO
Delay If Sensor If Sensor
2==HIGH 1==HIGH

YES
YES

Counter
Counter
Incremented by
1, Decrement by 1
Room Devices ON

YES

NO
If
Counter==0

YES

Room Devices Off

Fig. 10.1 Flow Chart

11. PROGRAM

25
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

STARTUP
DIS_A EQU P1.5
DIS_B EQU P1.4
DIS_C EQU P1.3
DIS_D EQU P1.1
DIS_E EQU P1.2
DIS_F EQU P1.6
DIS-G EQU P1.7
DIS1 EQU P3.3
DIS2 EQU P3.4
DIS3 EQU P3.5
LDR1 EQU P3.0
LDR2 EQU P3.1
BUZZER EQU P1.0
LIGHT EQU P3.2
MOT1 EQU P2.0
MOT2 EQU P2.1
LIMT EQU P2.2
LIMT1 EQU P2.3

DSEG ; This is internal data memory

ORG 20H ; Bit addressable memory


BITS: DS 1
UP BIT BITS.0
DWN BIT BITS.1
COUNT: DS 1
SPEED: DS 1
VALUE _1: DS 1
VALUE _2: DS 1
VALUE _ 3: DS 1
COUNTER: DS 1
STACK: DS 1 ; Stack begins here
DST: DS 1
CSEG ; Code begins here

;--------------------------------------------------------------------------------------------------------
; PROCESSOR INTERRUPT AND RESET VECTORS

26
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

;---------------------------------------------------------------------------------------

ORG 00H ; Reset


JMP MAIN
ORG 000BH ; Timer Interrupt0
JMP REFRESH

;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
&&&&
; MAIN PROGRAM
;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

MAIN:
CLR BUZZER
MOV SPEED, # 00H
MOV COUNT, #00H
MOV VALUE_1, #00H
MOV VALUE_2, #00H
MOV VALUE_3, #00H
MOV COUNTER, #00H
MOV DST, #03H
CLR MOT1
CLR MOT2
CLR LIMT
CLR LIMT1

CLR LIGHT

CLR DIS1
CLR DIS2
CLR DIS3

MOV TMOD, #01H ; enable timer0 for scanning


MOV TLO, #00H
MOV THO, #0FDH
SETB ETO
SETB EA
SETB TRO

AJMP ZAZA

ASSA: AJMP ASAA

ZAZA: SETB LIMT1


JNB LIMT1, OK1
CALL DELAY
CALL DELAY

27
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

CALL DC
OK1: SETB LDR1
JNB LDR1, ASSA
CALL DP
CALL DELAY
SETB LDR2
JNB LDR2, $

;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
; UP COUNTER
;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
SETB BUZZER
INC COUNTER
CJNE R5, #00H, LOOP1
AJMP LOOP2
LOOP1: SETB LIGHT
LOOP2: MOV R5, COUNTER
DOIT: MOV A, #10
CLR C
SUBB A, R5
JC ZX1
JZ AQ1
INC VALUE_1
AJMP CVC
AQ1: MOV VALUE_2, #01H
MOV VALUE_1, #00H
AJMP CVC
ZX1: MOV A, #20
CLR C
SUBB A, R5
JC ZX2
JZ AQ2
INC VALUE_1
AJMP CVC
AQ2: MOV VALUE_2, #02H
MOV VALUE_1, #00H
AJMP CVC
ZX2: MOV A, #30
CLR C
SUBB A, R5
JC ZX3
JZ AQ3
INC VALUE_1
AJMP CVC
AQ3: MOV VALUE_2, #03H
MOV VALUE_1, #00H
AJMP CVC

28
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

ZX3: MOV A, #40


CLR C
SUBB A, R5
JC ZX4
JZ AQ4
INC VALUE_1
AJMP CVC
AQ4: MOV VALUE_2, #04H
MOV VALUE_1, #00H
AJMP CVC

ZX4: MOV A, #50


CLR C
SUBB A, R5
JC ZX5
JZ AQ5
INC VALUE_1
AJMP CVC
AQ5: MOV VALUE_2, #05H
MOV VALUE_1, #00H
AJMP CVC

ZX5: MOV A, #60


CLR C
SUBB A, R5
JC ZX6
JZ AQ6
INC VALUE_1
AJMP CVC
AQ6: MOV VALUE_2, #06H
MOV VALUE_1, #00H
AJMP CVC

ZX6: MOV A, #70


CLR C
SUBB A, R5
JC ZX7
JZ AQ7
INC VALUE_1
AJMP CVC
AQ7: MOV VALUE_2, #07H
MOV VALUE-1, #00H
AJMP CVC

ZX7: MOV A, #80


CLR C

29
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

SUBB A, R5
JC ZX8
JZ AQ8
INC VALUE_1
AJMP CVC
AQ8: MOV VALUE_2, #08H
MOV VALUE_1, #00H
AJMP CVC

ZX8: MOV A, #90


CLR C
SUBB A, R5
JC ZX9
JZ AQ9
INC VALUE_1
AJMP CVC
AQ9: MOV VALUE_2, #09H
MOV VALUE_1, #00H
AJMP CVC

ZX9: MOV A, #100


CLR C
SUBB A, R5
JC ZX10
JZ AQ10
INC VALUE_1
AJMP CVC
AQ10: MOV VALUE_3, #01H
MOV VALUE_2, #00H
MOV VALUE-1, #00H
AJMP CVC

ZX10: MOV A, COU NTER


CLR C
SUBB A, #100
JZ AQQ1
JC ZXX1
MOV R5, A
AJMP DOIT
AQQ1: MOV VALUE_3, #02H
MOV VALUE_2, #00H
MOV VALUE-1, #00H
AJMP CVC

ZXX1: MOV VALUE_1, #00H


MOV VALUE_2, #00H
MOV VALUE_3, #OOH

30
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

CVC
;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
CALL DELAY
CLR BUZZER
JB LDR2, $
AJMP ZAZA
ZAZAA: JMP ZAZA
ASAA: SETB LDR2
JNB LDR2, ZAZAA
CALL DP
CALL DELAY
SETB LDR1
JNB LDR1
;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
; DOWN COUNTER
;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
SETB BUZZER
DEC COUNTER
CJNE R5, #00H, LOOP4
CLR LIGHT

LOOP4: MOV R5, COUNTER


MOV A, R5
INC A
CJNE A, #00H, DOIT1
MOV VALUE_1, #00H
MOV VALUE_2, #00H
MOV VALUE_3, #00H
MOV COUNTER, #00H
AJMP CVCV

DOIT1:
MOV A, #10
CLR C
SUBB A, R5
JC AZX1
JZ AAQ1
MOV R6, VALUE_1
CJNE R6, #00H, GHG
MOV VALUE_2, #00H
MOV VALUE_1, #09H
AJMP CVCV

GHG:

31
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

DEC VALUE_1
AJMP CVCV
AAQ1: MOV VALUE_2, #01H
MOV VALUE-1, #00H
AJMP CVCV
AZX1: MOV A, #20
CLR C
SUBB A, R5
JC AZX2
JZ AAQ2
MOV R6, VALUE_1
CJNE R6, #00H, GHG1
MOV VALUE_2, #01H
MOV VALUE_1, #09H
AJMP CVCV

GHG1:
DEC VALUE_1
AJMP CVCV
AAQ2: MOV VALUE_2, #02H
MOV VALUE_1, #00H
AJMP CVCV

AZX2: MOV A, #30


CLR C
SUBB A, R5
JC AZX3
JZ AAQ3
MOV R6, VALUE_1
CJNE R6, #00H, GHG2
MOV VALUE_2, #02H
MOV VALUE_1, #09H
AJMP CVCV

GHG2:
DEC VALUE_1
AJMP CVCV
AAQ3: MOV VALUE_2, #03H
MOV VALUE_1, #00H
AJMP CVCV

AZX3: MOV A, #40


CLR C
SUBB A, R5
JC AZX4
JZ AAQ4
MOV R6, VALUE_1

32
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

CJNE R6, #00H, GHG3


MOV VALUE_2, #03H
MOV VALUE_1, #09H
AJMP CVCV

GHG3:
DEC VALUE_1
AJMP CVCV
AAQ4: MOV VALUE_2, #004H
MOV VALUE_1, #00H
AJMP CVCV

AZX4: MOV A, #50


CLR C
SUBB A, R5
JC AZX5
JZ AAQ5
MOV R6, VALUE_1
CJNE R6, #00H, GHG4
MOV VALUE_2, #04H
MOV VALUE_1, #09H
AJMP CVCV

GHG4:
DEC VALUE_1
AJMP CVCV
AAQ5: MOV VALUE_2, #05H
MOV VALUE_1, #00H
AJMP CVCV

AZX5: MOV A, #60


CLR C
SUBB A, R5
JC AZX6
JZ AAQ6
MOV R6, VALUE_1
CJNE R6, #00H, GHG5
MOV VALUE_2, #05H
MOV VALUE_1, #09H
AJMP CVCV
GHG5:
DEC VALUE_1
AJMP CVCV
AAQ6: MOV VALUE_2, #06H
MOV VALUE_1, #00H
AJMP CVCV

33
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

AZX6: MOV A, #70


CLR C
SUBB A, R5
JC AZX7
JZ AAQ7
MOV R6, VALUE_1
CJNE R6, #00H, GHG6
MOV VALUE_2, #06H
MOV VALUE_1, #09H
AJMP CVCV

GHG6:
DEC VALUE_1
AJMP CVCV
AAQ7: MOV VALUE_2, #07H
MOV VALUE_1, #00H
AJMP CVCV
AZX7: MOV A, #80
CLR C
SUBB A, R5
JC AZX8
JZ AAQ8
MOV R6, VALUE_1
CJNE R6, #00H, GHG7
MOV VALUE_2, #07H
MOV VALUE_1, #09H
AJMP CVCV

GHG7:
DEC VALUE_1
AJMP CVCV
AAQ8: MOV VALUE_2, #08H
MOV VALUE_1, #00H
AJMP CVCV

AZX8: MOV A, #90


CLR C
SUBB A, R5
JC AZX9
JZ AAQ9
MOV R6, VALUE_1
CJNE R6, #00H, GHG8
MOV VALUE_2, #08H
MOV VALUE_1, #09H
AJMP CVCV

GHG8:

34
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

DEC VALUE_1
AJMP CVCV
AAQ9: MOV VALUE_2, #09H
MOV VALUE_1, #00H
AJMP CVCV

AZX9: MOV A, #100


CLR C
SUBB A, R5
JC AZX10
JZ AAQ10
MOV R6, VALUE_1
CJNE R6, #00H, GHG9
MOV VALUE_3, #00H
MOV VALUE-2, #09H
MOV VALUE_1, #09H
AJMP CVCV

GHG9:
DEC VALUE_1
AJMP CVCV
AAQ10: MOV VALUE_3, #01H
MOV VALUE_2, #00H
MOV VALUE_1, #00H
AJMP CVCV

AZX10: MOV A, COUNTER


CLR C
SUBB A, 100
JZ AAQQ1
JC AZXX1
MOV R5, A
MOV A, COUNTER
CJNE A, #199, JKJK
MOV VALUE_3, #01H

JKJK:
AJMP DOIT1
AAQQ1: MOV VALUE_3, #02H
MOV VALUE_2, #00H
MOV VALUE_1, #00H
AJMP CVCV

AXZZ1: MOV VALUE_1, #00H


MOV VALUE_2, #00H
MOV VALUE_3, #00H

35
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

CVCV:
;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
CALL DELAY
CLR BUZZER
JB LDR1, $
AJMP ZAZA

;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
; 7 SEGMENT DISPLAY
;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

DISP: MOV R2, SPEED


CJNE R2, #00H, AAS1
CLR DIS-A
CLR DIS-B
CLR DIS-C
CLR DIS-D
CLR DIS-E
CLR DIS-F
SETB DIS-G
RET

AAS1: CJNE R2, #01H, AS2


CLR DIS_B
CLR DIS_C
SETB DIS_A
SETB DIS_D
SETB DIS_E
SETB DIS_F
SETB DIS_G
RET

AS2: CJNE R2, #02H, AS3


CLR DIS_A
CLR DIS_B
CLR DIS_D
CLR DIS_G
SETB DIS_C
SETB DIS_F
RET

AS3: CJNE R2, #03H, AS4


CLR DIS_A

36
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

CLR DIS_B
CLR DIS_C
CLR DIS_D
CLR DIS_G
SETB DIS_E
SETB DIS_F
RET

AS4: CJNE R2, #04H, AS5


CLR DIS_B
CLR DIS_C
CLR DIS_F
CLR DIS_G
SETB DIS_A
SETB DIS_D
SETB DIS_E
RET

AS5: CJNE R2, #05H, AS6


CLR DIS_A
CLR DIS_C
CLR DIS_D
CLR DIS_F
CLR DIS_G
SETB DIS_B
SETB DIS_E
RET

AS6: CJNE R2, #06H, AS7


CLR DIS_A
CLR DIS_C
CLR DIS_D
CLR DIS_E
CLR DIS_F
CLR DIS_G
SETB DIS_B
RET

AS7: CJNE R2, #07H, AS8


CLR DIS_A
CLR DIS_B
CLR DIS_C
SETB DIS_D
SETB DIS-E
SETB DIS_F
SETN DIS_G
RET

37
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

AS8: CJNE R2, #08H, AS9


CLR DIS_A
CLR DIS_B
CLR DIS_C
CLR DIS_D
CLR DIS_E
CLR DIS_F
CLR DIS_G
RET

AS9: CJNE R2, #09H, AS10


CLR DIS_A
CLR DIS_B
CLR DIS_C
CLR DIS_D
CLR DIS_F
CLR DIS_G
SETB DIS_E
RET

AS10: MOV SPEED, #00H


AJMP DISP

;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

REFRESH:
INC COUNT
MOV R4, COUNT
QA1: CJNE R4, #01H, QA2
MOV SPEED, VALUE_1
SETB DISI
CLR DIS2
CLR DIS3
CALL DISP
AJMP DOWN

QA2: CJNE R4, #02H, QA3


MOV SPEED, VALUE_2
CLR DIS1
SETB DIS2
CLR DIS3
CALL DISP
AJMP DOWN

QA3: CJNE R4, #03H, QA4


MOV SPEED, VALUE_3

38
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

CLR DIS1
CLR DIS2
SETB DIS3
CALL DISP
AJMP DOWN

QA4: MOV COUNT, #01H


MOV R4, COUNT
AJMP QA1
DOWN : MOV TL0, #0FFH ; reload the timer for scanning
MOV TH0, #0F2H
RETI
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

DELAY:
MOV R1, #OFFH
RE1: MOV R2, #5FH
RE: NOP
DJNZ R2, RE
DJNZ R1, RE1
RET
; DOOR OPENING
DP: SETB MOT1
SETB LIMT
JNB LIMT, $
CLR MOTI
RET
; DOOR CLOSING
DC: SETB MOT2
SETB LIMT1
JNB LIMT1, $
CLR MOT2
RET

END

12. ADVANTAGES

39
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

 Advantages

 It is low cost and user friendly.


 Since it switches OFF the room devices as soon as the persons
occupying the room leave, it functions as a power saver.
 It automatically sets as a status symbol luxury aid.

40
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

13. DISADVANTAGES

 Disadvantages

 It can be applied only when a single person cuts the sensor, hence it
cannot be used when two or a crowded number of persons cross
simultaneously at a same instant.
 It must be implemented with a digital code lock or a finger print
analyzer to filter the required personals into the conference hall
otherwise any one can enter.

41
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

14. APPLICATION

 Application
 It can be used in boats with additional safety feature such, the no. it
counts is set to a specific value & when exceeds the limit it alarms.
 It can be used as a luxuries aid in Star Hotels, Airports and Trains or
as a helping aid in the toilet of old agers.
 A little modified form of this project can control room devices
according to the no. of persons occupying the room.

42
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

15. CONCLUSION

In our present day life style we are looking for more and more hands
free equipments. This project “INTELLIGENT CONFERENCE HALL” proves to be
very useful not only for the use in a conference hall but also it can be implemented as
helping aid for blinds and old agers in their usual life. This project is less costly and
easy to implement in our daily life both in the case of luxury as well as for our daily life
system. In case of very high security conference sessions this circuit can be
implemented with addition of some security feature and hence safety too can be assured.
The heart of this project is AT89C51 micro-controller. The working of this system is
very accurate and error free.

16. BIBLIOGRAPHY

43
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

 Reference Books
 Programming in ANSI C: E Balaguruswamy.

 The 8051microcontroller and embedded systems: Muhammad Ali


Mazidi, Janice Gillespie Mazidi.
 The 8051 microcontroller: Kenneth J. Ayala.

 Website
 www.datasheets4u.com
 www.8051.com
 www.atmal.com

44
DEPARTMENT OF E&C MZC, KADAMMANITTA
MINI PROJECT 2010 INTELLIGENT CONFERENCE HALL

APPENDIX

45
DEPARTMENT OF E&C MZC, KADAMMANITTA

Anda mungkin juga menyukai