HOW TO LOCATE (ALMOST) ANYTHING 265
Determining Distance
Electronic locating systems like GPS, mobile phone location, and sonar seem magical at
first, because there’s no visible evidence as to how they work. When you break the job
down into its components, it becomes relatively straightforward. Most physical location
systems are based on the same principle. They determine distance from several known
and fixed locations by measuring the energy of an electromagnetic or acoustic wave
coming from the object to be located. Then they combine those measurements to
determine a position in two or three dimensions.
For example, a GPS receiver determines its position on
the surface of the planet by measuring the strength of
received radio signals from several geosynchronous satel-
lites. Similarly, mobile phone location systems measure
the signal strength of the phone at several cell towers.
Sonar and infrared ranging sensors work by sending out
an acoustic signal (sonar) or an infrared signal (IR rangers)
and measuring the strength of that signal when it’s
reflected off the target.
Distance ranging techniques can be classified as active
or passive. In active systems, the target has a radio, light,
or acoustic source on it, and the receiver just listens
for the signal from the target. In passive systems, the
target doesn’t have to have any technology on board. The
receiver emits a signal, and the signal bounces off the
target. Mobile phone location is active, because it relies on
the phone sending out a radio signal. Sonar and infrared
ranging are passive, because the sensor has to emit a
signal in order to measure the reflection. GPS is an active
locating technology, because although the receiver doesn’t
emit a signal, it has an electronic receiver onboard to
receive satellites’ signals.
Sometimes distance ranging is used for acquiring a
position, and other times it’s used for refining it. In the
following examples, the passive distance rangers deliver a
measurement of physical distance, but the radio ranging
tell you only when another radio is in transmission range of
your radio, and whether it’s near or far within the range.
Passive Distance Ranging
Ultrasonic rangers like the Devantech SRF02 and infrared
rangers like the Sharp GP2D12, shown in Figure 8-1, are
examples of distance rangers. The Devantech sensor
sends an ultrasonic signal out and listens for an echo;
it’s basically a sonar device. The Sharp sensor sends
out an infrared light beam, and senses the reflection of
that beam. These sensors only work in a short range.
The Sharp sensor can read about 10 cm to 80 cm, and
the Devantech sensor reads from about 15 cm to 6.4 m;
these are useful only for very local measurements. Passive
sensors like these are handy, though, when you want to
measure the distance of a person in a limited space, and
you don’t want to have to put any hardware on the person.
They’re also handy when you’re building moving objects
that need to know their proximity to other objects in the
same space as they move.
Figure 8-1
Devantech SRF02 and Sharp GP2D12 sensors. The Devantech
sensor can read a range from 15 cm to 6 m. The Sharp sensor can
read a range from 10 cm to 80cm.
Making_Things_Talk.indb 265 11/13/09 4:55 PM

Get Making Things Talk now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.