Living in the year 2020 has been interesting. This pandemic has brought to our attention the importance of maintaining public health as individuals, communities, and businesses. One of the best ways to do that is to limit exposure to others in ways such as social distancing. It's tough to accomplish that inside of a packed building so nearly all public buildings and gathering areas have a capacity limit, but how can this be regulated without having someone stand at the door and count every person who enters the building and subtract every person who exits? Sounds like too much mental math for us. We wanted to design a system that could keep a count of the number of people entering the building and exiting and subtract them in order to keep a real-time total of the number inside.
Our goal was for this to be linked to a spreadsheet with constantly updating cells and graphs. With this data, you could also determine what times throughout the day are the busiest and which days of the week receive the most traffic. Businesses could use this information on their websites so that consumers could have access to it and make decisions based on the data. For example, if you needed to go to your local grocery store sometime this week but wanted to avoid the crowds, you could check a website to see the trends in this data to choose the least busy time to get your frozen pizzas.
Particle Argon Circuit ConnectionsThe connections for the circuits were pretty simple. Two PIR motion sensors were used with each being on the lowest sensitivity and range settings. Each was connected directly to a Particle Argon in a breadboard from the power, signal, and ground pins. The third Argon was a receiver and had no circuit connections.
Physical SetupA convenient location for us to test this system was a Starbucks where one of our group members works. One Argon with the PIR motion sensor was set up near the entrance to the building and the other was set up at the end of the counter where customers were leaving. Naturally, the former Argon was the "entrance Argon" and the latter was the "exit Argon".
Both Argons contained code to detect motion signals from the PIR sensor and change a variable called "counter" by publishing an event to the Particle cloud. The difference between the two sets of code is how they affected the numerical counter when they detect motion. The "entrance Argon" adds 1 to the counter while the "exit Argon" subtracts one. This counter variable was stored by a third Argon which subscribed to the events of both publishing Argons. When the subscribing Argon received event data, the D7 LED on the board was set to come on as an indicator.
IFTTT ApplicationThe services available through the application If This Then That (IFTTT) allowed us to track the motion activation as well as the numerical counter in Google Sheets. An IFTTT applet was created to read event data from the subscribing Argon. This applet stored specific event data in the sheet and also sent a smartphone notification to one of the group members that new data was published. This was an optional addition that we wanted to provide an extra bit of certainty that the event data was coming across properly.
The Google Sheet updates automatically when new event data is published and recorded in the corresponding cells. It is formatted as a line graph of the counter versus the date and time of motion detection.
There are a lot of possibilities for this project going forward. Now that we have the basic idea and setup, we could implement other sensors or displays to make a more useful tool. If we continue advancing this project, we would like to implement an LCD module that will display a message once a certain number is reached by the counter. This could be a user input for a building's maximum allowed capacity. Perhaps a video option could be added with facial detection for accurately counting groups of people passing the sensor at the same time. This project can lay the groundwork for these ideas and other advancement options.
Project Video
Comments
Please log in or sign up to comment.