The Internet of Things — a Look at Embedded WiFi Development Boards

Keith Chester
Fusion Digital
Published in
9 min readAug 12, 2015

--

The Internet of Things (IoTs) has been a buzzword for years, but ultimately has been either just that or a series of overpriced normal things now with WiFi.

A $50 light bulb that requires a $60 base station, proving my point entirely.

IoTs, home automation, and a plethora of connected-device ideas are an exploding industry. Right now I suspect adoption is stifled by two core issues. The first is just poor interoperability between systems and modules due to closed-source systems and too many standards. The other is price. The first will solve itself as the dozens of IoTs and home automation companies fail. The second is being solved in no small part of a few startups and open source fanatics.

If you asked me, five years ago, to incorporate WiFi into a project, it would mean adding a full laptop to the project. Three years ago the Raspberry Pi came out, ushering in a new era of cheap DIY-oriented embedded Linux computers. Now we’re seeing a similar drop in price due to very low cost microcontroller units (MCUs) with WiFi capability. In fact — WiFi can be added to your project for a bit under $3. That’s right — your Jamba Juice / Starbucks / Chipotle order will likely add WiFi to three projects.

This new-found freedom in internet/network connectivity can lead to ambitious ideas and designs not thought possible before. Wireless light displays, useful sensors deployed everywhere, hundreds of interactive scanners — the list goes on.

Let me introduce you to three MCUs I’ve been in using in projects lately — I’ll be briefly talking about their history, their setup, and my thoughts on them.

The Particle Photon — Easy Mode In Theory

Particle’s (formerly Spark) Core MCU launched on Kickstarter. Photon is the Core’s newer and more refined brother. Both are WiFi development platforms being sold for just $19. Coming soon is their Electron MCU, providing 2g and 3g connectivity for $39 and $49 respectively. In this article it is by far the most expensive solution, but claims to provide an unsurpassed ease-of-use.

Particle is aiming to not just be a provider of a cool development kit, but a full ecosystem to enable projects to become industry-scale consumer products. They’ll provide scalable server-solutions in case you need to sell and manage a million Photon-powered WiFi products. DIYers, meanwhile, will never utilize the cloud systems enough to pass the free-tier threshold and never need to worry about costs. Setting up simple programs to check for sensor values from a Photon, or activate a function on it, or react when the Photon trigger’s something, is child’s play. With the built in over the air (OTA) updating, you can remotely expand project’s capabilities too.

My first project with it? Why, there’s no better application of technology at Fusion than using it to prank our dear leader here at Fusion Digital. I created a small breadboard circuit with the Photon, adding on the Adafruit Bluefruit EZ-Key, a battery shield, and a battery pack. The EZ-Key emulates a bluetooth mouse and keyboard through a serial port. The Photon would take commands from the internet (aka my coworker’s and my computers) and produce mouse and keyboard output on the boss’s computer. Also, this article is how we’re going to tell him about it. Hi Brad!

I hid it right behind his desk in his prized beer brewing stand. The battery provided about 12 hours of juice. I could check the battery voltage and estimated charge percentage remotely so I knew when I had to grab it and charge it.

My thoughts on the platform so far? It’s a good start, but needs some refinement. Documentation was suffering heavily until a very recent (while I was writing this post, actually) overhaul. Even after the overhaul I find the documentation a bit lacking. I do come from the land of impossibly clear overly informative datasheets so perhaps I’m expecting a bit much. The Photon is primarily programmed (for now) in a web-browser based IDE — this sounds like a cool idea, but integrating with your favorite IDE would be more ideal for a developer. It’s further muddled by a lack of auto-complete, a troublesome interface for larger projects or juggling multiple files, lack of version control, and — the biggest sin of all — plagued by terribly unhelpful obscure compilation errors when something goes wrong.

What I thought would be a significant win for cloud IDE is the ability to search for and one-click add libraries to extend capabilities of your Photon, allowing very simple integration to common sensors/parts. Or, at least, in theory. At first I was overjoyed to see a number of Arduino libraries for my ICs and sensors were already on the cloud IDE. The downside is most of them wouldn’t compile, requiring me to either open a Github issue or fork and fix the library. I have a sneaking suspicion most of these were uploaded with no attention paid to whether or not they compiled or worked for the Photon.

The Photon’s cloud features are easy to work with. You can declare “cloud” variables and functions — these become values or triggers you can read/fire off when hitting Particle’s REST API. It becomes a cinch to check the value of a sensor in your web browser, or to hook a function moving a servo motor’s position into a web page app. The Photon doesn’t always have to be connected either — they provide numerous sleep options and WiFi control options so you can maximize your battery life.

For a WiFi development board, I’m miffed that the biggest issue is the connectivity. I had few issues at my home, but my office it routinely dropped connection. I thought that, since my office is proliferated with dozens of devices and multiple WiFi networks, this would be the cause and thus an exception. Friends who also bought Photons, however, are reporting the same experience. The Photon is entirely unreliable in its connection too often. This is unfortunate, and I hope that the Particle team addresses it soon. The only fix I’ve found is to routinely reset the board in code — a duct-taped hack of a fix.

I’d also love a deploy manager, where I can group together Photon’s so I can deploy the same code to a fleet of Photons. This would be very useful for us at Fusion for our smaller production scale deploys. I suspect the tool exists since Particle already powers multiple consumer products with their platform, but I don’t see it on their current IDE.

Along came the ESP8266

The ESP8266 was a largely ignored piece of hardware until some DIYers realized that it could be completely controlled and reconfigured through its serial port, allowing dead simple WiFi capability. This miscommunication — and the problem of figuring out how to actually work the chip — was primarily because all the documentation was only in Chinese. In a few short months the open source community reverse engineered and translated documentation making their own comprehensive English ones. Since then it’s quickly become a mainstay of DIY WiFi connected projects. I can understand why — I was quite ecstatic the first time I had one of the little chips serving up web pages and reacting to HTTP requests.

The Arduino holds a special place in my heart — it did, after all, jump start a large portion of the DIY electronic community (or, at the very least, made it way more accessible). Despite being trained in college on numerous MCU platforms I still find myself coming back to Arduino for the sheer simplicity it provides. With Arduino-clones dropping in price — with some boards costing a mere $3 — I’d be remiss if I didn’t talk about using the ESP8266 interfaced with an Arduino.

The Arduino interfaces with the ESP8266 via its serial ports, but requires a 3.3V logic levels. If you don’t have a 3.3V Arduino (like the Trinket Pro) then you need to worry about logic-level shifting. I found mixed success with ESP8266_Simple.

You’ll want to buy or make a breadboard adapter for working with the ESP8266.

It turns out, however, that the Arduino isn’t even necessary. A team has brought the ESP8266 to the Arduino platform. You’ll be able to program the chip in the familiar Arduino IDE and still maintain internal WiFi capabilities. There’s even examples of building an HTTP server right on the board. Integrating many popular sensors and integrated circuits becomes a breeze as you gain the full support of Arduino’s vast collection of libraries.

NodeMCU

An open source project called NodeMCU created a flashable firmware for the ESP8266. The firmware allows the chip to be controlled from a NodeJS-styled Lua language (confusing, I know). The language allows for simple HTTP and socket connections, WiFi station and host control, and more.

While controlling the ESP8266 is great, the raw chip itself lacks an analog to digical converter (ADC), has only 1 PWM (pulse width modulation — useful for a lot of applications), and only a few I/O pins. The NodeMCU team created an open source development board to mitigate this.

The common hookup for communicating with the ESP8266 via a 3.3v FTDI cable/board. Take note that the CH_PD needs to be pulled to ground on chip bootup to flash firmware.
The bigger brother — the NodeMCU Dev Kit

The board runs for about $7 from most retailers I found online, is completely open source, and adds a much needed boost in functionality to the ESP8266, all at the price of size. The added USB to serial converter also means wiring up and programming this board is dead simple, as you don’t need to wire up any special circuits like you would on the straight ESP8266 board.

Unlike the Photon, the NodeMCU firmware and devkit certainly does not hold your hand. There are numerous pitfalls and sharp edges in usability. When first starting out I locked my chips into a boot-loop, requiring me to flash the firmware from scratch on them. Drivers for the serial port connection to the board was another problem I had. Since the devkit is open source, there are plenty of sellers who tweak the design to cut costs. Mine happened to use an older and cheaper USB to serial chip, requiring me to read extremely tiny print and find an older set of drivers off a Chinese website (thanks, Google Translate!).

The capabilities, however — acting as a WiFi host/access point rather than a client (imagine a project you can connect your cell phone to via WiFi and modify settings for via a web browser, for instance), finer-grained off-line capabilities, socket connections, built in MQTT support — means the NodeMCU is going to make it into projects I need more robust control over. I can picture deploying dozens of small wireless RFID readers around an event, or a swarm of dynamically reactive displays.

Going Forward

The Photon is an interesting platform — one that I suspect that will improve with time. While it’s a joy to work with when everything’s coming up Milhouse, I’m worried about connectivity issues and a lack of key IDE features. Until I’m confident in the Photon’s reliability, I will probably be sticking with going the extra mile in setting up NodeMCU/ESP8266 boards simply for the deeper control I have over them.

While writing this post I found overwhelming amounts of information. If you’re interested, reach out to me on Twitter if you want to hear about some more cool stuff I’ve found but couldn’t fit in here!

--

--

Keith Chester
Fusion Digital

Developer + R&D for Fusion Marketing. Hardware maker. Node programmer. Entrepreneur. Curious fellow.