Book Image

Hands-On Internet of Things with MQTT

By : Tim Pulver
Book Image

Hands-On Internet of Things with MQTT

By: Tim Pulver

Overview of this book

MQ Telemetry Transport (MQTT) is a lightweight messaging protocol for smart devices that can be used to build exciting, highly scalable Internet of Things (IoT) projects. This book will get you started with a quick introduction to the concepts of IoT and MQTT and explain how the latter can help you build your own internet-connected prototypes. As you advance, you’ll gain insights into how microcontrollers communicate, and you'll get to grips with the different messaging protocols and techniques involved. Once you are well-versed with the essential concepts, you’ll be able to put what you’ve learned into practice by building three projects from scratch, including an automatic pet food dispenser and a smart e-ink to-do display. You’ll also discover how to present your own prototypes professionally. In addition to this, you'll learn how to use technologies from third-party web service providers, along with other rapid prototyping technologies, such as laser cutting, 3D printing, and PCB production. By the end of this book, you’ll have gained hands-on experience in using MQTT to build your own IoT prototypes.
Table of Contents (16 chapters)
Title Page

What this book covers

Chapter 1, The Internet of Things in a Nutshell, gives you an overview of fields where IoT plays an important role. It introduces you to smart cars, the Industrial Internet of Things (IIoT), and smart homes.

Chapter 2, Basic Architecture of an IoT Prototype, introduces you to related technologies and concepts, as well as microcontroller recommendations for IoT prototyping. This chapter touches on a lot of topics and should be seen as a starting point for your own learning, after which you can dig deeper into the topics that interest you.

Chapter 3, Getting Started with MQTT, explains the concepts behind MQTT, the lightweight IoT protocol we will be using throughout the entire book. While we only use a subset of the features explained in this chapter during the hands-on projects, you can use it as a reference to go back to if you want to create more advanced MQTT projects later. Feel free to create a bookmark for this chapter, as you will hopefully re-read fragments from it.

Chapter 4, Setting Up a Lab Environment, explains how to install the software needed for the hands-on projects. It also includes a shopping list with all the necessary hardware for the projects.

Chapter 5, Building Your Own Automatic Pet Food Dispenser, is the first hands-on project in the book. It will show you, using a servo motor, how to control an automatic dispenser using MQTT, either from your computer or smartphone using one of the apps introduced in Chapter 3, Getting Started with MQTT. You can fill the dispenser with pet food, sweets, cereals, or whatever you like.

Chapter 6, Building a Smart E-Ink To-Do List, is the second hands-on project in the book. In this chapter, you will learn how to use an energy-efficient e-ink display and send text to it using MQTT. The display could, for example, be hung next to your front door to remind you to take out the trash or buy milk.

Chapter 7, Building a Smart Productivity Cube, Part 1, is the third and final hands-on project in the book. It explains how to create an orientation sensor from scratch using simple electrical components called tilt switches. The cube can then be used to record the time you spend on various activities. Because all three projects use MQTT, they can also be chained together, such that activating the smart productivity cube might show some text on the e-ink display and activate the food dispenser.

Chapter 8, Building a Smart Productivity Cube, Part 2, is the second part of building a smart productivity cube. Based on the prototype that we built together in the previous chapter, we will add MQTT connectivity and make use of third-party MQTT clients to receive and display the data coming from your prototype.

Chapter 9, Presenting Your Own Prototype, introduces technologies such as laser cutting and 3D printing to build great-looking and sturdy cases. It will give you an idea of how professional prototypes are made using Printed Circuit Board (PCB) services and software. While making a product out of your ideas probably seems far-fetched to you, I want you to explore different options and where continuing on this path might lead you.