Crowd Controller for an Elevator

by RaghavMehta in Circuits > Raspberry Pi

194 Views, 2 Favorites, 0 Comments

Crowd Controller for an Elevator

1WhatsApp Image 2021-10-31 at 1.42.14 PM.jpeg

Description - Device to control crowding in an elevator to ensure social distancing is maintained. The device uses Computer Vision to calculate the number of people inside the elevator. If the number exceeds 4, a beep alarm is sounded until the number of people in the life reduces to 4 or less.

Supplies

  1. Raspberry pi (I used raspberry pi 3b+)
  2. Raspberry pi case
  3. Raspberry pi camera (any other compatible camera module)
  4. HDMI cable
  5. Keyboard
  6. Mouse
  7. Monitor
  8. Micro SSD (64 Gb)
  9. Power Supply (5V or 2.5A)
  10. Speaker
  11. Microphone

Setup Raspberry Pi

To setup your Raspberry pi look at the documentation and videos given below:

  1. Documentation - Raspberry pi and SD card
  2. Video of setting up Raspberry pi os
  3. Raspbian download link

Attaching Camera

WhatsApp Image 2021-10-31 at 1.22.22 PM (1).jpeg
WhatsApp Image 2021-10-31 at 1.22.22 PM.jpeg

After setting up Raspberry pi switch it off. Then attach the camera to the raspberry pi and turn it on again.

Then use the Spyder IDE and write the given code.

Python File 1 - Temp.py (Main File)

Temp.py is the main file and it uses the functions created in Person1.py file.

The program counts the number of people going in and out of the elevator and if the number of people inside minus number of people outside is greater than 4 a beep sound is produced.

"Number of people entering the elevator- Number of People leaving the elevator > 4"

Beep sound is produced.

Downloads

Python File 2 - Person1.py

Person1.py is a function class from which functions are used in the main file.

Downloads