Zigbee Realistic Use Case Weather Station

Revision as of 12:28, 28 February 2024 by Registered User (→‎Zigbee implementation)

For the sake of brevity, we will refer to Realistic Use Cases (RUC) as an abbreviation throughout this discussion.

1. Introduction

This implementation can be seen as a simple extension of the Wiki: Zigbee RUC Lighting [1], adding home sensors that can be extend to thermostat or others.
In the aim to test and verify various functionality and ensure proper functioning, this approach mixes and maintains several devices with different clusters without logical interaction on the same network.

RUC Weather Station


2. Getting started

From the Wiki: Zigbee RUC Lighting [1], this project adds new ZR and ZED for measurement sensors features.
The ZED are not Sleepy ones but it is a possible extension, for more information please see Application Note [2].

2.1. Hardware requirements

The P-NUCLEO-WB55 pack [3] with its USB-Dongle are required to set up the demonstration.
For more information, please visit STM32WB Development ecosystem

P-NUCLEO-WB55 USB-Dongle
Connectivity nucleo-description.png
Connectivity STM32WB55MM-USB-Dongle-Description.png


Additionally, its uses two different sensors integrated:

  • The BME680 sensor, directly connected to the base station (Nucleo board [3] used as ZR), provides real-time data for temperature, pressure, and humidity by SPI control
  • The SCD41 sensor, connected to the autonomous sensor (Nucleo USB-Dongle [3] used as ZED) by I2C control. For future upgrades, the sensor measurement could be programmed as SED with the Low-Power programming.

Finally, the data are displayed by the base station. For this purpose, an e-Paper display is used by SPI control.
Black and white e-paper with a size of 4.2 inches (300 x 400 pixels) from Pervasive Displays.
Total screen refresh time: approximately 2 seconds.

2.2. Software and system requirements

For more information to build Zigbee application, please visit STM32WB Build Zigbee Project
To check messages from the board, use any convenient terminal software via the UART Interface, please visit Wiki: Zigbee Log via UART
One driver is available for each sensor and display, these could be found with source example.

2.3. Install the Zigbee network

To install the RUC example, please follow the HowTo Join a Zigbee Network and HowTo bind devices.

3. Zigbee implementation

This example will use several Measurement clusters with the following topology:

  • a base station as ZR with client clusters to collect data sensors
  • three or more sensor devices as ZED with multiple server clusters by device

Several clusters Measurement are mixed for sensors, like Temperature, Water content and concentration.

  • Temperature Measurement cluster [4], is the basic cluster for the weather station.
  • Water Content Measurement [5], which includes three subclusters. The one used in the application is the Relative Humidity Percentage.
  • Concentration Measurement, a collection of 33 subclusters [6]. The one used in the application is the CO2 cluster.

3.1. Sensors

The ZED sensor is based on Nucleo USB-Dongle [3].
Each ZED uses several Server Measurement clusters as Temperature and humidity to connect (bind) to the base station.
At the same time interval, the sensor will send frame a data measurement to client(s). The sensor could be set in low-power when no data send, so the device could be become a SED.
With multiple sensors, the sending frame is multiplicated and the Zigbee network stressed without any other devices.

3.2. Base station

The base station is a ZR with all measurement clusters available to collect data sensors.

Sensor Report Measurement Process


4. Possible Extensions

From this use case, some possibles extension:

  • Complete the Weather Station with the Wind Speed cluster [7].
  • Add AQI option to the Weather Station with the Concentration Measurement [6] like Sulfur Dioxide, Nitrogen Dioxide and Ozone sensors.
  • Add the Alarms cluster [8] to warn user to do something like open the Windows[9] when there is a potential problem or danger.
  • Transform it to Thermostat (futur Use Case) with corresponding cluster [10] and add control HVAC
  • Verification station in Industrial context (as chemical) with corresponding clusters in the Concentration Measurement [6].

5. Acronyms and definitions

Term Definition
AQI Air Quality Index
ZC Zigbee Coordinator
ZR Zigbee Router
ZED Zigbee End Device
SED Sleepy End Device
RUC Realistic Use Case
GPIO General Purpose Input Output
PWM Pulse Width Modulation
SPI Serial Peripheral Interface
I2C Inter-Integrated Circuit

6. References