(This is the second of four posts in our On-Ramp To IoT series, based on the Prototyping Connected Devices webinar co-presented by Todd Zielinski and Bill Horan and hosted by O’Reilly. Read the other posts: Anatomy of a Connected Product; Selecting a Cloud Provider; and Prototyping Your Connected Device.)
If you read our blog regularly, you know that Bresslergroup is big on prototyping and testing. For us, it really comes down to failing, which we see as a good thing. (As you can see below, Thomas Edison agrees.)
You want to fail quickly and early so you can come up with a successful solution instead of spending a lot of time and effort pursuing a non-starter. To fail early, test early and often. This’ll leave you with plenty of time to pivot.
Types of Prototypes
There are a lot technical aspects to consider when you’re making an interactive prototype. I’ll go into those below, but first I wanted to point out that when you’re designing a connected device, there’s a lot of testing you can do before you get to the production-grade prototype. You don’t need a working, interactive prototype to start testing (and failing). Here are a few examples of different fidelity levels of prototypes you can use to test early on in your IoT product development:
The lowest form of prototype is the paper prototype, pictured top left. It lets you get something together to start testing interactions with users really quickly.
The prototype pictured top-right is for a coffee maker with an interactive, embedded touchscreen. Here we’ve set up the prototype to work so users can interact with both the physical and digital aspects of its interface even though they have yet to be developed. The physical and digital aspects are represented in this prototype by a cup, a water carafe, and a simple wireframe we developed in Axure that’s running on an iPhone.
The bottom-left photo shows an interactive prototype of a device with an embedded touchscreen, but the screen is not yet integrated into the device itself. In this case we created the wireframe of an onboarding walkthrough in Axure and slipped an iPhone inside an actual model of the device to let people interact with it in a realistic way.
The bottom-right picture in the grid is an example of the highest level of fidelity, which looks, feels, and responds to the user like the actual device — and lets us really understand what’s working and what’s not.
Technology: How Will You Get Connected?
There are quite a few things to think about before you start prototyping: size, power, costs, connectivity, durability — all above and beyond the user interface you intend to support. Again, it helps to spend enough time upfront to clearly understand the end user’s needs and what problem(s) your users want to solve. People tend to want to jump right in and work on a prototype, but first you have to do enough research to know you’re solving the right problems.
Security is another strategic decision. How much security are you (or your client) willing to pay for? Nothing is perfectly secure, but security issues can be hard to fix once you are exposed and the product has shipped. Encrypted communication is becoming a requirement in IoT devices.
Hardening devices to withstand attacks can cost additional hardware, processing requirements, memory, and firmware development time. It’s good to have a plan early on as to how the device will be secured.
Of course, one of the larger considerations for an IoT device is how it will actually connect to the Internet. The methodologies currently in vogue and garnering all the attention are WiFi, Bluetooth, ZigBee, and cellular radio. That said, there are many factors to consider and there is no one cookie-cutter approach. The method you choose needs to be project-specific.
Good for: If you want to use the existing infrastructure and you have a little bit more power. In order to stay connected to a WiFi platform you have to keep sending data, i.e. using more power. Otherwise the local infrastructure will toss you out and it takes a significant amount of time and power to reconnect. For that reason, it’s not as well suited for battery-powered devices, such as wearables.
Drawbacks: WiFi requires a bit more setup in order to get the device onto local WiFi infrastructure, and the stack involved in WiFi is more complicated and requires more memory. The cost is moderate — WiFi can cost around five to ten dollars in volume. What you pay for in terms of power and memory, though, you get back in speed.
Benefits: WiFi does come with benefits like increased bandwidth and independence from cell phone or gateway devices, so it works well for things like refrigerators, thermostats, and sprinkler systems. These are stationary, plugged-in devices and appliances that require a higher bandwidth connection or constant connection to the Internet and don’t need a gateway. The increased bandwidth makes WiFi a good choice for higher performance applications, like cameras and higher-rate data collection applications. In these cases, there’s really no substitute. WiFi can be hundreds to thousands of times faster.
Good for: A device you want to connect to the Internet through, say, your cell phone or another connected device, but that requires a gateway application for real Internet connectivity. Bluetooth has low power consumption compared to WiFi and cellular options. It’s getting a lot of traction in the healthcare field for things like insulin pumps. It offers ‘beacon’ proximity detection that is gaining popularity in location-aware services—in retail and other applications. Since it works well for proximity detection and tracking, it’s a popular choice for fitness trackers. Google has an ‘Eddystone‘ reference platform that is demonstrating beacons in embedded applications.
Drawbacks: The range isn’t great, and with the new Bluetooth low energy, there are limited mesh capabilities or networking capabilities—and only if the device is using proprietary communication stacks. It’s also not a great choice in high-traffic areas because it’s not particularly reliable, but the cost is very low. In some implementations, it’s as little as $1.50 for small to medium volume applications.
Good for: A lot of things. More home automation and industrial control applications are opting to connect through ZigBee, a mesh networking standard that sits on top of an 802.15.4 physical radio. It allows each device to connect to other devices without a router, and it self repairs the network connection by automatically routing through the best possible path.
We’re seeing it used in industrial valve and temperature collection, data collection, and home automation applications like door locks, thermostats, and window breakage sensors. There are several other competing standards for protocol stacks on top of 802.15.4 radios, but ZigBee is a leading communications stack option. We wouldn’t be surprised to see it expand dramatically, especially with the Thread Group‘s recent release of a protocol specifically for home automation that may replace ZigBee on 802.15.4.
Benefits: It’s relatively low cost and usually runs from a dollar to a few dollars at high volumes. So it’s a bit more expensive than Bluetooth but less expensive than WiFi, and it’s pretty flexible. The mesh radio allows you to send data over pretty long distances for very low power, so it’s good for low battery-power applications. Common uses include valves, temperature sensors, and controls in building control and lighting.
Drawbacks: There are a lot of different protocols and people are rolling out their own protocols to handle security across the mesh. The best security protocol for ZigBee isn’t exactly clear yet, but I believe that’s one of the things the Thread Group wants to address.
Good for: When you have a remote application that needs to connect to the Internet, cellular radio is pretty much the only way to go. Cellular radio is the last stop if you don’t have any other methodologies for getting connected—when you don’t have WiFi, a Bluetooth connection to a cell phone, or a gateway. It’s being used for applications like animal tracking, radio dog collars, that sort of thing.
Drawbacks: High cost—cellular radio can be as high as eighteen to twenty dollars at volume—and high power requirements. It can be used for battery-powered applications, but it is not well-suited for long-term disconnected devices. There are also certification issues. To work with carriers, certification and approvals can cost upwards of $100k and take months to process. It also has service contract requirements so there is a yearly fee associated with keeping cellular radio devices connected.
Technology: How Will You Communicate with the Cloud?
Once you’ve figured out how your device is going to connect to the Internet, you have to decide which language it will use to communicate with the cloud. There are so many options out there right now—and so many ways you can put them together. The best option varies from case to case. Sometimes a cloud provider might require a specific language or there might be an existing standard for a system you’re trying to work with. Often it comes down to the cost model differences, and what’s familiar to you and your development team. Some methodologies that are popular right now are JSON, MQTT, CoAP, XMPP, SOAP, and REST:
MQTT & XMPP
MQTT, or Message Queue Telemetry Transport, is more of binary format whereas JSON is more of an English-readable format. This makes MQTT more lightweight in communication costs. MQTT has the publish-and-subscribe mechanism, and it needs a small broker service in the protocol stack in order to handle this, but generally it’s very small and responsive. Extensible Message and Presence Protocols (XMPP) is very similar to MQTT.
CoAP & SOAP
Then there is Constrained Application Protocol, or CoAP. This is a well-defined request-response protocol, and it’s gained a lot of traction recently. It’s showing up in a lot of different places, more in industrial automation. SOAP, Simple Object Application Protocol, is simply another methodology for transferring lots of data over existing HTTP, using an XML-similar text format.
All of these methodologies are using essentially REST, Representational State Transfer, a software architecture style that really works well over the Web and Internet in general. It can use existing connection methods, server technologies, and parsing methods.
All of these work in the same Web space and allow us to communicate with the cloud. Once you’ve chosen how to connect and communicate, your next decision is Selecting a Cloud Provider.
(On-Ramp is an ongoing series explaining engineering techniques used in product development.)