This is my second project using the new Person Sensor from Useful Sensors. My first project was more whimsical in nature, a Haunted Picture to get in the mood for Halloween.
For this project, I tried to think of a use case that could potentially have commercial application. For this project, I envisioned the Person Sensor, attached to a Blues Wireless Feather Starter Kit for Swan, be used for a company's fleet of vehicles. Maintaining the privacy of the driver, the solution could identify which employee is driving the vehicle, where and when. Using the blues.io Notehub and routing to Datacake, the business owner can visualize the location of the fleet and be notified of any vehicles outside a geo-fenced area. The visualization could also be used for awareness of vehicles over time for route optimization, reducing the fleet's carbon footprint.
This may sound a bit "big brother-ish", but this solution would have the potential to minimize any unnecessary travel, reducing carbon emissions from fleet vehicles.Project Details
The project was straightforward to set up. Since the Person Sensor only requires an I2C connection via Quiic/Stemma QT, and the Blues Wireless Notecarrier-F that comes in the kit has a Quiic/Stemma QT input, the connection was simple with 1 cable directly connecting the two.
The Notecarrier can be powered with a 3.7V LiPo battery via the JST connector, or via Micro USB. I tried both methods and they worked great.
I wrote an Arduino sketch (you can find in the code section) to detect a person using the sensor. That meta data (ID, confidence, number of faces) is then passed to the Notecarrier. The Notecarrier is pretty slick in that it has a GPS and cellular connection, so GPS data, along with the Person Sensor meta data, can be sent to the Blues Wireless Notehub (using the cellular connection) on a periodic basis. You can select the periodicity in which the data is sent to Notehub to preserve battery (a USB cable can also be used, plugged into the micro USB connection on the Notecarrier on one end and the vehicle's USB plug on the other end to remove any battery concerns).
Notehub is just meant to be a data aggregator and distributor. Once the data is in Notehub, it can be routed to various 3rd parties for visualization:
For my project, having never used this ecosystem before, I used Datacake. Datacake has a free tier that allows up to 500 data points a day and 2 device connections. For this project, that tier was adequate for me. Along with the detailed tutorials that Blues Wireless provides for routing from Notehub to Datacake, I was able to quickly route and visualize the data.
For my project, the data I was interested in was the ID of the person in the vehicle, the confidence that the Person Sensor has that it is that person, and the location of the vehicle. I set up the dashboard in Datacake to look like this:
You have multiple options for visualizing data. You can create gauges (see the card temperature), trend charts, data points, and maps based on GPS data.
Once I had the Arduino sketch uploaded, and Notehub and Datacake routes and visualization established, I took the setup into my car to give it a try.
For this project, I did a "solution in a box" where I just place the components on my dashboard. Obviously, with acceleration and turns, that can move. A more permanent solution would be a 3D-printed enclosure that could be mounted in a phone case or elsewhere, but that is outside the scope of this project (and frankly outside the scope of my abilities, haha).
You can see in the Datacake visualization dashboard that I received GPS points on my drive, although less points than I expected to see. I think I need to do a better job of verifying that GPS satellite connection was established before starting my drive. That issue would be mitigated by having the hardware permanently installed in a fleet vehicle (LiPo battery for when the vehicle is off, and USB connection for when vehicle is on).
Overall, I thought this was a cool project to utilize the Person Sensor in a real-life application. Happy coding everyone!