One of my clients (I'll call it Marc) needed to track his employees inside a multi-floor facility.
He works in the logistic industry and wants to optimize his employee efficiency and response time by improving their "routing" (when an urgency occurs, the employee who is the nearest to the location of interest must be notified).
This case study outlines how I helped him achieve his goal with a lightweight, cost-effective solution.
Key issues
Marc had a few requirements:
- the solution needs to be cost-effective and rely on off-the-shelf, available hardware
- the tracking must work in real-time
- the solution must be as decentralized as possible, to not overload the local internet network
Key findings
As detailed in my blog post about WiFi Indoor Positioning, you can achieve the required result via cheap ESP32 boards. If your setup doesn't require precise localization, you can map your entire building with 3$ hardware.
Problem statement
This project is about deploying a fully decentralized, cost-effective network of devices that know, in real-time, where they're located inside a know environment.
You can attach these devices to people, animals or vehicles that move inside a building, or a factory, or a warehouse... and each device can act or notify its owner based on the room/zone/department he currently is. Or you can collect all the remote data inside a central server to coordinate the routing of each one.
This is not a GPS-like navigation system, where you know the exact location of each person by the meter. Instead, you only know in which room/zone/department that person is.
Routing optimization can have a big impact on a business efficiency and a variety of solutions exist. Most of them (if not all), imply the use of specialized and costly hardware, vendor lock-in and specialized support to setup and run. The aim of my solution was, instead, to stay simple and lean, while not costing a fortune to setup or extend in the future.
How To
Since we only need to know in which room/department a given device is, the first step is to map the rooms/departments. We want to create a fingerprint of each to be able to later distinguish one from another.
Most indoor location systems rely on some form of radio signal to work. Mine is no different and relies on WiFi (the same you use to connect to internet) because WiFi hardware is cheap and readily available. So cheap that you can buy a WiFi + BLE 5 board for 3$.
The process is rather simple:
- N hotspots emit a signal
- each room/department will see only part of the hotspots (the nearby ones), with a given signal strength
- the concatenation of visible Hotspot + Signal is the room fingerprint
- a machine learning model learns how to associate a fingerprint to a room/department
So what did I do?
- created a firmware to load on a sample device to scan each room/department and generate a file with the results
- created a graphical interface where Marc can upload these files to feed as input to a machine learning model
- created a web server that deploys the generated model back to the client devices when requested
- created a firmware that runs on the client devices to run the downloaded model
The classification runs so fast (< 10 ms) that the refresh interval is only governed by the compromise to not deplete the device battery too fast.
Marc successfully deployed my solution to a building with 160 rooms and tens of people using it.
How much does it cost?
Marc's building already had WiFi hotspots and he didn't invested in new hardware, so giving an exact number is difficult.
But let's try to estimate:
- an ESP32 with an external antenna can easily cover 20-30 m2 and costs 5-6$
- you want to make the WiFi coverage of each hotspot to overlap a bit => I suggest 5 ESPs per 100 m2 => 25 - 30$
- you need one ESP32 per person/animal/vehicle you want to track
At the end of the day, if you compare these figures with commercial solutions you will see a great money saving. And the wider area/more devices, the greater the saving.
Interested?
If you're looking for a solution similar to the one described here, feel free to book a call with me using the following button. You'll tell me more about your specific needs and we'll see if I'm a good fit for you.