Hardware Reference
In-Depth Information
Radio Transmitters, Receivers, and
Transceivers
Of course, it depends on all the transmitters being in sync.
When they're not, time-division multiplexing can still work
reasonably well if all the transmitters speak much less
than they listen (remember the first rule of love and net-
working from Chapter 1: listen more than you speak). If a
given transmitter is sending for only a few milliseconds in
each second, and if there's a limited number of transmit-
ters, the chance that any two messages will overlap, or
collide , is relatively low. This guideline, combined with a
request for clarification from the receiver (rule number
three), can ensure reasonably good RF communication.
How do you know whether to choose a radio transmitter-
receiver pair, or a pair of transceivers? The simplest
answer is that if you need feedback from the device to
which you're transmitting, then you need a transceiver.
Most of the time, it's simplest to use transceivers. In
fact, as transceivers have become cheaper to make (and
therefore sell), transmit-receive pairs are getting harder to
find.
Back to the cocktail party. If every person spoke in a
different tone, you could distinguish each individual by her
tone. In radio terms, this is called frequency-division multi-
plexing . It means that the receiver has to be able to receive
on several frequencies simultaneously. But if there's a
coordinator handing out frequencies to each pair of trans-
mitters and receivers, it's reasonably effective.
There are many different kinds of data transceivers
available. The simplest digital radio transceivers on the
market connect directly to the serial transmit and receive
pins of your microcontroller. Any serial data you send
out the transmit line goes directly out as a radio signal.
Any pulses received by the transceiver are sent into your
microcontroller's receive line. They're simple to connect,
but you have to manage the whole conversation yourself.
If the receiving transceiver misses a bit of data, you'll get
a garbled message. Any nearby radio device in the same
frequency range can affect the quality of reception. As
long as you're working with just two radios and no interfer-
ence, transceivers like this do a decent job. However, this is
seldom the case.
Various combinations of time- and frequency-division
multiplexing are used in every digital radio transmission
system. The good news is that most of the time you never
have to think about it becausetthe radios handle it for you.
Multiplexing helps transmission by arranging for transmit-
ters to take turns and to distinguish themselves based on
frequency, but it doesn't concern itself with the content of
what's being said. This is where data protocols come in.
Just as you saw how data protocols made wired network-
ing possible, you'll see them come into play here as well.
To make sure the message is clear, it's common to use a
data protocol on top of using multiplexing. For example,
Bluetooth, ZigBee, and WiFi are nothing more than data
networking protocols layered on top of a radio signal. All
three of them could just as easily be implemented on a
wired network (and, in a sense, WiFi is: it uses the same
TCP/IP layer that Ethernet uses). The principles of these
protocols are no different than those of wired networks,
which makes it possible to understand wireless data trans-
mission even if you're not a radio engineer. Remember the
principles and troubleshooting methods you used when
dealing with wired networks, because you'll use them
again in wireless projects. The methods mentioned here
are just new tools in your troubleshooting toolkit. You'll
need them in the projects that follow.
Nowadays, most transceivers on the market implement
networking protocols, handling the conversation manage-
ment for you. The Bluetooth modem in Chapter 2 ignored
signals from other radios that it wasn't associated with,
and handled error-checking for you. The XBee radios you'll
use in the next project will do the same, and much more,
which you'll see in Chapter 7. They require you to learn a
bit more in terms of networking protocols, but the benefits
you gain make them well worth that minor cost.
The biggest difference between networked radios and
simple transceivers is that every device on a network has
an address. That means you have to decide which other
device you're speaking to, or whether you're speaking to all
the other devices on the network.
Because of the complications of network management, all
networked radios generally have two modes of operation:
command and data modes (as described in Chapter
2). When looking at the communications protocol for a
networked radio, one of the first things you'll learn is how
to switch from command mode to data mode and back.
X
 
Search WWH ::




Custom Search