- 2 Mbps (e.g. Zgibee is at 250 Kbps to have a higher range), the bitrate does not improve the range enough to get rid of repeaters, and once you need repeaters these are continuous listeners and require permanent power anyway, so the strategy is to have a repeater for every slot of the house and those repeaters can have power amplifiers and the range problem is solved with a high bitrate.
- stress tests including up to 300 packets / second were successfull.
- This configuration file contains the short id for device unique identifier (uid64) and other configurations such as the channel, the sleep time, the required function,... Note that a python script using jLink API automate the flashing process as the uid is read every time from the attached device and matches the parameters to be flashed from the config file.
- As the short id (8 bits) is flashed, there is no association process required and all sensor devices can act as a pure beacons (no listening required) which considerably increases battery life time. We can keep arguing about the need of an acknowledged protocol for sensors logging, I do not think it is required as the feedback of battery level and rssi are both logged as well so the user knows if the sensor is in a healthy position or not.
- Router = Coordinator = Repeater = Sniffer = CLI : actually, a configuration activates the repeat functionality in case someone wants a completely stealth sniffer and this config does not require a different FW. There is nothing to coordinate as the mesh is fully dynamic with a flood and time to live concept. And every dongle has a CLI in text mode to report heard packets and takes commands as text input.
- A consequence of the simplified design allows to have multiple dongles in different locations listening to the network and reporting it to mqtt which avoids any single point of failure. By design there is no id 0 privileged coordinator and end devices do not require to know any particular associated address, they just wake up, broadcast and sleep.
- As visible in the gif animations below, Open Source SW is provided for all steps, devices firmware and server python code.
Just plug a dongle and watch the serial port
cu -l /dev/ttyACM0 -s 460800
Then start a python service to turn serial to mqtt
Link to the python script nrf_mesh.py
mosquitto_sub -t 'nrf/#' -v | ts
more details about the protocol on the Home Smart Mesh Website Protocol page
Home Smart Mesh with comprehensible structure, menu for different boards, mesh concept,...
Repeater and Command Line Interface : nRF52840 usb dongle
- Nordic has release a cheap usb dongle. This board does not have a serial to usb converter, rather the physical usb of the nRF52840 chip. A firmware is provided to offer a high performance interface. I must admit that it was not easy due to all required ring buffers and interrupt management.
- This dongle is multi purpose and is also used in other projects with "OpenThread" as a protocolas example #Self standing balancing robot. But the custom protocol is simpler and has a millisecond scale efficiency.
DIY nRF52 Sensor Tag
Why am I doing a custom HW ? When I started this there were no Aqara sensors on the market. The aqara weather do not measure ambient light, the motion sensor does but with unpractical sampling rate and resolution. The nRF51802 is an 8€ tag that can sense temperature and ambient light, and the aqara the humidity and pressure which for my use case do not require a high sampling rate. So this nRF52 is more as a platform to plug in any new sensor but is an optional chain in the nRF custom mesh framework.
mRF52 Sensor Tag Key Features
- RF Mesh Logging of Temperature, Humidity, Pressure, Battery Level
- Low power ~ 25 uA
- Open source firmware, even the RF stack is open source, no softdevice used.
- BME280 : temperature (high precision 0.01°), humidity, pressure
- MAX44009 : Ambient light (0.045 Lux to 188,000 Lux Range)
- PCB is available on the repo, schematics, board and gerbers for direct order
- Very easy to solder
- Possibility to solder different I²C sensor modules
- nRF SDK 15.0.0 inetgrated as a light weight git submodule where custom radio protocol is extracted
- debug project for Segger Ozone
Two battery types
nRF52 Mesh Router Dongle
Not really cheaper but smaller than the nRF52840 usb dongle. The nRF52840 usb dongle is now a much attractive alternative with way higher performance. But I do have lots of these nRF5832 dongles and the do the job, so both will be supported in this project.
nRF52 Mesh Dongle Key Features
- RF Mesh Autonomous router
- RF Mesh Remote configuration
- RF Mesh Host Controller Interface (HCI)
- HCI used by Raspberry pi Python scripts
- UART @ 460 Kbps
- Continuos Streaming of up to 300 RF Packets / second
How the Mesh Works
Complete Mesh to MQTT Mapping
The mqtt has been updated to be similar to zigbee2mqtt (json payload and topi in two levels not three), these changes are not yet reflected in the diagram below.
Docker and Raspberry pi Server Software
More structured info on
More details about the DIY nRF52 : The PCB is ready
- Eagle design files available in the IoT Frameworks github
- gerber files also available in there
- Frame dimensions are 37 mm x 27 mm with around 8mm of antenna side out of frame so total is 37 x 35 mm.
- Support options on same pcb the user can decide what support to solder :
- CR2032 small
- CR2477 big
- MPU6050 (can be soldered from the back side or below the other modules)
|Cost||0.25 €||2 €||x8|
|Capacity||230 mAh||900 mAh||x4|
|Holder height||4 mm||12 mm||x3|
Link to Schematics
"nRF52832 module" search keyword, returns on vendor websites modules similar to this one :
- nRF52832 512KB ROM, 64KB RAM
- PCB ant
- 16.4 mm x 22.9 mm
- VCC, GND, SDIO, SCLK, P0. (6, 7, 8, 9, 10, 11, 12, 14, 29, 30, 31)
- pio spacing 2.54 mm very easy soldering
Selection process of the power supply strategy
Market Available nRF52 sensor Tags Alternatives
As this is not a project that focus on competition rather on feature rich eco-system, here are provided the closest market available alternatives, all of those HW could easily be ported to the Home Smart Mesh SW stack and vice versa.
This is the ideal design, low power sensors logging in mind, has a big battery for longer life, open source, open hw. Although everything looks ideal, it is not affordable for a simple maker like me to redesign this into my own IoT sensors combination. Same as in the #Home Smart Mesh , the Ruuvio community is also converging to standard tools for logging data such as Grafana and a serious time series database such as Influx db. But funnily enough, as of 08-Apr-18 they hope to get the data in real time, they'll probably have fun with the bluetooth limitations and end up in a non optimal RF power usage, where as #Home Smart Mesh uses a custom power efficient protocol. So all of this shows that projects can profit from one another's oppenness.
- nRF52832 (512K ROM - 64K RAM)
- LISDH12 (accel)
- BME280 (hum, temp, press)
Professionaly boosted sensors you can never think of, this IoT wonder is not designed for long term sensors logging but rather for short term very smart companion (li-ion battery), although this could easily be changed. Again here, the cost is prohibitive for a maker you only wants one sensor type for an application, or let's say a dash button, that would be a waste.
- sensors (temp, hum, press, air qual, color, light)
- 9 axis accel
- speaker, mic
- li-ion batt
source, undefined, search keywords "nRF52832 sensor".
- 8 MBit SPI Flash