Hardware Reference
In-Depth Information
The early part of this chapter covers how wireless works
and what makes it stop working, giving you some back-
ground and starting places for troubleshooting. The
second half of the chapter contains examples. The topic
is so broad, even a survey of several different devices only
covers the tip of the iceberg. For that reason, the exercises
in this chapter will be less fully developed applications than
the previous ones. Instead, you'll just get the basic “Hello
World!” example for several forms of wireless device.
X
Why Isn't Everything Wireless?
The advantage of wireless communication seems obvious: no wires! This makes
physical design much simpler for any project where the devices have to move and
talk to each other. Wearable sensor systems, digital musical instruments, and remote
control vehicles are all simplified physically by wireless communication. However, there
are some limits to this communication that you should consider before going wireless.
Wireless communication is never as reliable
as wired communication
You have less control over the sources of interference.
You can insulate and shield a wire carrying data com-
munications, but you can never totally isolate a radio or
infrared wireless link. There will always be some form of
interference, so you must make sure that all the devices
in your system know what to do if they get a garbled
message, or no message at all, from their counterparts.
radios consume extra power when they're transmitting.
This causes a slight dip in the voltage of the power source.
If the radio isn't properly decoupled with a capacitor
across its power and ground leads, the voltage can dip
low enough to make the radio reset itself. The radio may
appear to function normally when you're sending it serial
messages, but it will never transmit, and you won't know
why. When you start to develop wireless projects, it's
good practice to first make sure that you have the com-
munication working using a regulated, plugged-in power
supply, and then create a stable battery supply.
Wireless communication is never just
one-to-one communication
The radio and infrared devices mentioned here
broadcast their signals for all to hear. Sometimes that
means they interfere with the communication between
other devices. For example, Bluetooth, most WiFi radios
(802.11b, g, and n), and ZigBee (802.15.4) radios all work
in the same frequency range: 2.4 gigahertz (802.11n will
also work at 5GHz). They're designed to not cause each
other undue interference, but if you have a large number
of ZigBee radios working in the same space as a busy
WiFi network, for example, you'll get interference.
Wireless communication generates
electromagnetic radiation
This is easy to forget about, but every radio you use
emits electromagnetic energy. The same energy that
cooks your food in a microwave sends your mp3 files
across the Internet. And while there are many studies
indicating that it's safe at the low operating levels of the
radios used here, why add to the general noise if you
don't have to?
Make the wired version first
The radio and IR transceivers discussed here are
replacements for the communications wires used in
previous chapters. Before you decide to add wireless
to any application, it's important to make sure you've
got the basic exchange of messages between devices
working over wires first.
X
Wireless communication does not mean wireless power
You still have to provide power to your devices, and if
they're moving, this means using battery power. Batteries
add weight, and they don't last forever. The failure of a
battery when you're testing a project can cause all kinds
of errors that you might attribute to other causes. A
classic example of this is the “mystery radio error.” Many
 
Search WWH ::




Custom Search