Site Tools


en:tech:zigbeesensor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:tech:zigbeesensor [2024/05/17 14:14] – [Planning] bullaren:tech:zigbeesensor [2024/05/18 04:35] (current) – [Software] bullar
Line 11: Line 11:
  
 There are 3 types of ZigBee Devices: There are 3 types of ZigBee Devices:
-  - **Zigbee Coordinator Device:** It communicates with routers. This device is used for connecting the devices. +  - **ZigBee Coordinator Device:** It communicates with routers. This device is used for connecting the devices. 
-  - **Zigbee Router:** It is used for passing the data between devices. +  - **ZigBee Router:** It is used for passing the data between devices. 
-  - **Zigbee End Device:** It is the device that is going to be controlled+  - **ZigBee End Device:** It is the device that is going to be controlled
  
  
-In order to setup ZIGBEE you need at least one **ZIGBEE coordinator** device. In my case I use [[https://www.home-assistant.io/yellow|YELLOW]] from Home Assistant where a ZIGBEE module (Silicon Labs MGM210P Mighty Gecko) is on-board. In common use is also [[https://www.zigbee2mqtt.io|Zigbee2MQTT]] with a supported ZIGBEE adapter of your choice. I use this approach for debugging purpose only.+In order to setup ZIGBEE you need at least one **ZigBee coordinator** device. In my case I use [[https://www.home-assistant.io/yellow|YELLOW]] from Home Assistant where a ZIGBEE module (Silicon Labs MGM210P Mighty Gecko) is on-board. In common use is also [[https://www.zigbee2mqtt.io|Zigbee2MQTT]] with a supported ZIGBEE adapter of your choice. I use this approach for debugging purpose only.
  
-=== Modules ===+==== Modules ====
  
 In order to build a DIY Zigbee device (End Device or Router) we need a programmable Zigbee module. Several modules can be found in the market but I stick to [[https://wmsc.lcsc.com/wmsc/upload/file/pdf/v2/lcsc/2404011708_Chengdu-Ebyte-Elec-Tech-E18-MS1-PCB_C97344.pdf|E18-MS1-PCB]] from Chengdu Ebyte Elec Tech. In order to build a DIY Zigbee device (End Device or Router) we need a programmable Zigbee module. Several modules can be found in the market but I stick to [[https://wmsc.lcsc.com/wmsc/upload/file/pdf/v2/lcsc/2404011708_Chengdu-Ebyte-Elec-Tech-E18-MS1-PCB_C97344.pdf|E18-MS1-PCB]] from Chengdu Ebyte Elec Tech.
Line 25: Line 25:
 {{ :en:tech:e18-ms1-pcb.png?direct&200 |E18-MS1-PCB}} {{ :en:tech:e18-ms1-pcb.png?direct&200 |E18-MS1-PCB}}
  
-=== Quirks & Co. ===+==== Quirks & Co. ====
 For DIY devices you may have to teach the coordinator software how to deal with your Zigbee data. In Home Assistant [[https://github.com/zigpy/zha-device-handlers|quirks]] bridge the functionality gap created when a DIY device deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices. For DIY devices you may have to teach the coordinator software how to deal with your Zigbee data. In Home Assistant [[https://github.com/zigpy/zha-device-handlers|quirks]] bridge the functionality gap created when a DIY device deviate from the ZCL specification, handling deviations and exceptions by parsing custom messages to and from Zigbee devices.
  
Line 43: Line 43:
 </WRAP> </WRAP>
  
-The final PCB is quite compact with a size of 44.5 x 24mm. On top you see the programming interface (J1) and a button (SW1). The yellow LED (LED1) is used an indicator. A 5V power supply can be connected via 2-pin JST connector (J7) or Micro-USB.  A 3.3V regulator is on-board too. The UART interface has 5V signal level and the I²C is standard 3.3V. The level of additional two GPIOs can be selected between 3.3V and 5V by jumper. All 4-pin XH connector (J3-J6) provide a power pin so that a sensor can directly be connected.+The final PCB is quite compact with a size of 44.5 x 24mm. On top you see the programming interface (J1) and a button (SW1). The yellow LED (LED1) is used as an indicator. A 5V power supply can be connected via 2-pin JST connector (J7) or Micro-USB.  A 3.3V regulator is on-board too. The UART interface has 5V signal level and the I²C is standard 3.3V. The level of additional two GPIOs can be selected between 3.3V and 5V by jumper. All 4-pin XH connector (J3-J6) provide a power pin so that a sensor can directly be connected.
  
 {{ :en:tech:pcb_pic.jpg?direct&400 | Soldered PCB}} {{ :en:tech:pcb_pic.jpg?direct&400 | Soldered PCB}}
 ===== Software ===== ===== Software =====
  
-For long I hesitated to step to ZIGBEE as the firmware development could become a challenge. There are a lot of step-by-step descriptions public but it's look like not to be an out-of-the box task. But I could find a couple of projects utilising the [[https://ptvo.info|PTVO firmware]]. The firmware tool allows creating a ZIGBEE device with easily configurable functionality, including inputs, outputs, ADC, pulse counter/generator, I2C, external sensors.+For long I hesitated to step to ZIGBEE as the firmware development could become a challenge. There are a lot of step-by-step descriptions public but it's look like not to be an out-of-the box task. But I could find a couple of projects utilising the [[https://ptvo.info|PTVO firmware]]. The firmware tool allows creating a ZIGBEE device (has to be TI SOC based) with easily configurable functionality, including inputs, outputs, ADC, pulse counter/generator, I²C, external sensors.
   
 After some tests I was impressed and convinced how easy it is to setup a ZIGBEE device. This tools not only outputs the binary file (.hex) that can be directly programmed to the ZIGBEE module, it also generates the custom files for your coordinator of choice (e.g. quirks for Home Assistant). No need to program a single line of code.  After some tests I was impressed and convinced how easy it is to setup a ZIGBEE device. This tools not only outputs the binary file (.hex) that can be directly programmed to the ZIGBEE module, it also generates the custom files for your coordinator of choice (e.g. quirks for Home Assistant). No need to program a single line of code. 
  
-An example setup is described [[en:tech:zigbeesensor#st_application_water_meter|here]]+An 1st application setup is described [[en:tech:zigbeesensor#st_application_water_meter|here]]
 ===== Programming ===== ===== Programming =====
  
en/tech/zigbeesensor.1715955285.txt.gz · Last modified: 2024/05/17 14:14 by bullar