Site icon Circuit Ideas for You

Arduino Based Entry Exit Monitoring Circuit

This Arduino Entry Exit Monitoring Circuit counts people while entering and leaving place, it uses Arduino UNO R4 WiFi board.

Two IR sensors detect people and two servo motors control entry and exit gates and then sends crowd count to Arduino IoT Cloud.

Hence, this help us know how many people are inside anytime.

Arduino Code:

#include <Servo.h>
#include "thingProperties.h"

Servo entryServo;
Servo exitServo;

int entrySensor = 2;
int exitSensor = 3;
int count = 0;

void setup() {
Serial.begin(9600);
delay(1500);
initProperties();
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
pinMode(entrySensor, INPUT);
pinMode(exitSensor, INPUT);
entryServo.attach(9);
exitServo.attach(10);
}

void loop() {
ArduinoCloud.update();

if (digitalRead(entrySensor) == HIGH) {
entryServo.write(90);
delay(2000);
entryServo.write(0);
count++;
crowdCount = count;
delay(1000);
}

if (digitalRead(exitSensor) == HIGH) {
exitServo.write(90);
delay(2000);
exitServo.write(0);
count--;
if (count < 0) count = 0;
crowdCount = count;
delay(1000);
}
}

Code Explanation:

Circuit Working:

Arduino Based Entry Exit Monitoring Circuit Diagram

Parts List:

ComponentsQuantity
Arduino UNO R4 WiFi1
MG90S Servo Motor2
IR Sensor2
7.4V Li-ion Battery Pack1

Person comes near Entry IR sensor and sensor gives HIGH signal and then Arduino moves entry servo and gate opens.

After few seconds servo goes back and gate closes and then Arduino adds people count.

When person comes near exit IR sensor and sensor gives HIGH signal, then Arduino moves exit servo and gate opens.

After few seconds servo goes back and gate closes and then Arduino reduces people count.

Now Arduino sends count to IoT Cloud and we see real-time crowd on dashboard.

Note:

Formulas:

The following formula applies to the Arduino-Based Entry Exit Monitoring Circuit:

People Count = Entry Count – Exit Count

If Entry sensor detects signal then Entry Count = Entry Count + 1

If Exit sensor detects signal then Exit Count = Exit Count + 1

Power Supply = 2 x 3.7V = 7.4V

Servo need 5V and Arduino board regulates from VIN.

How to Build:

To build a Arduino Based Entry Exit Monitoring Circuit follow the below steps for connections:

IR sensor at Entry:

IR sensor at Exit:

Entry Servo Motor:

Exit Servo Motor:

Battery connection:

Conclusion:

Overall, this Arduino Entry Exit Monitoring Circuit counts people in room or hall, it uses simple IR sensors and servo gates.

Furthermore, the circuit displays crowd data on the IoT Cloud, it offers an easy and low-cost solution, and schools, offices, malls, libraries and event organizers can use it to monitor crowd levels.

Exit mobile version