https://github.com/edward62740/wmns
Wireless mesh network system which integrates customizable smart home sensing into a single network.
https://github.com/edward62740/wmns
freertos grafana influxdb iot mesh pcb-design sensor smart-home
Last synced: about 1 month ago
JSON representation
Wireless mesh network system which integrates customizable smart home sensing into a single network.
- Host: GitHub
- URL: https://github.com/edward62740/wmns
- Owner: edward62740
- License: gpl-2.0
- Created: 2020-09-26T02:37:33.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-10-06T02:47:28.000Z (over 3 years ago)
- Last Synced: 2025-03-17T08:22:28.447Z (over 1 year ago)
- Topics: freertos, grafana, influxdb, iot, mesh, pcb-design, sensor, smart-home
- Language: C
- Homepage:
- Size: 35.2 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.txt
- License: LICENSE
Awesome Lists containing this project
README
# Wireless Mesh Network System (WMNS)

## Overview
This is a wireless sensor network system as a part of an ongoing project for smart home sensing and security. The intent is to create easily deployable, low-maintenance (thereby low-power) sensors for real-time collection of non-sensitive data. The various sensors have a battery life typically between 1-4 years off a CR2032 (excl. CO2SN - 4 months, Li-ion).
The data is collected in InfluxDB and can be viewed graphically in Grafana.


## Related Development
_These devices either contribute to the WMNS database or utilize it for their functions._
[PMS](https://github.com/edward62740/wmns-pms) - Particulate matter sensor.
[IN-16 Display](https://github.com/edward62740/wmns-in16) - IN-16 tubes for displaying database information.
[E-Paper Display](https://github.com/edward62740/wmns-epd) - Simple Wi-Fi/BLE enabled e-paper display. Designed for displaying real-time sensor data.
[Lamp](https://github.com/edward62740/wmns-epd) - Mood lamp simulating candle flicker.
[Transposer](https://github.com/edward62740/wmns-transposer) - Python script to transfer data from InfluxDB to Firebase RTDB.
## Network Structure
This wireless mesh network is a proprietary, decentralized flood type network. The network consists of three distinct node types: routers (R), gateways (GT) and low-power end devices (LP).\
Routers retransmit received data to form the backbone of the network.\
Gateways are similar to routers and forward mesh network data to a server/cloud.\
End devices are low-power nodes that sleep for most of the time, periodically transmitting data.

## Measured data
Currently, the following data is collected by the system through multiple sensor types (sensors in brackets, not necessarily utilized as such):
* Temperature (BME280, BME680, Si7021, SCD41, BMA400, mcu_internal)
* Relative humidity (BME280, BME680, Si7021, SCD41)
* Barometric pressure (BME280, BME680)
* Illuminance (OPT3001, VEML6030, Si1133/5)
* UV levels (Si1133/5)
* Sudden/discontinous motion (BMA400)
* Person counter (VL53L1X)
* CO2 concentration (SCD41)
* VOC concentration (BME680)
* Battery levels (ADC)
* Signal strength (radio)
## Custom Hardware Devices
GPSN | LRSN | CO2SN | ALSN
:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:

General-purpose configurable sensor for: temperature, humidity, air pressure, light, VOCs, motion|
Person counter sensor | 
Carbon dioxide concentration sensor | 
Specialized light sensor for visible, UV, IR
GATEWAY | ROUTER32PA | ROUTER40 | LTSN | TERMINAL
:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:

Internet gateway node |
Power amplified router node | 
USB-powered router node |
Specialized temp sensor for sub-zero|
Security node and gateway redundancy.
## Performance
The following performance factors were considered during the design of the WMNS:
* Low maintenance - essentially long battery life and reliability
_Low power circuit and software design from bottom up. Certain sensors (i.e those expected to face harsher conditions) are conformally coated to increase reliability._
_Network has no central "coordinator" type node which is required to sustain the network. Packets can take multiple paths to the gateway. Gateways can be configured as redundancies._
_Connectionless protocol. No risk of runtime disconnections, failed acks etc. Sensors only need initial positioning in an area with good RSSI and reasonable packet loss from multipath fading._
* Ease of use - able to easily add more sensors (and more types), and modify configurations.
_Easy plug-and-play to add more sensors. Only the gateway needs modifications to add new sensor types (for database side processing)._
_Sensors can easily be configured for different sample rates._
* Range - good wireless range vs power consumption compromise
_Tuned internal antennas allow for lower tx power (and less power consumption)._
* Low-cost - cheap sensors
_Runs off comparatively low-cost and widely used nRF52 series SoCs. Same design template was used across sensors to drop development time and costs._
_No protocol overhead or IP costs involved._
## Deployment
This system has been deployed in stages since Q1 21 with zero system failures (e.g gateway restarts, sensor malfunctions and drops out of network, hardware failure).

Deployed devices: 28
This repo is released under the GPL-2.0 License. Related repos DO NOT INHERIT licenses.