THT Control: Bluetooth Sensor Visualizer App

Our mission was to create a product that is composed of an android phone connected to different sensors via bluetooth. The system is intended to be used in forests and natural environments to collect various sensor information. The user interacts with the mobile device only every now and then, to check that it is working properly. It’s connected to the internet and is able to send the data to a SQL database.

For sensor hardware, we had no limitations on what we should do or what data we should collect. We decided to focus on the temperature, humidity and pressure data. 

The system periodically gathers data from the BLE sensors connected that he has the connections with. Data is stored on a mobile device until it is connected to the internet. Information is then uploaded to the remote SQL database.

First Prototype

For our first physical prototype we decided to create a simple connection between the Arduino and the sensor. We used a breadboard to connect the wires and wrote a C-code to run it using BLE-technology.

First Prototype
Figure 1. First prototype’s wiring

On Figure 1 we can see the sensor prototype, composed of a BME280 Sensor, connected to an Arduino nano 33 BLE. Although this is a minimal setup, it’s almost definitive. After creating this prototype we decided to add a battery and a powerswitch to it in later prototypes.

The first results of the project came from building the sensor and connecting it to the phone. In Figure 2, we can see the connection of the prototype to the mobile phone using a generic App for BLE connections, called LightBlue. We were able to send all the sensor data: Pressure, Humidity, Temperature and Altitude.

 

LightBlue data
Figure 2. Successful connection to BLE Device through LightBlue App.

Second Prototype

For the second prototype we bought a proper board, battery and switch to it. Parts were properly soldered into the board. We attached 4 AA batteries and tested how the system works without powering it via usb. 

Second Prototype
Figure 3. Second Prototype

In this phase we started to actively work on creating our own software on the phone. We were able to pair the phone and the device via our app as well as collecting the data in the raw form on the terminal. Figure 4 shows the graph cluster from the data gathered.

Second Prototype's Graphs
Figure 4. Second Prototype’s graph cluster

Final Prototype

For our most perfected physical prototype we designed a circuit board via CAD-software and created the device on a copper plate. The arduino and the sensor can be easily connected by soldering the parts into the board. 

Final Prototype B
Figure 5. Final Prototype’s PCB
Final Prototype A
Figure 6. Final Prototype

On the App development side, we were able to display as graphs and to upload the gathered data into a SQL database. Figure 7 shows how is the navigation diagram in the final app.

Navigation

Figure 7. Navigation Schema

Links

Final Report

Demo

Arduino code

Mankinen, P. (2020). THT Bluetooth Sensor. https://github.com/mankin3n/thtSensor8

Android App

Onnela, M., & Castro, G. (2020). Bluetooth Sensor Visualizer Android App. https://github.com/markusonnela/protopaja

Authors

Markus Onnela – 715560 – markus.a.onnela@aalto.fi
Pauli Mankinen – 712534 – pauli.mankinen@aalto.fi
Gabriel Castro – 784821 – gabriel.castromunoz@aalto.fi

License:

Source code: MIT-license

Other material: Creative Commons (CC BY 4.0)