loading

Hello friends,I'm Ostin. I'll explain,how to control a fan and light using arduino through sms.

Let us switch on/off a fan and light through sms commands,actually i have designed the project for controlling a irrigation motor in the farm land,just for making tutorial i have applied it on a fan and light in my room

you must learn AT commands from the data sheet of your gsm module.AT Command usually varies on different gsm modules but not necessary in all cases.

it is a highly dangerous project for amateur, since we are dealing with 220 V - which can kill you. DO NOT try if you are rookie in electrical.

Step 1: What Will You Need to Start the Project!

1) Arduino UNO

2) GSM module sim900A

3) Relay module

4) Bread board

5) 2 Led's and wires.

6) Working SIM for GSM module

7) Mobile for sending sms

8) Fan and Light

Step 2: Connections

Always power up the gsm module with separate power supply 12v 1 A .And insert the SIM.

GSM module

RX and TX of gsm module to TX pin0 and RX pin1 of Arduino respectively. Cross connection. rx to tx and tx to rx.Gnd of gsm module to arduino gnd.

Relay

relay1 to pin 7 and relay 2 to pin 6.

vcc of relay to 5v arduino.

gnd to gnd arduino

We are using Normally open connection in relay. so that we can trigger on and off the light . Hot line from supply is connected to COM
Supply line to the Ac light/fan is connected to NO. Gnd or - or other terminal in light/fan is connected directly.

Led's

Led 1 to pin 8 (fan status indicator)

Led 2 to pin 9 (light status indicator)

Step 3: Wiring

Unscrew the switch board and find the supply line for fan/light. Be careful while doing this step,always wear a slipper to avoid grounding yourself.

Connect those supply line to relay NO connection and hot line to COM of relay 1 and relay 2 . Fan to relay 1 and Light to relay 2.

Step 4: Sending Sms

#a1b1

a1 turns on the fan.(relay 1)

b1 turns on the light.(relay 2)

#a0b0

a0 turns off the fan.

b0 turns off the light.

Step 5: Status

Green led indicates fan is ON

Orange led indicates light is ON

Both leds goes low when #a0b0 is sent.

Step 6: Code

Library is not needed, if you are using sim900 module with AT commands.

Step 7: Watch the Working

<p>how can we use sim800 instead of sim900..Coz im have two sim800 module.can you help me?? </p>
Can u send me the sketch for this project<br>
<p>can we use simple mobile phone, like any nokia phone?</p>
<p>Yes it is possible! (I don't know) but it ll not have all the features of sim900 gsm module.</p>
<p>Thanks for this wonderful project.. I want to control 8 relays..</p><p>can you help me?</p>
<p>Hi, I tried the sketch with sim900 to control relays, but there is something wrong and not working. All working with serial monitor and when I send sms the led indicator on sim900 blink ones that probably mean it is coming but does not change pins state. If I got any hint for it, I would be grateful, thanks Karol.</p>
<p>can i use this circuit??.. in this circuit ULN is used is this necessary??</p>
<p>hi, i recently bought a 8 channel relay board for arduino</p><p>i has 9 pinouts..namely,,</p><p>in1,in2.......in8, and a ''com'' pin. for arduino connection.</p><p>kindly guide me how to connect it to arduino.</p>
<p>hi, i recently bought a 8 channel relay board for arduino</p><p>i has 9 pinouts..namely,,</p><p>in1,in2.......in8, and a ''com'' pin. for arduino connection.</p><p>kindly guide me how to connect it to arduino.</p>
<p>which software is used to write the codes</p>
Today saw on zee news a man from varanasi make a device who cut off power through whatsapp sms...is it same thing?..ostine jos
<p>it isnt the same. to cutoff using whatsapp message packet data will be required. also tampering with whatsapp code will be required. I wonder if he have taken permissions from whatsapp to do the same. </p>
<p>it isnt the same. to cutoff using whatsapp message packet data will be required. also tampering with whatsapp code will be required. I wonder if he have taken permissions from whatsapp to do the same. </p>
<p>It was a Nice experience doing this project. This instructable is complete of guidance and steps. </p>
<p>I'm working on a small pernal project : i want to Interrupt or restore the electricity by sending an sms to a Arduino controlling a circuit breaker.</p><p>I found on internet some breakers using SMS but too expensive : 120 USD.</p><p>I want to build a small one using Arduino + GSM MODULE on low cost.</p><p>My objectives is to control electricity with budget low then 50 USD</p><p>I'm waiting your answer, we can discuss :</p><p>1. How to do it </p><p>2. How much it will cost</p><p>3. How long it can take</p><p>4. How you can deliver the final product</p><p>Can we be in contact ? monsar04@yahoo.fr is my contact.</p><p>Thanks</p>
<p>What kind of Circut breaker you want to controll. If you tell me i can help you may be deliver final product if you live in india.By the way my email : jameelsheik@gmail.com</p>
<p>my relay cant function whn i sen msg</p>
<p>man thank you so much for the code base, it was the only stuff i could get to work with a SIM900 stacked on a Mega r3 and running hardware serial instead of software serial. You totally made my day, thanks</p>
HI!<br>Can i control operation of many<br> ( thousands) of electrical devices from a single central location.<br>Thanks<br>Arun jain<br>New delhi, India<br>emaik: bestbrand@gmail.com
Hai ostin,, i'm rizal from papua-indonesia... i really like all ur project with arduino.... hhmm... by the way,, i want to make a project with arduino...<br>Can you teach me about arduino , gsm shield, and relay 2 module... ?<br>And can you give me ur email please ??<br>Thanks a lot master..
<p>sir do you have a code for the program that the arduino will reply to your text i cant download your pdf i dont know why...thank you sir</p>
So can this work with the fona break out board too??
<p>cool project buddy,...</p><p>but could you tell me which one is the supply line and hot line in the switch board.</p><p>tanx,....</p>
<p>Usually in switch board Live hot line will be in red, earth in green and neutral in black.</p>
<p>i know how</p>
<p>tanx buddy.......</p>
<p>can i use this method to control my home devices like air conditioning ? And how to be on the safe side ? Because I'm very new to electronics.</p>
<p>I believe you'll have to check the specifications of the relay you're going to use. Example if the relay spec is 220V 5A, and AC unit is consuming about 7-9A, then you'll have to use a relay than has greater then 9A specs, lets say use a 220V 10A electromechanical relay.</p>
<p>I believe you'll have to check the specifications of the relay you're going to use. Example if the relay spec is 220V 5A, and AC unit is consuming about 7-9A, then you'll have to use a relay than has greater then 9A specs, lets say use a 220V 10A electromechanical relay.</p>
<p>Will I need to change something on the code, if I will be using Arduino Mega 2560</p>
salahmu dewex
<p>Can we change sim900 with cell phone or android?</p>
Hallo i'm from Indonesia<br>sorry my english not good..<br>How to replace #a0 with #LampuOFF ? Thx
<p>Dear is there mistakes in commands.!!</p>
@imusab thanks . I usually buy these equipments in ebay india. You can buy it in exclusive electronics shops . As for as i know sim900A is updated one and supports arduino.
<p>thx man for good project ,, </p><p>1-where are u buy this gsm module, website or no ? </p><p>2- i found other model but the cpu sim900 is okay or necessary use sim900a ?</p>
<p>this is the complete codes ?</p>
<p> Your project is very good Thank you!</p>
<p>What I want to do is to use something specified command to control each relay separately.</p><p>For example, I want to send #b1 or #b0 to control relay2 only, and #a1 or #a0 to control relay1 only.</p><p>could you help me please??</p><p>thanks....</p>
<p>you are right! even I am stuck with that! i got no time to review again! if you find guide me!</p>
<p>Hi...</p><p>it's really nice project, but what if I want to turn on or off relay2 with out turning relay1??</p>

About This Instructable

49,598views

43favorites

License:

Bio: Hello I'm Ostin.A tyro techie living in India. I love messing around with electronics,Gadgets.
More by ostin jos:Controlling AC appliances through sms-Using Arduino remotely control fan and light Controlling AC light using Arduino with relay module Desk lamp hack - DIY  - A Penny Saved! 
Add instructable to: