This IoT System Tracks Badge Counts in Real-Time
With a few IR sensor modules and a cellular-capable board, Nebel's project helps his community know when passes are available ahead of time.
Why track badges?
We use RFID badges for so many tasks, including authentication, transit passes, or for identification. But for Nebel, having to keep track of several cards at once was getting cumbersome since his village club offers free day passes that must be returned in the evening. Some would show up expecting to get one but then walk away disappointed, so Nebel decided to create a system that can both record the number of passes and report the quantity online when requested.
Building the organizer
Nebel designed the storage rack with 3D printing and ease of access in mind, which is why it consists of three pockets that each slant upwards. Within each slot is a small hole where an APDS9960 IR sensor can be attached and then measure the proximity to gauge the presence of a card. Also on the back is a Microchip AVR-IoT Cellular Mini board, which supports LTE-M, meaning that connecting to a nearby Wi-Fi network would not be required.
Badge sensing and display
Nebel needed to integrate three APDS9960 sensor modules into his project, but connecting them all to the same I2C bus would not have been possible since the addresses cannot be modified. Rather, he used the FlexWire
library and its software-defined I2C buses to multiplex them. From here, the code initializes the LTE radio and sensors before entering a low-power state. Once a hardware interrupt has been raised by one of the APDS9960s, the Cellular Mini immediately polls all of them to get the total number of cards.
After determining the card count, the board sends a POST request to a webserver that promptly saves the information to a text file. Then when someone accesses the PHP-based site, the file is read and displayed on the page.
Nebel's IoT badge-tracking project write-up can be found here.