Zigbee Realistic Use Case Window Covering

Revision as of 13:53, 14 December 2023 by Registered User

1. Introduction

This implementation can be seen as a simple extension of the Wiki: Zigbee RUC Lighting [1], adding another Zigbee cluster in the Home automation aspect.
This approach mixes and maintains several Device with different clusters on the same network without logical interaction to test and verify various functionality and ensure proper functioning.

RUC Window Covering


2. Getting started

From the base Zigbee network [1], this project adds new Router (ZR) and End Device (ZED) with Window covering features.

Hardware requirements
P-NUCLEO-WB55[2] and STM32WB5MM-DK[3] are required to set up the demonstration.
For more information, please visit STM32WB Development ecosystem

P-NUCLEO-WB55
Connectivity nucleo-description.png
STM32WB5MM-DK
Connectivity DK board.png


Additionally, It uses an Arduino Motor Shield Control (AMS) [4] based on the ST dual full-bridge driver L298P [5] to drive a DC motor, enabling the real opening and closing of a window covering.

Arduino Motor Shield


3. Zigbee Implementation

The Zigbee cluster Window Covering [6] is used for this example.

Window Covering cluster usage


3.1. Server cluster side

The server is based on a STM32WB5MM-DK [3], which has a slot to put an Arduino board to expand its functionality.

It uses an Arduino Motor Shield Control (AMS) [4] based on the ST dual full-bridge driver L298P [5] to drive a DC motor, enabling the real opening and closing of a window covering.

One driver was created to enable the following functionalities:

  • Adjust the motor’s speed by modifying the duty cycle of a PWM (driven by a GPIO connected to a timer).
  • Change the rotation direction (driven by a GPIO).
  • Set a break (also driven by a GPIO)
  • Current sensing, with that possibility, this feature detects when the window covering is stuck and stops the motor.

3.2. Client cluster side

The client is based on a P-NUCLEO-WB55 [2]

The client cluster of the window covering implements 7 commands but only three commands are used.

  • Up / Open
  • Down / Close
  • Stop

As with the previous example, theses commands are associated with callbacks functions on the server side. When a UP comand is sent, the corresponding callback function on the server side, initiating the motor rotation to open the window covering.

3.3. Binding and Report process

This example reuse the same process of Zigbee RUC Lighting.
For more information please visit it.

3.4. Extension possible

A potential extension is to add the Alarms cluster [7] to notify when the shutter is blocking and flash the LEDs controller to warn User.
To better understood a first approach implemented, please find below a process used.

4. Acronyms and definitions

Term Definition
ZC Zigbee Coordinator
ZR Zigbee Router
ZED Zigbee End Device
RUC Realistic Use Case
AMS Arduino Motor Shield
GPIO General Purpose Input Output
PWM Pulse Width Modulation

5. References