Solar-powered, low energy environment sensor node with WiFi interface. The device will measure the following parameter:
- Temperature (with a MCP9808)
- Humidity (with a BME680)
- Pressure (with a BME680)
- Gas resistance (with a BME680)
- Ambient light (with a BH1726)
- UV (with a VEML6070)
The whole device is designed for low power operation and for a solar panel as current source. A backup battery will be used to buffer the sun-free time during the night or on cloudy days. This battery will be charged by an integrated solar-charging circuit.
The integrated WiFi is used to transmit the data as an MQTT message to a broker (i. e. a Raspberry Pi). The included Qt application for the Raspberry Pi can be used to visualize and record the received data.
Please visit the project site or write me an e-mail when you need additional informations or if you have any questions.
- You have to use the Particle CLI or the Particle App to setup your WiFi credentials in the microcontroller module before you can use the software.
$ particle usb start-listening
Done.
$ particle serial wifi
? Should I scan for nearby Wi-Fi networks? (Y/n) y
? Should I scan for nearby Wi-Fi networks? Yes
? SSID ...
? SSID ...
? Security Type (Use arrow keys)
? Security Type ...
? Cipher Type (Use arrow keys)
? Cipher Type ...
? Wi-Fi Password ...
? Wi-Fi Password ...
Done! Your device should now restart.
- Download a bluetooth app for your smartphone (i. e. nRF Connect).
- Make sure that your microcontroller module runs at least firmware version 1.5.2.
- Optional: Build the firmware from the soures in
software/SensorHub
by using Visual Studio Code and the Particle Workbench. - Power up the
SensorHub
and flash the firmware fromsoftware/release
by using the Particle CLI. - Hold the
MODE
button of the microcontroller module to enter the setup mode. - After entering the setup mode the RGB LED of the device will lights up red.
- Open the app and connect your smartphone with the
SensorHub
. When the connection is successful the RGB LED of theSensorHub
starts to blink green until you close the connection or a IP address of the MQTT broker was transmitted successfully.
The SensorHub
use the RGB led of the microcontroller module to display his current state. Each state is encoded in a blink pattern which begins with a 3 seconds group color.
RGB color | Group |
---|---|
Blue | Sensors |
Green | Network |
Red | Device |
The group color is followed by the error code which is encoded with a white flashing of the RGB LED. Each flash has a duration of 1 second.
Blink code | Sensors | Network | Device |
---|---|---|---|
1x | Temperature sensor failure. | No valid WiFi credentials found. Please use the Particle CLI to setup your WiFi credentials. |
- |
2x | Light sensor failure. | No valid IP address found. | - |
3x | Environment sensor failure. | Connection error. | - |
4x | UV sensor failure. | Network timeout. | - |
5x | Communication error. | - | - |
The current device error is also printed over the serial interface of the microcontroller module or is published over the MQTT tag sensorhub/errors
(this required valid network settings).
The firmware use the following UUIDs for the bluetooth low energy service:
UUID | Description |
---|---|
b4250401-fb4b-4746-b2b0-93f0e61122c6 | General service UUID for the BLE service. |
b4250402-fb4b-4746-b2b0-93f0e61122c6 | Server IP UUID to configure the IP address of the MQTT server. |
After a successful configuration and initialization the device will enter the sleep mode. The microcontroller is woken up every three minutes to read in new data from the sensors. After a successful read of the
sensors the data gets packed in a JSON structure and published by using the MQTT protocol. The firmware uses the topic sensorhub/weather
to publish the sensor data in the network.
The JSON object uses the following structure:
{
"Temperature": "23.0",
"Ambient light": "1000.0",
"UV": "7",
"Pressure": "1004",
"Humidity": "44.0",
"Gas resistance": "20000",
"Gas valid": "0",
"IAQ": "97.5",
"IAQ valid": "0",
"Solar": "1.2",
"Battery": "3.3"
}
Element | Description |
---|---|
Temperature | Temperature as float in °C. |
Ambient light | Illuminance as float in lux. |
UV | UV-A index as byte in the range of 0 to 11. |
Pressure | Air pressure as float in hPa. |
Humidity | Humidity as float in %RH. |
Gas resistance | Gas resistance as float in Ohms. |
Gas valid | Boolean flag to indicate a valid gas measurement. |
IAQ | Indor Air Quality in %. |
IAQ valid | Boolean flag to indicate a valid IAQ index. |
Solar | Solar cell voltage as float in V. |
Battery | Battery voltage as float in V. |
Version | Description | Date |
---|---|---|
0.1 | Release hardware version 1.1 Firmware version 1.0 Release application version 1.0 |
13.07.2020 |
0.2 | Release hardware version 1.2 Improve firmware and release firmware 1.1 Release application version 1.1 |
18.07.2020 |