BUILD A WI-FI
By Bob Colwell
I have a lot of projects I want to work on. They all have certain
things in common, such as they need a control module that
speaks 802.11a/b/g fluently, they are physically small, are low
power with lots of I/O port bits, come with a large sample code
library, and don’t cost much. One particular project is my Wi-Fi
sprinkler system that exemplifies these aspects. The Wi-Fi sprinkler
uses a module from Rabbit Semiconductor to control a set of 16
relays, Wi-Fi to connect it to my home network (so I can use my
iPod in my yard to turn water zones on and off), an Internet
connection, plus an internal real-time clock so the module knows
the day of the week, day of the month, and time of day. There’s
also an interface to a standard 2x16 LCD display module. I’ve
included a labeled “pin field” that brings the Rabbit module
pinouts to a set of 50 stakes, to make it easy to connect scopes
and logic analyzers to aid in software debugging.
We have a lot to cover, so this first article will show
how to use the Rabbit module to do the basic functions for
this project (or others). Next month, we’ll talk more about
the sprinkler-specific aspects of the design. Software is
covered in a comprehensive file included in the downloads.
The Wi-Fi Module
Rabbit’s Wi-Fi module has five general-purpose eight-bit
I/O ports. The module uses some of the bits of some of the
ports for Wi-Fi and other functions. If you read the
documentation very carefully, you will find that all bits of
Port A are available for your use. The same is true of Port
D. Certain bits of Ports B and C have other duties that you
can work around if necessary.
Rabbit’s documentation states that RCM5450W ports
can source or sink 24 mA and are guaranteed to swing an
output voltage of 2.0V (0.4V low, 2.4V high). We will use
these specifications in designing an appropriate relay driver
44 January 2011
■ FIGURE 1.
RCM5450 W Wi-Fi m odule.
Control by Relay
Almost every project needs to control something. The
module needs to be able to turn on motors, energize
circuits, or actuate solenoids like the ones inside the 24