top of page

Connecting external sensors

Smartphones are equipped with a multitude of sensors, but they sometimes have limitations when it comes to studying certain physical phenomena. That's why we've expanded FizziQ's capabilities by allowing it to connect to microcontrollers via Bluetooth. This innovation opens the door to a variety of exciting possibilities. You can now use a multitude of external sensors to measure parameters such as temperature, pressure, weight, CO2 concentration, and more. Our connection protocol is open and easy to use, meaning anyone can benefit from the power and simplicity of data logging and analysis offered by the FizziQ app.

Contents :

What microphone-controllers can connect to FizziQ? -What Bluetooth service use? - Message structure -How to connect FizziQ?Special case of an ArduinoSpecial case of a micro:bitSpecial case of an ESP32Special case of HM10

Ancre 1

Which microcontrollers can connect to FizziQ?

All microcontrollers with a Bluetooth BLE connection can connect to FizziQ. Bluetooth is a standard wireless communications technology, providing higher data rates suitable for devices requiring fast transfers. Bluetooth Low Energy (BLE), designed for low power consumption, is ideal for battery-powered devices and proximity IoT applications. BLE offers shorter range and potentially higher latency, while regular Bluetooth offers greater range and lower latency.

 

In most cases, microcontrollers can communicate in BLE format, such as micro:bit, ESP32 or Arduino Nano 33 BLE devices. If this is not possible, it may be necessary to add a Bluetooth BLE connection module to the microcontroller to send the data. A circuit such as the BM-HM10 can then be used, for example.

What serviceBluetoothuse with FizziQ?

In theBluetooth protocol, a "service" represents a specific functionality that devices can offer, such as streaming audio or file sharing. Each service may have several "features" that describe the details of its functionality. For example, a wireless headset service may have features such as volume adjustment or music play/pause. This hierarchical organization allows devices to understand and cooperate effectively to deliver a wide range of wireless capabilities, from earbuds to IoT sensors.

For data exchange with Arduino, FizziQ uses the UART service. This service allows you to send any type of data acquired by the microcontroller. Followthis link to the Nordic Semiconductor page.

To connect an Arduino board with FizziQ via Bluetooth:

1. Give the device a name to recognize it, for example: “FizziQ Connection”

2. The service uuid is "6e400001-b5a3-f393-e0a9-e50e24dcca9e"

3. The uuid of the characteristic is "6e400002-b5a3-f393-e0a9-e50e24dcca9e"

4. The service must include a notification (NOTIFY)

Whatis the message structure ?

The data exchanged by the UART service must bestructured in the form of a character string in the following format: 'NAME: VALUE'. For example, to send information about a voltage of 5 volts, send the UART message: 'Voltage: 5.0'.

 

The following measurement names are recognized by FizziQ:

- temperature

- weight

- humidity

- tension

- pressure (atmospheric)

- acceleration

- brightness

- magnetic (field)

- compass (compass)

- co2 (concentration of)

- tvoc (volatile compounds)

- intensity

For this data, the units and an icon representing the data will be automatically recognized and displayed. 

 

Data different from those recognized can be shared with FizziQ, but unrecognized names will be displayed under the name of a generic sensor: "UART".

Note that only the first three letters of the name are recognized by FizziQ so it is not necessary to put all the letters in the message. 

How to connect FizziQ?

Please note, the connection with external sensors is managed exclusively by the application. Do not attempt to pair the external sensor via the Settings menu or native Bluetooth of the smartphone!

 

To connect an external sensor to FizziQ, in the application, in the Measurement tab, select "External Sensors", then press the connection button corresponding to your micro-controller. An icon giving access to the data transmitted by the microcontroller will appear. Data management is done in the same way as any other smartphone sensor. To disconnect the smartphone, tap Disconnect. The disconnection will be automatic if the connection is broken. The Refresh button is used to update the list of smartphone sensors.

What program for an Arduino?

An example program to transmit Humidity data can be found in the following text file:

Ancre 2
Ancre 3
Ancre 4
Ancre 5

The connection steps for Arduino are described in the video below:

Ancre 6

What program for a micro:bit

The connection steps for micro:bit are the same as for micro:bit and are described in the video below:

Ancre 7

What program for an ESP32?

The connection steps for micro:bit are the same as for micro:bit and are described in the video below:

Connection steps for ESP32 are the same as for micro:bit and Arduino

Ancre 8

How to program a BM-HM10 module?

The HM-10 is a small 3.3v SMD Bluetooth 4.0 BLE module based on the TI CC2540 or CC2541 Bluetooth SOC (System On Chip). It allows data to be transmitted in UART format on different services. For more information:  http://www.martyncurrey.com/hm-10-bluetooth-4ble-modules/

Example of a program created with the programming environment of VittaSciences, with a micro:bit card, a Grove extension and an HM-10 module

Capture d’écran 2021-05-30 à 10.42.28.pn
bottom of page