Reader small image

You're reading from  Internet of Things from Scratch

Product typeBook
Published inFeb 2024
PublisherPackt
ISBN-139781837638543
Edition1st Edition
Right arrow
Author (1)
Renaldi Gondosubroto
Renaldi Gondosubroto
author image
Renaldi Gondosubroto

Renaldi Gondosubroto is an accomplished software engineer and developer advocate in the tech community. With a wealth of experience in developing proprietary and open-source solutions, he has made significant contributions to numerous organizations and communities. Currently, he holds all 12 AWS certifications, along with 20 Microsoft Azure certifications. He has a Bachelor of Science in Computing and Software Systems from the University of Melbourne and a Master of Science in Computer Science from Columbia University. Outside of the industry, he is active in the academic community, with his research focused on IoT and Artificial Intelligence. Having spoken at over 40 events, conferences, and workshops, he has been an international speaker for the past six years, sharing his experiences and projects. He aims to build open-source solutions and deliver content that can help people achieve more value in what they do and promote best practices for practitioners.
Read more about Renaldi Gondosubroto

Right arrow

Examining Communication and Connectivity Technologies

In Chapter 3, Integrating Application Protocols we learned how to form IoT networks, understanding the fundamental components that constitute them and how we can connect them to establish the respective networks. We also had a high-level look at a few key communication protocols that help with building the network while understanding the considerations that we take to ensure that our design choices are optimized based on our use cases. That, paired with our understanding of application protocols in Chapter 3, will allow us to take a deeper look at some advanced communication and connectivity protocols and understand more complex deployments in this chapter.

When navigating this chapter, ensure that you not only take in the high-level overview of the networks but understand how the protocols work and deliver the data. Understanding a low-level view of how data packets are transferred will help you think more critically about solutions...

Technical requirements

This chapter will require you to have the following hardware and software installed:

  • Hardware:
    • ESP32
    • A key fob
    • The RFID RC522 module
    • USB cable A male to micro B male
  • Software:

You can access the GitHub folder that contains the code for this chapter at https://github.com/PacktPublishing/IoT-Made-Easy-for-Beginners/tree/main/Chapter04/.

The role of short- and long-range protocols within IoT

In designing an IoT network, deciding whether to use short- or long-range connectivity protocols is a straightforward but crucial decision. Both have their advantages and disadvantages and deciding on this will depend on your individual use case. In this section, we will highlight some factors to consider and talk about the remaining component of connectivity protocols that we have not yet discussed: long-range protocols.

Design factors

In designing networks, protocols such as Zigbee and Bluetooth are often chosen for communication within confined areas such as homes or industrial office buildings. While they excel in low power consumption and robust security features, their operational range is limited, making them unsuitable for covering large distances. However, their lower hardware costs and ability to deliver reliable services within their operational bounds make them the preferred choice for many localized applications...

Mesh networking, RFID, and Bluetooth

Many protocols are yet to be mentioned as part of IoT. Here, we’ll highlight three more to add to your toolkit, with a special emphasis on RFID technologies, given their prevalence within open source and industrial communities.

RFID

RFID technologies are used to identify and track objects through radio waves, and in IoT, they are used to track a wide array of devices or sometimes people. There are two main types of RFID technologies: passive and active. Passive ones use tags that do not have power sources and instead depend on the power transmitted by the reader for them to send their data, while active systems use tags that have power sources and can transmit data over longer distances.

RFID technologies can identify and track objects without necessitating a direct line of sight, making them perfect to use within environments where objects are difficult to track, such as in manufacturing environments or within warehouses. They can...

Examining edge cases for protocol selection and operation

In industry-based settings, we will often encounter scenarios where we must figure out the best solutions when it comes to edge cases. Edge cases, in this context, are cases where certain circumstances out of your control may occur, and you will need to account for this despite having no historical event of a similar occurrence which you can learn from.

In this section, we will discuss how to account for this with complex environments, understand the key factors to consider in such environments, and look at a case study to see how such factors are considered within a real industry-based scenario.

Understanding the fundamental rules of architecting for different areas

First, let’s look at three key factors that often lead to uncovering edge cases when architecting within the different environments around us.

Environment

In our deployment, it is crucial to understand where we are putting the equipment with...

Practical scenario – working with multiple communication protocols with ESP32

In this hands-on project, we’ll build an access control system using an MFRC522 RFID reader connected to an ESP32 microcontroller. This system will read, write, and register MIFARE 13.56 MHz RFID cards. When a scanned ID card matches any registered ID, the microcontroller will issue an MQTT publish message. This message instructs a remote MQTT subscriber, running on another ESP32 microcontroller, to activate the corresponding switch meant to enable door access. However, in this demonstration, we won’t connect to an actual switch. Instead, we’ll illuminate the built-in LED on the MQTT subscriber’s ESP32 microcontroller to simulate the process.

You will require the following materials:

  • 2x ESP32 NodeMCU microcontroller
  • 1x MFRC522 RFID card reader
  • 1x push button (latch) switch
  • 2x MIFARE 13.56 MHz RFID cards, fobs, or NFC cards
  • Jumper cables
...

Summary

In this chapter, we learned more about communication and connectivity protocols, understanding how to apply long-range protocols to the networking knowledge that we gained in Chapter 2, Understanding and Designing IoT Networks and understanding more about how to apply the relevant protocols to our use case. We learned more about what we must consider in creating an optimal deployment that meets our needs. We also looked at edge cases in creating networks, understanding how to cater to complex needs, and considering multiple protocols to achieve the optimal design.

Then, we put what we learned into practice by completing some practical exercises, including working with an RFID module based on the ESP32 microcontroller, designing more complex networks based on select use cases, and creating a network hub model based on the ESP32 microcontroller while catering to multiple protocols that are present at the same time. With this practice, you will have become more confident in...

Further reading

For more information about what was covered in this chapter, please refer to the following links:

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Internet of Things from Scratch
Published in: Feb 2024Publisher: PacktISBN-13: 9781837638543
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Renaldi Gondosubroto

Renaldi Gondosubroto is an accomplished software engineer and developer advocate in the tech community. With a wealth of experience in developing proprietary and open-source solutions, he has made significant contributions to numerous organizations and communities. Currently, he holds all 12 AWS certifications, along with 20 Microsoft Azure certifications. He has a Bachelor of Science in Computing and Software Systems from the University of Melbourne and a Master of Science in Computer Science from Columbia University. Outside of the industry, he is active in the academic community, with his research focused on IoT and Artificial Intelligence. Having spoken at over 40 events, conferences, and workshops, he has been an international speaker for the past six years, sharing his experiences and projects. He aims to build open-source solutions and deliver content that can help people achieve more value in what they do and promote best practices for practitioners.
Read more about Renaldi Gondosubroto