Wi-Fi equipped 32-bit Arduino board streamlines cloud-powered embedded app development
Digilent's chipKIT WiFire board is an awesome little beastie. Powered by Microchip's latest 32-bit 200 MHz MCU, the Wi-Fi equipped Arduino-compatible platform has been paired with Imagination Technologies' Flow Cloud service development tools in an effort to make creating cloud-powered embedded applications practical for the average developer. They may well succeed at this not-so-simple task which has eluded several other player in the IoT market.
This product is featured in EDN's Hot 100 products of 2015. See all 100 here.
Although a lot of "experts" have promised that the IoT's ability to connect low-cost embedded systems to powerful cloud-based services is a "game-changer", or "(insert today's hot buzzword)" for smart lighting and other distributed systems, I've found there's usually a wide gap between those promises and a working system. That gap is strewn with obstacles that can be as simple as hardware isn't up to the task, as frustrating as poorly-integrated design tools, or as confusing as a complex, poorly-documented set of digital rituals an embedded system must follow to access a cloud-based service. My brief road test of the WiFire board and the cloud-app developer resources from Imagination Technologies suggests that it's well-equipped to avoid the hazards lurking on beside the on-ramp to the IoT which can overtake an unwary embedded system.
WiFire is a pin-compatible variant of an Arduino board which replaces the standard 8-bit AVR MCU with Microchip’s 200 MHz, 32-bit PIC32MZ MCU, and adds an on-board 802.11b/g Wi-Fi module (also from Microchip). Since my first meaningful encounter with the Arduino platform and its development environment had been a couple of years ago on an earlier Microchip/Digilent Arduino board, I was really excited when Eric Lawson, my prime contact at Microchip, offered to let me test-drive one of the first WiFire boards to come off the production line. (Speaking of which.... Eric - my home-brew hot sauce is finally ready and the thank-you bottle I promised should be in the mail soon!)
Figure 1: Digilent's WiFire chipKIT board
A palmtop powerhouse
Even a casual glance at Digilent's WiFire board (Figure 1) lets you know that it's a palmtop powerhouse, bristling with I/O and one of the most powerful MCUs available in an Arduino-compatible form factor. Digilent's done it usual excellent job of providing the right mix of developer-friendly amenities on a high-quality board and backing it up with excellent documentation. It's fully-compatible with Arduino's original Multi-Platform Integrated Development Environment (MPIDE), and Microchip's MPLAB®X, an enhanced development environment based on the original ArduinoIDE, which makes developing complex applications, especially those involving real-time functions, much easier.
I was tempted to fool with MPLAB X but since I was tight on time I decided to conduct my test drive using the latest version of the familiar Arduino IDE (http://chipkit.s3.amazonaws.com/builds/mpide-0150-windows-20150103-test.zip . Once Arduino's simple GUI popped up on my monitor, I decided to explore the board's Wi-Fi capabilities using the example code for an HTTP Server available from the dev library I'd just downloaded to my hard drive at: \mpide-0150-windows-20150103-test\hardware\pic32\libraries\DEWFcK\examples\deWebServer.
Once the sketch was loaded in, I had to modify the HTTPServerConfig.h file to fit the network parameters of my network. The next step was to copy the contents of the "Content" directory (...\deWebServer\Content) to a micro-SD card and plug it into the WiFIRE board's memory slot.
Being a newbie, there were some details which confused me but a quick look at the setup instructions (SrvSetup.htm) available in the content directory (...\deWebServer\Content) helped me figure out where I went wrong. After applying the correct settings, the HTTP Server code began serving up web pages. Meanwhile , the PIC32MZ MCU didn't break a sweat running the server code and appeared to have plenty of free cycles to devote to other application tasks.
There's lots more to say about the WiFire, and the PIC32MZ's that powers it - but since the hardware is not the focus of this story I'll direct you WiFire's reference manual http://www.digilentinc.com/Data/Products/CHIPKIT-WIFIRE/chipKIT-WiFire_RM_RevB.pdf for those details and reserve the remainder of this review for covering the platform's development tools.
Onward, into the cloud!
WiFire's primary mission is to serve as a development platform for embedded IoT applications. Microchip-powered chipKITs have been used as a remote node development platform by several cloud services including Exocite, OctoBlue, UbiDots, and Imagination Technologies' Flow Cloud service. Microchip and ChipKit have made things even easier by partnering with Imagination Tech to make its FlowCloud services and IoT application development technology available on the WiFire platform.
Getting started is pretty straightforward, you can point the PC, Mac or Linux box you’re using to write your code to the FlowCloud Developer site http://flow.imgtec.com/developers or directly download the FlowCloud "Getting Started" app for either an iOS or Android platform. The app enables a mobile device to use its Wi-Fi radio to connect with the WiFire development board and set up the remainder of its configuration parameters.
From there, you use the FlowCloud SDK to create your cloud application from FlowCloud's modular infrastructure capabilities and underlying services. At present, the available services include:
• Device and user management
• Asynchronous messaging
• Data storage
• Event logging
• International E-wallet payments
• Optional FlowRadio and music services
• A customizable website
The cloud services infrastructure also provides secure asynchronous messaging and end-to-end connection establishment.
I'm still new to cloud services and find them a bit confusing. Thankfully an abstract sketch of the system like the one in Figure 2 helps me understand just what goes on where and which entity is responsible for a particular function. FlowCloud's cartoon was especially informative so I'm including it here.
It's easy to see how several of these services could be used to build a smart lighting management system which could manage energy and maintenance costs for a single building or easily scale to provide centralized lighting, security, and other services for all the properties in a national hotel chain. For more details, you can download a very informative whitepaper from Imagination Technologies which provides additional details on the workings of cloud services. It also includes several practical examples of how their web-based resources can be used to create applications such as security, personal and professional health monitoring, energy management, and cloud-based content delivery systems. The .pdf document is available at http://www.imgtec.com/downloads/factsheets/FlowCloud_Whitepaper_1.1.pdf.
The chipKIT WiFire is priced at $79 (U.S.), and can be ordered today from Digilent at www.digilentinc.com/wifire.
Users can get started with FlowCloud for the chipKIT WiFire at http://flow.imgtec.com/wifire. Visit http://imgtec.com/flowcloud/ or contact firstname.lastname@example.org for more information.