My campaign against infiltrating water began when I moved to a location with a higher water table that required the
assistance of a sump pump to keep water out of the
basement. This is particularly worrisome during the
snow melts and heavy rains of the spring. As every
sump pump will one day expire, backup systems are
needed to prevent basement flooding. The device I
created provides a first line of defense against a
flood. It will alert the user via text message that the
water level has risen above the sump pump’s
maximum level, thereby indicating a pump failure.
This alert could potentially enable the user to return home
and drop in a replacement pump prior to any flooding
Although the device described here will send a text as
a sump pump warning, this project applies to pretty much
anything with an appropriate sensor. An open door or
window, a tripped laser beam, a pressure change on a
pressure plate, a proximity sensor, etc., could all be
converted into a text message warning.
My goal for this project was to design a device that
will monitor the sump pump water level and text me if the
water level gets too high. The device design parameters
included: must be battery powered; have Wi-Fi capability;
and the ability to send an email or text. I chose to go with
Texas Instruments’ CC3200 LaunchPad, which is the
evaluation board for the CC3200 Wi-Fi wireless
microcontroller (MCU). LaunchPad comes with a built-in
in-circuit debugger, LEDs, switches,
sensors, and two 20-pin connectors.
For water level sensing, I
selected a reed switch commonly
used in aquariums. The switch is
hermetically sealed in the body of
the device, while a magnet is
located within the float ring. The
bracket for the reed switch was cut
from a 1/8 in x 2 in x 4 ft piece of
aluminum from a local hardware
The entire design runs off two
AA batteries. To limit the load
current and extend battery life, the
device is mostly hibernating. It
wakes up immediately if the reed
switch closes, and it also wakes up
every eight hours to check the
battery voltage and read the switch.
If it finds that the reed switch is
closed or the battery level is low, it
will text me to let me know.
Email to Text
To avoid utilizing third-party servers/gateways to send
an email or text, I use CC3200 SDK and my Gmail
account. The way it works is that on CC3200, I run an
SMTP client that connects to my Gmail account. Once
connected, it sends an email message to my mobile
carrier’s SMS gateway, which sits on the mobile network
that delivers the message. All you need is a phone number
and an SMS gateway domain name.
In my case, the Verizon SMS gateway domain is
vtext.com. So, I send an email to firstname.lastname@example.org,
where 1234567890 is my phone number. All email and
Wi-Fi settings for the project are stored in a config.h file.
CC3200 is a SoC (system on chip) that consists of an
ARM M4F core for application
software processing, SimpleLink (the
Wi-Fi network processor subsystem),
256 kB RAM, and peripherals.
SimpleLink has its own dedicated
ARM MCU that completely off-loads
the application MCU. It also
includes 802.11bgn radio and a
TCP/IP stack. This arrangement
simplifies development significantly.
The application MCU runs at 80
MHz. User code and user files are
stored in an external serial Flash (1
MB). ROM comes factory
programmed with device
initialization firmware, a bootloader,
and a peripheral driver library. The
power-up sequence is as follows:
After a PoR (power-on reset), the
device gets initialized, then the
bootloader loads the application
code from the serial Flash into on-
February 2018 15
Post comments on this article and find any associated files and/or
downloads at www.nutsvolts.com/magazine/issue/2018/02.
■ FIGURE 2. Project big picture.
■ FIGURE 3. CC3200 hardware