In our project “GSM (Global System Mobile Communication) based home automation system” we are going to design a Digital Home. For this we use GSM module, with the help of smart phone we can easily control our home appliances from anywhere in the world just by sending an SMS through mobile phone and cloud with help of internet. In addition to this, these devices can also be controlled through an app “Remote-XY” using the internet. For this we are going to use Node MCU-ESP32 which has a built-in Wi-Fi facility. This Node MCU_ESP32 module will also help us in interfacing with cloud.
Furthermore, we will use the temperature sensor (DHT_11) to measure the current temperature of a room and update this information on the cloud. To interface ESP32 with the server we will use the MQTT (Message Queuing Telemetry Transport) protocol. Through MQTT protocol we can easily connect our devices to the cloud and can update their status.
The end use of this project on a large scale may be things like power plants, power grid and many more.
We will design a simple rectangular box in which we encapsulate all the things which we are going to use. This box can be printed by using a 3D printer. It contains of an LCD in the front side of BOX to display the run time temperature and humidity. The design is based on GSM module for the purpose of GSM network, ESP32 module for the purpose of Wi-Fi connection, Relay module for the purpose of controlling appliances and a DHT11 sensor for getting the data of temperature and humidity.
This is how the final design of the box will look like. We will put all the components inside the box according to their suitable position. The mechanical drawing of the sample design is also given below.
In order to make this project, first we will work on interfacing of Arduino Uno with and LEDs to check whether it works properly.
Similarly, we will try to interface Arduino Uno with Node MCU-ESP32 including DHT11 temperature and humidity sensor and Relay module.
Then as per the project Requirement we Remove the Arduino Uno and then interface Node MCU-ESP32 with same temperature sensor and Relay module.
After that we will assemble all the components on the PCB and connect loads to the outputs of relay module and operate the circuit by applying voltage.
Finally, we will design a box on CAD software and print it with the help of 3D printer. All the components get fixed in this box and we will have a complete product of project, GSM based home automation for the purpose of demonstration and as a business model.
Distribution of tasks play a very important role while starting any project. We, as a team members, also distributed the tasks so that we can complete our project at the proper time. We divide the tasks on the basis of understanding that who will be best for the particular task. This thing makes our project informative and successful. The distribution of task is as.
This one is the diagram of the project which contains all the major components. The flow diagram is given with the help of arrows which indicates the operating procedure of the circuit and how the components will interact with one another.
Principle of Operation is about how the project will work and the components used, will operate. This project Consist of Node MCU-esp32, GSM module and Relay module. As in this project we are going to control home appliances through two different ways which is shown in the above diagram. One way of controlling home appliances is through GSM module, the command we send through mobile will be received by GSM module and this information will send to the relay with the help of Node MCU-ESP32 module. The relay module will act by making loads ON or OFF after getting the command. Similarly, another way of controlling home appliances is by mobile App, as the app is consisting of different switches for different load. If any switch from the mobile will high, the command will send to relay module with the help of Node MCU-ESP32 module. The relay module will respond by operate that particular load.
We will use the components which are very easy to use and do not dissipate too much energy. We will operate the components by knowing their current and voltage ratings. If we talk about the voltage and current ratting of the all the components used in this project, as the GSM sim900 Module will properly work on 6V and the Node MCU-esp32 will turned ON at 3.3V and finally the Relay module need 5V for proper operation.
Following are the major components which we use in our project.
1. Node MCU-ESP32
2. GSM Sim900
3. DHT11 Sensor
4. Relay Module
5. 0.91-inch Olde LCD
Node MCU-esp32 is an open source IoT platform. It includes firmware which run on the esp-32/8266 Wi-Fi SoC from espressif system, and hardware which is based on ESP-12 Module. This module has a lot of new features than the other like ESP8266 module. One of its key features includes a built-in Wi-Fi. It uses 32-bit microcontroller. The clock frequency can go up to 240MHz and it has a 512 kB RAM. The ESP32 board has 30 or 36 pins but the module which we are using for our project has 30 pins, 15 on each row. It also has wide variety of peripherals available, like capacitive touch, ADCs, DACs, UART, SPI, I2C and much more. It comes with built-in hall effect sensor and built-in temperature sensor.
Link of:ESP-32 module tutorial
SIM900 GSM/GPRS shield is GSM modem, which can be integrated into great number of IoT projects. This shield can use to accomplish almost anything as a normal cell phone can like, SMS text messages, make or receive phone calls, connecting to the internet through GPRS system. GSM sim900 need 6V for the proper operation and draw a maximum current around 2A during transmission burst. The shield supports quad-band GSM/GPRS network that means it works properly anywhere in the world. This shield uses UART protocol to communicate. The chip supports baud rate from 1200bps to 115200bps with Auto-Baud detection. An antenna is required to use the SIM900 for any kind of voice or data communications as well as some SIM commands. There’s a SIM socket on the back. Any activated, 2G full-size SIM card would work perfectly.
Sim900 module is operate same as the sim800l module like on AT commands. There are many AT commands which are used for different things to do. The different things like for sending SMS, receiving SMS, dialling call, receiving call, registration, and many more. In this project we are using some basic commands. When we send AT command to module it will respond with OK and when we send AT+CREG, it will tell that we are connected with network or not, by responding with numbers like (0,1), (0,2) etc. (0,1) means that your inserted sim is connected with network similarly, (0,2) means sim card is trying to connected with network but denied. Apart from this the commends which we use for sending is AT+CMGS""(the number will required in inverted commas to whom you are sending SMS) and AT+CMGR for receiving SMS. To check that sim module it running properly the commend used is AT+CFGS.
The built-in LED on the sim900 module is respond by blink within unique number of seconds to inform its status. When LED is blink after every one second it means that sim900 module is running properly but has not connected with GSM or GPRS network. Similarly, when LED is blink after every two second it means it is connected with only GSM network. When LED is blink after every three seconds it means your module is connected with network and you can work with AT commands
Link of:GSM-SIM900 tutorial
The DHT11 humidity and temperature sensor makes really easy to add humidity and temperature data to any project. It’s perfect for remote weather stations, home environmental control systems, and farm or garden monitoring systems. In this project we are going to use this sensor because it is basic ultra-low-cost digital temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air and temperature and spilt out a digital signal on the data pins (No analogue input pin is needed). It’s fairly very simple to use but requires careful timing to grab data.
Link of:DHT11 Sensor tutorial
Relay is an Electrical component, or we can say, an electromagnetic switch operated by a relatively small current, through which much larger currents can be controlled. Electromagnet is activated by a separate low power signal from a microcontroller. They are designed to be controlled with low voltage like 3.3V same is like Node MCU-ESP32. In this project we are going to use four channel relay modules. There are other modules connected with one. This module is designed for switching two high powered devices from an Arduino. It has two relays with current rating up to 10A per channel and voltages between 250VAC or 30VDC. There are four LEDs on the relay module indicating the position of the relay. Whenever a relay is activated, the respective LED will light up. One of the best things about these modules is that they come with four Optocoupler ICs which provide good isolation.
Link of:4.Relay Module tutorial
OLED 0.91 inch is a monochrome graphic display module with a built-in 0.91 inch, 128X32 high-resolution display. OLED 0.91inch is able to work despite the absence of backlight. In a dark environment, contrast of OLED display is higher than LCD display. This device is I^2C or SPI compatible. Due to its capability in displaying, it is often used in various application for instances, smart watch, MP3, function cellphone, portable health device and many others.
Link of:0.91inch OLED Display tutorial
For the proper communication we will connect RX2 and TX2 pins of the Node MCU-ESP32 module with the 7 and 8 pins of GSM sim900 module for sending and receiving SMS. The 4 pins (14,21,18,19) of ESP module will be connected with relay module and pin number 4 of ESP module with DHT11 sensor for getting the values of temperature and humidity. After apply the proper supply and ground to the components used in circuit, we can operate it properly. The table of the above information is given below. As we must display the value of the temperature and humidity on the led and connect the pins according to given table.
Link of:IOT home Automation tutorial
The below mentioned figure shows the schematic of the project GSM based home automation. In this schematic there are different numbers of connectors used for the devices such as Node MCU-ESP32, GSM module, DHT11 sensor and relay module. One ams1117 voltage regulator is used which converts the supply voltage into the required voltage of 5V. A DHT11 sensor is used to sense the temperature and humidity, which is directly connected with one of the digital pins of the ESP32 module. The resistors and capacitors are used in this schematic for the proper operation of the circuit.
After completing the wiring of the electrical schematic, we moved for PCB routing. It is too difficult to rout the PCB in proper way. After spending half of an our we finalize PCB, there was some problem to set the connected wires but we use zero resistor method and get solved that problem. The picture of the PCB layout is given below.
The process of routing is very challenging and hard for every student while making any project. Routing require a lot of practice, skills and experience. In our project i.e., “GMS based home automation†we face many problems specially in setting the distances between connectors of the devices we are using like NODE MCU-ESP32, GSM sim900 and relay module. Furthermore, there was a problem in wiring that we didn’t found any proper path for one wire. At last, we set that problem by zero resistor method but the overall circuit was simple, uncomplicated and straightforward so we done with routing without spending too much time.
The picture of the components which are used in this circuit is given below
It may take around one hour to solder all the components on the milled PCB. After successfully soldering of the components on the PCB board, we get the populated circuit board. The picture of the populated circuit board is given below.
For the verification we check every component of the PCB with the help of multimeter. For this purpose, we keep the multimeter on beep mode. If the connection between the components will appropriate there will be beep from the multimeter. If there is any problem with connection, we will resolder the components of the PCB. After going to this process, we get our PCB with proper operation.
After getting the proper connection of the PCB we connect all the components such as ESP module, sim900 module and relay module on the connectors of PCB. Now we will supply the required voltages to the assembled PCB and follow the same process which we did before PCB. As all the components relate to each other so we connect loads to the outputs of the relay module to control them with SMS and mobile app. The picture and the video of this fully assembled and operated system is given below.
The commands which we used in our project to control the devices connected with module are given below.
All the appliances connected with the Relay module can be controlled by two ways.
For this we have to type a text like (Relay1on) and send this text to the sim number which is inserted in sim900 module. As a result, the LED connected to the Relay module one will be turned ON. In order to turned OFF this LED we have to type a text like (Relay1off) and send the text to the sim number which is inserted in GSM module. As a result, the LED connected to the Relay module one will be turned OFF. From the given video it is clear that when user type text like Relay1on and send it to sim900 module, the LED connected with that relay module get turned on and a SMS from sim900 module received by user for the sake of confirmation. Similarly, when user will type text like Relay¬1off and will send it to sim900 module, the LED connected with that relay module will turned off and a SMS from sim900 module received by user for the sake of confirmation. The temperature and humidity are also displayed on the server and updated after every two seconds.
This method is quiet easy compare to the first one. This method provides a very good user interface in order to control all the appliances connected with the relay module. As the app is consist of different switches for different loads. When any of the switch get ON or OFF the load connected to that particular switch will turned ON or OFF. From the video it is clear that when user turned on switch one the LED connected with that switch get ON. Similarly, when user turned off switch one the LED connected with that switch get OFF. The temperature and humidity are also displayed on the server and updated after every two seconds.
For this project we need to design an app to control the appliances, for this we visit many websites like Thing speak, Blynk and many more but the principle of operation provided by these websites is too complicated and difficult to understand. After all we get a simple and easy way to design an app on a website Remote XY. It is very easy to use like we can design an app by drag and drop of things we need for app. There are some required things like the microcontroller we are using, the module on which you will control the devices like Bluetooth, Wi-Fi etc. The libraries and the code for app is provided by the website on the basis of app we design. After uploading that code in Arduino IDE and connect to Wi-Fi we can control the devices which are connected with circuit. The link and image of Remote XY and app is given below.
Link of: Remot XY tutorial
Link of:Things Speak.com tutorial
Link of:Blynk .com tutorial
MQTT (Message Queuing Telemetry Transport) is a lightweight application-layer messaging protocol is used to interface any hardware device to server. The hardware connected on the protocol is termed as client and the server is termed as broker for the interfacing. There are other things like subscriber, publisher on every MQTT protocol. These things, subscriber and publisher are related to people who are interesting in your project like the subscriber can show the data which you are uploading on server by subscribing the channel on which you upload the data. For uploading the data of temperature and humidity on the server we visit different MQTT protocols like Mosquitto, MQTT Box, HiveMQ etc but cannot get any idea from these protocols that how they will work and how we can interface the server with hardware. After continuously work on this thing finally we find Things board protocol which was quite easy to use and understand. This protocol has so many features like you can upload data on server and you can also control the devices of your hardware through sever and many more. We work on this and finally get result. The updated data of temperature and humidity was displayed on the server and we can also get the graph of temperature and humidity with respect to time. To upload the run time data of temperature and humidity we have to make account on ThingsBoard Demo website and login. When we logged in, we have to add devices by select the Devices option, devices like temperature humidity or others. When devices are added we get token of each device and that token is used in coding to upload the run time data from sensor. The run time data is shown in the device elementary beside the token number of devices on ThingsBoard server. This data can be displayed in different formats like charts, digital gauges, analogue gauges etc. In this project we use simple chart to display the data of temperature and humidity. Image and link of ThingsBoard is given below.
Link of:ThingsBoard tutorial
Link of:Mosquitto.org tutorial
Link of:MQTTBOX tutorial
Link of:Hivemq.com tutorial
This is how the software diagram flow of the project.
In this project we are using different things like MQTT protocol ThingsBoard, Remote XY, and Node-MCU. For the successful operation of coding, we have to interface all these things together. First, we have to initialize all the variables which we are using for components like temperature and humidity, relay module pins etc. Then we have to connect with Wi-Fi and ThingsBoard network by providing their libraries to do this, we have to add the token number of the device which we get from the ThingsBorad server to upload the data of temperature and humidity. For the connection of Wi-Fi and ThingsBoard server we have to define function in which we will provide the Wi-Fi ssid number and password for the sake of getting connection. In this function we will use while loop, the loop will run till the connection of network. As the network will connected the run time data from the sensor will displayed on the server. The code of the Remote XY which we get from its website will implement in the code of our project by using Remote XY library. For the implementation of relays, we use if else statements in which we define different pins of Node-MCU connected with different devices through relay module. As we can control the devices with only one thing at a time it will either by app or SMS. For this contradiction we use one Boolean expression. It is a variable running relay when devices will be controlled through app the running relay will be false and when the device will be controlled through SMS the running relay will be true.
Coding is one of the challenging parts of any project. It requires a lot of skills, understanding of logics and proper attention. In this project we also faced a lot of problems while operating the circuit of the project. Also, we learn a lot when we get solved those problems with the help of websites, YouTube and respected teachers. The problems which we face in coding are listed below. Firstly, we get fatal error continuously while uploading the code on Node MCU-ESP32 module. It was too difficult to understand that there is problem with the module or error in coding. We spend couple of hours on this and finally got the solution of this. We connect a 10uF capacitor between the pins (enable and ground) of the Node MCU-ESP32 module. As there are two different things to control the devices when it is come to coding there is issue of control the device separately by two gadgets. After uploading the code, we can control the devices with only one thing sometime with app or sometime with SMS. This one was a logical mistake and we solved it by using some Boolean expression in the code like running relay is false for app and true for SMS. In last it was somehow undesirable issue of connecting with server. All the things were running properly like Wi-Fi, code, hardware system but we got no connection with Wi-Fi and Things board server. Though there was some login issue with the server that we already logged in with server. We logged out from server and upload code on module and it works. Our hardware get connected with server and we visualize the data of temperature and humidity by log in again to the Things Board.
All the things were finalized and it was time to design of enclosure for the project. This cannot made possible because there was announcement of closure of education institutes due to the third phase of covid-19. As it was the order from the government so we have to leave the university and change the way of study from physical to online so we cannot complete the CAD design of this project.
The main objective of this project is to develop a home automation system using Node MCU-ESP32 with GSM sim900 controlled by smart phone. As technology is advancing, so homes are also getting smarter. Presently Conventional walls switches located in different parts of the home makes it difficult for the users to go near them to operate that’s why the people of modern era prefer this automated system. Which provides a good user interface and to controlled all the home appliances with Smart phones. Keeping all these advantages of home automated system in mind this system is not too much expensive and high-priced. As it was earlier discussed that this model can be used in power plants, power grids and anywhere in the world. This model will make free the people from the changing of walls switches located in different parts because this thing they can do by their sell phone from anywhere in the world. On this behalf this model can used for sell for the business purpose because of low cost as compare to the models available in the market. As this model is too simple in design and same functionality and less expensive than the products of market. Furthermore, this project can also embed with other project to make a perfect model which may be for better than this single GSM based home automation model. We can connect this model with GPS or inverter, the inverter will amplify the input of 12 to 15 volt of DC voltage and provide us AC supply of more than 220 volts. These 220 volts can be used to operate the home appliances connected in the home. Similarly, these appliances can also be controlled through SMS or app which can be through home automation model. This combined model will be proved as a perfect business model.
Intellectual property (IP) is ideas, information and knowledge. In the university context it can be viewed as the result, outcome and the research of individual. It is commonly referred to, consists of all the pieces of our business that you have thought of. It’s the things that differentiate us from the competition that we came up with using our brain. The invention or the things coming from our research, by using our intellect brain.
As in this project we are using a lot of things from different sides. So, the references which we used in this project are given above. We collect information from different websites and the parts of code used for this project is taken from the different websites. The link of the website is provided with the description of the device used in this project.
In this project we refer different websites to implement the project. These websites about sim900 module, relay module Node-MCU help us a lot. As these websites provide different things if we talk about ThingsBoard server it will provide you the interfacing of devices by ESP8266 module but here we are using ESP32 module. Additionally, the sim900 module website is providing interfacing with Arduino but here we are using Node-MCU module. We refer these websites to implement our project differently and we get success in this. The website which we refer are given below.
GSM Based Home Automation is very informative project, we can extend the above simple project in a final year project for undergraduate students like to make the smart or digital home. From this project we learn so many things from our respected teachers, from the internet and from the mistakes which we did while going through this project.
In the start when we chose this project, we thought that this project will be so simple and interesting from the others. We thought that we will complete this project within one month but as we go through this project, we faced so many difficulties. Earlier we said that this project is very simple and interesting but now we say that no matter this project is interesting but quite difficult.
We have done with the hardware design of this project but due to current pandemic situation and unexpected closure of university as precautionary measure, we were unable to design the box to place the hardware. But we are very ecstatic that this project has helped us a lot to know about number of incredible technologies available in the current era. Also, though this project, we get a hand-on experience that how we can also make such fascinating projects with focus, handwork, consistency and patience.
This project could not complete but we are very much encouraged and want to complete this. We will make a perfect model of this project by working on the CAD designing and on other things which are important for this project. When we get some free time, we will try to complete this and will make a perfect model of GSM based home automation with IOT.
some important links are given bellow, by following the given links you can access the Complete Vedio, complete arduino uno coding as well as the Eagle files of PCB design
Please follow the given links to watch the complete and operational demo of digital home.
You can download the complete coding of digital home by clicking the given link below
Link of:Complete Coding of Arduino Uno
Please click on the link to access eagle file of project PCB.
Link of:Eagel Files of PCB Design