Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lab 4 ZigBee & 802.15.4 with PICDEM Z Boards 55:088 Fall 2006.

Similar presentations


Presentation on theme: "Lab 4 ZigBee & 802.15.4 with PICDEM Z Boards 55:088 Fall 2006."— Presentation transcript:

1 Lab 4 ZigBee & 802.15.4 with PICDEM Z Boards 55:088 Fall 2006

2 Everyone has heard of 802.11 (Wi-Fi)… IEEE 802.11 features: Ethernet matching speed, Long range(30-90m) Complexity to handle seamless roaming Message forwarding Data throughput of 2-11Mbit/s

3 …so what is 802.15? Specializes in Wireless PAN (Personal Area Network) standards Specializes in Wireless PAN (Personal Area Network) standards 802.15.1 – a.k.a. Bluetooth(1 Mbps) 802.15.1 – a.k.a. Bluetooth(1 Mbps) 802.15.2 - Deals with coexistence of Wireless LAN (802.11) and Wireless PAN 802.15.2 - Deals with coexistence of Wireless LAN (802.11) and Wireless PAN 802.15.3 - High-rate WPAN standards (Wireless USB) 802.15.3 - High-rate WPAN standards (Wireless USB) 802.15.4 – a.k.a ZigBee, low-data rate, low-power networks 802.15.4 – a.k.a ZigBee, low-data rate, low-power networks

4

5 What is ZigBee about? ZigBee can be found in embedded applications requiring low data rates and low power consumption ZigBee can be found in embedded applications requiring low data rates and low power consumption Fortunately, it is (relatively) low complexity as well Fortunately, it is (relatively) low complexity as well Applications include: Applications include: Embedded sensors Embedded sensors Medical devices Medical devices Smoke and intruder alarms Smoke and intruder alarms Home automation Home automation PC peripherals PC peripherals

6 ZigBee/802.15.4 features Transmission range: Transmission range: 10m – 75m 10m – 75m Three operating bands: Three operating bands: 868 MHz (20kbps) (ch. 0) 868 MHz (20kbps) (ch. 0) 915 MHz (40kbps) (ch. 1-10) 915 MHz (40kbps) (ch. 1-10) 2.4 GHz (250kbps) (ch. 11-26) * 2.4 GHz (250kbps) (ch. 11-26) * Three types of networks: Three types of networks: Star * Star * Cluster Cluster Mesh Mesh

7 Channel Spacing In the 2.4GHz band, each channel is about 3MHz wide

8 Types of IEEE 802.15.4 nodes Full Function Devices (FFDs) Full Function Devices (FFDs) Every network needs to have at least one FFD that acts as a Coordinator Every network needs to have at least one FFD that acts as a Coordinator FFDs are always powered on FFDs are always powered on Maintain the state of the network so that RFDs can save battery power Maintain the state of the network so that RFDs can save battery power Require more system resources (memory especially) in order to keep track of network state, addresses, routes, messages Require more system resources (memory especially) in order to keep track of network state, addresses, routes, messages

9 Types of IEEE 802.15.4 nodes Reduced Function Devices (RFDs) Reduced Function Devices (RFDs) Can only talk with FFDs Can only talk with FFDs Spend most of time powered down, will not receive messages when off Spend most of time powered down, will not receive messages when off Wake up occasionally and ask to see if they have a packet(s) waiting for them from their parent node (FFD) Wake up occasionally and ask to see if they have a packet(s) waiting for them from their parent node (FFD)

10 Types of ZigBee nodes Coordinator Coordinator This is an FFD This is an FFD Only one per network, is in charge of forming it Only one per network, is in charge of forming it Router Router This is an FFD This is an FFD Optional node that extends the range of the network Optional node that extends the range of the network End End This is an RFD (usually) the performs monitoring and/or control functions This is an RFD (usually) the performs monitoring and/or control functions

11 How does ZigBee form networks? Basic Type: Star Networks Basic Type: Star Networks

12 How does ZigBee form networks? More Complex: Cluster Network More Complex: Cluster Network

13 How does ZigBee form networks? Very Complex: Mesh Networks Very Complex: Mesh Networks

14 What does this have to do with 55:088? Lab 4 will be using 802.15.4 radios to create a wireless serial link between two nodes Lab 4 will be using 802.15.4 radios to create a wireless serial link between two nodes Each group will be provided with the pair of wireless radios on development boards from Microchip Each group will be provided with the pair of wireless radios on development boards from Microchip These kits are NOT to be removed from the lab These kits are NOT to be removed from the lab

15 PICDEM Z Boards

16 CC2420 Radio IC 2.4 GHz RF Transceiver 2.4 GHz RF Transceiver Connect to microcontrollers via SPI Connect to microcontrollers via SPI Comes on a daughter board with the PICDEM Z kit Comes on a daughter board with the PICDEM Z kit 250 kbps data rate 250 kbps data rate 2.1V – 3.6V 2.1V – 3.6V 19.7 mA (RX) 19.7 mA (RX) 17.4 mA (TX) 17.4 mA (TX)

17 18LF4620

18 18LF4620 Microcontroller found with the PICDEM Z kits Microcontroller found with the PICDEM Z kits Overall, very similar to the 18F452 Overall, very similar to the 18F452 Biggest difference that will matter to you is that these operate at 3.3V, instead of 5V Biggest difference that will matter to you is that these operate at 3.3V, instead of 5V Use the MPLAB and C18 compiler to write code for the PIC Use the MPLAB and C18 compiler to write code for the PIC

19 18LF4620 on the PICDEMZ Pin 1 = Reset Button Pin 1 = Reset Button Pin 2-3 = LEDs Pin 2-3 = LEDs Pin 11-12 = Power Pin 11-12 = Power Pin 13-14 = 4 MHz XTL Pin 13-14 = 4 MHz XTL Pin 15-18 = CC2420 Pin 15-18 = CC2420 Pin 23-24 = CC2420 Pin 23-24 = CC2420 Pin 25-26 = USART Pin 25-26 = USART Pin 31-32 = Power Pin 31-32 = Power Pin 33-36 = CC2420 Pin 33-36 = CC2420 Pin 37-38 = Interrupt Buttons Pin 37-38 = Interrupt Buttons Pin 39-40 = ICD 2 Pin 39-40 = ICD 2

20 Lab 4 Overview A text-input GUI on a computer will connect via RS-232 to one of the PICDEM Z boards (we’ll call this the Base Station) A text-input GUI on a computer will connect via RS-232 to one of the PICDEM Z boards (we’ll call this the Base Station) The other PICDEM Z board will be connected to a Liquid Crystal Display (LCD) that will display the text messages from the base station (we’ll call this the Remote Station) The other PICDEM Z board will be connected to a Liquid Crystal Display (LCD) that will display the text messages from the base station (we’ll call this the Remote Station)

21 Lab 4 Overview The remote station will have a couple of “switches” which will either indicate an “on” or “off” state The remote station will have a couple of “switches” which will either indicate an “on” or “off” state The switch states need to be sent back to the base station and displayed on the base station GUI The switch states need to be sent back to the base station and displayed on the base station GUI

22 Example Layout

23 PICDEM Z with LCD

24 GUI Layout on Base Station Use whatever language you wish to create the GUI… Use whatever language you wish to create the GUI…

25 Tools that you will use… Microchip has developed code that makes interfacing with the 802.15.4 radios vastly easier Microchip has developed code that makes interfacing with the 802.15.4 radios vastly easier This is called the “stack” This is called the “stack” IEEE 802.15.4 ZigBee Template & Your Code

26 Tools that you will use… In order to utilize the stack: In order to utilize the stack: MPLAB v 7.41 MPLAB v 7.41 C18 Compiler C18 Compiler Microchip ZigBee stack v 3.5 Microchip ZigBee stack v 3.5 ZENA Stack Configuration Tool ZENA Stack Configuration Tool Look at example files: Look at example files: C:\MpZBee\DemoCoordinator\ C:\MpZBee\DemoCoordinator\ C:\MpZBee\DemoRFD\ C:\MpZBee\DemoRFD\ Do NOT alter files in the Stack directory as this could cause the computer (or worse, the TA) to explode Do NOT alter files in the Stack directory as this could cause the computer (or worse, the TA) to explode “Look, but don’t touch” “Look, but don’t touch”

27 ZENA Found in the MpZBee directory

28 ZENA

29 ZENA

30 Profiles and Endpoints You will need to select a profile or create your own to detail how components interface with one another You will need to select a profile or create your own to detail how components interface with one another A functional block of code that supports a component is called an endpoint A functional block of code that supports a component is called an endpoint For the lab, best option is to use the zHCLighting.h profile provided with the stack and make a few changes For the lab, best option is to use the zHCLighting.h profile provided with the stack and make a few changes

31 Zigbee.def Created by ZENA Created by ZENA It selects many key parameters that will define how a particular node will operate: It selects many key parameters that will define how a particular node will operate: Specify Coordinator, Router, or End Device Specify Coordinator, Router, or End Device Frequencies (channels) to operate on Frequencies (channels) to operate on Power mode Power mode Node address Node address As well as many other network factors… As well as many other network factors…

32 zLink.lkr Created by ZENA Created by ZENA Allocates RAM and ROM Allocates RAM and ROM Reserves space on the PIC for the stack (differs for RFD and FFD) Reserves space on the PIC for the stack (differs for RFD and FFD) Reserves space on the PIC for received messages and messages to be sent Reserves space on the PIC for received messages and messages to be sent Don’t modify what ZENA generated Don’t modify what ZENA generated

33 myZigBee.c Defines ZigBee network parameters Defines ZigBee network parameters ZigBee Device Object Endpoint ZigBee Device Object Endpoint References Zigbee.def to fill out some of the parameters References Zigbee.def to fill out some of the parameters Suggestion: Compare to the myZigBee.c files found in the demo programs to help understand how endpoints work Suggestion: Compare to the myZigBee.c files found in the demo programs to help understand how endpoints work

34 How is a message formatted?

35


Download ppt "Lab 4 ZigBee & 802.15.4 with PICDEM Z Boards 55:088 Fall 2006."

Similar presentations


Ads by Google