UG124: ZigBee® Contact Sensor Reference Design (RD-0030-0201) Kit User's Guide
Introduction
Silicon Labs' ultra-low power, small, and cost-effective complete reference design based on ZigBee HA (Home Automation) 1.2 standard focuses on contact sensors that can be used for window or door sensing. This ZigBee contact sensor reference design kit features Silicon Labs' EM3587 ZigBee Pro Wireless Microcontroller (MCU) and the Si7053 temperature sensor. This document contains instructions and guidelines for the following: a quick-start demonstration and next steps, system overview and operations, hardware and firmware considerations, and engineering and manufacturing testing.
KEY POINTS
- ZigBee Door/Window Sensor
- HA 1.2 and FCC Certifiable
- Hardware and Firmware Considerations
- Engineering and Manufacturing Testing
Images showing the front and back of the ZigBee Contact Sensor Reference Design board are provided in Figure 1.1. A diagram illustrating the ZigBee Home Automation application, showing a ZigBee HA 1.2 Gateway communicating with multiple ZigBee Contact Sensors, is provided in Figure 1.2.
1. Introduction
There is an increasing desire in the market for a standards-driven, low-cost, and low-power wireless home automation system. Silicon Labs has released an ultra-low power, small, and cost-effective complete reference design based on ZigBee HA 1.2 standard that focuses on contact sensors that can be used for window or door sensing (Figure 1.1 ZigBee Contact Sensor Reference Design on page 1). This ZigBee contact sensor reference design kit features Silicon Labs' EM3587 ZigBee Pro Wireless Microcontroller (MCU) and the Si7053 temperature sensor. The reference design can be directly integrated into a connected ZigBee home automation application as shown in Figure 1.2 ZigBee Home Automation Application with Contact Sensors on page 1. The contact sensor boards come pre-programmed and fully functional out of the box. All hardware design files and firmware application source code are available.
[Description of Figure 1.1: Images showing the front and back of the ZigBee Contact Sensor Reference Design board.]
[Description of Figure 1.2: Diagram illustrating the ZigBee Home Automation application, showing a ZigBee HA 1.2 Gateway communicating with multiple ZigBee Contact Sensors.]
2. Quick Start Demonstration
A video showing the quick-start demonstration is available at http://www.silabs.com/zigbeecontactsensor.
-
Setup an HA 1.2 ZigBee gateway.
To test the contact sensor in a ZigBee network, it needs to connect to a gateway. Silicon Labs offers an RD-0002-0201 ZigBee Wi-Fi/Ethernet gateway (sold separately) for the purpose of evaluating the ZigBee contact sensor reference design. A commercially available Home Automation (HA) 1.2 compliant gateway that supports an IAS zone sensor with device profile ID = 0x0402 will also work for this purpose. Depending on the commercially available gateway, the contact sensor can also display its temperature sensor reading. The RD-0002-0201 supports the contact sensor's temperature sensor feature.
-
Supply power to the ZigBee Contact Sensor.
- Remove the white battery tab that separates the battery from its battery connector.
- The contact sensor is powered when red LED D1 momentarily flashes at least once.
-
Connect the ZigBee Contact Sensor to the ZigBee network.
- Follow the directions provided with the ZigBee gateway to enable the Contact Sensor reference design to join its ZigBee network.
- Depress and hold S1 button for more than one second, then release to begin the network join procedure.
- The demo board has joined the ZigBee network when the red LED D1 blinks six times.
-
Demonstrate ZigBee Contact Sensor functionality.
- To send a "close" command to the gateway, ensure the supplied magnet from the kit is less than 7 mm from the SW0 reed.
- To send an "open" command to the gateway, ensure the supplied magnet from the kit is more than 15 mm from the SW0 reed.
- The contact sensor will send temperature sensor updates to the gateway every thirty minutes by default if this parameter is not configured differently by the gateway.
3. Recommended Next Steps
A video showing the recommended next steps is available at http://www.silabs.com/zigbeecontactsensor.
3.1 Evaluate the Contact Sensor
The ZigBee contact sensor reference design can support most contact sensor application requirements. Typical areas of evaluation include:
- ZigBee network behavior, such as network join and leave.
- Monitoring open/close events.
- Monitoring ambient temperature.
- RF performance, such as range.
3.2 Evaluate the Firmware
If firmware modification is needed to support your application:
- Visit the ZigBee Getting Started page and order a development kit.
- Refer to Section 7. Firmware of this document.
3.3 Build Proof of Concept
Out of the box, the contact sensor reference design can be used for a rapid proof of concept. By simply adding a plastic housing (such as one that is 3D printed) to the reference design, one can demonstrate the look, feel, and function of a final product. Refer to Section 7. Firmware to change functional behavior, such as LED blinking or button functionality.
3.4 System Integration
Section 6. Hardware of this document describes the considerations for integrating the reference design into a typical application. Often the reference design can be designed into a system without modification. In cases where a change is required, the hardware section of this document also offers modification guidelines.
3.5 Engineering and Manufacturing Tests
Section 8. Engineering Tests of this document provide engineering test results, such as FCC and HA 1.2. Section 9. Manufacturing Tests of this document offers considerations for simplified manufacturing tests.
3.6 Manufacturing
Please contact Silicon Labs if you would like access to our manufacturing partner network for the reference design, or a modified version of the design.
4. Overview
4.1 Part Numbers
The part number convention is RD-XXXX-YYYY, where:
- RD: Reference Design
- XXXX: Reference Design Number
- YYYY: Reference Design Component
This document will use the reference design number (RD-XXXX) when describing the complete design, and the reference design component (RD-XXXX-YYYY) when describing a specific component.
The following table provides a description and PCB marking for each part number. Note: Some cases lack sufficient space on the PCB, and an internal "IST" marking appears on the PCB instead of the "RD" part number.
Part Number | PCB Marking | Description |
---|---|---|
RD-0030-0201 | N/A | ZigBee Contact Sensor Reference Design Kit with EM3587, Si7053, and PCB Antenna. |
RD-0030-0101 | IST-A30 Rev 2.0 | ZigBee Contact Sensor Reference Design Evaluation Board with EM3587, Si7053, and PCB Antenna. |
4.2 ZigBee Contact Sensor Reference Design Kit
Kit Contents:
- ZigBee Contact Sensor Reference Design with CR2032 battery and battery tab.
- Standex / Meder M13 magnet enclosed in plastics with screw holes.
- Quick start card to obtain the latest reference design collateral.
4.3 ZigBee Contact Sensor Reference Design
This reference design contains many features for the evaluation of a contact sensor, including:
Reference Design Features | Benefit |
---|---|
Form C reed switch, with footprint options for Form A reed switch or SOT23 hall-effect sensor | Senses open and close events with support for various magnetic sensor options. |
Si7053 I2C temperature sensor with thermistor footprint option | Senses ambient temperature to aid home automation systems. |
Status LED | Provides feedback such as network status. |
10-pin ISA3 compatible connector | Facilitates ZigBee packet debugging. |
User button | Eases network commissioning (join/leave) and tamper detection. |
Test points | Simplifies hardware-level debugging. |
CR2032 battery holder | Supports low-cost, small footprint battery. |
[Description of Figure 4.1: Diagram of the ZigBee Contact Sensor Reference Design circuit board, showing key components and connections on the front and back.]
4.4 Feature List
EM3587 Device Features:
- 32-bit ARM® Cortex®-M3 processor.
- 2.4-GHz IEEE 802.15.4-2003 transceiver & lower MAC.
- AES-128 encryption accelerator.
- Flexible ADC, UART/SPI/I2C serial communications, and general purpose timers.
- Highly efficient Thumb-2 instruction set.
ZigBee Contact Sensor Reference Design Hardware Features:
- Integrated PCB antenna.
- Form C reed switch with PCB footprint options for form A and SOT-23 sensors.
- Silicon Labs Si7053 temperature sensor with ±0.3 °C maximum accuracy.
- Pushbutton for network join.
- Network/status LED.
- Full packet trace port for RF communications debugging.
- Supports up to five years of operation on a CR2032 coin cell battery.
- 2.1 V to 3.6 V operation.
- Fully qualified BOM for 0 to 55 °C operation.
- Up to +8 dBm TX power.
- 512 kB user programmable flash with 64 kB RAM.
- Pre-certified FCC Part 15.
ZigBee Contact Sensor Reference Design Firmware Features:
- Pre-compiled and source application firmware.
- Over-the-Air (OTA) upgradable.
- ZigBee HA 1.2 pre-certifiable clusters: basic, power configuration, identify, OTA upgrade, temperature measurement, IAS zone, diagnostics.
- Application firmware (source code) available in the EmberZNet™ PRO stack library.
5. Operation
5.1 ZigBee Network Behavior
This section describes the various operational states a powered contact sensor reference design is able to occupy as it joins and leaves a ZigBee network. The input mechanism for operation utilizes a join button, S1. The red LED operates as output signaling information as the reference design traverses or occupies a functional state. Refer to the figure below for a pictorial representation of this process.
[Description of Figure 5.1: State diagram illustrating the operational states of the ZigBee Contact Sensor, including transitions based on button presses and network status.]
5.1.1 First Time Contact Sensor Power-up
After the hardware has been powered for the first time, the device will be in a factory default mode and will be placed in the ACTIVE NTWK SEARCH state. If the dimmer switch successfully joins a network is powered off at a later time, upon re-powering, it will enter the REJOIN NETWORK state instead of the ACTIVE NTWK SEARCH state.
5.1.2 OFF NETWORK State
This state is a condition where the design is not connected to a network and is not searching for a network. To leave this state and enter the ACTIVE NTWK SEARCH state, press the S1 button one time.
5.1.3 ACTIVE NTWK SEARCH State
This state is a condition where the contact sensor is actively searching for a network but has not yet joined a network. While in this mode, the D1 LED will flash once every two seconds. This operation of actively searching for a network will remain for up to three minutes. If no network is found by the three minute time limit, the contact sensor will enter into the OFF NETWORK state. Power-cycling or a button press while in this state will reset the three minute timer, while keeping the contact sensor in this state. If a network is found it will leave this state and enter the NETWORK JOIN state.
5.1.4 NETWORK JOIN State
After a contact sensor leaves the ACTIVE NTWK SEARCH state and enters this state, the D1 LED will flash six times to indicate successfully finding and joining a network. This state is temporary and will place the contact sensor into the ON NETWORK state once the LEDs complete their flash sequence. Power cycling will only impair the LED flashes, and will not prevent entry into the ON NETWORK STATE once the power is reapplied.
5.1.5 ON-NETWORK State
The ON-NETWORK state is a condition where the contact sensor is connected to a ZigBee HA 1.2 network and is not searching for another network. This state contains multiple entry and exit paths depending on various factors, such as the number of S1 button presses that are within 0.5 second of each consecutive press.
If power to the contact sensor is removed and later restored, the reference design will not seek other networks unless the user forces it to leave its joined network (as will be described within this section).
- If S1 is pressed once for more than one second, the reference design will enter the LEAVE NETWORK state.
- If S1 is pressed two times, the reference design will temporarily enter the IDENTIFY state while remaining on its joined network.
- If S1 is pressed three times, the reference design will temporarily enter the NETWORK STATUS state while remaining on its joined network.
- If S1 is pressed four times, the reference design will enter the REJOIN NETWORK state.
- If S1 is pressed and held for greater than four seconds, the reference design will activate its tamper monitoring algorithm while remaining on its joined network. Tamper monitoring is used when a reference design is contained inside a housing and the opening of the housing will release the S1 button. If tamper monitoring is activated and the S1 button is released, it will temporarily enter into the TAMPER DETECTED state.
5.1.6 IDENTIFY State
The purpose of this state is to help an installer (or user) identify which device is communicated to by visually flashing the D1 LED in a specified pattern to locate the targeted device. After a contact sensor leaves the ON-NETWORK state and enters this state, the D1 LED will flash twice per second if on a network then pause for a full second, repeating the pattern for up to three minutes. This state is temporary, and the contact sensor will return to the ON-NETWORK state once the state's timer reaches its time limit. While in this state, the device will report any change in open/close state or any change in tamper alarm state (if tamper monitoring is enabled).
If not on a network, it will enter the ACTIVE NTWK SEARCH state.
If power cycled while in this state, the design will enter the REJOIN NETWORK state.
5.1.7 NETWORK STATUS State
The purpose of this state is to help an installer (or user) to identify if a device is successfully connected to a network. After a contact sensor leaves the ON-NETWORK state and enters this state, the D1 LED will flash six times if on a network. This state is temporary, and the contact sensor will return to the ON-NETWORK state once the state's timer reaches its time limit. While in this state, the device will report any change in open/close state or any change in tamper alarm state (if tamper monitoring is enabled).
If not on a network, it will enter the ACTIVE NTWK SEARCH state.
If power cycled while in this state, the design will enter the REJOIN NETWORK state.
5.1.8 REJOIN NETWORK State
The purpose of this state is to ensure the design can successfully rejoin a previously joined network with little user intervention, while minimizing battery drain when searching for the network on both its original connected channel as well as searching on all channels for the network. Upon locating its original joined network, the design will enter the ON NETWORK state where it will rejoin the network. No LED flashes will occur during this transition.
For battery savings, if it receives no response from the network, the device will wait 15 minutes before attempting to search for the network.
If S1 is pressed once for longer than one second, the reference design will enter the LEAVE NETWORK state.
5.1.9 TAMPER DETECTED State
As described in the ON NETWORK state, this state provides a method to act once tampering is detected with this reference design upon the release of the held S1 button. Entering this state will trigger and launch an alarm message, promptly transmitting this event to the host gateway on the network. Once tamper monitoring is activated, this alarm can occur in any of the network states. To disable it, one must fully remove the CR2032 battery and re-install it.
5.1.10 LEAVE NETWORK State
Upon entering this state, the contact sensor will leave the joined network and will indicate this process is in action by flashing the D1 LED three times within a two second period. This state is temporary and will place the contact sensor into the ACTIVE NTWK SEARCH state once the LEDs complete their flash sequence.
5.2 Reed Switch Behavior
ZigBee Contact Sensor Reference Design utilizes a reed switch for magnetic sensing in conjunction with a nearby magnet to detect an entry points' open and close events. With the provided magnet, the SW0 form C reed switch will be in a closed state when the magnet is within 7 mm of proximity to it. The reed switch will be in an open state if the magnet is at least 15 mm away from it.
Alignment is critical to a predictable magnet for reed switch operation. The specifications are based on both the reed switch and magnet being on the same plane, parallel to each other and aligned from top to bottom.
6. Hardware
This section describes the key aspects of the reference design.
6.1 ZigBee Contact Sensor Reference Design RD-0030
This section describes the key hardware specifics of the RD-0030 module.
Key Highlights:
- EM3587 ZigBee Pro radio with an embedded flash.
- Si7053 temperature sensor.
- Two-layer 0.031" printed circuit board with all components on primary side.
[Description of Figure 6.1: Block diagram of the ZigBee Contact Sensor Reference Design, showing the EM3587 MCU, Si7053 temperature sensor, reed switch, and other key modules.]
[Description of Figure 6.2: Photographs of the ZigBee Contact Sensor Reference Design board, highlighting the front and back views and labeled components like the EM3587, Si7053, reed switch, and pushbutton.]
PCB Test Points
[Description of Figure 6.3: Photograph of the ZigBee Contact Sensor Reference Design board, indicating PCB test points.]
Pin Number | Pin Name | Pin Functions | Description |
---|---|---|---|
1 | VBRD | Supply Voltage | |
2 | PC2 | JTDO/ SWO | JTAG Data Out, Serial Wire Out |
3 | PC0 | nJRST | JTAG Reset |
4 | PC3 | JTDI | JTAG Data In |
5 | GND | Ground | |
6 | SWCLK | JTCK/SWCLK | JTAG Clock, Serial Wire Clock |
7 | PC4 | JTMS/SWDIO | JTAG Mode Select, Serial Wire Data In/Out |
8 | nRESET | EM3xx Reset | |
9 | PA4 | PTF | Packet Trace Enable |
10 | PA5 | PTD | Packet Trace Data |
Note: The debug connector is compatible with the ISA3 packet trace port connector when placed on the bottom side of the PCB.
6.2 Hardware Modification Guidelines
For users who wish to modify the reference design, we offer guidelines below for what to expect in the modification process.
6.2.1 Alternate Footprint Parts
- Alternate type reed switch + support circuitry.
- SOT23 footprint for hall-effect sensor.
6.2.2 Avoid Modification
All changes listed here may have serious impacts on performance:
- Modifying the spacing between the EM3587 and balun.
- Changing the PCB antenna length/shape.
- Changing any part of the ground pour area.
6.2.3 Bill of Material Cost-Saving Options
To further reduce overall bill-of-material (BOM) cost of this contact sensor, the following items and their supporting circuitry can be considered for removal:
- J3 programming header.
- U3 external flash.
- U5 Si7053 temperature sensor.
7. Firmware
This section describes the Contact Sensor reference design application firmware.
7.1 Obtaining the Firmware Application
The firmware application in pre-compiled binary form is available for download from: http://www.silabs.com/zigbeecontactsensor. The firmware application source code is available as part of EmberZNet PRO, which is available to registered users of a development kit. For more information visit the ZigBee Getting Started page.
7.2 Programming the Contact Sensor Reference Design
The reference design provides two methods to reprogram the demo board:
- Using the ISA3 header with an .s37 or .hex image file.
- Using the over-the-air (OTA) upgrade feature with an .ota image file.
7.2.1 Board Header Reprogramming
The contact sensor can be reprogrammed with an available .s37 or .hex file and an ISA3 programmer. Please refer to Silicon Labs' UG110: "Ember® EM35x Development User's Guide" for more information on how to successfully program the contact sensor with an ISA3 programmer. The ISA3 connector on the contact sensor is the J3 header. Notice the orientation of the connector, where the keyed side of the connector corresponds to the ISA3 key marking found with the silkscreen drawing surrounding the J3 header.
7.2.2 Over-the-Air Repregramming
The demo board can be reprogrammed with an available .ota file and a device that can perform OTA upgrades such as the RD-0002-0201 ZigBee USB Gateway Kit supported by Silicon Labs. Refer to the gateway documentation for more information on how to reprogram via OTA upgrade.
7.3 Build Instructions
The instructions below describe how to build the device firmware.
- Install EmberZNet PRO. Note: You must have installed Ember Desktop version 3.3 build 1913 or later for this stack release to work.
- Create a new Application Framework Configuration in AppBuilder and select the 5.4.4 stack release.
- Create a project using HaContactSensor sample application.
- In AppBuilder, under the "hal configuration tab", select the EM3587 chip.
- Generate and note the directory in which the project files were created.
- Save the Ember Desktop project file into the directory you just created.
- Compile in IAR version 7.30.1 or later.
At this point you can load the image onto the Contact Sensor reference design.
7.4 Cluster Support
This section details clusters that were implemented as part of this project.
- Basic
- Power Configuration
- Identify
- OTA Boot-loading
- Poll Control
- Temperature Measurement
- IAS Zone
- Diagnostics
8. Engineering Tests
This reference design completed the following product testing for pre-certification purposes:
- ZigBee Home Automation (HA) v1.2
- FCC Emissions
- Antenna Radiation Patterns
8.1 ZigBee Home Automation HA v1.2
The contact sensor went through a preliminary HA 1.2 testing to verify their compliance with the ZigBee standard.
8.2 FCC Emissions Testing
This design went through a preliminary FCC pre-scan testing to verify compliance with FCC Part 15 restrictions. Such testing is done to ensure customers are given a design that can pass FCC. FCC compliance does not transfer to modules built according to this reference design, even if the design is copied exactly.
9. Manufacturing Tests
This section describes how a user can develop a low-cost manufacturing test methodology in order to test products that utilize this reference design. Recommended test equipment and test procedures will also be outlined in this section.
9.1 Test Coverage
By following these guidelines, the following items will be tested and verified for functionality:
- RF TX/RX performance
- Current consumption
- Magnetic sense functionality
- Common ZigBee operations
- Frequency offset (with optional spectrum analyzer)
9.2 Test Equipment List
The test system is composed of the following components:
- Desktop PC
- RF Shielded Box
- Power Supply (Agilent E3646A)
- PoE Hub (Netgear Prosafe 108P)
- 2x ISA3 programming/packet trace adapters (Silicon Labs ISA3)
- Golden Node (Silicon Labs ZigBee coordinator device)
- Spectrum Analyzer (Agilent E4407B)
- Device Under Test (DUT)
9.3 Test System Diagram
[Description of Figure 9.1: Diagram of the manufacturing test system setup, showing connections between a PC, PoE Hub, ISA3 adapters, Golden Node, Spectrum Analyzer, Shielded Box, DUT, and Magnet.]
9.4 Test System Connection Procedure
Wire the system as indicated above. Both ISA3 adapters and the PC will be connected to the PoE hub. One ISA3 adapter will connect to the DUT, to both reprogram and interact with the DUT, whereas the second ISA3 adapter will connect to the Golden Node for testing network functionality. The ISA3 Adapters connected to the DUT should never be turned off. Instead, the DUT will be powered from the Power Supply for live current measurements.
Within the shielded box the only items protruding inward should be the connectors linked to the DUT, the magnet and connectors for 50 Ω antennas. If desired, a spectrum analyzer may be procured and integrated into the system to measure frequency offset.
A controllable electro-magnet can be used to verify correct installation of the reed switch.
9.5 Configuring the ISA3 Adapters
For this setup, the PC will communicate to the ISA3 Adapter with an Ethernet connection over Telnet. To do this, first the ISA3 adapters need to be configured to use a static IP address. For instructions on how to setup static IPs, reference Chapter 6.3 and 6.4 in Silicon Labs' UG110: "Ember® EM35x Development User's Guide". Use the Admin interface over USB to set up the ISA3 adapters.
9.6 Communicating with Targets
For testing purposes, the nodetest will be used. Through the telnet interface, both the ISA3 adapters and their respective connected targets can be communicated with simultaneously. To communicate with the ISA3 adapters, a telnet session should be opened to its static IP at port 4902. To communicate with a target connected to the ISA3 adapter though virtual UART, connect to the ISA3's static IP at port 4900.
Once connected, pressing Enter, or sending a '\r\n' sequence will result in a prompt ending with a '>' character.
9.7 Additional Details
For a more thorough checklist, refer to application note, AN700: "Manufacturing Test Guidelines for the Ember EM250, EM260, and EM35x" or contact Silicon Labs (http://www.silabs.com) for additional information.
Simplicity Studio
One-click access to MCU tools, documentation, software, source code libraries & more. Available for Windows, Mac and Linux!
Disclaimer
Silicon Laboratories intends to provide customers with the latest, accurate, and in-depth documentation of all peripherals and modules available for system and software implementers using or intending to use the Silicon Laboratories products. Characterization data, available modules and peripherals, memory sizes and memory addresses refer to each specific device, and "Typical" parameters provided can and do vary in different applications. Application examples described herein are for illustrative purposes only. Silicon Laboratories reserves the right to make changes without further notice and limitation to product information, specifications, and descriptions herein, and does not give warranties as to the accuracy or completeness of the included information. Silicon Laboratories shall have no liability for the consequences of use of the information supplied herein. This document does not imply or express copyright licenses granted hereunder to design or fabricate any integrated circuits. The products must not be used within any Life Support System without the specific written consent of Silicon Laboratories. A "Life Support System" is any product or system intended to support or sustain life and/or health, which, if it fails, can be reasonably expected to result in significant personal injury or death. Silicon Laboratories products are generally not intended for military applications. Silicon Laboratories products shall under no circumstances be used in weapons of mass destruction including (but not limited to) nuclear, biological or chemical weapons, or missiles capable of delivering such weapons.
Trademark Information
Silicon Laboratories Inc., Silicon Laboratories, Silicon Labs, SiLabs and the Silicon Labs logo, CMEMS®, EFM, EFM32, EFR, Energy Micro, Energy Micro logo and combinations thereof, "the world's most energy friendly microcontrollers", Ember®, EZLink®, EZMac®, EZRadio®, EZRadioPRO®, DSPLL®, ISOmodem®, Precision32®, ProSLIC®, SiPHY®, USBXpress® and others are trademarks or registered trademarks of Silicon Laboratories Inc. ARM, CORTEX, Cortex-M3 and THUMB are trademarks or registered trademarks of ARM Holdings. Keil is a registered trademark of ARM Limited. All other products or brand names mentioned herein are trademarks of their respective holders.
Silicon Laboratories Inc.
400 West Cesar Chavez
Austin, TX 78701
USA
http://www.silabs.com