The inspiration came from my grocery shopping experience during the COVID-19 pandemic. Sometimes I had to queue up in close proximity to many other shoppers when checking out. A massive lineup in a confined area is not only daunting but also poses serious health threats to the communities during a pandemic. I thought, if there's a citywide system in place that keeps track of the crowd density of each grocery store within the city and inform the shoppers on the least packed stores in the area, large crowds/long queues would probably be mitigated. And by scattering the crowds, we could possibly slow down the community spread of the virus.

What it does

This project provides a system prototype for the government/health department to mitigate the chance of community spread by keeping track of the occupancy of major grocery stores within a city or a geographical area. Each store is equipped with a people counter. The people counter is connected to the store’s gateway, through which it sends real-time people counts to the internet. A dedicated server is configured to receive and store these people counts in a database. The data for each store is then computed as occupancy rate and is logged in a convenient webapp for citizens to browse. In this way, people can choose where to shop wisely by avoiding stores with high occupancy rates, thus lower the chance of contracting the virus.

How I built it

  • I configured my Infrared (IR) sensor pairs as people counters. A people counter is supposed to be installed near the entrance/exit of each store.
  • I configured my Arduino to function as a gateway/modem/router of the store. Code was written in C++ (hardware) and Python (serial communication).
  • I configured my PC as a server. Server code was written in Node.js.
  • I built a website that polls data from the server and presents relevant information to the users. Code was written in HTML, CSS, and Javascript.

Challenges I ran into

I had a hard time trying to make my Arduino connect to the Internet without having a wifi module/ethernet shield. I couldn't get one either because all electronic component stores were closed in my area and shipping couldn't make it before the submission deadline. I tried many alternative and finally found a hack by using serial communication.

Accomplishments that I'm proud of

This project includes a full-stack application and hardware. I was super excited when I got my software working. I was even more excited when I got the hardware and software working altogether!


This project was my solo idea.

What's next for Citywide Smart Queue Monitoring System

This prototype can be scaled to have a broader use: it can be used for any future pandemics & outbreaks & other emergency situations.

Share this project: