All the public buildings have a maximum limit of occupants. No more than a certain people are allowed in a room. But there is no automatic alert system to implement this regulation. We are building an IoT device that will help the Fire Department to detect if a public building or room has reached its occupant's limit. And based on this, they can take action-
No More Allowed
Technically, we are using two IR sensors to detect incoming and outgoing people from the door and calculate the number of occupants. We can have many of these IoT devices at public buildings connected to the AWS platform, and the data is readily available to the Fire department.
The heart of our IoT device is Intel Edison development board.
We used the following sensors from Grove Indoor Environment Kit-
- LEDs (2 nos.)
Finally, the brain of our device- Amazon AWS IoT Platform used for database, processing and alert system.
How to implement the counter using PIR sensor? How to check whether a person enters or exits a room? The difficulty is that the IR sensor triggers whenever a person crosses the sensor. No worries! This can be done using two IR sensors.
When sensor is in idle mode, the distance calculated by sensor is large (width of the door). When a person crosses the door, it decreases. So, we used a threshold on sensor data to detect the person.
When a person enters the door, it crosses the Sensor1 first and then Sensor2. It is vice-versa when a person exits the room. So we can increase the counter when person enters and decrease it when the person exits.
Step 1: Unpack Grove Indoor Environment Kit for Intel Edison. Place the Intel Edison chip on the board. Connect it to laptop with two USB cable and follow these instructions to configure it.
Step 2: Configuring the Intel Edison Board as follow.
Step 3: Connect the IR sensors and LEDs to Intel Edison Board.
- Connect IR sensor-1 to base shield socket A0.
- Connect IR sensor-2 to base shield socket A1.
- Connect Red Led to base shield socket D3.
- Connect Yellow Led to base shield socket D6.
Step 4: Write the code.
Step 5: Follow these steps to connect the device to Amazon AWS IoT service. Also configure Amazon SNS service to receive text notification and email when the number of occupants in the room are above the allowed threshold.
Step 6: Run the code.
- The people counter can be used to detect the load on small bridges in remote areas to prevent collapse of the bridge by analysing the number of vehicles running on the bridge.
- The people counter can be used in shopping complexes to count the number of customers in the shop.
The first video explains our project. the second video is a short demonstration