RADIO, RF Concepts, and TOS Radio Stack Mote Radio Architecture RF Propagation Information Transport TOS Messaging & Radio Stack Mote Radio Control SMARTER SENSORS IN SILICON 1
ChipCon Radio System Single IC Transceiver Dual Band 433MHz and 915MHz ISM Bands 38.4KBit/sec Data Rate FSK Low Power 16mA Tx / 9mA Rx Programmable Configuration SMARTER SENSORS IN SILICON 2
Chipcon CC1000 Block Diagram SMARTER SENSORS IN SILICON 3
Chipcon-ATMega Interface Configuration Interface Communication Interface Data uses ATMega SPI Port CC1000 is SPI Master SPI Port Rx Double Buffer (more later) Tx Single Buffer (more later) SMARTER SENSORS IN SILICON 4
RF Modulation - FSK 0 1 64KHz Separation Frequency SMARTER SENSORS IN SILICON 5
Manchester Encoding Every Bit (Zero or One) has a transition Guarantees no run of NRZ ones or zeros Simplifies Clock Recovery at Receiver Implemented in CC1000 hardware SMARTER SENSORS IN SILICON 6
RF Frequencies & Channels ISM Bands 902 928 MHz US 433 434.8 MHz Europe RF Channel Programmable within a band Mote is manufactured for specific band 916/868MHz : Model MPR400/500 433MHz : Model MPR410/510 315MHz: Model MPR420/520 SMARTER SENSORS IN SILICON 7
Mica2 has MMCX RF connector Where to get mating connectors An External Antenna with ground plane give about 2x distance improvement Antennas SMARTER SENSORS IN SILICON 8
Monopole Antenna ¼ wavelength Wire is sufficient for most applications 916Mhz => 3.2 wire length 433Mhz => 6.8 wire length Mounting above a ground plane helps SMARTER SENSORS IN SILICON 9
Commercial Antennas Linx ANT-xxx-JJB-RA, 916Mhz, 1/4 wave (Doesn t fit on Mica2 until next rev). About 0.5 distance attenuation Linx ANT-xxx-CW-QW, 433Mhz, 916Mhz ¼ wave. Good if you re putting the mica2 in an enclosure SMARTER SENSORS IN SILICON 10
Antennas and Radio Transmission Antenna Height 300 ft / 100m Range when Antenna is 3ft/1m off ground 30 ft / 10m range with Antenna at ground level Frequency Band 433 Mhz, 500ft/150m Range 915 MHz 300ft/100m Range SMARTER SENSORS IN SILICON 11
Polarization Radiation is Polarized. Vertical orientation of all antennas in a system is best. Range drops to 1/10 th when antennas are not aligned (mismatched polarization) E Field with Vertical Polarization SMARTER SENSORS IN SILICON 12
Signal Path Path Profile characteristics may change over time, due to obstacles such as people, vehicles, etc. SMARTER SENSORS IN SILICON 13
Radio Signal Propagation Line of Sight Direct path from Transmitter to Receiver Free space attenuation 1/d 2 Doubling the range requires 4x power Reflection Off objects large compared to Wavelength walls, buildings Scattering Off objects smaller than Wavelength foliage, chairs SMARTER SENSORS IN SILICON 14
MultiPath Multi-path fading effects: Rapid changes in signal strength over a small time interval Random frequency modulation due to varying Doppler shifts on different multi-path signals Time dispersion caused by multi-path propagation delay. 180 Phase Interference creates NULLS Zero signal strength Tx Rx SMARTER SENSORS IN SILICON 15
3 db Rule dbm = 10 x log[power in Watts / 0.001W] 0 dbm = 1 milliwatt -3 db = 1/2 power -6 db = 1/4 power +3 db = 2x power +6 db = 4x power SMARTER SENSORS IN SILICON 16
Indoor Propagation Rapid Signal Attenuation 1/d 3 or 4 Doubling the Range requires 8-16x the Power People moving thru path cuts range to 1/3 Concrete/Steel Flooring to 1/4 Metallic Tinted Windows to 1/3 SMARTER SENSORS IN SILICON 17
Dynamic Fade Effects People Moving, Doors Opening & Closing Eg. Closing doors in a lab changes Strong (Green) to Weak (Blue) RF Regions SMARTER SENSORS IN SILICON 18
Common RF Link Problems Signal Strength Weak, Overload Collisions Other Motes (GroupID filter does not prevent collisions!) Interferers ISM Bands are getting crowded Multi-path Cross-talk Adjacent RF Channels SMARTER SENSORS IN SILICON 19
RF Link Metrics Packet Loss Application Layer Bit Error Rate Link Layer RSSI Received Signal Strength Physical Layer dbm SMARTER SENSORS IN SILICON 20
RF Solutions Signal Power & Wavelength Transmitter Power Level Antenna Efficiency Monopole vs. Dipole Antenna Orientation Antenna Placement Ground Plane Off Ground RF Band Choice Installation 433MHz vs. 916MHz RF Channel selection default static / compile time Frequency Hopping dynamic / run time SMARTER SENSORS IN SILICON 21
MICA2 TOS Wireless Packet Messages are built into packets Preamble for Receiver data & clock recovery Frame Sync indicates start of Message MAC Delay Preamble Sync TOS Message 1-128 18 2 36 Radio to TX Mode 56 Radio to RX Mode 250µs 250µs SMARTER SENSORS IN SILICON 22
TOS Message Structure HEADER(5) PAYLOAD(29) CRC(2) Header Address (2bytes) Active Message Type (1byte) Group ID (1 byte) Payload Length (1byte) Payload 29 bytes User / Application Message CRC 2 bytes SMARTER SENSORS IN SILICON 23
COMMUNICATION STACK Send(TOSMsg) Receive Event(TOSMsg) Control (Freq,Power,etc) CC1000Control Generic Comm AM CC1000RadioC CC1000RadioIntM UART Wires the control and data paths: Implementation hidden from app SpiByteFifo RandomLFSR ADC SMARTER SENSORS IN SILICON 24
GenericCom Stack AM Handling & RF/UART SMARTER SENSORS IN SILICON 25
Radio Stack CC1000Radio SMARTER SENSORS IN SILICON 26
TOS Message Transmission TOS Message is travels down the Stack GenericCom AM Handler Build Header: Source Address, AM ID, Address Hand off to Radio or UART Communication channel Random Delay (up to 15 packet times) Check for Collision (CSMA) Turn On Transmitter & Send Packet over SPI Port 18-byte Preamble (10101 pattern) & Frame Sync TOS Message (34 bytes) & CRC (2 bytes) Turn Off Transmitter & Signal TxDone Event to Application SMARTER SENSORS IN SILICON 27
Radio Hardware Interface Data/ Noise streams in to SPI Port from CC1000 at 19.2Kb/s rate SPI Port Interrupt every 416uSec (8bits) Triggers RadioIntM.nc Module SPI Rx Data 0 1 0 1 0 1 0 1 Rx Byte Interrupt 0 1 0 1 0 1 0 1 Tx Byte SMARTER SENSORS IN SILICON 28
TOS Message Reception RadioIntM.nc SPI Port Interrupt Handler Search for Preamble Pattern (10101) Wait for Frame Sync word Assemble TOS Packet Check CRC reject if bad Route to Active Message Handler Check Group ID reject if not match Signal Application ReceivedMsg Event Application GenericCom AM RadioIntM SMARTER SENSORS IN SILICON 29
CC1000RadioInt State Machine Radio SPI Data Port Interrupt triggers every 8 bit times = 416uSec Major States IDLE RX Related: Sync, Packet Assemble TX Related: Collision Sense, Preamble, Sync, Packet, CRC, Flush,Done Graphically SMARTER SENSORS IN SILICON 30
IDLE TX Delay = 0 Collision Error PRE- TX No Sync Preamble TX Error No Collision SYNC CRC or Length Error Sync OK POST PacketReceived RX Count<Length RX TX (substates) POST PacketSent SMARTER SENSORS IN SILICON 31
TOS Radio Controls - Frequency Frequency Band / RF Channel Choices #define CC1K_433_002_MHZ 0x00 #define CC1K_916MHZ 0x01 Specify CC1K_DEFAULT_FREQ in makefile CFLAGS d:cc1k_default_freq=cc1k_916mhz 433MHz is defaultin../platform/mica2/cc1000const.h SMARTER SENSORS IN SILICON 32
TOS Radio Controls - Power Power On / Off Sleep ~ 2uA Radio Signal Strength (RSSI Valid) ~ 20uS Receiver Packet Acquire Time ~3mSec Re-TUNE Radio after a power off/on cycle command result_t Tune(uint8_t freq); RF Power Level (@ 915MHz) command result_t SetRFPower(uint8_t power); 0xFF is 5dBm 0x80 is 0 dbm (1mW) 0x09 is 10dBm SMARTER SENSORS IN SILICON 33
Important RF Issues Different Motes for Different ISM Bands Re-tune after Sleep or Temperature changes Keep Motes separated >1m Watch out for Multi-path effects Different Group Ids do NOT prevent RF interference SMARTER SENSORS IN SILICON 34
Radio Debugging Hints Correct Radio Frequency? CC1K_DEFAULT_FREQ Correct GroupID? GenericBase Hangup Press RESET button RF Null Location? Move Mote to different location (+/- 1m) RF Overload Separation >3m SMARTER SENSORS IN SILICON 35
Conclusion Mote Radio Architecture Information Transport RF Propagation TOS Messaging Mote Radio Control SMARTER SENSORS IN SILICON 36