I’ve recently completed an Honours Degree in Software Development and as part of this I spent a few months off and on working on a proof of concept tracking system utilising Bluetooth Low Energy (BLE) in order to track small asset tags. I believe this system could quite easily be scaled up to an industrial scale with further work but don’t personally plan to follow this up in the near future due to working on other projects. As such I figured I’d release a lot of what I have and hopefully it can help somebody else.
If you do something cool with this then please get in touch, otherwise do with it all as you wish.
This post is one of eight scheduled to be released over the next few weeks, all posts in this series may be found by selecting the tag below.
Bluetooth Low Energy (BLE) /Wi-Fi Tracking
Designing an open-source real-time location system (RTLS)
Radio Frequency Identification and similar systems have been in use for a number of years in order to reduce overstocking and inventory shrinkage, and to reduce picking time which increases the efficiency of staff in warehouse environments and to provide real-time views of inventory. This allows companies to have a much more accurate view of inventory than they may have with manual systems.
However, such systems are seen to be extremely costly. This is most often down to utilising niche hardware which is custom built for the purpose and closed-source software owned by one of only a few companies. For example, a typical RFID reader which most staff will require can cost upwards of $3000 per device when including related costs.
A system utilising Bluetooth and Wi-Fi however may make use of off-the-shelf components which can be purchased and operated for a significantly lower price point and for which the installation costs could be significantly cheaper due to requiring much less specialised technologies
The overall aim of the project is to attempt to utilise low-cost IoT devices to build a functioning asset tracking system.
Whereas existing systems utilise proprietary hardware and software to build such systems which leads to high costs for implementation and maintenance by the end user, the system designed here will utilise off-the-shelf hardware components and open-source, freely available, software to achieve a proof-of-concept tracking system.
There are two primary concepts involved in locating a given tag.
RSSI Signal Strength
The first is calculating distance from tag to receiver using the Received Signal Strength Indicator (RSSI). As shown below the value drops off depending on distance in a fairly consistent manner, but is effected by environmental factors and so does vary and so needs to be normalised using the average of several values.
By comparing a reference RSSI value from 1 meter to the given RSSI value an estimated distance from the receiver may be inferred.
The second concept is called trilateration, which allows us to determine a tags position given three separate known points and the distance from each point to the tag. The concept can be demonstrated as below –
Here each circle represents a single receiver with the radius of each circle the estimated distance based on the RSSI value. The orange marker where the distances all align is the estimated location of a single tag.
Multiple devices were considered to implement the system, however, the following were selected due to their low-cost, general availability, ability to be programmed and the wide-availability of existing resources online.
NRF51822 BLE Beacon
Built-in coin cell battery compartment. Capable of sending a reliable signal up to 20m.
NRF51822 BLE Module
Exposed pins make programming simple. Used as a receiver and powered externally via connected WiFi chip.
ESP8266 Wi-Fi Module
Exposed pins aid in connecting to the NRF51822 chip without requiring solder. Built-in USB-Micro port allows for simple programming and power via standard charger cables. Programmable via Arduino, a widely adopted IoT programming platform.
A demonstratable system has been created with low-cost widely-available IoT hardware and open source software such as Python and PHP. My aim is that the foundation this project has created may be expanded upon and adopted in a industry environment to reduce adoption costs of real-time location systems.