Smart Home Automation With Humidity-Controlled Using Blynk

The ioT-based home automation system is revolutionising day by day according to our needs. Everywhere in technical industries are using artificial intelligence for their work to be easy. As the term “home automation” or “automated home” suggested, it may mean two meanings for everyone. Some readers think it is on/off devices such as time clocks controlling a lamp as smart home automation. Others would consider home automation a managing service that can monitor events in the home and make adjustments when necessary. Others thought it is a high-end system where a virtual assistant handles all of the automation work alone. None of these views would be wrong.

However the purpose of this article, home automation is to make it easy for the do-it-yourself by employing computer software that will become artificial intelligence to manage controllable tasks through the system. The projects in this article will allow an operator to operate a high-end smart home automation system. There are millions of households in the world using some level of partially to fully integrated home automation features.

We often use our voice to control our phones, so why not use it to control the entire home? Today this is not impossible, even easy, to control on/off devices such as lights, temperature, and appliances using single touch, voice and remote
controls. On the one hand, these on/off smart home automation devices save effort and energy. But on the other hand, adjustments are inconvenient and require the user to be present and knowledgeable enough to make the changes.

Implementing 21st-century, smart home automation with the projects described in this article can eliminate a majority of the negative issues associated with on/off remote control devices. It brings full automation and increased levels of control for all the fixtures, equipment, and appliances in the home.

Must Read Home Automation System Using Cayenne Platform

What is Smart Home Automation System?

In addition, to control electronic devices, the concept of “Smart Home Automation” is further enhanced. Home automation is a hardware network that works to communicate everyday devices with one another through internet service (IoT). It connects all devices with a common single central controlling unit which depends on the user input. These devices have a wifi system to interface with smartphones or tablets whether users are at home or anywhere in the world.

Concept of Internet of Things (IoT)

When talking about smart home automation systems, the so-called name Internet of Things (IoT) comes. The concept of IoT associates was to set up a zone around all your devices to establish a secure network connection.

From the name suggested, it is clear that all the devices with IoT enabled are connected via the same network remotely. It works by a secure cloud server where users can operate every device connected to that from anywhere. This gives us not only better control but also offers comfort and security in our daily life.

It sends notifications and emails 24/7 through a cloud server to notify us when unwanted activity happens. IoT spreads its value to industrial sectors beyond smart home automation.

Project

Smart Home Automation With Humidity Controlled Using Blynk

We will show you a smart home automation system with LDR, temperature, and humidity features in this build. Also, it has an external push-button and touches switch features. This system works via Blynk software which is easy to control.

About The Parts of Smart Home Automation

This project includes two main parts. First is hardware, which allows us to control over sensors and actuators of the smart home automation system. The second is the server, which manages, controls and monitors the user’s home.

An IoT system is built up with basic sensors, actuators, embedded systems, networks, user interface and data storage. These are discussed in detail below.

Sensors

There are three types of sensors that we use to build this system using Blynk software. The first one is the DHT11 sensor which can sense temperature and humidity both. The second one is LDR which controls the automatic on/off features of the system. And the third sensor is a touch sensor, which is used to control the actuators manually via touch.

Actuators

The 5V two-channel relay module is used here as an actuator. Basically, the output pins that are directly connected to the relay input are called actuators. Electrical loads like AC lights, fans etc are connected to the common and normally open terminals of the relays. This relay module is controlled by the Blynk app through smartphones.

Embedded System

Every smart home automation device needs a proper embedded system that can handle the whole process. ESP8266 NodeMCU plays the role here as an embedded controller. It is programmable by Arduino IDE software. The NodeMCU controls digital and Analog data from the receiver and transmits this via a web server. At the same time, its process commands are given by sensors and actuators.

Network

To link all the devices with the embedded system, we need a proper network to communicate with each other.

User Interface

For sending data from the receiver to the transmitter, we need a user interface to control devices from anywhere. In this project, we introduce the Blynk platform to make this smart home automation system. It is too simple to use. It also provides non-programmable buttons to save our time and effort from programming.

Data Storage

The data storage used here is also provided by the Blynk cloud platform. Big data storage is basically huge data that is collected from all devices. This type of data always varies from device to device. Being a cloud server, the data speed is very high.

Circuit Diagram

Smart Home Automation Using Blynk Circuit Diagram

Components Required

  • ESP8266 NodeMCU
  • DHT11 Humidity Sensor
  • LDR Sensor
  • Touch Sensor (x3)
  • 5V Relay (x2)
  • 817 Opto Coupler (x2)
  • BC547 NPN Transistor (x2)
  • Push Button (x3)
  • Red LED (x2)
  • Green LED (x2)
  • 1N4007 PN Diode (x2)
  • Screw Terminal (x2)
  • 330Ω Resistor (x2)
  • 1KΩ Resistor (2)
  • Wires

Software Required for Smart Home Automation

Communication between devices and the Blynk IoT platform will be established when there is a network connection present.

To upload code to ESP8266 NodeMCU, we need Arduino IDE software.

  • First, open the Arduino IDE software
  • Go to File and select Preferences and paste the link “https://arduino.esp8266.com/stable/package_esp8266com_index.json” in Additional Board Manager URLs to add the ESP8266 board. Open Boards Manager from the Tools menu and type ESP8266 to install the ESP8266 platform.
  • For programming the ESP8266 module, one unique identity is required from the Blynk software. That is Auth code. After connecting to a network this ID help to communicate the device with it.
  • Connecting to the local WiFi network requires WiFi SSID and password.
  • Before compiling and loading the code to this module, we have to install the Adafruit Sensor Library, Blynk Library, DHT11 Library, and OLED Library.

To add these libraries to Arduino IDE, go to Sketch – Include Library – Add .zip Library – locate and install files.

Preparing Smart Home Automation Dashboard Using Blynk

Open the official Blynk app and create an account for yourself. After creating a new project, you will get the Auth token via your email.

Copy this Auth token and paste it into the appropriate fields of the Arduino ESP8266 code. After that, upload the Arduino IDE code to the NodeMCU and wait for connecting with the device on the network.

The next page will show a blank space to add buttons for the system. Tap on the blank space and choose the button option and add this. Again click on this and choose a virtual pin and select the desired pin which you include in your Arduino code. Then click OK and press back.

Continue with the same process as the other one. After that choose the gauge button for temperature and humidity and choose their virtual pins. Finally, get back to the homepage and click on the play button on the upper right side. You can control then your devices through this Blynk app.

Working Principle of Smart Home Automation System

The ESP8266-based smart home automation system is built around wifi module ESP8266, LDR, DHT11 sensor, three touch sensors, OLED display and two relays.

This circuit has two sensor parts. The first part is an Analog input to measure light intensity through the LDR sensor. The second part is digital input to read values of temperature and humidity through the DHT11 humidity sensor. For measuring a wide range of temperatures and humidity, you can use DHT22 as the replacement for DHT11.

We need a 5V DC supply to power up this circuit, as it needs to drive relays. Then we have to power the ESP8266 NodeMCU also. ESP8266 NodeMCU V1.0 has 11 GPIO pins and one ADC pin with a 10-bit resolution. In the figure, we explain the pin configuration of ESP8266. This module has a 3.3V inbuilt voltage regulator. It also has a CP2102-based USB to serial converter that gives an easy interface with the PC for loading Arduino code to the module.

The LDR sensor is used here to sense the light intensity around it. It can control lights switching on or off by light intensity. This is connected to the A0 pin of the ESP8266 NodeMCU to read Analog voltage based on ambient light. It can be manually changed via the CMOD push button on the system.

DHT11 sensor is used here to read temperature and humidity through digital input pin SD3. The given data is split into temperature and humidity by DHT11 through the same input pin. Digital pins D5 and D6 are connected to the inputs of the relay which act as actuators. These pins control the AC devices through the app. Three touch sensors are connected via three push buttons and then connected to digital pins D0, D7, and D8 respectively. When the system is gone offline, then these will work as normal switches. So we could use this smart home automation project with both online and offline modes.

Last we need to connect the OLED display with the system through the I2C pins of the NodeMCU and OLED display. This OLED display is optional.

NodeMCU Code

Leave a Comment