Thursday, April 25, 2024

GSM-based Cellular IoT Home Automation

ashwiniWhat if you are out of your home (and/or in another country) and suddenly realise that you have forgotten to turn off the geyser, lights and other electrical appliances? This costly mistake can increase the electricity bill as well as put your and others lives in danger. 

Fear not. We are going to make an IoT-based cellular device for home automation, which will help you in controlling your home appliances, no matter where you are.

Bill Of Material

Coding

Install the Adafruit Fona library in Arduino IDE. Inside this library, set the serial and reset pins for the SIM 800L module, and after that, set its baud rate to 4800 in the setup function. 

Now, we will create a loop where we check the incoming message and with the help of the if condition, we will set a function for the command to be sent from message. (Refer Fig 2,3,4,5).

- Advertisement -
Fig 2.
Fig 3.
Fig 4
Fig 5

Now, we will upload the code to Arduino IDE and connect the components as given in the circuit diagram.

Connection

Now connect the components as in pic below

Connection

Testing

Insert any SIM card (that supports 2G network) in the SIM800L module and connect any appliance through a relay. Now, send the message consisting of commands to the phone number (of the SIM card). 

- Advertisement -

Here, I have used the lights on/off command for turning the lights on or off. You can set any command in the code, which you can control using SMS.

Code

Ashwini Sinha
Ashwini Sinha
A tech journalist at EFY, with hands-on expertise in electronics DIY. He has an extraordinary passion for AI, IoT, and electronics. Holder of two design records and two times winner of US-China Makers Award.

3 COMMENTS

SHARE YOUR THOUGHTS & COMMENTS

Unique DIY Projects

Electronics News

Truly Innovative Tech

MOst Popular Videos

Electronics Components

Calculators

×