RF concepts

Transcription

RF concepts
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
Frequency
64KHz Separation
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
Antennas
•Mica2 has MMCX
RF connector
•Where to get
mating connectors
• An External
Antenna with
ground plane give
about 2x distance
improvement
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/10th
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/d2
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
SMARTER SENSORS IN SILICON
Rx
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/d3 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
SMARTER SENSORS IN SILICON
RF Band Choice
Installation 433MHz
vs. 916MHz
RF Channel selection
default
static / compile time
Frequency Hopping
dynamic / run time
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
1-128
18
Radio to
TX Mode
TOS Message
2
36
56
Radio to
RX Mode
250µs
250µs
SMARTER SENSORS IN SILICON
22
TOS Message Structure
HEADER(5)
PAYLOAD(29)
Header
Address (2bytes)
Active Message Type
(1byte)
Group ID (1 byte)
Payload Length
(1byte)
SMARTER SENSORS IN SILICON
CRC(2)
• Payload
– 29 bytes User /
Application Message
• CRC
– 2 bytes
23
COMMUNICATION STACK
Send(TOSMsg)
Receive Event(TOSMsg)
Generic Comm
UART
AM
Control
(Freq,Power,etc)
CC1000RadioC
CC1000Control
SpiByteFifo
SMARTER SENSORS IN SILICON
Wires the control
and data paths:
Implementation
hidden from app
CC1000RadioIntM
RandomLFSR
ADC
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 01 0 1 01
0 1 01 0 1 01
SMARTER SENSORS IN SILICON
Rx Byte Interrupt
Tx Byte
28
TOS Message Reception
RadioIntM.nc SPI Port Interrupt
Handler
Search for Preamble Pattern (10101)
Wait for Frame Sync word
Assemble TOS Packet
Application
Check CRC – reject if bad
Route to Active Message Handler GenericCom
Check Group ID – reject if not match AM
Signal Application ReceivedMsg
RadioIntM
Event
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
TX Delay = 0
IDLE
Collision Error
Preamble
TX Error
No Sync
PRETX
No Collision
SYNC
CRC or Length Error
Sync OK
POST PacketReceived
TX
(substates)
RX Count<Length
RX
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