Zigbee Realistic Use Case Weather Station

For the sake of brevity, we 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, for example, thermostat, or other sensors.
With the aim to test and verify various functionalities and ensure proper functioning, this approach mixes and maintains several devices with different clusters without logical interaction on the same network.

RUC Weather Station
Connectivity Realistic Use Case-Wiki-RUC Weather Station Overview.png


2. Getting started

From the Wiki: Zigbee RUC Lighting [1], this project adds new features ZR and ZED as measurement sensors.
The ZED is not Sleepy, but it is a possible extension. For more information, refer to the related application note. [2]

2.1. Hardware requirements

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

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


Additionally, different integrated sensors are used:

  • The BME680 sensor, directly connected to the base station (Nucleo board [3] used as ZR), that 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. A possible future upgrade includes programming the sensor measurement as SED with low-power programming.

The data is displayed by the base station. For this purpose, an e-Paper display is used by SPI control:

  • Black and white e-paper size: 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 on how to build a Zigbee application, visit STM32WB Build Zigbee Project.
To check messages from the board, use any convenient terminal software through the UART interface, see Wiki: Zigbee Log via UART.
One driver is available for each sensor and display, including source examples.

2.3. Install the Zigbee network

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

3. Zigbee implementation

This example uses 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 measurement clusters include a variety of sensors, like temperature, water content and concentration.

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

3.1. Sensors

The ZED sensor is based on the Nucleo USB-Dongle. [3]
Each ZED uses several server measurement clusters, such as temperature and humidity, to connect (bind) to the base station.
With the same time interval, the sensor sends a data measurement frame to client(s). The sensor can be implemented as a SED [2] for minimal power usage.
Several Report Attributes commands are sent from multiple sensors.

3.2. Base station

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

Sensor Report Measurement Process
Connectivity Zigbee Realistic Use Case-Wiki-Weather Station Sensor Report Process.png


4. Possible extensions

Possibles extensions for this use case:

  • Complete the Weather Station with the Wind Speed cluster. [7]
  • Add AQI[8] option to the Weather Station with the Concentration Measurement [6] like sulfur dioxide, nitrogen dioxide and ozone sensors.
  • Add the Alarms cluster [9] to warn the user that an action is needed, such as opening the windows[10] when there is a potential problem or danger.
  • Transform it to Thermostat (future use case) with the corresponding cluster [11] and add control HVAC.
  • Verification station in an industrial context (for example, 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