
CIRCUIT CELLAR • MARCH 2014 #284
72
TESTS & CHALLENGES
Sponsored by WIZnet — circuitcellar.com/wiznet2014
into the microcontroller itself, so you’ll have
to conjure up some external memory if you
want to spice things up.
The most popular add-on is a MicroSD
card, which, like the W5500, uses a SPI
bus so you just need one extra pin for chip
select. Using a standard file system driver
(e.g., FAT), you can actually do much of the
development and testing of your “website”
on a PC. Then when you’re finished, just plug
the SD card into your IoT gadget.
For prototyping, check out the WIZnet
ioShield (see Photo 7), which is a baseboard
for the WIZ550io that includes an SD card
socket. There are ioShields for different
platforms (e.g., Arduino, LaunchPad,
mbed, etc.), and with 0.1” headers they are
breadboard friendly.
PRESTO, CHANGE-O
Since your browser is a “client,” it makes
sense that every IoT gadget should be a
“server,” right? Not necessarily. Being a server
typically implies being open for service 24/7,
but many IoT applications (e.g., my garage
“Thing”) are characterized by intermittent
low duty-cycle activity. And while running
on a LAN works fine, there may be issues
reaching an in-house server from the WAN
due to firewalls, ISP restrictions, changing IP
addresses, and the like. Besides, do you really
want to let the outside world anywhere near
your LAN? Maybe it makes more sense for IoT
gadgets to be clients.
But how do you get two clients (i.e., IoT
device and browser) to talk to each other?
The answer is you stick a server in between
them courtesy of a “Device Cloud” provider
such as Xively (formerly Pachube), Exosite,
Devicehub.net, ThingSpeak, Nimbits, XOBXOB,
the list goes on and on. (Postscapes provides
an extensive list, see Resources.)
As much as the WIZnet chip offloads
network chores, these services handle data
storage and visualization to make life easy
for the IoT application. Just send your raw
data and the service will archive it, present it
to a browser as a graphical chart, and send
an e-mail, text, or Twitter alert if you like.
Better yet, you don’t need any specialized
web programming tools or know-how to get
something useful working quickly.
The technical capabilities and look and feel
of each device cloud service differ, as do their
business models, everything from for-profit
and pay-to-play to free and open source. But
from 50,000’ all work in a similar way. To send
data to the cloud, the IoT client hits the cloud
server with a request that carries the data
(e.g., variable name and value) in the URL or
the request body. To get data from the cloud,
the IoT device sends a request specifying a
variable and then retrieves the data from the
server response.
I decided to get my head in the clouds
by prototyping a client version of my garage
door “Thing” (see Photo 8) using an Arduino
+ a WIZ550io connected to Exosite.
Note I’m powering the WIZ550io from the
Arduino 3.3-V supply. That works for newer
Arduinos (e.g., my UNO R3) that have a
150-mA, 3.3-V regulator. To work with earlier
Arduinos or clones that only specify 50 mA,
a real “shield” (e.g., the WIZnet ioShield) will
include a 3.3-V regulator running off the 5-V
supply.
PHOTO 8
A prototype of the client version of my garage “Thing” is shown.
circuitcellar.com/ccmaterials
RESOURCES
T. Cantrell, “I-Way the Hard
Way,” Circuit Cellar 135, 2001.
———, “Weatherize Your
Embedded App,” Circuit Cellar
273, 2013.
S. Foskett’s blog, “Power Over
Ethernet Calculator,” http://
blog.fosketts.net/toolbox/
power-ethernet-calculator.
Postscapes, “IoT Data Broker and Cloud Service
Providers,” http://postscapes.com/companies/
iot-cloud-services.
WIZnet, “Connect the Magic,” http://j.mp/
ConnectTheMagic.
SOURCES
Exosite Device Cloud
Exosite | www.exosite.com
RPLC-201KIT AV adapter starter kit
Rosewill, Inc. | www.rosewill.com
TL-WR702N 150 Mbps Wireless N NanoRouter
TP-Link Technologies, Co. | www.tp-link.us
W5500 Ethernet controller
WIZnet | wizwiki.net
ABOUT THE AUTHOR
Tom Cantrell (micro
working on chip, board,
and systems design and
marketing for several
years.
Copyright © 2014 by Circuit Cellar, Inc.
Subscription: http://circuitcellar.com/subscription/
Komentáře k této Příručce