This project is a Zigbee End Device designed to operate as a battery-powered contact sensor (for doors, windows, or similar applications).
It is based on the Texas Instruments CC2530 Zigbee SoC and can be flashed with the PTVO firmware to provide full Zigbee functionality.
The aim of this project is to replicate the door/window contact and try to do it as small as possible. The first attempt was made with 0402 components, easy and beautiful to design but extremely hard in the real life to solder. This version is based on 0603 pieces which are "more easy" to prepare by hand. I've do my best! 🤣
Okay, okay... I've discovered hot water... these are sensors that can be easily purchased off the shelf without too many problems, I know. The purpose of my work was simply to try to understand how they work and, consequently, their potential, starting with the oldest and most established chip on the market. It's not a major innovation, but it certainly helps us understand the possibilities ahead.
📂 --> My OshwLab repository of the project
- Zigbee 1.2 compatible (using PTVO firmware)
- Based on CC2530F256 microcontroller
- Powered by a CR2032 coin cell
- Integrated reed switch for contact detection
- LED indicator for status or pairing feedback
- Reset button for firmware or network reset
- Compact design suitable for enclosure integration
- Pogo pins on the left are only for programming.
- I've added also the base for an external antenna but I didn't use it.
- Designed in EasyEDA
- Compatible with Zigbee2MQTT, Home Assistant, OpenHAB, and other automation platforms
- Zigbee module (CC2530) flashable via programmer and TI Flash Programmer
The hardware is compatible with the PTVO Zigbee firmware generator:
👉 https://ptvo.info
You can configure the firmware as an End Device (battery-powered) and assign the reed contact input to the relative GPIO.
Once the configuration is ready, download the .hex file generated by the PTVO tool and flash it to the CC2530 chip.
I wanted to try battery power for the first time on a simple project. With the configuration I used, the precautions taken to connect the sensor and power capacitors, and the firmware configuration, the sleep power consumption is approximately 3-4 µA, which guarantees significant battery life.
To upload the firmware to the CC2530, follow these steps:
-
Required tools:
- A CC Debugger or compatible programmer (I've used the cheaper SmartRF04EB)
- The SmartRF Flash Programmer or TI Flash Programmer software
- The
.hexfile generated by PTVO
-
Connections:
CC2530 Pin CC Debugger Pin P2_2(Debug Data)DDP2_1(Debug Clock)DCGNDGNDVCCVCC(3.3 V)RESET_NRESET
Others test point applied are for eventually future implementations whit an optiona pull-up resistor.
-
Flashing procedure:
- Connect the programmer board to the Zigbee End Device board.
- Verify that the programmer board LED turns red (indicating correct connection).
- Open SmartRF Flash Programmer.
- Select the connected device (CC2530).
- Choose your
.hexfile. - Click Program and wait for the operation to complete.
-
After flashing:
- Disconnect the programmer.
- Power the device from the CR2032 battery.
- The LED should blink once at startup, and the device will join the Zigbee network when powered.
This project is inspired by and based on designs shared by DIY&Zi on OSHWHub / OSHWLab.
Special thanks to PTVO for providing a lot of informations for the tune of this board and flexible Zigbee firmware generator.
carletz
Created: January 2026
This project is open hardware, released under the MIT License.





