If the range of your Zigbee coordinator is a bit disappointing, some sensors will be disconnected from your Zigbee network. Annoying, because you cannot receive information from those sensors. You can improve and enlarge the mesh through a device powered by 230v, such as a lamp. They also act as a Zigbee router and increase your reach and strengthen your mesh network, but it can also be done differently. With some cheap hardware and some free software.
What do I need to create a Zigbee router?
We are going to create a Zigbee router based on the CC2531 USB stick (sniffer). On this stick we are going to flash a firmware that acts as a Zigbee router. You can then add the stick to your existing network and increase the range. The stick only needs 5v usb voltage, so you can put it in a phone charger for example at a place where you want to increase the range.
- CC2531 USB Zigbee stick
- CC Debugger with downloader cable
- SmartRF software (free) for Windows
- Zigate or other Zigbee gateway and your smarthome control such as Domoticz. (at the time of writing Zigate plugin version 4.6.001 and domoticz 4.10998)
If you want to make a second stick, then you only need the firmware and an extra CC 2531 USB sniffer.
You only need the CC debugger and the downloader cable while flashing the firmware on the stick. After that the stick works standalone.
What is a Zigbee mesh network?
Zigbee is a communication protocol (a kind of way of talking) that ensures that you can connect smart devices with each other. Zigbee uses the mesh technique, which you hear more and more these days. Internet routers are also increasingly using it. A mesh network means that each device is connected to at least two other (powered) devices. The more interconnections between sensors, lamps and the coordinator, the stronger and more reliable your network is. This has major advantages over, for example, 433Mhz (RFXcom) devices, for example, that commands always arrive.
How to flash CC2531
Benodigde tijd: 30 minuten.
In order for the stick to function as a Zigbee router, we must flash special firmware on the stick. You can do that by connecting the stick with the CC Debugger and your PC. Hold on, first install all software on your PC or laptop with Windows.
- Install Flash software
Download and install SmartRF Flash programmer (NOT V2). The software is free but you need an account to download it. Because I didn’t feel like creating a new account, I used bugmenot. Here you can borrow an account for many of these types of websites.
- Install drivers
Install the CC debugger driver on your PC. Before continuing, check whether the driver installation was successful in device management.
- Connect everything
Now connect the CC debugger to the downloader cable and plug the USB sniffer into your PC. Connect the cables as shown in the photo below. Now insert the USB of the CC debugger into your PC. The light on the CC Debugger lights up red.
- Reset CC Debugger
Reset the CC debugger by pressing the button. The LED turns green.
- Download firmware
Download the Zigbee router firmware . For the standalone stick you use “router-cc2531-std”. The other firmwares are supporting monitoring and serial functions that I don’t use.
- Flash the firmware
Start SmartRF Flash Programmer, set it up like the screenshot below, and click on Perform Actions. When the flashing is finished, you can disconnect the cables and disconnect the USB connections.
Remove the cables and close the software.
Add Zigbee router to your network
Plug your CC2531 into a USB port of a phone charger or other device where you still have good reach with your Zigbee network. If you place the stick in a place where you have poor connection, the stick also has poor connection with the coordinator. That is not going to solve your signal problem. The router must have enough overlap with an area where a good Zigbee coverage is. The stick is booting and therefore the red LED starts to flash.
Make a connection…
Because we are going to connect the CC2531 router stick with the Zigbee coordinator (for example the Zigate) , you now put it in the “Permit Join” mode. When you have done that, press the button with SW2 for 5 seconds. The stick and the network will now connect, the reason that the LED now blinks 1x per second.
The red LED will flash once every 4 seconds when the devices are connected to each other. When you use the stick in combination with a Zigate and domoticz, a new switch device has now been created.
Test the Zigbee connection
If you now press the SW1 button, you will see the switch jump to On in domoticz. The green LED also lights up at the same time. If you press the switch in domoticz, the light on the stick goes out. The connection works! The Zigbee router can now be connected to sensors and thus increase your network reach.
If you now try to add the sensors with which you have range problems, keep the sensor close to the router. That way you force the sensor to connect to the router. On the screenshot below you can see that device ‘droger’ is linked to the Zigate via the CC2531 router.
The stick works and now immediately increases the reach of your Zigbee network. Because you can touch the printed circuit board in this way, the stick is very sensitive to damage and a short circuit. I thought it would be better to make a neat housing around it. By means of a 3D printer I made a nice housing.
What did you think of this article?
Enter your vote via the stars below. Let us know what you think of the article and ask your questions in the comments!