Instructables
Remote control, especially when this no ethernet or Wifi in the outdoor, has been a very profound things in the past. When I was a child, I always image that I have an equipment which can control all home appliances. Now, this becomes a reality,with Arduino and GPRS modules and some other related modules. And, it is also quite easy, even for the beginners. Here I will step by step to show you how to remote control your home appliances via the GPRS/GSM SMS and relays.

At first, let me give a brief introduction about relay to you.
Relays are used where it is necessary to control a circuit by a low-power signal (with complete electrical isolation between control and controlled circuits). It acts as a “low voltage controlled switch to control high voltage”, For example, if you want to control power of your washer or air conditioner, which is oftern110v or 220v,by microchip such as AVR or PIC, it is necessary and safe to make your microchip control the relay first, and then control the power supply of those device with the relay.

With the GSM SMS, it is possible to control the relay remotely. You can send a message via phone to control the relay on&off. With this, it will convenient to control any device wirelessly, especially helpfully on irrigation, smart home, outdoor remote control etc.
So, let’s make such a “SMS controlled Relay” with Arduino, GPRS/GSM and a Relay module.
 
Remove these adsRemove these ads by Signing Up
eddevine1 year ago
What SIM card are you using? The ones I've seen require an expensive plan with a provider
Elecrow (author)  eddevine1 year ago
Hello eddevine,

We are using a very common SIM card which used in my phone, the GPRS shield is support 2G sim card, but I not sure whether it support 3G Sim card. if you have any tech question, please feel free to contact with techsupport@elecrow.com.

Best Regards
I do everything I follow the instruction but still not able to turn on the led. I can manually turn on the led but by sms onb nothing happens
please help

Hey ,
did u do this project using sms?

KevenY5 days ago

EFCom Pro GPRS Shield is compatible with all boards which have the same
form factor (and pinout) as a standard Arduino Board.
http://www.elecfreaks.com/store/gprsgsm-shield-efcom-shdefcom-p-415.html

KevenY5 days ago
stanpilip27 days ago

hey, where did you download the command prompt for the gsm/gprs sheild to connect with the arduino? the one on wikihow comes up as an empty folder.

also what sim provider did you use? I am having trouble with the telefonica card that comes with the arduino

KariyappaK2 months ago

Hi

this kariyappa

I need help regarding bellow

i am working on arduino uno with Sim900 module to send an sms. my sample code is as follows

i am not able to receive reply from sim900,and able send sms.

#include<SoftwareSerial.h>

SoftwareSerial mySerial(3, 2); // RX, TX pins

int led= 13;
//String str;
char str;


// serial communication settings

void setup()
{

Serial.begin(9600);
mySerial.begin(9600); // setting the buad rate as 9600
pinMode(led,OUTPUT); // initialize the digital pin as an output.
Serial.println("GSM communication initialization");
mySerial.println("AT"); // activating the gsm module.
delay(500);

mySerial.println("AT+CMGF=1"); // setting the gsm module to sms mode.
delay(500);
Serial.println("serial communication begins");

}

void loop()
{

while(mySerial.available() > 0)
{
str = mySerial.read();
Serial.print(str);
int data=str.indexOf("hello");
/Serial.println(str);


if(data!=-1)
{
mySerial.println("AT+CMGS=\"9902062107\""); // mobile number
delay(500);
mySerial.println("hello"); // Message contents
delay(500);
mySerial.write(byte(26)); // (signals end of message)
delay(500);
}
}
}

ckrmustafa4 months ago

Hi friend,

Congratulations. The project is fantastic. I am newbie on ARDUINO. I read your instructions step by step but there is some problem. When I send SMS via my phone there is no action on relay board. Could you tell me what is wrong on my job? Thanks.

YOUR CODE DOES NOTHING. SOFTWARESERIAL LIBRARY ISN'T EVEN USED ON THIS SKETCH.

Hello I have been following all instructions you gave above but mine so far can only receive the sms message but nothing happens to the relay. In the monitor prints out receive sms and store sms but nothing happens to the relay. One thing i noticed when i switched my gprs model to softwareserial mode i can hear clicking when i hook my relay up to the unit. But when i switched it back to hardwareserial mode as instructed above i hear nothing. I have arduino uno and my relay is from Deek-Robot it's a 4 channels relay. Please help!

sisay566 months ago

HI I am doing the same project on micro controller(atmega32) and encountered a problem how to send SMS messages to GSM module. could you tell me how to send and receive . thank you

Michelvt made it!7 months ago

I have tested many different codes, but I get no output.

From the serial monitor I receive the messages.

I use an Arduino Uno, GSM / GPRS shield and Relay V2 module.

Could it be because the declaration is not correct?

eg:

# include <GSM.h>

# define PINNUMBER "4889"

GSM_UNO_stacked.jpg
elesol127 months ago

ok ! but i have this

http://store.arduino.cc/index.php?main_page=produc...

not

http://grobotronics.com/relay-shield-v2.html#.Uz0E...

how am i going to conect it to the UNO+GSM SHIELD << sandwich>> ? :)

aal-faify7 months ago

Thx so much .
Eng. Ahmad Ali - Makkah SA

azeem8810 months ago

Hi this code is working only to control with sms is it possible to control with serial monitor too as well as sms.

i tried but sms not working serial monitor working perfectly.

plz tell what piece of code need to add and where.

im using Arduino UNO R3 and GSM SIM 900

thanx

SS_201311 months ago
I tried the GSM shield on the Arduino Uno, but no output. Maybe i am doing something wrong. i have a different relay board, which i have not tried as yet.

I want to send a text and be able to measure an output 5V on one of the Arduino outputs available at the GSM header.

Grateful for some assistance. thank you.
ojje221 year ago
Thank you. Everything works fine, but after a while my SIM card memory is full. How can I delete every incoming SMS at the end of the code?
aalhowidi1 year ago
thanks.. it's nice project
sounghyogi1 year ago
How can I go about controlling equipment that is rated for 10 amps or over?
Thank you and what a great instruction!
This is very interesting . I just wanna know how much will everything cost approximately ?
pravink1 year ago
Hi, what has happened to the arduino software? the link does not seem to work anymore.
Hi pravink
did u find the arduino software ?
thanks
Elecrow (author)  afadhel1 year ago
Hello Praviink and afadhel,

sorry for my late reply! I have fixed the link, please try again, if you have any question, please feel free to contact with techsupport@elecrow.com
THANKS YOU
eddevine1 year ago
I have enjoyed your instructables, laundered if I could do a similar one. I would like to have a message sent to my cell phone if the sump pump quits and my basement begins to flood?




Elecrow (author)  eddevine1 year ago
Hello eddevine,

Good idea! it is not very difficult to accomplish your idea, but you may need to add some sensors to detect the sump pump quits. The following is the function for sending a SMS from GPRS shield to the phone:
///SendTextMessage()
///this function is to send a sms message
void SendTextMessage()
{
mySerial.print("AT+CMGF=1\r"); //Because we want to send the SMS in text mode
delay(100);
mySerial.println("AT + CMGS = \"+86138xxxxx615\"");//send sms message, be careful need to add a country code before the cellphone number
delay(100);
mySerial.println("A test message!");//the content of the message
delay(100);
mySerial.println((char)26);//the ASCII code of the ctrl+z is 26
delay(100);
mySerial.println();
}

you just need to add this function to you program, and call the function after the sensor detected the sump pump quits.
Thank you.
Best Regards
Elecrow (author)  eddevine1 year ago
Hello eddevine,

Good idea! it is not very difficult to accomplish your idea, but you may need to add some sensors to detect the sump pump quits. The following is the function for sending a SMS from GPRS shield to the phone:
///SendTextMessage()
///this function is to send a sms message
void SendTextMessage()
{
mySerial.print("AT+CMGF=1\r"); //Because we want to send the SMS in text mode
delay(100);
mySerial.println("AT + CMGS = \"+86138xxxxx615\"");//send sms message, be careful need to add a country code before the cellphone number
delay(100);
mySerial.println("A test message!");//the content of the message
delay(100);
mySerial.println((char)26);//the ASCII code of the ctrl+z is 26
delay(100);
mySerial.println();
}

you just need to add this function to you program, and call the function after the sensor detected the sump pump quits.
Thank you.
Best Regards
soafree1 year ago
Hi there, I need your help. I follow the instruction but still not able to turn on the led. I can manually turn on the led but by sms onb nothing happens. Please help!
Hi soafree
i want your help in the file software , I'm unable to download it
please try to send it
please HELP????
thanks
afadhel1 year ago
Hi, I can't download the program file ... can any body help me please ??
eddevine1 year ago
Looking at your work is very inspiring , I have been looking for a similar way to signal me if the sump stops working and the basement starts to flood on my phone, is there a way to convert your application to mine?
BoloXwoX1 year ago
may i ask..??

how to edit the sim number..??
sorry.....im newbie in coding.....
need to learn from you...
Elecrow (author)  BoloXwoX1 year ago
of course you can ask ...
i am sorry there may be some misleading in the article, you do not need to edit the SIM card nunber for this kind of remote control . Actully, the GPRS shield here acts like a "phone" to receive SMS. for example, the SIM card number is "1234", you just need to sent you control message to the number "1234", the gprs shield will receives the SMS and then reports the crowduino: hey, i receive a sms, please analys and then tell the relay what to do.
sg7861 year ago
hi i am using micro controller in this circuit so can you help mean, and ex plane with that....
Elecrow (author)  sg7861 year ago
yes, do you have any problem ? actually, you can use any kinds of Arduino compatible controller.
Hello there.
I followed all the instructions,I have exactly the same parts,
but when i send sms the thing i see in serial monitor is the position of the sms in storage.
And ofcourse no led open.
Any ideas please??
I am waiting for suggetions asap.
Elecrow (author)  FallenRider1 year ago
Dear, i receive the sms with crowduino hardware serial port. the gprs shield reports to the crowduino that a SMS has been received , and the crowduino will judge the sms, to control the relays.
Download the code to crowduino mainboard, and you do not need to open any serial monitor , it may make the transmit error because they all use the hardware serial port.
Hello,

This tutorial is very very useful. I am trying to demonstrate this project on my own. I am using SIM300 gsm module because I don't have a gsm shield for arduino. However, the relay control part is working fine BUT the problem is that SIM300 has only 25 sms memory. I want to delete the sms memory after every "reset" or after executing ona, onb, onc, ond etc.

So, I added the code in Void Setup()
but it is not working.
Serial.write("AT+CMGDA=");
Serial.write(34); //ASCII of “
Serial.write("DEL ALL");
Serial.write(34);
Serial.write(13);
Serial.write(10);
delay(10000);

I have written the details & result of my experiment in this post.

http://arduino.cc/forum/index.php/topic,155448.msg1165394.html#msg1165394

Any help shall be highly appreciated.
Thanks
Elecrow (author)  nightcrawler2181 year ago
Nice job!