Code Monkey home page Code Monkey logo

sensorhub's Introduction

SensorHub

Table of Contents

About

Solar-powered, low energy environment sensor node with WiFi interface. The device will measure the following parameter:

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.

Overview

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.

Application

Please visit the project site or write me an e-mail when you need additional informations or if you have any questions.

Image sources

Setup

  • 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 from software/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 the SensorHub starts to blink green until you close the connection or a IP address of the MQTT broker was transmitted successfully.

Device modes

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).

Bluetooth

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.

Measurement

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.

History

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

Maintainer

sensorhub's People

Contributors

kampi avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.