Radio Transceivers
In many cases, one-way communication isn’t enough. For example, you might have
noticed in the previous example that sometimes the message doesn’t get through,
even when you’ve got the circuitry and the code fully working. In that case, you might
want the PC to be able to query the microcontroller occasionally to see the state of
the inputs. Or perhaps you’re making an application in which there’s input and output
on both sides. In that case, transceivers are essential.
There are many different kinds of data transceivers on
the market. Some connect directly to the serial I/O of the
microcontroller and send the data as is. Some, like the
Bluetooth module you saw in Chapter 2, add an additional
protocol layer on top of the data communication, so you
have to be able to implement that protocol on both sender
and receiver. The cost of transceivers varies widely.
Until recently, most digital radio transceivers on the
market implemented only the most basic serial com-
munications protocol. For example, the RTF-DATA-SAW
transceivers from Abacom do a good job of sending and
receiving serial information. They connect directly to the
serial transmit and receive pins of your microcontroller.
Any serial data that 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. The benefit is that you don’t have to learn any serial
protocol — you can send data in any form you want. The
cost is that you have to manage the whole conversation
yourself. If the receiving transceiver misses a bit of data,
you’ll get a garbled message, just like you did with the
transmitter-receiver pair in the preceding project. Fur-
thermore, any radio device in the same frequency range
can affect the quality of your reception. As long as you’re
working with just two radios and no interference, trans-
ceivers like the RTF-DATA-SAW do a fine job. There are
other companies on the market who sell similar transceiv-
ers, including Linx Technologies (www.linxtechnologies.
com) and Low Power Radio Solutions (www.lprs.co.uk).
There are an increasing number of cheap transceivers
on the market that implement networking protocols,
handling the conversation management for you. The
Bluetooth modem in Chapter 2 ignored signals from other
radios that it wasn’t associated with, and took care of
error checking for you. The XBee radios you’ll use in the
next project will do the same, and much more, as you’ll
see in Chapter 7. These particular transceivers are in the
same general price range as the plain serial transceivers
mentioned earlier. 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.
There’s one other difference between the serial trans-
ceivers and the networked ones: the networked modules
tend to operate at much higher speeds, both in terms of
transmission frequency and serial data rate. For example,
the Abacom modules mentioned previously operate at
315 MHz and a maximum serial data rate of 9600 bits per
second. The XBee modules in the following project operate
at 2.4Ghz and up to 115,200 bits per second. Hence, the
XBee radios can send a message at nearly 100 times the
speed. Even if you’re sending only a few bytes per second,
this means that your transceiver can spend more time
listening and less time speaking, thus reducing the chance
that it’ll miss a given message from another transceiver.
Making_Things_Talk.indb 192 11/13/09 4:54 PM

Get Making Things Talk now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.