18,99 €
Take your idea from concept to production with this unique guide
Whether it's called physical computing, ubiquitous computing, or the Internet of Things, it's a hot topic in technology: how to channel your inner Steve Jobs and successfully combine hardware, embedded software, web services, electronics, and cool design to create cutting-edge devices that are fun, interactive, and practical. If you'd like to create the next must-have product, this unique book is the perfect place to start.
Both a creative and practical primer, it explores the platforms you can use to develop hardware or software, discusses design concepts that will make your products eye-catching and appealing, and shows you ways to scale up from a single prototype to mass production.
If you'd like to design for the future, Designing the Internet of Things is a great place to start.
Sie lesen das E-Book in den Legimi-Apps auf:
Seitenzahl: 553
Veröffentlichungsjahr: 2013
This edition first published 2014
© 2014 John Wiley and Sons, Ltd.
Registered office
John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, United Kingdom
For details of our global editorial offices, for customer services and for information about how to apply for permission to reuse the copyright material in this book please see our website at www.wiley.com.
The right of the author to be identified as the author of this work has been asserted in accordance with the Copyright, Designs and Patents Act 1988.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by the UK Copyright, Designs and Patents Act 1988, without the prior permission of the publisher.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.
Designations used by companies to distinguish their products are often claimed as trademarks. All brand names and product names used in this book are trade names, service marks, trademarks or registered trademarks of their respective owners. The publisher is not associated with any product or vendor mentioned in this book. This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. It is sold on the understanding that the publisher is not engaged in rendering professional services. If professional advice or other expert assistance is required, the services of a competent professional should be sought.
Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley and Sons, Ltd. and/ or its affiliates in the United States and/or other countries, and may not be used without written permission. Pomodoro Technique® and Pomodoro® are registered trademarks of Francesco Cirillo. All other trademarks are the property of their respective owners. John Wiley & Sons, Ltd. is not associated with any product or vendor mentioned in the book.
A catalogue record for this book is available from the British Library.
ISBN 978-1-118-43062-0 (paperback); ISBN 978-1-118-43063-7 (ebook); 978-1-118-43065-1 (ebook)
Set in 9.5/11.5pt Minion Pro by Indianapolis Composition Services
Printed in the United Kingdom by TJ International
About the Authors
Adrian McEwen is a creative technologist and entrepreneur based in Liverpool. He has been connecting devices to the Internet since 1995—first cash registers, then mobile phones, and now bubble machines and lamps. He founded MCQN Ltd., an Internet of Things product agency and (along with Hakim and others) is co-founder of DoES Liverpool, a hybrid co-working/makerspace that incubates Internet of Things startups in NW England. He is also CTO of Good Night Lamp, a family of Internet-connected lamps. He was one of the first employees at STNC Ltd, which built the first web browser for mobile phones and was acquired by Microsoft in 1999. Adrian concentrates on how the Internet of Things intersects with people’s lives and how heterogeneous networks of devices should work together, and lectures and speaks on these issues internationally. You can find him on the Internet at www.mcqn.net or follow him on Twitter as @amcewen.
For Jean, Les, and Christine, and in memory of Karen.
—Adrian
Despite an education in Italian and English literature, once Hakim Cassimally discovered software development, he hasn’t looked back. He is a staunch proponent of Perl and was one of the organisers of YAPC::EU 2010 in Pisa. These days, however, he is likely to be writing Python for 3D printers or for civic hacking projects with mySociety.org. He co-founded (with Adrian and others) DoES Liverpool. His website is at greenokapi.net.
For my parents. This time I didn't start with the page numbers.
—Hakim
Publisher’s Acknowledgements
Some of the people who helped bring this book to market include the following:
Editorial and Production
VP Consumer and Technology Publishing Director: Michelle Leete
Associate Director–Book Content Management: Martin Tribe
Associate Publisher: Chris Webb
Executive Commissioning Editor: Craig Smith
Project Editor: John Sleeva
Copy Editor: Chuck Hutchinson
Technical Editors: Daniel Soltis, Aaron Crane, Alexandra Deschamps-Sonsino
Editorial Manager: Jodi Jensen
Senior Project Editor: Sara Shlaer
Editorial Assistant: Annie Sullivan
Marketing
Associate Marketing Director: Louise Breinholt
Marketing Manager: Lorna Mein
Senior Marketing Executive: Kate Parrett
Marketing Assistant: Polly Thomas
Composition Services
Compositor: Jennifer Mayberry
Proofreader: Susan Moritz
Indexer: Potomac Indexing, LLC
Acknowledgements
First off, we’d like to thank Craig Smith at Wiley for persuading us that capturing some of what we know into a book would be a good thing. Thanks also to the rest of the Wiley team and everyone who helped edit the book: John Sleeva, Daniel Soltis, Alexandra Deschamps-Sonsino, Chuck Hutchinson, and Aaron Crane. Despite our grumbling at the additional work of rewriting sections, the book is much better as a result.
We’d also like to thank everyone at DoES Liverpool for putting up with our sometimes distracted have-book-to-write periods in the run up to deadlines, and in particular our fellow organizers, John McKerrell, Andy Goodwin, Paul Freeman, Patrick Fenner, Steve Sparrow, and Ross Jones, who had to take up the slack in running the space.
—Adrian and Hakim
The acknowledgements section was one I never normally paid a lot of attention to, as it was the author thanking a load of people I didn’t know. Having written a book, and realised how much help and support are given to the authors, I have a newfound appreciation for this section.
I’d like to thank Hakim for agreeing to join me in the adventure of actually doing the writing. Andy Huntington, Lawrence Archard, and Christopher Pett were all generous with their time and sharing their expertise in areas where I’m only in the early stages of exploring.
For endless encouragement and keeping me sane in the difficult bits, I need to thank my family and friends, especially Francis Irving, Andrew Dixon, Rob Stock, Neil Sowler, Kieran MacCourt, Jen Forakis, Colette MacCourt, Dan Lynch, and Neil Morrin.
And, finally, thanks to Bubblino for helping get me into this mess in the first place.
—Adrian
I tend to at least skim the acknowledgements and knew (in theory) that writing a book was a huge, collaborative effort. Experiencing it firsthand was awe-inspiring. We will almost certainly have forgotten to thank somebody: if that’s you, we would love to make it up to you over a beverage of your choice.
Firstly, thanks to Adrian for suggesting we work together on the book; it’s been an interesting project. Dave Cross, Kieren Diment, and Jodi Schneider gave invaluable early advice about publishing. Georgina Voss pointed me in the right direction on the ethics chapter, and Coen van Wyk kindly proofread the first draft. Tomas Doran gave useful suggestions on asynchronous web programming for the online components chapter, and Aaron Crane stepped in as technical editor. Kelvin Lawson advised us on the current state of real-time operating systems, while Kiel Gilleade and Jen Allanson provided insights into physiological computing. Guy Dickinson gave his usual enthusiasm and support, and Jim Hughes has kept me regularly up-to-date with interesting ideas. Thanks, also, to Shaun Myhill at Electric Imp, Aaron at .:oomlout:., Antony McLoughlin, Ross Jones, and Francis Fish for donating or lending microcontrollers and books without which writing this book would have been impossible. My colleagues at mySociety have been exceptionally tolerant of my last-minute time off to finish the final drafts.
Having the opportunity to attend or speak at events such as OpenIoT, the IoT Howduino, TSB IoT round table, BBC’s PlayIoT unconference, MadLab’s IoT workshop, Internet World, LivLug, and SMC Liverpool helped shape the ideas of the book. Thanks to Alex Deschamps-Sonsino, Ed Borden, Usman Haque, Adam Greenfield, Hannah Goraya, Nick O’Leary, Ben Ward, Thomas Amberg, Charalampos Doukas, Stefan Ferber, Chris Adams, Gavin Sparks, Peter Bihr, Andrew Back, Laura James, Russell Davies, Rob van Kranenburg, Erik van der Zee, Martin Spindler, Matt Biddulph, Fiddian Warman, Rachel Jones, Alistair MacDonald, Natasha Carolan, Mark Holmes, Pat Link, Cefn Hoile, Thom Shannon, Alistair Houghton, Chris Holgate, Alastair Somerville, Matthew Hughes, Jessi Baker, Aine and Aidan McGuire, Grey Povey, Hwa Young Jung, Andy Piper, Sue Black, Travis Hodges, Bob Ham, Neil Morrin, Dan Lynch, Francis Irving, Conrad Mason, Pete Thomas. In addition, I have had great discussions online and offline with Javier Montaner, Paul Kinlan, Luke Petre, Paul Ede, and have received helpful comments and suggestions from Rob Nightingale, Zarino Zappia, Aldo Calpini, David Jones, Kirsty Sparrow, and Arto Nabito.
I worked with Greg McCarroll back in 2005. Though I didn’t know it at the time, his connected train-aware alarm clock was the first Internet of Things object I ever came across. Greg was a gentleman as well as an innovator, and will be dearly missed.
Thanks, also, to Claire, Lolita, Rumplestiltskin, Sheri My, Wolfie, and Helvetica. Definitely.
—Hakim
Table of Contents
Introduction
What this book is not
Who should read this book?
How to use the book
Production Notes
I: Prototyping
1: The Internet of Things: an Overview
The Flavour of the Internet of Things
The “Internet” of “Things”
The Technology of the Internet of Things
Enchanted Objects
Who is Making the Internet of Things?
Summary
2: Design Principles for Connected Devices
Calm and Ambient Technology
Magic as Metaphor
Privacy
Keeping Secrets
Whose Data Is It Anyway?
Web Thinking for Connected Devices
Small Pieces, Loosely Joined
First-Class Citizens on the Internet
Graceful Degradation
Affordances
Summary
3: Internet Principles
Internet Communications: An Overview
IP
TCP
The IP Protocol Suite (TCP/IP)
UDP
IP Addresses
DNS
Static IP address Assignment
Dynamic IP address Assignment
IPv6
MAC addresses
TCP and UDP Ports
An Example: HTTP Ports
Other Common Ports
Application Layer Protocols
HTTP
HTTPS: Encrypted HTTP
Other Application Layer Protocols
Summary
4: Thinking about Prototyping
Sketching
Familiarity
Costs versus Ease of Prototyping
Prototypes and Production
Changing Embedded Platform
Physical Prototypes and Mass Personalisation
Climbing into the Cloud
Open Source versus Closed Source
Why Closed?
Why Open?
Mixing Open and Closed Source
Closed Source for Mass Market Projects
Tapping into the Community
Summary
5: Prototyping embedded devices
Electronics
Sensors
Actuators
Scaling Up the Electronics
Embedded Computing Basics
Microcontrollers
System-on-Chips
Choosing Your Platform
Arduino
Developing on the Arduino
Some Notes on the Hardware
Openness
Raspberry Pi
Cases and Extension Boards
Developing on the Raspberry Pi
Some Notes on the Hardware
Openness
BeagleBone Black
Cases and Extension Boards
Developing on the BeagleBone
Some Notes on the Hardware
Openness
Electric Imp
Developing on the Electric Imp
Other Notable Platforms
Mobile Phones and Tablets
Plug Computing: Always-on Internet of Things
Summary
6: Prototyping the Physical Design
Preparation
Sketch, Iterate, and Explore
Nondigital Methods
Laser Cutting
Choosing a Laser Cutter
Software
Hinges and Joints
3D Printing
Types of 3D Printing
Software
CNC Milling
Repurposing/Recycling
Summary
7: Prototyping Online Components
Getting Started With an API
Mashing Up APIs
Scraping
Legalities
Writing a New API
Clockodillo
Security
Implementing the API
Using Curl to Test
Going Further
Real-Time Reactions
Polling
Comet
Other Protocols
MQ Telemetry Transport
Extensible Messaging and Presence Protocol
Constrained Application Protocol
Summary
8: Techniques for writing embedded code
Memory Management
Types of Memory
Making the Most of Your RAM
Performance and Battery Life
Libraries
Debugging
Summary
II: From Prototype to Reality
9: Business Models
A Short History of Business Models
Space and Time
From Craft to Mass Production
The Long Tail of the Internet
Learning from History
The Business Model Canvas
Who Is the Business Model For?
Models
Make Thing, Sell Thing
Subscriptions
Customisation
Be a Key Resource
Provide Infrastructure: Sensor Networks
TakE a Percentage
Funding an Internet of Things Startup
Hobby Projects and Open Source
Venture Capital
Government Funding
Crowdfunding
Lean Startups
Summary
10: Moving to Manufacture
What Are You Producing?
Designing Kits
Designing Printed circuit boards
Software Choices
The Design Process
Manufacturing Printed circuit boards
Etching Boards
Milling Boards
Third-Party Manufacturing
Assembly
Testing
Mass-Producing the Case and Other Fixtures
Certification
Costs
Scaling Up Software
Deployment
Correctness and Maintainability
Security
Performance
User Community
Summary
11: Ethics
Characterizing the Internet of Things
Privacy
Control
Disrupting Control
Crowdsourcing
Environment
Physical Thing
Electronics
Internet Service
Solutions
The Internet of Things as Part of the Solution
Cautious Optimism
The Open Internet of Things Definition
Summary
Introduction
A computer processor such as Intel’s i486 used to cost around the same as a small car. Nowadays a chip with similar power is the price of a chocolate bar.
When processing power is so cheap, you can afford to put processors in places that you couldn’t before—not just a business workstation or a home PC but also a telephone, an electricity meter, a bedside lamp, or a teddy bear. We can make objects intelligent. We can make them think and speak. Pundits have dubbed this “physical computing”, “ubiquitous computing” or “ubicomp”, or “the Internet of Things”. Whatever you choose to call it, we are really talking about making magical things, enchanted objects.
In this book we look at the kinds of computer chips that can be embedded in objects (“microcontrollers” such as the Arduino) and take you through each step of the process from prototyping a Thing to manufacturing and selling it. We explore the platforms you can use to develop the hardware and software, discuss the design concepts that will make your products eye-catching and appealing, and show you ways to scale up from a single prototype to mass production.
What this book is not
For starters, this book is not a specific guide to any given microcontroller. Although we look at the Arduino, Raspberry Pi, and other options, this detailed technical information will necessarily date more quickly than the rest of the material in the book. So we are more interested in showing the criteria for evaluating and choosing a platform.
Nor is this book a guide to particular cool projects to make. Rather, we survey some groundbreaking Things but mostly look at the general design principles that will, we hope, encourage you to make something fresh, beautiful, useful, and magical.
Finally, this isn’t an academic treatise on the business infrastructure of tomorrow’s Internet of Things—technologies such as 6LoWPAN and emerging M2M standards. We are far more interested in how to design, manufacture, and sell consumer-facing Things that will delight people.
Who should read this book?
We certainly hope that this book, as a technical publication, will help software engineers, web developers, product designers, and electronics engineers start designing Internet of Things products. Indeed, we cover microcontrollers, electronics, embedded programming, and web APIs, among other technical topics of interest.
The book is also targeted at entrepreneurs, “makers” (designers, artists, craftspeople, and hobbyists), academics and educators, and anyone interested in getting an overview of this exciting upcoming technology. Even if you have little or no technical background in IT, much of the material is accessible to a general reader, and our coverage extends beyond the purely digital to topics in design, ethics, and business.
How to use the book
As we mentioned previously, this is not a “how-to” book, so you don’t need any particular tools to read along. The more technical chapters do give some suggestions for microcontroller hardware or web development frameworks that you may choose to investigate further in parallel.
We have designed the book to flow from principles through prototyping to manufacture and business considerations, so you can certainly read it from cover to cover. However, you may prefer to take alternative paths through the book. Depending on your background and concerns, some chapters may be of greater interest, whereas others you may prefer to skip for now.
Part I, “Prototyping”, introduces the Internet of Things and moves onto experimenting and creating your prototype project.
We recommend that all readers start with Chapter 1, “The Internet of Things: An Overview”, which describes what the Internet of Things is and why it’s happening now, and Chapter 2, “Design Principles for Connected Devices”, where we set out a manifesto for consumer-facing Things for humans.
Chapter 3, “Internet Principles”, is designed to be an accessible introduction which will be helpful to keep your ideas clear while you are building your Thing and thinking about how it communicates with the world. If you have a background in the Internet and web family of protocols, you can certainly skip this one.
The next chapters will be of most interest if you are planning to build a Thing yourself. To get a better understanding of the field, it is certainly worth reading Chapter 4, “Thinking About Prototyping”, for general considerations about technology choices. For the engineer, maker, or technical person responsible for making a device, Chapter 5, “Prototyping Embedded Devices”, applies the general principles to specific devices (at time of publication); Chapter 6, “Prototyping the Physical Design”, discusses how to build the physical design of your prototype; and Chapter 7, “Prototyping Online Components”, describes building the online components as web APIs.
Although many readers will have at least some general knowledge of programming, writing code for the small computers which often power connected devices has its own challenges. Chapter 8, “Techniques for Writing Embedded Code”, presents some lessons learned in the trenches and will be useful to makers involved in projects with more complex computational requirements.
Part II, “From Prototype to Reality”, moves beyond the world of making and prototyping and looks at what happens when your project meets the real world.
If you are an entrepreneur hoping to make money from your Internet of Things project, Chapter 9, “Business Models”, examines business models which go far beyond simply selling devices. Of course, if you are planning to sell devices, then moving to manufacture presents a whole new set of problems, such as creating PCBs, sourcing materials, and getting certification, as we discuss in Chapter 10, “Moving to Manufacture”.
Finally, technology always changes the world, and not always for the better. We began the book with design principles for making enchanted objects, and Chapter 11, “Ethics”, discusses how ethical and moral principles are also essential if we want to keep the enchantment from going bad.
You can find more information about the book and the authors at book.roomofthings.com or by following @aBookOfThings on Twitter.
Production Notes
They say travel broadens the mind. It also helps you write. Parts of the book were written on a couple of flights, but much more on countless train journeys—mostly between Liverpool and London, but also elsewhere in the UK and in northern Italy. Former transport systems worked, too: the High Line in New York was an excellent venue for writing during an extended visit there early in the book’s life.
The rest was written in and around Liverpool. In DoES Liverpool, in my flat by the cathedrals, holed up in Bold St. Coffee, or on the third floor of the majestic Central Library. When the weather permitted, even some down at the Pier Head, overlooking the river Mersey.
The main text was written in Vim in Markdown, on a Sony Vaio laptop running Ubuntu, and then edited in Microsoft Word on Windows on the same laptop.
—Adrian
Before even touching a keyboard, Adrian and I had several long, wide-ranging conversations about the Internet of Things in general and the content we wanted for the book. As I was quite new to the topic, this helped me form an understanding by getting to ask silly questions and challenge assumptions. The discussions helped us to reach a common “voice” for the book. We drafted a chapter together (which eventually became Chapter 4, “Thinking About Prototyping”) and then split the remaining chapters evenly in accordance with our interests and knowledge. We have consistently reviewed each other’s chapters before submitting them, which has helped maintain that shared voice through the whole process.
My drafts were written in Vim, converted from Markdown using Pandoc, and edited in LibreOffice, originally on an aging ThinkPad and then, when that finally gave up the ghost, on a MacBook Pro. Dropbox was invaluable for sharing the latest version of every document immediately. We wrote blog posts in Markdown, too, and published them with Jekyll.
—Hakim
I
Prototyping
Chapter 1: The Internet of Things: An Overview
Chapter 2: Design Principles for Connected Devices
Chapter 3: Internet Principles
Chapter 4: Thinking About Prototyping
Chapter 5: Prototyping Embedded Devices
Chapter 6: Prototyping the Physical Design
Chapter 7: Prototyping Online Components
Chapter 8: Techniques for Writing Embedded Code
1
The Internet of Things: an Overview
The first question that we should attempt to answer is, of course, what is the Internet of Things? Although the concepts we call on throughout this book are relatively straightforward, people have many different visions of what the phrase means, and many of the implications are hard to grasp. So we will take this question slowly in this chapter and look at it from a number of different angles.
What does the phrase “Internet of Things” mean? And how does it relate to the earlier buzzword “ubiquitous computing”? For those who are interested in the history of technological progress, where does the Internet of Things sit in the broad sweep of things, and why are we talking about it now? For those who understand best through metaphors, we look at the idea of enchanted objects, an image which has described technology for millennia but which is especially potent when describing the Internet of Things. For the more practical readers who understand by seeing examples of real things, we sketch out some of the exciting projects that give a good flavour of this exciting field. Let’s start with this last approach, with a short piece of “design fiction”.
The Flavour of the Internet of Things
The alarm rings. As you open your eyes blearily, you see that it’s five minutes later than your usual wake-up time. The clock has checked the train times online, and your train must be delayed, so it lets you sleep in a little longer. (See http://makezine.com/magazine/make-11/my-train-schedule-alarm-clock/.)
In your kitchen, a blinking light reminds you it’s time to take your tablets. If you forget, the medicine bottle cap goes online and emails your doctor to let her know. (See www.vitality.net/glowcaps.html.)
On your way out of the house, you catch a glow in the corner of your eye. Your umbrella handle is lit up, which means that it has checked the BBC weather reports and predicts rain. You sigh and pick it up. (See www.materious.com/#/projects/forecast/.)
As you pass the bus stop on the way to the station, you notice the large LCD display flash that the number 23 is due. It arrives when you turn the next corner. When the bus company first installed those displays, they ran on the expected timetable information only, but now that every bus has GPS tracking its location, they simply connect to the bus company’s online service and always give the updated information. Various transport organizations have implemented this. London’s TfL has some useful information on their signs at www.tfl.gov.uk/corporate/projectsandschemes/11560.aspx.
When you get to the station, your phone checks you in automatically to a location-based service (such as Foursquare). On your mantelpiece at home, an ornament with a dial notices the change and starts to turn so that the text on it points to the word “Travelling”. Your family will also see later that you’ve arrived at “Work” safely. (See http://wheredial.com.)
On your lunch break, a pedometer in your training shoes and a heart monitor in your wrist band help track your run around the block. The wrist band’s large display also makes it easy to glance down and see how fast you are running and how many calories you’ve burned. All the data is automatically uploaded to your sports tracking site, which also integrates with your online supermarket shopping account to make it easy to compare with how many calories you’ve eaten. (See http://nikeplus.nike.com/plus/.)
As you can see from the preceding links, each of these products is feasible with today’s technology. Each has been prototyped, and many of them exist as craft or mass-market products.
The “Internet” of “Things”
We’ve looked at a number of examples of the Internet of Things, so what is the common thread that binds them together? And why the name? All the cases we saw used the Internet to send, receive, or communicate information. And in each case, the gadget that was connected to the Internet wasn’t a computer, tablet, or mobile phone but an object, a Thing. These Things are designed for a purpose: the umbrella has a retractable canopy and a handle to hold it. A bus display has to be readable to public transport users, including the elderly and partially sighted and be able to survive poor weather conditions and the risk of vandalism. The sports bracelet is easy to wear while running, has a display that is large enough and bright enough to read even when you are moving, and will survive heat, cold, sweat, and rain.
Many of the use cases could be fulfilled, and often are, by general-purpose computers. Although we don’t carry a desktop PC around with us, many people do carry a laptop or tablet. More to the point, in almost every country now, most people do carry a mobile phone, and in many cases this is a smartphone that easily has enough power for any task one could throw at a computer. Let’s see how well one could replicate these tasks with a smartphone.
Viewing your bus provider’s timetable with a smartphone web browser seems to fulfil the same function at first glance. But just consider that last phrase, “at first glance”. On arriving at the bus stop, one can simply glance at the computerised timetable and see when the next bus is due. With a smartphone, if you have one and can afford the data use (which may be prohibitive if you are a foreign tourist), you have to take the phone out of your pocket or bag, unlock it, navigate to the right website (this may be the slowest and most complicated part of the process, whether you have to type the URL or use a QR code), and read the data from a small screen. In this time, you are not able to fully concentrate on the arriving buses and might even miss yours.
You can track your runs with an app on your smartphone, and many people do: the phone has GPS, many other useful sensors, processing power, an Internet connection, and a great screen. But it turns out that such a phone isn’t easy to carry on a run without worrying about dropping it or getting it wet. Plenty of carrying options are available, from a waist bag to an arm strap. The latter, in theory, enables you to read the device while you are running, but in practice reading details on the screen can be hard while you are jiggling up and down! To get around this difficulty, apps such as RunKeeper provide regular audio summaries which can be useful (www.runkeeper.com). Ultimately, a phone is a perfectly capable device for tracking your run, and most runners will find it a sufficient, comfortable, and fun way of logging their running data. However, others may well prefer a device worn as a watch or wristband, designed to be read on the move, worn in the rain, and connected to peripherals such as heart monitors.
Of course, no mobile phone (or even tablet or laptop) is large enough or waterproof enough to use as an umbrella. However, you could pair a smartphone with a normal “dumb” umbrella, by checking an app to see whether it is likely to rain later, before you leave the house. Unlike a calm, subtle light in the umbrella stand, glimpsed from the corner of your eye as an ambient piece of information to process subconsciously when you pass it on the way out of your home, an app requires you to perform several actions. If you are able to establish and maintain the habit of doing this check, it will be just as effective. Rather than having greater capabilities, the smart umbrella simply moves the same intelligence into your environment so that you don’t have to change your routine.
So the idea of the Internet of Things suggests that rather than having a small number of very powerful computing devices in your life (laptop, tablet, phone, music player), you might have a large number of devices which are perhaps less powerful (umbrella, bracelet, mirror, fridge, shoes). An earlier buzzword for roughly the same concept was “ubiquitous computing”, also known by the ugly portmanteau “ubicomp”, and this also reflects the huge number of possible objects that might contain computing technology. Now that the Internet is a central pipe for data, it’s hard to imagine, for example, a PC that doesn’t have an always-on broadband connection. Younger readers may never have seen such a thing. As technologist and columnist Russell Davies joked at the 2012 Open Internet of Things Assembly in London:
I can’t understand why teddy bears did not have wifi before. A bear without wifi is barely alive, a semi-bear.
—http://storify.com/PepeBorras/opent-iot-assembly
The definition of ubicomp, however, would also include the Glade air fresheners which release scent when they detect movement in the room as part of its domain. That is to say, such a device is an intelligently programmed computer processor, driven by sensors in the real world, and driving output in the real world, all embedded into an everyday object. These factors make this ubicomp, and it is only differentiated from the “Internet of Things” by the fact that these days most of the really interesting things done with computing also involve an Internet connection.
But what does it mean to “connect an object to the Internet”? Clearly, sticking an Ethernet socket into a chair or a 3G modem into a sewing machine doesn’t suddenly imbue the object with mysterious properties. Rather, there has to be some flow of information which connects the defining characteristics of the Thing with the world of data and processing represented by the Internet.
The Thing is present, physically in the real world, in your home, your work, your car, or worn around your body. This means that it can receive inputs from your world and transform those into data which is sent onto the Internet for collection and processing. So your chair might collect information about how often you sit on it and for how long, while the sewing machine reports how much thread it has left and how many stitches it has sewn. In subsequent chapters, we talk a lot about “sensors”.
The presence of the Thing also means that it can produce outputs into your world with what we call “actuators”. Some of these outputs could be triggered by data that has been collected and processed on the Internet. So your chair might vibrate to tell you that you have received email.
We could summarize these components in the following appealingly simple (though, of course, also simplistic) equation:
An equation for the Internet of Things.
Note that in all the cases we’ve looked at, the form of the object follows the function of the Thing: your chair is designed to sit on, the sewing machine to sew at, and so on. The fact of also being connected to the Internet and having general-purpose computing capabilities doesn’t necessarily have an impact on the form of the object at all. (One might argue that current-generation smartphones and tablets are in forms optimized for use as general-purpose computers, not as portable telephony devices. Certainly, on seeing the number of phones with scratched screens, one could ask whether they are designed to be easy to hold securely and resistant to drops and the impacts of everyday use.)
The Technology of the Internet of Things
In starting to define the Internet of Things, we compared it to the earlier concept of ubiquitous computing. We could compare that, in turn, with Bill Gates’s famous vision in 1977 of “a computer on every desk and in every home” (http://danbricklin.com/log/billg_entwof.htm) and again with the earlier notion of a computer as an astonishingly expensive and specialised machine, accessible only to universities, some forward-thinking global corporations, and the military. It is worth taking a little time to look at the Internet of Things through a lens of the history of technology to more clearly understand how and where it fits.
Technology’s great drivers have initially been fundamental needs, such as food and water, warmth, safety, and health. Hunting and foraging, fire, building and fortifications, and medicine grow out of these needs. Then, because resources for these things are not always distributed where and when one might like, technological advances progress with enabling and controlling the movement of people, their possessions, livestock, and other resources. Trade develops as a movement of goods from a place where they are plentiful and cheap to one where they are rare and valuable. Storage is a form of movement in time—for example, from harvest time, when food is plentiful and cheap, to the following winter, when it is highly valued.
Information becomes key, too—hence, the development of language to communicate technology to others. Travellers might pass on messages as well as goods and services, and an oral tradition allows this information to pass through time as well as space. The invention of writing makes this communication ever more important and allows, to some extent, human lives to be preserved in words by and about writers, from the ancient philosophers and poets to the present day. From writing, via the telegraph, radio, and television, to digital information, more and more technology has been about enabling the movement of information or doing interesting things with that information.
But the other human needs we looked at haven’t ceased to exist, nor will they. We still need to eat and drink. We still need light and warmth. We still need love and friendship. We still need chairs, clothes, and shoes; means of transport and communication; and ways to entertain ourselves. The shape and details of all of these things will change but not the needs they address.
As technology has progressed, new categories of objects have been created: in the electronic age, they have included telephones, radios, televisions, computers, and smartphones. As with most new technology, these devices tended to start out very expensive and gradually come down in price. Demand drives down prices, and research leads to optimization and miniaturisation. Ultimately, it becomes not just possible but also feasible to include functionality that would previously have required its own dedicated device inside another one. So although a television screen would originally have physically dominated a living room, not only are today’s flat-screen panels more compact, but the technology is so ubiquitous that a high-resolution screen capable of displaying television content can be embedded into a door frame or a kitchen unit, and of course, even smaller screens can find their way into music players and mobile phones.
Similarly with computers, it has become so cheap to produce a general-purpose microchip in devices that your washing machine may contain a computer running Linux, the cash register at the supermarket may run on Windows, and your video player may run a version of Apple’s OS X. But as we’ve already hinted at, mere computing power isn’t a sufficient precondition for the Internet of Things. Rather, we are looking at computing power linked on the one hand to electronic sensors and actuators which interact with the real world and on the other to the Internet. It turns out that the rapid sharing and processing of information with services or other consumers is a huge differentiator.
As an example, let’s consider the computers that exist in modern cars: they have myriad sensors to determine how well the car is running—from oil gauge and tyre pressure to the internals of your engine. As well as diagnostics, computerized brakes may assist the driver when the processor spots conditions such as the wheels locking or spinning out of control. All this is local information, and although the processing and analysis of this data may be highly sophisticated, it will be limited to whatever your car manufacturer has programmed. But perhaps your car also tracks your location using GPS: this is external (although not necessarily Internet-related) data. High-end cars may communicate the location back to a tracking service for insurance and anti-theft purposes. At this point, the car carries computing equipment that is able to not just passively consume data but also to have a dialogue with an external service. When your car’s computer is connected to the Internet (regularly or permanently), it enables services such as responding to traffic conditions in real time by rerouting around them. Your GPS might already supply such data, but now it can be created in real time by “social route planning” based on the data aggregated from what other connected drivers nearby are doing. When the previously internal data gets connected to the Internet, the ways it can be processed, analysed, aggregated, and remixed with other data open up all the possibilities that we’ve seen in existing connected areas and indeed new ones that we can’t yet imagine.
So there is a real change to an object or appliance when you embed computing power into it and another real change when you connect that power to the Internet. It is worth looking at why this latter change is happening now.
When the Internet moved out of academia and the military, with the first commercial Internet service providers (ISPs) opening for business in the late 1980s, the early adopters of the consumer Internet may have first gone online with a computer running an Intel 486 chip, costing around £1500, or around the price of a small car. Today a microchip with equivalent power might set you back around £0.50, or the price of a chocolate bar. The rapid rise of processing power, and the consequent cost decrease, is not a new insight: it is widely known as Moore’s law (the rule of thumb, suggested by the co-founder of Intel, that says the number of transistors you can fit on a silicon chip will double every 18 months).
However, the kind of price difference we’ve mentioned isn’t merely a question of degree: it is a qualitative as well as a quantitative change. This is a “long tail” phenomenon through which we have now hit the right price/performance sweet spot that means the cost of the computing horsepower required to talk to the Internet has fallen to a level where adding a network or computing capability is akin to choosing what type of material or finish to use—for example, whether to use a slightly more expensive wood veneer. Either option would add a little to the cost of the product but could also add disproportionately to its value to the customer. When Internet-capable computing cost thousands of pounds, this wasn’t an option, but now that it costs tens of pence, it is.
So the price of computing power has come down to affordable levels, but this is only part of the story. Manufacturers of electronic products have started to incorporate general-purpose computer CPUs into their products, from washing machines to cars, as they have seen that it has become, in many cases, cheaper to do this than to create custom chips. The wealth of programming and debugging resources available for these platforms has made them attractive to hobbyists and the prototyping market, leading to the proliferation of the microcontrollers, which we look at in Chapter 4, “Thinking About Prototyping”, and Chapter 5, “Prototyping for Specific Devices”.
Internet connectivity is also cheaper and more convenient than it used to be. Whereas in the past, we were tied to expensive and slow dial-up connections, nowadays in the UK, 76% of adults have broadband subscriptions, providing always-on connectivity to the Net. Wired Ethernet provides a fairly plug-and-play networking experience, but most home routers today also offer WiFi, which removes the need for running cables everywhere. While having an Internet-accessible computer in a fixed location was useful to those who needed to use it for work or studies, it would often be monopolized disproportionately by male and younger members of the family for general browsing or gaming. Now that the whole family can go online in the comfort of the living room sofa or their own room, they tend to do so in greater numbers and with ever greater confidence.
We hope the reader will excuse the preceding generalisation. As shown in the following figure, computer use in the UK between genders for the 16–24 age group is near identical since 2002. For the 55–74 group, there is a clear gap which persists, despite increasing take-up for both genders, until a tipping point around 2010 (http://w3.unece.org/pxweb/database/STAT/30-GE/09-Science_ICT/). Our hypothesis is that the shift is due, at least in part, to processing power and connectivity becoming cheap, widely available, and convenient. Not entirely coincidentally, these are the same factors we suggest help give rise to the Internet of Things.
UNECE statistics on gender and computer use.
For situations in which a fixed network connection isn’t readily available, mobile phone connectivity is widespread. Because the demand for connectivity is so great now, even embryonic solutions such as the whitespace network are available to use the airspace from the old analogue TV networks to fill gaps.
Another factor at play is the maturity of online platforms. Whereas early web apps were designed to be used only from a web browser, the much heralded “Web 2.0”, as well as bringing us “rich web apps”, popularized a style of programming using an Application Programming Interface (API), which allows other programs, rather than just users, to interact with and use the services on offer. This provides a ready ecosystem for other websites to “mash up” a number of services into something new, enables mobile phone “Apps”, and now makes it easy for connected devices to consume.
As the online services mature, so too do the tools used to build and scale them. Web services frameworks such as Python and Django or Ruby on Rails allow easy prototyping of the online component. Similarly, cloud services such as Amazon Web Services mean that such solutions can scale easily with use as they become more popular. In Chapter 7, “Prototyping Online Components”, we look at web programming for the Internet of Things.
Enchanted Objects
The best known of Arthur C. Clarke’s “three laws of prediction” states
Any sufficiently advanced technology is indistinguishable from magic.
—http://en.wikipedia.org/wiki/Clarke’s_three_laws
We’ve already seen how technology has evolved to meet our needs and desires. The parallel invention of magic serves largely similar goals. After all, the objects in folktales and fairy tales are often wish-fulfilment fantasies to fill the deepest desires: if only I had enough to eat; if only my mother was well again; if only I could talk to my friend even though I’m far away; if only I could get home; if only I didn’t have to work every hour of the day to earn enough money for my family to eat. Literary and anthropological scholars have long studied fairy tales for the lessons that can be learnt about the basic rules of human narrative and meaning and have analysed the characters, storylines, and objects found within them. For example, the formalist scholar Vladimir Propp categorized the folktales of his native Russia and categorised their plot elements into 31 functions, including “violation of interdiction”, “villainy”, “receipt of a magical agent”, “difficult task”, and so on.
More recently, and from the point of view of a Silicon Valley entrepreneur and technologist, David Rose has talked about Enchanted Objects at TEDx Berkeley (http://tedxtalks.ted.com/video/TEDxBerkeley-David-Rose-Enchant) and has categorised various objects drawn from fairy tales and fantasy literature in ways that apply as much to technological objects. For Protection, just as magical swords and helmets protected the protagonists of fairy tales from their enemies, so has much of the development of science and technology throughout history been driven by the need for military superiority, for the purpose of security or conquest. Health has been a driver for many quests to find an ingredient for a health potion and for research into various branches of medicine, pharmacology and surgery, physiotherapy, and diet. Humans have always desired Omniscience, from Snow White’s wicked stepmother asking “Mirror mirror on the wall, who’s the fairest of them all?” to the friends settling an argument of fact by looking up articles from Wikipedia on their smartphones. Human Connection, even when one’s loved ones are far away, is an urgent, aching need: the Finnish hero Lemminkäinen’s family know that he has been hurt when the enchanted comb that he left on the mantelpiece starts to bleed. Similarly, the postal service, telephones, and social networking help keep us in touch with our family and friends. The ancient storytellers yearning for Effortless Mobility invented seven-league boots, flying carpets, and even teleportation. Through technology, we have invented cars and railways, bicycles, and aeroplanes. The need for Creative Expression is fulfilled in stories by the enchanted paintbrushes or magic flutes and harps, while we have always used technology to devise such creative outlets, from charcoal to paint to computer graphics, or from drums to violins and electronic synthesisers.
So, technology has always been associated with magic, and so this will be true almost by default for the Internet of Things. But there is more to it than that: a key element of many enchanted objects is that above and beyond their practical enchantment they are given a name and a personality—implying an intelligence greater than strictly necessary to carry out the task for which they are designed. Examples of this abound, each with its own personality and morality, from the Finnish mill of plenty, named the Sampo, and the Arthurian Excalibur, to the malevolent intelligences of Tolkien’s One Ring and Moorcock’s Stormbringer. Just as these enchanted mills, swords, and rings are capable of more than just their functional specification, so our connected devices, or Things, have processing and communicating capabilities well beyond the needs of the average lamp, umbrella, or bubble machine.
Who is Making the Internet of Things?
Although we look at various theoretical aspects in this book, we are largely interested in the practice of actually designing and making Internet-connected Things. As Internet of Things thought leader and entrepreneur Alexandra Deschamps-Sonsino noted at the Victoria and Albert Museum’s Power of Making Symposium, both these words mean many things to different people. The following graphic depicts her initial attempt to map out the meaning of making things:
“I Make Things”.
There are many crossover points between all the disciplines listed. Artists may collaborate with designers on installations or with traditional craftspeople on printmaking. Designers and engineers work closely to make industrial products, and hobbyist “hackers” (in the sense of tinkerers and amateur engineers), by their nature, are a diverse group encompassing various technical and artistic interests and skills. The map isn’t complete, and one could raise issue with omissions: no role of “architect” is listed, only the discipline of architecture, straddling the roles of engineer, designer, and craftsperson.
A more striking omission, given Deschamps-Sonsino’s pedigree as an Internet of Things innovator, is the role of “builder of the Internet of Things”. And, of course, this is not accidental. Rather, the Internet of Things straddles all these disciplines: a hacker might tinker at the prototype for a Thing; a software developer might write the online component; a designer might turn the ugly prototype into a thing of beauty, possibly invoking the skills of a craftsperson, and an engineer might be required to solve difficult technical challenges, especially in scaling up to production. Finally, as we will see in Chapter 2, “Design Principles for Connected Devices”, the Internet of Things is, or should be, the “Internet of Beautiful Things”, and every object, as well as being a crafted, designed, and engineered object, is, or could be, the work of an artist also.
Of course, it is a rare Renaissance individual who covers all these disciplines with the fluency and ease that are conducive to creating a truly successful product. If you fit only one or a handful of these roles, you can still learn enough of the others to get things going. Getting additional expertise to make a project work, from prototype to production, is no bad thing and is something that we touch on in Chapter 9, “Business Models”, and Chapter 10, “Moving to Manufacture”. The most important lesson, however, is that whatever your interest as a creative person, you are abundantly qualified to get involved in the exciting field of the Internet of Things!
Summary
We began by looking at some examples of the Internet of Things in action. Throughout the book, we discuss many similar projects, from the perspective of creating the first prototypes in Part I, to the extra effort required to manufacture and distribute them commercially in Part II. The Internet of Things can be characterised as joining the physical object, the computer embedded into it, and communication and code on the Internet itself. We focus on these three elements in both the prototyping and the manufacturing sections.
We compared Internet-connected devices to enchanted objects, and we will come back to this theme throughout the book, starting with the next chapter on design principles. These principles will, we hope, give rise to elegant, usable, interesting devices which delight their users. Creating a delightful and magical object may seem a daunting task, and as we saw in the previous section, the expertise required to make an Internet “Thing” is vast. However, this means that the playing field for making such a connected device is astonishingly level. Whatever your own skills and interests, you are as well placed as anyone to start experimenting and building. There really is no better time to enter the exciting world of the Internet of Things.
2
Design Principles for Connected Devices
This book is called Designing the Internet of Things, so does that mean we think design is an important part of building a connected device?
For some applications, you may think that design isn’t important at first glance. Who cares what the box holding a production-line sensor looks like in a factory? Surely form is defined by function?
Although the physical design of your connected device may be less important than that of something you’re going to set on your mantelpiece, the extra functionality regarding how it will interact with the rest of the factory and its control systems is something you should consider and think through rather than just leave to chance.
If you haven’t spent much time with designers, you might be forgiven for thinking that design is merely concerned with the shape and look of an object—something ornamental, to give it a pleasing appearance. However, design is a much wider field than that.
Industrial design (sometimes also called product design) does include the form and decoration of the item, but it also covers functional aspects such as working out how the product will be constructed or ensuring the controls are easily understood.
The user interface to the object—be that on a screen or the more traditional buttons and switches—is also something of interest to the discipline of experience design. That takes the perspective of the end user of the design as its focus and seeks to create the best solution for the user. Obviously “best” is subjective and could aim to make using the device as enjoyable as possible, or perhaps as efficient as possible, depending on the priorities of the designer or her team.
The rise of digital services, particularly those which take advantage of the Internet and the network effects it enables, has led to design specialists who take a wider view of the design of the whole system. Service design has the broadest view of the service in its entirety, whereas interaction design also looks at how different parts of the system interrelate, and especially how the user features in that interaction.
There are no hard boundaries between these differing facets of design, but we think designers of all types would agree that design is about more than just the surface look of the device.
In this chapter we look at some of the overarching principles that can be applied when designing an Internet of Things system, and then visit some of the techniques you can use to help explore the problem space and end up with a stronger product. Not all the techniques apply in all cases, but they provide some useful rules of thumb in approaching your work.
Calm and Ambient Technology
The Internet of Things has its roots in the work done by Mark Weiser at Xerox PARC in the 1990s. His work didn’t assume that there would be network connectivity but was concerned with what happens when computing power becomes cheap enough that it can be embedded into all manner of everyday objects. He coined the term ubiquitous computing, or ubicomp for short, to describe it, and through his research and writing sought to explore what that would mean for the people living in such a world.
With its focus on computing power being embedded everywhere, ubicomp is often also referred to as ambient computing. However, the term “ambient” also has connotations of being merely in the background, not something to which we actively pay attention and in some cases as something which we seek to remove (e.g., ambient noise in a sound recording).
We prefer, as did Mark Weiser, the term calm technology—systems which don’t vie for attention yet are ready to provide utility or useful information when we decide to give them some attention.
Such proliferation of computing devices into the world comes with all manner of new challenges. Issues include configuration, how to provide power to all these items, how they talk to each other, and how they communicate with us.
The power and networking challenges are purely technical and are driving developments such as 6LoWPAN (www.ietf.org/dyn/wg/charter/6lowpan-charter.html). This is a standards drive from a working group of academics, computing professionals, and others to take the next-generation Internet protocol (IPv6) to the simplest and lowest-power networked sensors. (It is revisited when we look at future developments in the next chapter.) It aims to provide the scale of addresses and lower power usage needed by so many sensors.
Configuration and user interaction, however, obviously involve people and so are difficult problems to solve with just technical solutions. This is where good design can aid in adoption and usability. You can see this with the introduction of the Apple iPod in 2001. It wasn’t the first portable MP3 player, but the combination of the scroll-wheel user interface and the companion iTunes software made it much easier to use and turned them into mass market gadgets.
Designing a connected device in isolation is likely to lead you to design decisions which aren’t ideal when that object or service is placed into the seething mess that is the real world. To bastardize Eliel Saarinen’s maxim on design, we suggest you think of how the connected device will interact as one of a wealth of connected devices.
In addition to thinking of a device in the physical context one step larger—Saarinen’s “Always design a thing by considering it in its next larger context—a chair in a room, a room in a house, a house in an environment, an environment in a city plan”—we should do the same for the services.
For connected devices which are just sensing their world, or generally acting as inputs, as long as their activity doesn’t require them to query the people around them, there shouldn’t be any issues. They will happily collect information and deposit it into some repository online for processing or analysis.
When the devices start interacting with people, things get more complicated. Already we’re seeing the number of notifications, pop-ups, and indicator noises on our computers and mobile phones proliferate. When we scale up this number to include hundreds of new services and applications and then spread that across the rest of the objects in our world, it will become an attention-seeking cacophony.
Mark Weiser and John Seely Brown proposed an antidote to such a problem by suggesting we design ubiquitous computing systems to seek to blend into their surroundings; in so doing, we could keep them in our peripheral perception until the right time to take centre stage:
Calm technology engages both the center and the periphery of our attention, and in fact moves back and forth between the two.
—Designing Calm Technology, Mark Weiser and John Seely Brown, Xerox PARC, December 21, 1995
A great example of this approach is Live Wire, one of the first Internet of Things devices. Created by artist Natalie Jeremijenko when she was in residence at Xerox PARC under the guidance of Mark Weiser, Live Wire (also sometimes called Dangling String) is a simple device: an electric motor connected to an eight-foot long piece of plastic string. The power for the motor is provided by the data transmissions on the Ethernet network to which it is connected, so it twitches whenever a packet of information is sent across the network.
Under normal, light network load, the string twitches occasionally. If the network is overloaded, the string whirls madly, accompanied by a distinctive noise from the motor’s activity. Conversely, if no network activity is occurring, an unusual stillness comes over the string. Both extremes of activity therefore alert the nearby human (who is used to the normal behaviour) that something is amiss and lets him investigate further.
Not all technology need be calm. A calm videogame would get little use; the point is to be excited. But too much design focuses on the object itself and its surface features without regard for context. We must learn to design for the periphery so that we can most fully command technology without being dominated by it.
—Designing Calm Technology, Mark Weiser and John Seely Brown, Xerox PARC December 21, 1995
The mention of the distinctive sound from the motor when the Live Wire is under heavy load brings up another interesting point. Moving the means of conveying information away from screens and into the real world often adds a new dimension to the notification. On a computer, updating the screen is purely visual, so any additional senses must be engaged explicitly. Like Live Wire, Bubblino—Adrian’s Internet of Things bubble machine which searches Twitter and blows bubbles when it finds new tweets matching a search phrase (see the case study in Chapter 4)—is a good example in which the side effect of the motor is to generate an audible notification that something is happening. With their Olly (www.ollyfactory.com) device, agency Mint Digital combines the motor with a deliberate olfactory indicator to provide a smelly notification of one of a number of social media events.
These noisy “side effects” are something that we should also be wary of losing with a move to “better” technology. Years ago all airport and railway arrival and departure boards were built using split-flap displays. They consisted of a number of flaps on a roll—sometimes with full place names printed onto the flap, and in other times as individually controllable characters—which could be rotated until they showed the correct item.
In most locations these split-flap displays have been phased out in preference for dot-matrix LED displays. The newer displays are much easier to update with new destinations. They also have capabilities such as horizontally scrolling messages which were impossible to add with the split-flap technology. Sadly, in doing so they have lost one important characteristic: the flurry of clacking as the display updates. As a result, passengers waiting in a station terminal must stare endlessly up at the display waiting for their train to be announced, rather than attending to other tasks and checking the departures board only when a change occurs.
That is not to say that screens are never the right choice, merely that in this age of mobile phones and tablets they are often chosen without realising a choice is being made. If you start from a position of trying not
