“Connected (IoT) Machines have conquered the world in a way humanity has never undertaken before”
Actually, that’s not a phrase from the Terminator movies, it’s just the reality of nowadays!
Statistics show that the number of connected devices in 2018 are 23+ billion. This is almost 3 times the population density of the Earth, which is 7.6 billion at the time of writing this blog.
Furthermore, this number is increasing and forecasted to reach 75+ billion in the next decade:
Even more, in 2016, the investments in the IoT technology were around $157 billion. It’s expected to reach $457 billion by the end of 2020.
So, we are talking about a massive industry here conquering the market, indeed!
The first IoT blog of a series of IoT Blogs
So, in this blog, I will walk you through IoT concepts and how IoT works. Moreover, in upcoming blogs, I will be explaining MQTT protocol. Also, I will be walking through some real-world projects using Arduino with 1Sheeld. It’s a blog series, and this is the first of it!
What is IoT?
Basically, “Internet of Things” is simply, devices which are connected together over the Internet. Hence, this connectivity allows them to be online all the time to share data between them. Also, analyze and make automated and real-time decisions based on these data.
IoT Example scenario:
For instance, there is a patient alone in his bedroom. He has many medical sensors connected to his body. Like blood pressure, heartbeat, pacemaker, breath rate .. etc.
These sensors are connected to a monitor which is, connected to the internet, indeed.
Let’s say the monitor detects an abnormal physiological activity that may cause a heart attack. Therefore, it sends an alarm to the IoT network. Aside to the patient’s location and his medical record.
Hospital and ambulances are connected to this network too and will receive this information.
Then this scenario will happen:
Firstly, the nearest ambulance will hurry up to the patient location they got. And deliver him to the hospital as quick as possible. This will avoid that delay caused by looking manually for the nearest available ambulance.
Even more, the hospital emergency doctors will get a detailed medical record of this patient and his current medical status. Hence, they can perform the required medical procedures quickly once the ambulance delivers the patient. Again, this will avoid the normal delay caused by extra examinations to know the patient health status.
Significantly, All these actions will happen:
In real time
With less effort
And all these above 4 elements are the most important features about IoT.
Moreover, another common example is the Internet-connected fridge. Once it detects that there is a shortage of any essential product, like milk, it automatically purchases milk from the online store.
How does IoT work?
IoT system consists of some devices, which are connected through the Internet to a certain online network(called platform). Consequently, users can monitor, manage and control these devices through an application.
So, what are the components of an IoT system?
Watson is an IBM cloud software that works as an IoT platform
Basically, a Typical IoT system consists mainly of 4 parts as illustrated in the image above and here they are:
Each device has one or more sensor to detect the environmental parameter and send them to the cloud network (platform).
2. Internet Connectivity:
That’s the guy who is responsible for connecting the devices to the Internet to be able to connect to the online platform. Wifi is one of the most popular Internet connectivity methods.
Another method is the ethernet, but it’s rarely used nowadays in IoT applications.
Here comes the most important, but confusing part of the IoT system. But I will simplify it for you.
Simply, the IoT platform is a software that’s hosted online. You can consider it as a network that all devices are connected to. The platform is smart enough to collect devices’ data, analyze, process and make decisions based on this data.
Do you remember the patient and hospital example?
The alert that the patient monitor sent to the online network(let’s call it the platform from now on)?
It’s the platform (the white cloud shape) that received the alarm, made the decision of calling the nearest ambulance and sent the patient’s medical record to the hospital.
Basically, an IoT platform is responsible for:
Connecting the devices to one specific online area.
Collecting data received from the devices.
Monitoring, storing, processing, analyzing and computing these data.
Taking decisions based on a pre-setted threshold of the processed data.
Working with different data exchange protocols (I will explain this later).
Integration with applications (online services, web apps, mobile apps, ..etc).
And you can figure out more about what platform does from this table:
The application is the interface between the user and the platform. So, whenever the user wants to monitor, configure or control a device, he will interact with the application.
Back to the patient and hospital example, doctors are the user. They can use an application to monitor the patient’s cardiograph and control the defibrillator.
The cardiograph sensor always sends the patient’s heart pulses he reads to the platform. If the cardiograph sensor reported a heart attack problem to the platform, then 2 scenarios can happen:
The doctor manually orders the platform by using the application to tell the defibrillator device to give a shock to the patient’s heart until the ambulance reaches him.
The doctor configures the application to automatically tells the platform to order the defibrillator device to give a shock to the patient’s heart until the ambulance reaches him.
So, by using an application that’s connected to the platform, you can monitor and control all your devices’ data and actions.
But why this long and indirect process?
As can be seen, devices don’t directly communicate with each other. Since they communicate with the platform. But can’t they do it without the need of the platform?
Actually, they can but this is considered as a small and unsecured application of IoT, not what enterprises do for sure.
So, if you have a little number of connected devices, then you can go without the platform.
And in the upcoming blogs, I will be making small IoT projects without using a platform. That’s because I want to simplify the IoT concepts and make it easy for you to create your own real-world IoT-based projects.
How do these devices communicate with each other?
Certainly, web browsers use HTTP protocol to communicate with the servers on the internet. Likewise, IoT devices use specific protocols to communicate (send and receive data) over the internet to each other.
And here are some of the most known IoT protocols:
CoAP (Constrained Application Protocol)
AMQP (Advanced Message Queuing Protocol)
DDS (Data Distribution Service)
STOMP (Simple Text Oriented Messaging Protocol)
MQTT (Message Queue Telemetry Transport)
The last one is the most used protocol in IoT projects. That’s due to it’s fast, lightweight and easy to implement.
I have explained all that you need to know about MQTT to use it in your Arduino projects in this MQTT blog.
Some IoT-based consumer products
To get more insights about the industrial use of the IoT, I recommend you check these consumer IoT-based products:
Arduino makers …. you can connect your Arduino to MQTT brokers(servers) and launch your IoT with Arduino IoT Shield! It’s the 1Sheeld IoT shield that will do the job for you. It’s one of the most important but recent Arduino shields in 1Sheeld. Simply, it turns your Arduino into MQTT client where you can publish and …
Monitor my home environmental parameters remotely is one of the most desirable things I have ever wanted to make. It’s not about purchasing such a system that can get the job done for me. But, passion to create it myself. So, today, I am going to connect the popular DHT sensor to an online MQTT …
“Oh God! … It seems like I have forgotten the door lock open, again” … the normal saying whenever I am in hurry to go out! Have you encountered this problem before? It always confuses me since I may even think that I have left the door lock opened, and once I go back, …
Here I am with another IoT-based home automation project; Arduino IoT Fan Control. Every day, I get back from work tired and feeling hot. No air conditioner here and the fan takes much time to start cooling the room, sadly! So, I was thinking why not controlling the fan from outside my home with my …
Have you ever forgotten to turn your home lights off when you got outside? Sadly, it happens to me all the time. And this causes confusion once I get my bills! Furthermore, here is one secret about me; I am a lazy man. I always want to control my room lamp from my sweet bed. …
MQTT is one of the most commonly used protocols in IoT projects. It stands for Message Queuing Telemetry Transport. In addition, it is designed as a lightweight messaging protocol that uses publish/subscribe operations to exchange data between clients and the server. Furthermore, its small size, low power usage, minimized data packets and ease of implementation …