Home Automation using Arduino and GSM Module
In this article, we are publishing a highly useful home application – GSM based home automation using Arduino. The project consists of a 16×2 LCD module for displaying the status of the home appliances. The status (turn ON or turn OFF) of the connected devices can be changed by sending an SMS from your mobile phone. Upon receiving SMS commands through GSM module, arduino will change the status (turn ON/OFF) of the device that is mentioned in the SMS.
Objectives of the Project
- Send/Monitor the status of the connected devices to a specified mobile number using GSM.
- Change the status (turn ON/OFF) of the device upon receiving commands through SMS.
- Display status of the devices in an LCD using a 16×2 LCD module.
Note: – For demonstration purpose, we are using 3 LED’s to represent 3 different devices. We have also connected a 12Volt dc motor as a 4th device. You can replace these LED’s with actual electrical light bulbs, devices like motor, fan, TV, refrigerator etc. You should use an appropriate supporting circuit to interface these devices to the circuit diagram given below.
Let’s begin to build our project – GSM Based Home Automation Using Arduino.
Here we are using SIM900 GSM module. The communication between GSM module and arduino is serial. The problem with this connection is that, while programming Arduino uses serial ports to load the program from the Arduino IDE. If these pins are used in wiring, the program will not be loaded successfully to Arduino. So you have to disconnect wiring in Rx and Tx each time you burn the program to Arduino. Once the program is loaded successfully, you can reconnect these pins and have the system working.
To avoid this difficulty, I am using an alternate method in which two digital pins of Arduino are used for serial communication. We need to select two PWM enabled pins of Arduino for this method. So I choose pins 9 and 10 (which are PWM enabled pins). This method is made possible with the SoftwareSerial Library of Ardunio. SoftwareSerial is a library of Arduino which enables serial data communication through other digital pins of Arduino. The library replicates hardware functions and handles the task of serial communication. This will help the programmer to use hardware serial pins for debugging purpose.
Note: – Read our complete tutorial on Interfacing GSM Module to Arduino.
Another section of the circuit is the interfacing of Arduino to 16×2 LCD. JHD162A is the LCD module used here. JHD162A is a 16×2 LCD module based on the HD44780 driver from Hitachi. The JHD162A has 16 pins and can be operated in 4-bit mode (using only 4 data lines) or 8-bit mode (using all 8 data lines). Here we are using the LCD module in 4-bit mode. To facilitate communication between Arduino and LCD module, we make use of a built-in library in Arduino <LiquidCrystal.h> – which is written for LCD modules making use of the Hitachi HD44780 chipset (or a compatible chipset).
In order to demonstrate the working of the home appliances, and awe are using three LED bulbs and a DC motor. These are connected to A0- A3 pins of Arand amicro buzzer is connected to A4. The buzzer will produce a beep sound upon receiving a valid SMS. Here we are using a 12V DC motor, which can’t be driven directly from Arduino board (arduino has very limited current capabilities). So a BC547 transistor is used here to drive the DC motor.
Program/Code – Home Automation using Arduino
Read More: Home Automation using Arduino and GSM Module
JLCPCB – Prototype 10 PCBs for $2 + 2 days Lead Time
China’s Largest PCB Prototype Enterprise, 300,000+ Customers & 10,000+ Online Orders Per Day
Inside a huge PCB factory: https://www.youtube.com/watch?v=_XCznQFV-Mw
This Post / Project can also be found using search terms:
- arduino gsm module
- gsm code for arduino home automation
- home automation using arduino and gsm coding and programming