Cricket: Tutorial On Using Cricket Location System
Cricket: Tutorial On Using Cricket Location System
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial
Cricket Goals
Research prototype
build and then evaluate
Useful mainly indoor environments
walls, ceilings not too far
Recognize spaces, not just physical position
good boundary detection is important
doors, floors, etc.
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 2
Features
Distributed architecture
No wired infrastructure
Easy deployment (no satellites)
Low maintenance
Users are not tracked
Listeners are passive
Large number of listeners w/o
interference
Integrates with a wide range of resource
discovery systems
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 3
Cricket: Private location-
support
space = “a2”
Beacon
space = “a1”
Pick nearest to
Listener infer space
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial
Finding the distance
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 5
Finding the distance
Synchronized clocks
receiver knows exactly when transmitter
sent signal
how about sending signal first to sync
clocks and then 2nd signal?
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 6
Finding the distance
We measure delay: m = t1 - t2
t2 = m * s1/(s2 - s1)
d = m * s2 s1 /(s2 - s1)
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 7
Location Estimation
• Distance estimation via coupled RF and ultrasonic
signals
– Beacons send information on the RF channel with concurrent
ultrasonic pulse
Beacon
RF info
Ultrasound
(pulse)
Listener
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 8
Multiple Beacons
Beacon A Beacon B
Incorrect distance
Listener t
RF B RF A US B US A
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 10
Solution
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 11
Bounding Stray Signal
Interference
RF A US A t
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 12
Bounding Stray Signal
Interference
S/b
S = size of space advertisement
b = RF bit rate
r = ultrasound range t
v = velocity of ultrasound r/v (max)
S r
b v
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 13
Bounding stray signal interference
RF B US B
RF A US A t
• Envelop ultrasound by RF
• Interfering ultrasound causes RF signals to collide
• Listener does a block parity error check
– The reading is discarded...
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 14
Problem: Closest Beacon May
Not Reflect Correct Space
Room A Room B
I am at
B
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 15
Correct Beacon Placement
Room A Room B
x x
I am at
A
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 16
Implementation
• Cricket beacon and listener
RF RF
Micro- Micro-
controller controller
RS232
US US
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 17
CricketUltrasonic
v1 Prototype
RF module (xmit)
sensor
RF module (rcv) RF antenna
Listener Beacon
Atmel
processor
RS232
i/f
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 18
Cricket Beacon LEDs
Debug Switch = UP
Green LED = Transmit
Red LED = Carried Sensed
At Startup
LEDs flash version number
Red on, Green flash count =
Major # Power
Switch
Green on, Red flash count = On
Minor # Off
Power Switch
Up = On Debug Switch
Beacon ID
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 20
Cricket Beacon Antennas
Receive antenna
Transmit antenna
Receive Antenna
For sensing
transmission of other
beacons
Transmit Antenna
Limit transmission
distance
Should not touch
ultrasound
Should not cover
receive antenna
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 21
Listener LEDs
Green Flash
Received valid RF and ultrasound
Red+Green Flash
RF Error (e.g., parity error)
Power On
Both LEDs flash together once
Off On
Power Switch
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 22
Software Components
ASCII data
over serial port
9600 baud
Cricket
Beacon Application 1
1
Cricket
Listener cricketd Application 2
Cricket
Beacon Application 3
2
ASCII data
Binary Data on TCP sockets (port 2947)
Over RF
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 23
cricketd
Background program (demon) that reads serial port and writes data
to a socket
Command line arguments (defaults work correctly on ipaq)
-T k Version 3 Listeners (with LEDs) (default)
-T c Version 2 Listeners (without LEDs)
-S <port> Socket port number (default is 2947)
-p <dev> Serial port device name (default “/dev/ttySA0”)
-s <baud> Baud rate of serial port (default is 9600)
-h Help
-D <num>Debug level
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 24
Cricket Listener Output
Strings reported from Listeners
When good RF and good ultrasound pulse heard:
“$Cricket2,ver=3.0,space=MIT7,id=20,dist=4F,duration=1A”
dist
t
duration
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 25
Speed of Sound
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 26
So where are you?
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial
So whre are you?
Beacon name may tell you room
That may be enough
May want to know relative movements
As you walk around the room
No climbing on tables
Can you do it using two beacons?
Can you do it without calibration?
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial
Two beacons
Put them along the wall
Come very close to one of them
Now know distance between them
Given distances from both
Before and now (d1,d2) & (e1,e2)
Can find relative movement
Two solutions! No problem, why?
Ex. Doom virtual world
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial
Orientation
Beacons on
ceiling
Orientation relative to B
on horizontal plane
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 30
Hardware Design
http://nms.lcs.mit.edu/projects/cricket
http://nms.lcs.mit.edu/cricket/fab
Need user & password
http://nms.lcs.mit.edu/cricket/distrib
Need user & password
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture Cricket tutorial 31