977  Zigbee Exercises and Knowledge Checks

Practice problems and interactive quizzes to test your Zigbee understanding

977.1 Learning Objectives

By completing these exercises, you will:

  • Reinforce your understanding of Zigbee concepts through practical scenarios
  • Apply protocol knowledge to real-world design problems
  • Identify common deployment mistakes and their solutions
  • Test your readiness for Zigbee implementation projects

977.2 Knowledge Checks

Test your understanding with these interactive questions covering key Zigbee concepts.

977.3 Practice Exercises

977.3.1 Exercise 1: Smart Home Network Design

Objective: Design a Zigbee network topology for a residential deployment.

Scenario: Plan a 25-device Zigbee network for a 2-story house (200 mΒ²): - 10 smart light bulbs (mains-powered, ceiling fixtures) - 8 door/window sensors (battery-powered, 5-year life expected) - 5 motion detectors (battery-powered) - 1 smart thermostat (wired to HVAC 24V power) - 1 Zigbee coordinator (SmartThings hub, plugged in)

Tasks:

  1. Classify each device as Coordinator, Router, or End Device based on power source
  2. Draw the network topology showing mesh backbone and parent-child relationships
  3. Calculate mesh coverage with 15-meter router range
  4. Identify single points of failure

Device Classification: - 1 Coordinator: Hub - 11 Routers: 10 bulbs + 1 thermostat (mains-powered) - 13 End Devices: 8 door sensors + 5 motion sensors (battery)

Coverage Calculation: - 200 mΒ² house with 11 routers - Each router covers ~150 mΒ² (10m radius) - 11 Γ— 150 = 1,650 mΒ² coverage (8x redundancy!) - Excellent mesh backbone

Single Points of Failure: - Coordinator (hub) - if it fails, no network management - Solution: Regular backup of coordinator config

977.3.2 Exercise 2: Wi-Fi Coexistence Planning

Objective: Optimize Zigbee channel selection for minimal Wi-Fi interference.

Scenario: Your Wi-Fi router uses channel 6. Your neighbor’s Wi-Fi uses channel 1. Microwave oven operates during lunch hours.

Tasks:

  1. Map Wi-Fi channel overlap with Zigbee channels
  2. Identify safe Zigbee channels
  3. Recommend primary and backup channels
  4. Describe interference mitigation for microwave

Wi-Fi-Zigbee Overlap:

Wi-Fi Ch 1 (2.401-2.423 GHz) β†’ Zigbee Ch 11-14 ❌
Wi-Fi Ch 6 (2.426-2.448 GHz) β†’ Zigbee Ch 15-20 ❌

Safe Channels: - Channels 25-26 (2.475-2.480 GHz) - above both Wi-Fi networks

Recommendation: - Primary: Channel 26 - Backup: Channel 25

Microwave Mitigation: - Microwaves blast entire 2.4 GHz (uncontrolled emissions) - Accept brief outages during cooking (1-3 minutes) - Use Zigbee retry mechanisms - Consider Sub-GHz Zigbee (868/915 MHz) for critical applications

977.3.3 Exercise 3: AODV Routing Simulation

Objective: Understand AODV route discovery through manual simulation.

Scenario: Network topology:

Coordinator (0x0000) ← β†’ Router1 (0x0001) ← β†’ Router2 (0x0002)
                    ↑                              ↑
               EndDevice (0x0003)           Router3 (0x0004)

EndDevice 0x0003 sends temperature reading to Coordinator 0x0000.

Tasks:

  1. Trace RREQ broadcast from EndDevice
  2. Show RREP return path
  3. Calculate route: source β†’ destination
  4. Simulate Router1 failure and re-routing

RREQ Broadcast:

1. 0x0003 broadcasts RREQ "Looking for 0x0000"
2. 0x0001 (Router1) receives, forwards
3. 0x0000 receives directly from 0x0001

RREP Return:

1. 0x0000 sends RREP to 0x0001 "I'm 0 hops away"
2. 0x0001 forwards RREP to 0x0003 "Route via me, 1 hop"

Established Route:

0x0003 β†’ 0x0001 β†’ 0x0000 (2 hops)

Router1 Failure Scenario:

1. 0x0003 sends data to 0x0001
2. No ACK received (3 retries, 300ms)
3. Mark route invalid, broadcast new RREQ
4. If Router2 (0x0002) or Router3 (0x0004) in range:
   0x0003 β†’ 0x0002 β†’ 0x0000
5. If not in range: Device orphaned, rejoin needed

977.3.4 Exercise 4: Battery Life Calculation

Objective: Calculate expected battery life for a Zigbee sensor.

Scenario: Temperature sensor specifications: - Battery: CR2450 (620 mAh) - Reporting interval: 5 minutes - Active current: 20 mA for 10ms transmission - Sleep current: 5 Β΅A - Parent poll interval: 30 seconds, 15ms at 18mA

Tasks:

  1. Calculate daily energy consumption
  2. Estimate battery life in years
  3. Identify the dominant power consumer
  4. Propose optimization to extend battery life

Daily Energy Calculation:

Transmissions: 24 hours Γ— 12/hour = 288 transmissions
TX energy: 288 Γ— 10ms Γ— 20mA = 57.6 mAs = 0.016 mAh/day

Polls: 24 hours Γ— 120/hour = 2,880 polls
Poll energy: 2,880 Γ— 15ms Γ— 18mA = 777.6 mAs = 0.216 mAh/day

Sleep: ~86,400 seconds Γ— 5Β΅A = 0.432 Ah Γ— 1000 = 0.012 mAh/day

Total: 0.016 + 0.216 + 0.012 = 0.244 mAh/day

Battery Life:

620 mAh / 0.244 mAh/day = 2,541 days = 6.96 years

Dominant Consumer: Parent polling (88% of consumption)

Optimization: Increase poll interval from 30s to 60s: - Polls: 1,440/day - Poll energy: 0.108 mAh/day - New total: 0.136 mAh/day - New battery life: 12.5 years

977.3.5 Exercise 5: Security Deployment

Objective: Plan a secure Zigbee deployment.

Scenario: Commercial office with 50 sensors. Requirements: - High security (sensitive data) - No default keys - Auditable device management

Tasks:

  1. Choose commissioning method and justify
  2. Describe secure joining procedure
  3. Plan key backup strategy
  4. Design monitoring/alerting approach

Commissioning Method: Install Codes (High Security) - Each device has unique pre-shared secret - No default keys used over-the-air - Per-device authentication

Secure Joining Procedure:

1. Verify Permit Join is CLOSED
2. Enter device Install Code into Coordinator
3. Open Permit Join for 60 seconds
4. Activate device pairing mode
5. Verify correct device joined (check MAC)
6. Close Permit Join
7. Log join event with timestamp and admin

Key Backup Strategy:

Backup items:
- Network Key (encrypted, HSM if available)
- PAN ID and Extended PAN ID
- Device table export
- Install Code documentation

Storage:
- Encrypted backup file
- Offsite secure storage
- Access limited to 2+ admins
- Test restoration quarterly

Monitoring/Alerting:

Monitor:
- Unauthorized join attempts
- Device offline events
- High retry rates (interference)
- Frame counter anomalies (replay attempts)

Alert thresholds:
- Join attempt when Permit Join closed β†’ Immediate alert
- Device offline > 1 hour β†’ Warning
- > 5% packet loss β†’ Investigate

977.4 Summary

These exercises covered practical Zigbee scenarios:

  • Network Design: Device role classification, topology planning
  • Wi-Fi Coexistence: Channel selection, interference mitigation
  • AODV Routing: Route discovery, self-healing
  • Power Management: Battery life calculation, optimization
  • Security: Commissioning, key management, monitoring

Use these exercises to prepare for real-world Zigbee deployments. The concepts apply whether you’re deploying a small smart home or a large commercial installation.

977.5 What’s Next

In the next chapter, Zigbee Common Mistakes, we examine frequent deployment errors and how to avoid them, learning from real-world troubleshooting experience.