.png)

PROCEDURE:
PIR sensor 1(measures infrared (IR) light radiating from objects in its field of view) is placed in entry gate and PIR sensor 2 is placed in exit gate. If only one entrance then can use delay mechanism that is 1st sensor should be placed right and second in left. If one is high then the other sensor is off for a while as per delay mentioned.
.png)
If PIR 1 is high then number of persons present inside is increased by one and if PIR 2 is high then number of persons present inside is decreased by one. It will be displayed in LCD screen. If number of person present inside count is more than 5(based on user), then buzzer sounds and LCD displays “no entry”. Else if it is less than 5, then buzzer is off and LCD displays “please visit”.

Photoresistor(a sensor that changes its resistance when light shines on it. The resistance generated varies depending on the light striking at its surface) detects the availability of light in that place. If number of person present is greater than zero and light availability is also less, the light turns on automatically. Else light turns off if any one condition fails itself.
.jpg)
All these are connected to Arduino Uno r3 board, embedded programming code is entered in Arduino IDE software and uploaded.
FLOW CHART:
.png)

.png)
ADVANTAGES:
- This system can be used in seminar halls, malls, parking system entrance etc… If it is used in parking slot, then there should be a separate gate for humans to move in and out after parking.
- Low cost and easy to implement.
- Saves electricity and avoid traffic, overcrowding.
CONCLUSION:
This project controls light of a room automatically and counts the number of visitors entering and leaving the room. By using the above circuit and proper power supply we can implement many devices like Fan, tube lights, etc…to run automatically. It prevents unwanted wastage of electric power. It can be used as home automation system. This automatic system saves electricity wastage, traffic control and time management.