Objective
The goal of our project was to develop a prototype for BLE (Bluetooth Low Energy) location system for smart lighting solutions. The system needs to wirelessly determine locations of every lamp in a group in order to speed up the process of setting up lighting in a large area, such as an office.
The approach we chose was based on collecting signal strength data from all BLE beacons in a system. The data is then processed to get a set of distanced between each beacon which are used to determine locations.
Hardware
We decided to use RuuviTag Bluetooth sensors since they are open source and have a readily available devkit. RuuviTag is an open-source sensor planform that, alongside BLE functionality that we needed, can measure air humidity, pressure, and temperature, which could have also been used for our task.
RuuviTags
It uses Nordic Semiconductor nRF52832 System-on-Chip Software Radio which includes required Bluetooth connectivity and processing power, and also is power efficient enough to be able to collect data for multiple long sessions without a need for recharge.
We have decided to order 10 RuuviTags since it would give us a good enough resolution. We also ordered RuuviTag Development Kit to update tags’ firmware. While over-the-air firmware update is possible devkit is faster, more reliable and enables debug options needed for testing of unfinished builds.
RuuviTag devkit
Results
At the end of the project, we have been able to create a tool, that collects signal level data on RuuviTags, sends it to host pc and then processes it to create a set of coordinates, that has similar shape to a real-world layout of RuuviTags. The host computer is receiving and parsing packets via python script that uses BLE GATT protocol to collect the signal level data from each individual tag to a single system. The received data is then converted into distance data, which is not accurate in terms of distance, but the distance ratios are representative of reality.
We then use this data to construct its 2D representation in terms of relative positions. This gives us a final shape that closely resembles reality and could be easily adjusted with human input.
Before
After
Links:
- Source code for currently used fork of RuuviTag firmware
- Source code for data collection from tags
- Source code for data processing algorithm
- Final report
Team:
Igor Oinonen, student of Electrical Engineering at Aalto University
Alexander Popov, student of Chemical Engineering at Aalto University
Licensing:
RuuviTag firmware: BSD-3
Other code: MIT License
Other work: Creative Commons (CC BY 4.0)