• Zigbee module: this example uses the Ebyte E18 module. You may use any board containing CC2530 (for example, E18-MS1PA2, E18-MS1PA2-IPX, E18-2G4Z27SI, or E18-TBH-27 USB Test Board).
  • PIR sensor: This simple analog HC SR501 PIR sensor uses 3.3V voltage. The “OUT” signal line has 3.3V when the sensor detects movement and 0V when a signal is off.
  • Power supply: CC2530 and E18 require 3.3V voltage.


Zigbee PIR sensor schematic


Zigbee PIR sensor breadboard

Firmware configuration

Firmware configuration

Please, note the board type. You should select your variant here.

CC2530 – select it for simple E18.
CC2530+RFX2401 – for E18-MS1PA2, E18-MS1PA2-IPX, E18-2G4Z27SI, or E18-TBH-27.

How it works

The sensor detects movements and raises a signal on the “OUT” line to the high state (3.3V). The firmware interprets this signal level as a pressed button. Because the sensor can hold the high state for a long time, the “switch” mode is selected. The switch is linked to a virtual output on any unused pin. It allows you to get the ON (move) and OFF (no movements) states in a home automation system.

You can use any unused pins in this application.

Harvey Specter
Posted at 15:45 February 24, 2021

Is P00 GPIO connected to +3.3V via a 4700 Ohm resistor?

    Harvey Specter
    Posted at 03:44 February 26, 2021

    You do not need this resistor. The firmware uses the internal pull-down resistor.

Leave a Reply