• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Contact | Calculators-online
You are here: Home / Arduino Projects / GSM Pump Motor Controller Circuit using Arduino

GSM Pump Motor Controller Circuit using Arduino

Last Updated on December 5, 2024 by Swagatam 200 Comments

In this post I will show how to construct a farmer friendly GSM pump motor controller circuit which could
turn on and off the irrigation system remotely from anywhere in the world via cellphone SMS and return you with an acknowledgement message. The idea was requested by Mr. PG Ragavandir.

Table of Contents
  • The Design
  • How it Works
  • Program Code:
  • Author’s Prototype of GSM Pump Motor Controller Circuit:
  • How to use the above setup:
  • Improving the above Concept
  • SMS Acknowledgement When Motor is Actually ON
  • Circuit Diagram:
  • Program Code:
  • Part List
  • Integrating with 3 Phase Motors

The Design

Agriculture is one of biggest industry in India which serves food for more than a billion people every year. Producing vast amount of food is never an easy task; irrigation is one of the factor.

Most of the agriculturist’s crop field is situated far from their residence, just turning on the water pump costs huge for their transportation per year.

India is known for IT skills and space programs and reached mars less than cost of movie “Gravity”, this signifies the great potential among Engineers and Scientists. But, the skills are not uniformly distributed across different fields; agriculture is one of the field where technological development is slow.

This SMS based GSM pump motor controller takes a baby step towards agricultural development, this may not be a revolutionary project but, it may bring delight among agriculturists.

Let’s dive into technical part of the project.

The project is designed with minimal hardware components so that a beginner can accomplish it with ease.
The circuit consists of power supply, which powers the whole setup.

The Arduino is the brain of the project which take decisions and GSM modem which sends and receives text SMS and communicate with the user and relay which controls the motor.

How it Works

GSM Pump Motor Controller Circuit using Arduino

Note: Please use at least 10K resistor at the base of the BC548 transistor, 330 Ohms is too low.

The transformer step down the 230VAC to 12VAC and bridge rectifier convert AC onto DC current and the current passes through an electrolytic capacitor to smooth the power supply.

A fixed 12V voltage regulator gives power to arduino, GSM modem and relay. The GSM modem is connected to arduino at pin #0 and pin #1, which are RX and TX respectively.

The RX of GSM is connected to TX of arduino and TX of GSM is connected to RX of arduino. If you are confused, just look at the below diagram, misconnection will not send or receive SMS.

ARDUINO       TX----------------------RX     GSM modem
RX----------------------TX

Ground to ground connection is also established between arduino and GSM modem.

Try to get a male jack power connector for the GSM and arduino, if not just solder the wires directly from power supply to arduino and GSM, which might increase the mess in the project.

The transistor drives the relay and the diode protects the circuit from high voltage spikes while switching the relay ON/OFF.

The LED indicator shows the status of the relay. If the LED glows the relay activated and if the LED is off, the relay is deactivated.

Insert a valid SIM on the GSM modem and try to take advantage of the offers availed by the network provider for SMS such as rate cutters, which will reduce the expenses for SMS.

Program Code:

//----------------Program developed by R.Girish------------//
int LED = 8;
int motor = 9;
int temp=0;
int i=0;
char str[15];
void setup()
{
Serial.begin(9600);
pinMode(motor,OUTPUT);
pinMode(LED,OUTPUT);
digitalWrite(motor,LOW);
digitalWrite(LED,LOW);
delay(20000);
delay(20000);
delay(20000);
Serial.println("AT+CNMI=2,2,0,0,0");
delay(1000);
Serial.println("AT+CMGF=1");
delay(500);
Serial.println("AT+CMGS=\"+91xxxxxxxxxx\"\r"); // Replace x with mobile number
delay(1000);
Serial.println("System is ready to receive commands.");// The SMS text you want to send
delay(100);
Serial.println((char)26); // ASCII code of CTRL+Z
delay(1000);
}
void loop()
{
if(temp==1)
{
check();
temp=0;
i=0;
delay(1000);
}
}
void serialEvent()
{
while(Serial.available())
{
if(Serial.find("/"))
{
delay(1000);
while (Serial.available())
{
char inChar=Serial.read();
str[i++]=inChar;
if(inChar=='/')
{
temp=1;
return;
}
}
}
}
}
void check()
{
if(!(strncmp(str,"motor on",8)))
{
digitalWrite(motor,HIGH);
digitalWrite(LED,HIGH);
delay(1000);
Serial.println("AT+CMGS=\"+91xxxxxxxxxx\"\r"); // Replace x with mobile number
delay(1000);
Serial.println("Motor Activated");// The SMS text you want to send
delay(100);
Serial.println((char)26); // ASCII code of CTRL+Z
delay(1000);
}
else if(!(strncmp(str,"motor off",9)))
{
digitalWrite(motor,LOW);
digitalWrite(LED,LOW);
delay(1000);
Serial.println("AT+CMGS=\"+91xxxxxxxxxx\"\r"); // Replace x with mobile number
delay(1000);
Serial.println("Motor deactivated");// The SMS text you want to send
delay(100);
Serial.println((char)26); // ASCII code of CTRL+Z
delay(1000);
}
else if(!(strncmp(str,"test",4)))
{
Serial.println("AT+CMGS=\"+91xxxxxxxxxx\"\r"); // Replace x with mobile number
delay(1000);
Serial.println("The System is Working Fine.");// The SMS text you want to send
delay(100);
Serial.println((char)26); // ASCII code of CTRL+Z
delay(1000);
}
}
//----------------Program developed by R.Girish------------//

NOTE 1: While compiling the program it shows a warning, which you can ignore it. The program is verified and tested.

NOTE 2: Please remove TX and RX connection from arduino while uploading the code.

NOTE 3: Replace “xxxxxxxxxxxxx” with recipient’s phone number in 4 places in the program.

NOTE 4: Please purchase a GSM modem without power button in the module; in case of power failure it won’t latch in into mobile network unless you manually press the button, so avoid such type of GSM modems. The GSM modem one without power button will latch into mobile network directly after power retains.

Author’s Prototype of GSM Pump Motor Controller Circuit:

P 20161116 082539 2

How to use the above setup:

•    Send /motor on/ SMS from your cellphone to activate the relay.

•    Send /motor off/ SMS to deactivate the relay.

•    Send /test/ SMS for testing the response from the circuit.

Make sure you start the command with”/” and end with “/” otherwise it won’t accept as valid request.

•    /motor on/ will turn ON the relay and return with an acknowledgement SMS “Motor Activated.”

•    /motor off/ will turn off the relay and return with an acknowledgement SMS “Motor Deactivated.”

•    If you send /test/ it will return with an acknowledgement SMS “The System is Working Fine.”

•    The above message signifies that your setup is working fine.

•    If no acknowledgement is returned to you can assume that no action is preceded on the motor and you may troubleshoot the problems.

•    After powering the setup ON wait for 1 minute the system will send an acknowledgement SMS “System is ready to accept commands.” once you receive this SMS your project is ready to serve.

The above commands are fool proof and never trigger the motor falsely, the setup will not respond any SMS other than the above specified commends.\

Improving the above Concept

This above GSM pump application circuit attracted lots of readers and we have received tons of queries and suggestions. One of the avid readers of this website Mr.Gandhi suggested a good improvement to the prior design.

SMS Acknowledgement When Motor is Actually ON

The improvement is all about the revert acknowledgement, where the user will receive a SMS response in his cellphone from the GSM pump controller system when a user sends a valid SMS comment.

The existing design sends an acknowledgement SMS to the user independent of the actual state of the relay i.e. ON/OFF.

The new design change suggested by Mr.Gandhi checks the state of the relay whether the relay is physically switched its state or not.

The change as per this new GSM water pump controller design can be implemented to the previous design without much hassle by adding a feedback system as shown in the schematic and uploading the new code.

Circuit Diagram:

feedback 2

When we send SMS command “/MOTOR ON/” the pin # 9 goes high and trigger the relay ON. If the relay connects the common and N/O pins the pump starts and also turns ON the transformer which will give +5 at the output.

The +5V signal is fed to pin # 7 which will confirm and return with an acknowledgement “Motor activated”.

When we send “/MOTOR OFF/” the pin # 9 turns LOW and relay disconnects the common and N/O pins, this will turn off the pump as well as the connected transformer. The output at pin # 7 goes LOW and returns with an acknowledgement “Motor deactivated”.

If no acknowledgement SMS is received in your cellphone, we can confirm that no action was taken and the pump is at the last requested state, you may go to the site and troubleshoot or no acknowledgement is received due power cut.

Program Code:

//----------------Program developed by R.Girish------------//
int motor = 8;
int LED = 9;
int temp=0;
int i=0;
int ack=7;
char str[15];
void setup()
{
Serial.begin(9600);
pinMode(ack,INPUT);
pinMode(motor,OUTPUT);
pinMode(LED,OUTPUT);
digitalWrite(motor,LOW);
digitalWrite(LED,LOW);
delay(20000);
delay(20000);
delay(20000);
Serial.println("AT+CNMI=2,2,0,0,0");
delay(1000);
Serial.println("AT+CMGF=1");
delay(500);
Serial.println("AT+CMGS=\"+91xxxxxxxxxx\"\r"); // Replace x with mobile number
delay(1000);
Serial.println("System is ready to receive commands.");// The SMS text you want to send
delay(100);
Serial.println((char)26); // ASCII code of CTRL+Z
delay(1000);
}
void loop()
{
if(temp==1)
{
check();
temp=0;
i=0;
delay(1000);
}
}
void serialEvent()
{
while(Serial.available())
{
if(Serial.find("/"))
{
delay(1000);
while (Serial.available())
{
char inChar=Serial.read();
str[i++]=inChar;
if(inChar=='/')
{
temp=1;
return;
}
}
}
}
}
void check()
{
if(!(strncmp(str,"motor on",8)))
{
digitalWrite(motor,HIGH);
delay(100);
if(digitalRead(ack)==1)
{
digitalWrite(LED,HIGH);
delay(1000);
Serial.println("AT+CMGS=\"+91xxxxxxxxxx\"\r"); // Replace x with mobile number
delay(1000);
Serial.println("Motor Activated");// The SMS text you want to send
delay(100);
Serial.println((char)26); // ASCII code of CTRL+Z
delay(1000);
}
}
else if(!(strncmp(str,"motor off",9)))
{
digitalWrite(motor,LOW);
delay(5000);
if(digitalRead(ack)==0)
{
digitalWrite(LED,LOW);
delay(1000);
Serial.println("AT+CMGS=\"+91xxxxxxxxxx\"\r"); // Replace x with mobile number
delay(1000);
Serial.println("Motor deactivated");// The SMS text you want to send
delay(100);
Serial.println((char)26); // ASCII code of CTRL+Z
delay(1000);
}
}
else if(!(strncmp(str,"test",4)))
{
Serial.println("AT+CMGS=\"+91xxxxxxxxxx\"\r"); // Replace x with mobile number
delay(1000);
Serial.println("The System is Working Fine.");// The SMS text you want to send
delay(100);
Serial.println((char)26); // ASCII code of CTRL+Z
delay(1000);
}
}
//----------------Program developed by R.Girish------------//

The above implementation is not practically tested, but the author is cent percent sure that above idea will work. If readers found any issues with the above improvement can express through the comment section.

Part List

1) Transformer step down 12-0V
2) Diodes IN4007 x5
3) LM7812 x1
4) Relay 12V x1
5) BC548 Transistor x1
6) Electrolytic Capacitor 1000uF x1
7) GSM module: SIM 800 or SIM 900 model
8) 330 Ohm Resistor x2
9) LED RED/GREEN x1
10) Arduino Uno or Arduino nano or Arduino Mega
11) DC male jack x2

Video Clip:

Integrating with 3 Phase Motors

I have been receiving many requests to upgrade the relay stage for the above design so that it becomes compatible for operating 3 phase motors using GSM cell phone commands.

Therefore I decided to design the required circuit which will hopefully be able to switch ON and switch OFF a given 3 phase motors having the typical start and stop contactor mechanism.

The following figure shows how to configure the design using an IC 4017 circuit.

GSM 3 phase motor controller remote cell phone

NOTE: The 100uF /10K and 220uF and 47K values may need some adjustments in order ensure the correct amount of delay for the respective transistors and relay stages.

You'll also like:

  • 1.  Automatic Torque Optimizer Circuit in Electric Motors
  • 2.  Automatic Street Light Dimmer Circuit
  • 3.  Electronic Voting Machine with SD Card Module
  • 4.  Wireless Thermometer Using 433 MHz RF Link Using Arduino
  • 5.  Blinking an LED with Delay – Arduino Basics
  • 6.  Solid State Contactor Circuit for Motor Pumps

About Swagatam

I am an electronics engineer with over 15 years of hands-on experience. I am passionate about inventing, designing electronic circuits and PCBs, and helping hobbyists bring their projects to life. That is why I founded homemade-circuits.com, a website where I share innovative circuit ideas and tutorials. Have a circuit related question? Leave a comment.... I guarantee a reply!

Previous Post: « Intruder Position Indicator Security Circuit
Next Post: Remote Controlled Solar Lamp Intensity Controller Circuit »

Reader Interactions

Comments

  1. Abdul Salam says

    June 7, 2019 at 3:49 pm

    Hello sir ,
    Thanks for the wonderful project and very good explanation ,
    Sir me and my team are going to Perform this project in our college so i want to know from u that , what new advancements can be made right now …

    Reply
    • Swagatam says

      June 7, 2019 at 5:00 pm

      Glad you liked it Abdul, However since I am not very good with Arduino suggesting new advancements can be difficult for me through codes.

      Reply
  2. ashfaq says

    May 16, 2019 at 4:22 am

    sir we are doing the same project we need literature overview, plz point us the problems in your sys, how is it diffrent

    Reply
    • Swagatam says

      May 16, 2019 at 8:59 am

      Hello ashfaq, the literature is already given in the article with full details.

      Reply
  3. Sylvester says

    April 25, 2019 at 2:15 pm

    What is the price of project?

    Reply
  4. mahendhar says

    March 21, 2019 at 2:28 pm

    helo bro second tutorial is not working,, when i send motor on,, it getting on but im not getting any message,, when i send off ,, its getting off and im getting message also,, for experiment i given 5 voltage via relay,, but input 7 is not working

    Reply
    • Swagatam says

      March 21, 2019 at 5:53 pm

      Hello Mahendhar, as you can see the circuit is working in the video. I would suggest you to do the exact set up as indicated in the diagram and check again.

      Reply
  5. Shubham says

    March 6, 2019 at 9:24 am

    Hello, swagatam sir our seniors made the project of gsm based single phase pump motor,so now this year we have a job to make it gsm based 3 phase pump motor. Sir we need help ASAP i hope u’ll get my msg , i have seen th circuit diagram above but i am not getting it . We need to control the starter may b u have any idea to make it possible and we need to change the coding a little bit ,sir i hope u’ll contact me soon….

    Reply
    • Swagatam says

      March 6, 2019 at 9:44 am

      Hello Shubham, I am not good with Arduino coding so modifying the code can be difficult for me. However for the starter section I may investigate if you could tell me about its specifications.

      The last 4017 circuit is actually designed to operate a start/stop based contactor box.

      Reply
  6. Partap says

    February 22, 2019 at 3:48 pm

    Hi Swagatam,
    Like your project but question in my mind,
    In case of power failure, does GSM module alert user by sending a SMS back.
    if its not, can we make it possible as I am working on a project where need to monitor a fan basically I required a solution which in case fan goes down, it generate a sms to alert users for potential action.

    Reply
    • Swagatam says

      February 22, 2019 at 4:36 pm

      Thank you Pratap,

      The pin#7 is designed to accept the input prompts. It can be arranged with a transistor circuit such that it triggers pin#7 of the Arduino whenever power fails, and prompts the GSM to send a message to the owner regarding the actions. However for this the GSM and the Arduino must have the facility of a battery back up.

      Reply
      • Partap says

        February 22, 2019 at 5:26 pm

        Thanks for reply,
        There are few more things that I want to discuss can we talk in personal through email

        Reply
        • Swagatam says

          February 22, 2019 at 6:58 pm

          You can feel free to discuss it here, I’ll try to help you if possible!

          Reply
          • Partap says

            February 23, 2019 at 3:37 am

            Sure, is it possible if you can provide me the circuit design of my model with codes

            Reply
            • Swagatam says

              February 23, 2019 at 8:53 am

              Sorry, actually I am not good with Arduino coding, so it can be difficult for me to create new codes. There are many experts in the Arduino.cc forums, where you can ask how to modify the second program from the above article as per your requirement. Hopefully somebody would be able to guide you in the right direction.

              Reply
  7. Krishna P says

    February 1, 2019 at 6:16 am

    Pls modified this code to dual mobile control the gsm pls help us

    Reply
  8. Stephen Buadee says

    January 10, 2019 at 3:42 pm

    Thank you very much for your usual cooperation,
    I’m OK with that , but the delay time is 3min in my case is too much.
    Can you adjust it less than 10 seconds

    Reply
    • Swagatam says

      January 10, 2019 at 4:34 pm

      You can replace the 470uF capacitor with 22uF/25V for getting a value around less than 10 seconds

      Reply
  9. Stephen Buadee says

    January 10, 2019 at 12:13 pm

    Thank you very much,
    I’m a beginner in electronic
    Can you give me something simple for controlling my led panel indication light, 230v 1watt
    Thank you

    Reply
    • Swagatam says

      January 10, 2019 at 1:50 pm

      OK, here’s another simple design that you can try:

      https://www.homemade-circuits.com/2016/07/alternate-switching-relay-timer-circuit.html

      Reply
  10. Stephen Buadee says

    January 9, 2019 at 11:09 pm

    Hi Mr swag, thanks you very much for always sharing us with your innovations and research, may God richly go as yo.
    My problem is I need your usual help, I want a circuit to blink led panel light without arduino, below are its spec: 230v ac 1 watt
    Hopping to hear from you soon

    Reply
    • Swagatam says

      January 10, 2019 at 8:29 am

      Thanks Stephen, you can try the following concept:

      https://www.homemade-circuits.com/2015/12/220v-dual-alternate-lamp-flasher-circuit.html

      you can remove one of the triac stages and keep any one of them for the required flashing.

      Reply
  11. Francis says

    August 21, 2018 at 9:49 pm

    I have tried the circuit and works very well and am very great full for offering the circuit free!however I would request an upgrading where one can control two pumps independently or one pump with two independent solenoid valves and incorporate a flow switch

    Reply
    • Swagatam says

      August 22, 2018 at 9:32 am

      I am so glad you liked it, will surely consider your request and update if it is possible!

      Reply
  12. mohan says

    August 16, 2018 at 10:51 pm

    sir,
    How much time it will take to complete the project,from basic level????

    Reply
    • Swagatam says

      August 17, 2018 at 10:37 am

      Mohan, it will depend on the user, how quickly he is able to grasp and implement it.

      Reply
  13. I Sudheer says

    July 27, 2018 at 6:44 pm

    Sir update the moter controll system on and off using 2relays with missed call and SMS system and using time setting futeru. Like Kisan raj (or) maharaj product

    Reply
    • Swagatam says

      July 27, 2018 at 7:18 pm

      We’ll surely try to update, if it’s possible, thanks for the suggestion!

      Reply
      • Sudheer says

        July 28, 2018 at 7:10 pm

        can i use sim800l module for this project

        Reply
        • Swagatam says

          July 28, 2018 at 7:39 pm

          sorry I have no idea about it….

          Reply
      • Sudheer says

        July 28, 2018 at 7:14 pm

        sir ic 4017 circute is not working
        So give me solution (or) another circute plz………Sir

        Reply
        • Swagatam says

          July 28, 2018 at 7:38 pm

          Sudheer, it will definitely work, please take the help of an expert in your area…you will have to first confirm the relay operations on work table and then implement in actual project.

          you will have to understand the circuit and then implement it step wise

          Reply
  14. Madhu Sk says

    July 20, 2018 at 4:27 pm

    Sir how to control 3 phase motor by using this project

    Reply
    • Swagatam says

      July 20, 2018 at 6:18 pm

      Madhu, what kind of switch do you have for your 3 phase motor?

      Reply
      • Madhu Sk says

        July 20, 2018 at 7:03 pm

        Push button

        Reply
        • Swagatam says

          July 20, 2018 at 7:10 pm

          start and stop type??

          Reply
          • Madhu Sk says

            July 21, 2018 at 9:30 am

            No sir, green button for start and red button for stop

            Reply
            • Swagatam says

              July 21, 2018 at 10:52 am

              I’ll try to find a solution for this soon…

              Reply
  15. Mandira says

    July 12, 2018 at 7:31 am

    Hi Swagatam.!
    I am having trouble with this project. I used first code it worked fine. But after some days i turned it on GSM module sim900a wasn’t detecting signals light was blinking fast every second. Then after several hours of this madness of separating supplies for both arduino and GSM module (by making sure its 12v – 3A for GSM) and changed sim cards several times it started to detect network. But it stopped communication with arduino. I’m completely puzzled into it. I have to submit it to my university. please help me..!

    Reply
    • Swagatam says

      July 12, 2018 at 7:44 am

      Hi Mandira, I’ll try to contact the author of the article and try to get the solution soon.

      Reply
    • GR says

      July 12, 2018 at 5:10 pm

      Hi Mandira,

      I think your GSM module is malfunctioned somehow, better replace with new one.
      Don’t use Jio simcards as it is 4G only network.

      Remove the GSM’s module all wire connections and just insert SIM and turn ON and try to give a call to GSM and you should hear ringing, if not replace the GSM module and the network LED should blink only every 3 seconds, blinking every one seconds signifies searching for network.

      Regards

      Reply
      • Mandira says

        July 16, 2018 at 4:57 am

        Thanks for this quick response. Yes the GSM light is blinking every 3 seconds it means it detected the signals and registered to the network. The problem is it has no communication to arduino through RX TX when calling on the number it gives ringing. But has no output. Even when i checked the pins RX,TX with oscilloscope and called that number. Nothing appeared on oscilloscope. Probably there’s a shortage between these rx,tx pins. I think i need to replace it right now.
        Thanks Swagatam & GR you guys are great.

        Reply
        • Swagatam says

          July 16, 2018 at 6:53 am

          You are welcome Mandira. We are always happy to help!

          Reply
      • Mandira says

        July 17, 2018 at 5:21 am

        Hey GR, is it normal for a GSM module what i mentioned below:
        I connected rx tx to arduino, the arduino is powered on while i didn’t power GSM module. But through the connection of rx tx and ground the lights on GSM are turned on. They are not very bright but they are turned on. Its strange. Do you have any idea if this behaviour of module is normal. Because may be this reason blown the previous GSM module rx tx pins

        Reply
        • GR says

          July 17, 2018 at 6:28 am

          Hi Mandira,

          I too faced the glowing of LED by just powering the Arduino with connection with GSM (Tx, Rx, GND), but don’t do this again, either turn on the both boards simultaneously or power the GSM board first and power the Arduino.
          This could probably malfunction the GSM, I have done this couple of times accidentally but nothing gone wrong yet.

          Regards

          Reply
  16. Madha sk says

    July 6, 2018 at 12:38 pm

    I have done this project it is working fine thank you very much

    Reply
    • Swagatam says

      July 6, 2018 at 3:09 pm

      I am glad it worked Madhu, please keep up the good work

      Reply
  17. Eman says

    June 25, 2018 at 4:30 pm

    Swagatam ! You’re the one of the greatest blessings of God to this earth. My all prayers for you..!
    Have a wonderful day.!

    Reply
    • Swagatam says

      June 25, 2018 at 5:14 pm

      Thank you very much Eman. The pleasure is all mine!!

      Reply
  18. Massarath says

    May 6, 2018 at 9:59 pm

    The usb frm laptop to arduino provides 12v ?

    Reply
    • Mandira says

      July 17, 2018 at 5:23 am

      No it provides 5v

      Reply
  19. Nikhil Mer says

    April 27, 2018 at 3:05 pm

    And again a nice and useful project .
    So if I have to connect this to start and stop configuration then I just need to connect the relay contacts to the button with appropriate contact rating right????

    Reply
    • Swagatam says

      April 27, 2018 at 9:31 pm

      Thanks very much, yes that’s correct, but the relay action will need to be momentary, the “start” will need to be momentary ON (relay#1), and stop will need to be momentary OFF (relay#2)

      Reply
  20. madhu shankar says

    April 23, 2018 at 5:12 pm

    Hello sir can you please share the circuit diagram for the same project,but connecting 3 phase motor at the end in place of single phase of motor or 230v motor..
    Thank you

    Reply
    • Swagatam says

      April 23, 2018 at 6:01 pm

      Hello Madhu shankar, are you using a contactor for the 3 phase motor, having start stop buttons??

      Reply
  21. Suman says

    April 10, 2018 at 9:41 pm

    Thanks sir…
    Can you suggest any specific Arduino IDE sotware version.
    I compiled the code using ARDUINO IDE 1.0.3 and 1.8.0
    And i am not receiving any acknowledgement message in any of it. However, i didnt have the relay connected yet.

    Reply
  22. SUMAN says

    April 10, 2018 at 3:01 pm

    sir, while compiling and uploading, the arduino software is showing following errors:
    software: Arduino: 1.8.5 (Windows Store 1.8.10.0) (Windows 10), Board: “Arduino/Genuino Uno”

    errors:
    C:\Users\Hi\Downloads\WOCS\WOCS\WOCS.ino: In function ‘void serialEvent()’:

    C:\Users\Hi\Downloads\WOCS\WOCS\WOCS.ino:41:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

    if(Serial.find(“/”))

    ^

    Sketch uses 2902 bytes (8%) of program storage space. Maximum is 32256 bytes.
    Global variables use 383 bytes (18%) of dynamic memory, leaving 1665 bytes for local variables. Maximum is 2048 bytes.
    avrdude: verification error, first mismatch at byte 0x0000
    0x62 != 0x0c
    avrdude: verification error; content mismatch
    avrdude: verification error; content mismatch

    This report would have more information with
    “Show verbose output during compilation”
    option enabled in File -> Preferences.

    Reply
    • GR says

      April 10, 2018 at 6:38 pm

      Hi Suman,

      These are warnings, noting to worry about it:
      ———————————————
      C:\Users\Hi\Downloads\WOCS\WOCS\WOCS.ino: In function ‘void serialEvent()’:

      C:\Users\Hi\Downloads\WOCS\WOCS\WOCS.ino:41:19: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

      if(Serial.find(“/”))
      ——————————————–

      But you should have compiled the code successfully, there are no errors in the code.

      If your issue is while uploading the code to Arduino, then check that you have proper drivers is installed to your PC or any hardware issue with your Arduino (Try uploading a blink sketch).

      Regards

      Reply
  23. madhu shankar says

    April 10, 2018 at 11:47 am

    hello sir,
    i am having problem with the output..i am using gsm 900A gsm module and arduino UNO for the project..after completion of programming and when i turn on the circuit i am getting the message “SYSTEM IS READY TO RECEIVE THE COMMANDS” ,but when i send /motor on/ or /motor off/ the i am not getting output..it mean motor not getting turn on,as well as replay message is not getting..but when i calling to number which one is in gsm module its gets ringing..can you help me to complete my project..
    Thank you

    Reply
    • GR says

      April 10, 2018 at 6:50 pm

      Hi madhu shankar,

      Try these two codes:
      https://www.homemade-circuits.com/how-to-receive-sms-using-gsm-modem-and/

      https://www.homemade-circuits.com/how-to-send-sms-using-gsm-modem-and/

      Check these two functionality with your GSM module it should work fine, if any issues any replace it.

      Regards

      Reply
  24. randhir says

    March 20, 2018 at 7:15 am

    Hi girish sir,
    I m new in the learning stage about hobby of microcontroller programing. I want any program code that my microcontroller work / read the instructions from a specific mobile number and the mobile number can be changed by re-programming or via sms what ever your convinces. plz send me that code on my reply or my email – [email protected]
    Thanks in advance.

    Reply
  25. Jyoti says

    March 16, 2018 at 10:47 pm

    Sir I want the code for wireless closed loop speed control of DC motor . Here I am using GSM, Arduino and h bridge module. Also I want to implement the pid controller in the above program. Can you help me?

    Reply
    • Swagatam says

      March 17, 2018 at 10:18 am

      Jyoti,
      creating customized code will need a fee to be paid for the service, presently the price is 10/- INR per line of code

      Reply
  26. ravindra balme says

    January 21, 2018 at 9:29 am

    hello sir,
    thanxx for tutorial … sir I want to on and off motor using missed call based please tell me how can I do thiss??can u send me code for thiss??

    Reply
    • Swagatam says

      January 21, 2018 at 12:12 pm

      Ravindra,

      you can try eh following circuit

      blog/gsm-based-irrigation-circuit-using-cellphone-missed-calls-and-arduino/

      Reply
  27. Rahul says

    January 5, 2018 at 11:41 pm

    This following AT command AT+CLIP=1 in this pic has caller IDENTIFICATION i.e., getting the number of caller to module…so if we try to match this number to our if else code and we can write if else condition… like if matched with that number as receiving number LED=HIGH, we can control led on n off with missed call

    Reply
  28. Rahul says

    January 5, 2018 at 5:25 pm

    IAM facing a problem with my GSM Sim 900A when I give it /Motor ON/ message it’s taking and giving output, but when I give off message it’s not responding…i.e.,it’s only taking the 1st command and not responding to the second….when I use the same code for other gsm module it’s working fine for 1st and second messages of motor on and off…when I ask shopkeeper to replace he is saying it will not behave like that and blaming me that my code is wrong and he is covering himself when it is responding to 1st command it will respond to 2nd also it won’t do half work…but code 100% correct..as it worked for u all and worked for me in other gsm mod.. please say what to do.is there any minor error on my side?.

    Reply
    • Swagatam says

      January 5, 2018 at 6:12 pm

      I will forward this message to Mr. GR, he will reply you soon.

      Reply
    • GR says

      January 5, 2018 at 6:27 pm

      Hi Rahul,

      I am sure that it is a hardware issue with GSM module. Try getting replaced especially if you are going to represent the project for your final year.
      If it responded to your first comment, it would not be your mistake most probably.

      Regards

      Reply
  29. Rahul says

    January 2, 2018 at 2:23 pm

    Can we write a program to start a Motor by first ring and stop it with second ring…and we must get acknowledgement message after each ring whether motor Is on or off like ur previous program
    Help me write this code

    Reply
    • Swagatam says

      January 2, 2018 at 3:01 pm

      I will forward this to Mr. GR, if it is possible he will revert with a reply.

      Reply
    • GR says

      January 4, 2018 at 12:54 am

      Hi rahul,

      I will try to design as per your requirements soon.

      Regards

      Reply
      • Rahul says

        January 4, 2018 at 8:22 am

        Ok,sir…and this will help farmers a lot because some farmers are not literate enough to send message and turn on motor,if it’s a missed call it will be easy and simple for them…

        Reply
  30. Anne says

    December 28, 2017 at 11:03 am

    Can i get the required material list and if there is any link where i can get the same at the best price?
    Mainly i want link to the gsm module.
    Have you used gsm module or gsm modem?
    Please reply asap as i need help with my College irrigation project

    Reply
    • Swagatam says

      December 28, 2017 at 1:52 pm

      As mentioned in the article, it is a GSM modem that is used in the project.

      The GSM modem can be easily purchased from any online store.

      If you wish you can purchase the entire project for Rs.5000/- from us (all inclusive)

      I’ll try to get the entire parts list from the author of the article Mr. GR, and update it soon…

      Reply
    • Swagatam says

      December 28, 2017 at 7:45 pm

      The parts list has been updated at the end of the post

      Reply
  31. Anupam Dasgupta says

    December 14, 2017 at 9:29 pm

    Hi, Swagatam

    To switch on/off a single phase submersible pump set, I made a little change in the code and it is working fine. The changes I made are :
    int motor = 8; // main power suppy to pump unit via relay
    int LED = 9;
    int start = 10;//for momentary shorting of start button
    int temp=0;
    int i=0;
    int ack=7; //will act as dry run detector
    char str[15];
    void setup()
    {
    Serial.begin(9600);
    pinMode(ack,INPUT);
    pinMode(motor,OUTPUT);
    pinMode(LED,OUTPUT);
    pinMode(start,OUTPUT);
    digitalWrite(motor,LOW);
    digitalWrite(LED,LOW);
    digitalWrite(start,LOW);
    delay(20000);
    delay(20000);
    delay(20000);
    Serial.println(“AT+CNMI=2,2,0,0,0”);
    delay(1000);
    Serial.println(“AT+CMGF=1”);
    delay(500);
    Serial.println(“AT+CMGS=\”+91xxxxxxxxxx\”\r”); // Replace x with mobile number
    delay(1000);
    Serial.println(“System is ready to receive commands.”);// The SMS text you want to send
    delay(100);
    Serial.println((char)26); // ASCII code of CTRL+Z
    delay(1000);
    }
    void loop()
    {
    if(temp==1)
    {
    check();
    temp=0;
    i=0;
    delay(1000);
    }
    }
    void serialEvent()
    {
    while(Serial.available())
    {
    if(Serial.find(“/”))
    {
    delay(1000);
    while (Serial.available())
    {
    char inChar=Serial.read();
    str[i++]=inChar;
    if(inChar==’/’)
    {
    temp=1;
    return;
    }
    }
    }
    }
    }
    void check()
    {
    if(!(strncmp(str,”motor on”,8)))
    {
    digitalWrite(motor,HIGH);
    delay(100);
    digitalWrite(start,HIGH);
    delay(5000);
    digitalWrite(start,LOW);
    if(digitalRead(ack)==1)
    {
    digitalWrite(LED,HIGH);
    delay(1000);
    Serial.println(“AT+CMGS=\”+91xxxxxxxxxx\”\r”); // Replace x with mobile number
    delay(1000);
    Serial.println(“Motor Activated”);// The SMS text you want to send
    delay(100);
    Serial.println((char)26); // ASCII code of CTRL+Z
    delay(1000);
    }
    if(digitalRead(ack)==0)
    {
    digitalWrite(motor,LOW);
    delay(1000);
    Serial.println(“AT+CMGS=\”+91xxxxxxxxxx\”\r”); // Replace x with mobile number
    delay(1000);
    Serial.println(“Motor Dryrun”);// The SMS text you want to send
    delay(100);
    Serial.println((char)26); // ASCII code of CTRL+Z
    delay(1000);
    }
    rest of the code is same.
    with regards

    Reply
    • Swagatam says

      December 14, 2017 at 9:41 pm

      That’s wonderful Anupam, I am glad you could modify it and make it work you you…keep up the good work!

      Reply
      • Anupam Dasgupta says

        December 14, 2017 at 10:27 pm

        Hi Swagatam,

        Thanks for your appreciation. By the way, I am also very much interested in Arduino Uno based LED moving message display. In fact I have built one with the help of projects available in net. But I do not find any way how to increase the number of rows. All such projects I came across are of 8 rows. As a result the characters are too small. There is scope in the sketch to increase the number of columns but not rows. Would you please help me in this regard.
        With regards

        Reply
        • Swagatam says

          December 15, 2017 at 7:32 am

          Hi Anupam, I wish I could help you, but since I am not good with Arduino so I won’t be able to suggest you much in this regard. You can contact and request Mr. GR on his Facebook account and see if he can help.

          Reply
    • Krishna P says

      February 4, 2019 at 6:33 pm

      This code was showing error pls help

      Reply
      • Swagatam says

        February 4, 2019 at 7:18 pm

        I checked it just now, it’s not showing any errors….

        Reply
  32. Anupam Dasgupta says

    December 12, 2017 at 7:20 pm

    Hi Swagatam,

    I am very much glad to let you know when I changed the GSM module, the circuit is working fine as described. Many many thanks to you and Mr. Ragavan for extending your help. I would like to request you kindly give me suggestion how to modify the circuit as well as code/sketch to switch on and off a single phase Pump motor and three phase motor.

    With regards

    Reply
    • Swagatam says

      December 12, 2017 at 7:36 pm

      You are welcome Anupam, we are glad you could succeed, according to me you can use the same circuit and code for switching ON/OFF a single phase pump and also for a 3 phase, but for 3 phase replace the BC548 with a 2n2222, and the relay with a triple pole triple throw or TPTT relay, and wire the 3 contacts with the 3 phase supply connections accordingly.

      By the way the author name is “Mr. Radhakrishnan” and not Mr. Ragavan 🙂

      Reply
      • Anupam Dasgupta says

        December 12, 2017 at 8:18 pm

        Hi Swagatam,

        First of all I am extremely sorry for wrongly quoting the name of Mr. Radhakrishnan as Mr. Ragavan. Please convey my thanks to Mr. Radhakrishnan. By the way, I was supposed to let from you know how to switch on/off a single phase submersible pump motor and not a simple single phase pump motor. Please help me in this regard. Also please let me know how can the code be modified to accept messages from more than one mobile.
        With regards

        Reply
        • Swagatam says

          December 12, 2017 at 8:38 pm

          Hi Anupam, do you mean to say you want to know how to operate the submersible contactor “start”, “stop” buttons? I’ll try to figure it out if possible.

          For the codes I will inquire with Mr. GR.

          Reply
          • Anupam Dasgupta says

            December 12, 2017 at 9:44 pm

            Hi Swagatam,

            Thank you for your prompt reply. Yes, I want to operate the Start, Stop buttons of submersible pump starter. Also please let me know if the circuit and code can be modified to respond sms from multiple numbers.
            With regards

            Reply
            • Swagatam says

              December 13, 2017 at 9:42 am

              OK,Mr. GR will reply you soon…

              Reply
        • GR says

          December 13, 2017 at 10:27 am

          Hi Anupam,

          You can send SMS commands to GSM module from any mobile phone, but you will receive the acknowledgements to number than you entered in the code.

          Regards

          Reply
          • GR says

            December 13, 2017 at 10:29 am

            *that not “than”

            Reply
  33. Anupam Dasgupta says

    December 10, 2017 at 10:23 pm

    Hi, GR

    I think the problem is with the GSM Modem. I bought SIM900A Dualband GSM/GPRS TTL MODULE for Arduino Raspberry Pi and other MCU from eBay. Is this type of module is alright ? If not, then please suggest what type of GSM module is needed . There was no message “System is ready to receive commands”. Moreover, When I tried to make call, the reply was subscriber is not reachable. Please tell me one thing, after inserting the SIM if 5 volt supply is applied to the module without connecting Tx and Rx to Arduino Rx and Tx respectively , should I not hear ring tone ? If I do not get ring tone on calling, is it due to the fault of GSM module?
    With regards

    Reply
  34. Anupam Dasgupta says

    December 10, 2017 at 12:29 pm

    Hi Swagatam,

    I made the circuit and uploaded the sketch as described above but there is no response even if /test/ or /motor on/ SMS is send. Moreover, when I tried make call the response was “subscribe is not reachable” What could be the problem? Or where could be the possible error I made ? Please help.

    With regards
    Anupam Dasgupta

    Reply
    • Swagatam says

      December 10, 2017 at 2:15 pm

      Hi Anupam, I’ll forward this issue to Mr. GR, he’ll reply you soon….

      Reply
    • GR says

      December 10, 2017 at 7:25 pm

      Hi Anupam,

      The problem is probably with mobile network.

      You must receive “System is ready to receive commands” from the GSM module after powering 1 to 2 minutes, only after then you able to control the motor/relay. If you did’t receive the mentioned acknowledgement SMS, your SMS commands won’t be accepted.

      When you call to GSM modem, we must hear ring sound.

      Also check the TX and RX pins once again.

      Regards

      Reply
  35. Subhash Bandgar says

    December 5, 2017 at 10:07 am

    Dear GR sir
    I like your gsm based irrigation system and,your profile also
    But I need to add more things in that irrigation projects,which is helpful for me, I need to implement some motorized valve to irrigate our farm land randomly when given commond by me,and also I need to check 3phase detection when power comes give 1 msg to me AC power on and when power failure give another msg to me No AC supply ,we using phase supervision relay and use NO NC contact of this relay for feedback also check status of flow water using flow switch

    Reply
    • GR says

      December 5, 2017 at 5:40 pm

      Hi Subhash,

      Let me do some research, if all your mentioned points are feasible, I will make this project.

      Regards

      Reply
  36. Anupam Dasgupta says

    December 2, 2017 at 4:12 pm

    while compiling the code an error message – expected ‘)’ in string command. I could not go further. Please help me.

    Reply
    • Swagatam says

      December 2, 2017 at 5:16 pm

      Hi, please check it now, and let me know if the problem is still there….

      Reply
      • Anupam Dasgupta says

        December 2, 2017 at 11:18 pm

        with the new code, there was no problem in compiling as well as uploading sketch. Rest will be informed as soon as I complete the project. One more thing I want to know from you that whether the project will work on 4G SIM or not ? If not, what are the modifications needed ? As 2G SIM is almost becoming obsolete. Please help your followers.

        Reply
        • Swagatam says

          December 3, 2017 at 10:04 am

          I’ll forward this question to Mr.GR, he’ll reply soon.

          Reply
        • GR says

          December 3, 2017 at 10:59 am

          Hi, Anupam

          The 4G sim will work if it is backward compatible with 2G network.

          Most of 4G Sim should work well, except “Jio” because their network is “4G only” but you can try with Jio and mention your result in comment.

          I used with BSNL 3G sim which is backward compatible with 2G and worked flawlessly.

          Regards

          Reply
          • Anupam Dasgupta says

            December 4, 2017 at 2:06 pm

            Hi, GR

            Thank you for your reply. For want of GSM Modem (which I ordered online) I could not complete the project. On completion, I will experiment with JIO SIM and let you know the result. I would like to take this opportunity to request you to publish moving message led display circuit with arduino uno with code having scope for increasing both number of rows and column.

            With regards.

            Reply
          • GR says

            December 4, 2017 at 3:01 pm

            Hi Anupam,

            Can you please elaborate you request a bit more.

            Regards

            Reply
  37. chintamani says

    October 24, 2017 at 2:34 pm

    dear sir . only this module it works is 10 km,so 20km how to works it with gsm module with motor pump

    Reply
    • Swagatam says

      October 24, 2017 at 2:39 pm

      chintamani, in the request the distance of the pump is specified being at 10km distance, that does not mean the above circuit is restricted to 10km…since it is a GSM based the range can be infinite.

      Reply
  38. sri kanth says

    September 11, 2017 at 9:03 am

    Friend i need dry run protection for this please provide the code ware i have to change

    Reply
    • Swagatam says

      September 11, 2017 at 11:14 am

      Hi, dry run protection will need to be a sensor based circuit, either a water sensor or heat sensor which can be attached with the motor along with a cut off circuit.

      Reply
      • sri kanth says

        September 12, 2017 at 4:10 am

        friend but i need message alert also so please provide the program
        like one digital in put but that one reading after after 10 min’s from motor ON condition digital in put LOW that time motor and led OFF and send the message motor off due to dry run so please provide the that condition

        Reply
        • Swagatam says

          September 12, 2017 at 5:48 am

          OK friend, I’ll request Mr. GR to update the feature in the article.

          Reply
  39. Rakesh Hadiyal says

    September 9, 2017 at 6:54 am

    Hi…

    I am farmer and i want my farm pump set automatic start using GSM Mobile no android.

    how many cost for this work.

    If you interested so please help me or advise me.

    please email me for cost and process.

    Thanks .

    Reply
    • Swagatam says

      September 9, 2017 at 8:11 am

      Hi,

      I have forwarded your email ID to Mr. GR, he will contact you soon with the reply.

      Reply
  40. sri says

    August 31, 2017 at 8:57 am

    friend i need three phase updating also include this project please do the help

    Reply
    • Swagatam says

      August 31, 2017 at 10:49 am

      replace the relay with a 3 contact relay..that’s all

      Reply
  41. Unknown says

    August 7, 2017 at 1:57 pm

    hi sir
    plz can you tell me the 12v relay can start 3 phase motor pump

    Reply
    • Swagatam says

      August 8, 2017 at 2:53 am

      use 3 relays in parallel, one relay for each phase, each relay contact must be rated at 30 amp…use TIP122 for the driver transistor, with 10K as the base resistor

      Reply
  42. kaushik maity says

    July 27, 2017 at 12:08 pm

    deaer swagatam da i need to controll the speed of a 12volt dc car wiper motor.please describe any circuit for it which able to varies the speed but no effect on torque.

    hope you understand my requirment……

    thanks

    Reply
    • Swagatam says

      July 27, 2017 at 1:18 pm

      Dear Kaushik, you can use the following concept for your requirement

      https://www.homemade-circuits.com/2012/05/make-this-pwm-based-dc-motor-speed.html

      Reply
  43. bala praneeth reddy says

    July 27, 2017 at 9:39 am

    HELLO GIRISH SIR
    CAN U SEND THE CIRCUIT DIAGRAM OF THE PROJECT WITH NEAT EXPLANATION

    Reply
    • Swagatam says

      July 27, 2017 at 11:05 am

      Hello Bala, the circuit and the explanation are adequately presented in the part1/part2 versions of the article, you can refer to them to get an in-depth view of the idea.

      part1 explains a controller that reverts an acknowledgement message when the remote unit is activated, whereas in part2 the same idea is further upgraded and allows the remote end to send a message to the user when the motor is actually activated making the process entirely foolproof.

      Reply
  44. KULDEEPSINH JADEJA says

    June 21, 2017 at 7:12 am

    Can it works on A6 module?

    Reply
  45. KULDEEPSINH JADEJA says

    June 21, 2017 at 6:56 am

    Can this program works on A6 module? Or sim 900?

    Reply
    • GR says

      June 23, 2017 at 4:19 am

      I would recommend sim 900 or sim 800 module, because this project has been test with these modules.

      I am assuming it must work on A6 module equally as it works on AT comments.

      Regards

      Reply
  46. Unknown says

    May 28, 2017 at 3:48 pm

    Hi Sir,

    Same question as above that if we plan to use 4 relays,what shuold we change or add in the code?

    Thanks a lot.

    Reply
    • Swagatam says

      May 29, 2017 at 4:41 am

      Hi, you can connect all the 4 relays in parallel, just make sure the driver transistor is replaced with an appropriately rated one.

      Reply
  47. kaushik maity says

    April 28, 2017 at 6:59 am

    MR GIRISH I AM WAITING FOR YOUR ADVICE …..PLEASE LET ME KNOW THE SOLUTION ASPS

    Reply
  48. kaushik maity says

    April 27, 2017 at 1:06 pm

    DEAR SWAGATAM I NEED TO USE MY SPAIRE LAND FONE AS A GSM FONE …SO GET ME THE IDEA HOW TO DO ….I HAVE A SIM 800 GSM MNODULE …SHALL I USE IT FOR THAT?

    Reply
    • Swagatam says

      April 28, 2017 at 2:16 am

      Mr.GR, will try to solve it for you

      Reply
    • GR says

      April 29, 2017 at 12:17 am

      Hi kaushik,

      You can't use your landline phone as GSM phone. Landline phones aren't designed or can't be modified. However you can use your GSM module to function as a basic cell phone (GSM phone), which I will try to make a different article.

      Regards

      Reply
  49. GR says

    April 21, 2017 at 2:20 pm

    Hi kaushik,

    I think 4G SIM don't work with SIM800/900 module, try to use only 2G SIM. In my prototype I've used BSNL 3G SIM (also 2G compatible) and it worked great. Make sure you 4G SIM is backward compatible with 2G network.

    Regards

    Reply
  50. kaushik maity says

    April 21, 2017 at 10:33 am

    GIRISH SIR,
    I HAVE NOTICE A PROBLEM…MY PROJECT IS WORKING FINE .BUT NOW I NOTICE WHEN I PUT THE 4G SIM (AIRTEL) INSTEAD OFF 2G SIM IT DON'T REVERT WITH THE SPECIFIED COMMEND LIKE"SYSTEM IS REDY TO RECCIVE THE COMMEND",MOTOR IS ACTIVATED OR DEACTIVATED" …..IN-SPITE OF IT SMS COMES "NULL" …..BUT IN 2G SIM IT WORKS AS YOU DESCRIBE …ALSO IT RESPOND ON 4G SIM…..WHY IT HAPPENS ? HOW TO RECOVER ?
    HOPE YOU UNDERSTOOD MY ISSUE?????

    Reply
  51. kaushik maity says

    April 5, 2017 at 3:56 am

    SIR…THANKS FOR YOUR UPDATES…I UNDERSTAND WHAT YOU ASKED…..IT MEAN AFTER ADDING THE NEW NUMBER AT PROGRAM SKETCH NEED TO BE RE-UPLOAD TO THE ARDUINO. AT SAME TIME IT ERASE THE OLD & REPLACE WITH THE NEW POGRAM?…SHALL I CORRECT ?

    Reply
  52. kaushik maity says

    April 3, 2017 at 3:02 pm

    My next project fire alart system which also described by mr girish…….for that i want to remove the old pogram and reload the new pogram…..how its possible please describe ???next another question is how to change the phone no for the exsisting project….please help

    Reply
  53. kaushik maity says

    April 2, 2017 at 4:51 pm

    MR.SWAGATAM…..SHALL I BE USE THIS arduino TO MAKE A NEXT ANOTHER PROJECT WHICH I USED IN MY LAST PROJECT ? PLEASE BRIEF ME HOW TO REPLACE THE OLD PROGRAM TO NEW ….PLEASE PLEASE

    Reply
    • Swagatam says

      April 3, 2017 at 2:12 pm

      please specify the details of your next project…

      Reply
    • GR says

      April 3, 2017 at 4:30 pm

      Hi,

      Just upload your new code, the old code will get erased.

      Regards

      Reply
  54. kaushik maity says

    April 1, 2017 at 3:25 pm

    GIRISH SIR ,
    MY PROJECT IS WORKING FINE …..NOW I WANT TO CHANGE THE PHONE NO & WANT TO PUT "MAINS " INSTEAD OF "MOTOR"……HOW TO IMPLIMENT PLEASE GUIDE ME …..

    Reply
    • GR says

      April 3, 2017 at 4:26 pm

      Hi kaushik,

      Replace the phone number which you have entered in code with new one.

      Replace the word MOTOR with MAINS in the code, don't change any thing else.

      Regards

      Reply
  55. kaushik maity says

    April 1, 2017 at 5:48 am

    MR .GIRISH
    MY CIRCUIT IS WORKING FINE ….AGAIN THANKS FOR YOUR CO-ORDINATION ..SIR.I HAVE AN IDEA TO MODIFIED WITH THIS CIRCUIT ….I WANT TO ADD TWO SENSOR WHICH INTERLOCK WITH THIS CIRCUIT….MOTOR CAN BE AUTOMATICALLY STOP INCASE THE WATER LAVEL IS MINIMISED THEN THE SPECIFIED LAVAL AT RESERVER OR IF MAXIMISED AT THE STORAGE TANK.AND IN BOTH CASE MASSAGE CAN BE SENT….PLEASE GET ME THE SOLUTION

    Reply
    • Swagatam says

      April 1, 2017 at 11:16 am

      Glad to know it's working Kaushik.

      If Mr.GR finds it comfortable and if he is not busy, he will surely look into it

      Reply
  56. kaushik maity says

    March 30, 2017 at 10:22 am

    DEAR MR. GIRISH ….I HAVE BOUGHT THE ARDUINO UNO 3 WITH ATMEGA 328 BOARD ….AFTER COPY THE PROGRAM ..SAVE AND COMPILE THE PROGRAM TO ARDUINO ….I HAVE DONE AS FOLLOWS——

    1.USING IDE 1.0.3 VERSION AT WINDOWS 7 LAPTOP.
    2.COPY THE PROGRAM FROM YOUR DESCRIBED BLOG.
    3.REPLACE THE PHONE NO AS YOU HAD TOLD .
    Serial.println("AT+CMGS="+91xxxxxxxxxx"r"); // Replace x with mobile number

    IN ABOVE LINE PUT MY PHONE NO AND DELETE THE LAST TEXT COMMENT FOR ALL
    4.BEFORE COMPILING THE LED NEAR USB CONNECTOR HAS GOT FLASHING BUT AFTER COMPILING I NOTICE IT STOPE TO FLASH …..

    SIR ….IS ABOVE STEPS ARE ATTEMPTING CORRECT ?IF ANT MISTAKE PLEASE ASK THE RECTIFICATION PROCESS….
    SHALL I GOT YOUR MOBILE NO ?IT WILL HELP ME MORE OF COURSE IF YOU DON'T MIND?

    Reply
    • GR says

      March 31, 2017 at 3:33 pm

      Hi kaushik,

      You have done everything right. The two LEDs are Tx and Rx, which will glow while your code is being uploaded to arduino and stop glowing after the code is uploaded.

      Regards

      Reply
  57. gandhi says

    March 27, 2017 at 4:35 am

    GR sir
    i am gandhi,my hobby to do the electronics projects,its really very useful to agri pump on and off.i use your code with gsm perfectly 9th digital pin led working based on the sms command and serial monitor i got the acknlowdgement while i send "/test/".i need the technical help 4m your side.weather the relay which is connected to the motor is on or not.just we want to know the status through gsm to our mobile sim number via sms not in serial monitor means how i wants to modify the program.guide me when ever u found free time.
    thanks

    Reply
    • GR says

      March 27, 2017 at 5:20 pm

      Hi Gandhi,

      I understood your request, I will try to update the code with schematic soon.

      You want to receive the acknowledgment only after the motor is turned on physically and not just after Sending SMS commands.

      Regards

      Reply
  58. kaushik maity says

    March 25, 2017 at 3:58 pm

    BRO…..THANKX FOR YOUR COORDINATION ,ONE MORE DOUBT IS WHICH NUMBER HAS TO BE PUT TO THE PROGRAM IN THE PLACE OF "XXXXXX"…….THE NUMBER FROM WICH I SENT SMS OR WHICH THE SIM TO BE INSERT TO THE MODULE?

    Reply
    • GR says

      March 26, 2017 at 6:27 pm

      Hi kaushik,

      You have to place your phone number from where you send SMS to GSM modem.

      Regards

      Reply
  59. kaushik maity says

    March 24, 2017 at 4:18 am

    thank you to both of you ;i will try this ,if faced any trouble then please have to be help me to fulfill this project.

    Reply
    • GR says

      March 24, 2017 at 6:00 am

      Hi kaushik, we will help you to accomplishing the project, you may ask any number of queries.

      Regards

      Reply
  60. kaushik maity says

    March 23, 2017 at 2:43 pm

    MR.GIRISH I AM WAITING FOR YOUR REPLY….I BOUGHT ALL THE COMPONENT BUT DUE TO THIS DOUBT I CANNOT CONSTRUCTE MY PROJECT……PLEASE REPLY AT MOST EARLIEST……….

    Reply
    • Swagatam says

      March 24, 2017 at 3:28 am

      Kaushik, Please refer to the above comment for the reply.

      Reply
  61. kaushik maity says

    March 22, 2017 at 12:06 pm

    swagatam,
    i have a doubt,can you guide me sir,in program front what will be the 1st line of program & what will be the last line of program to be copy for uploaded?

    Reply
    • Swagatam says

      March 23, 2017 at 12:01 pm

      kaushik, this article was submitted by Mr. girish who is one of the authors of this blog, I hope he will find your comment and respond soon.

      Reply
    • GR says

      March 23, 2017 at 4:46 pm

      Hi kaushik,

      The program starts with

      //—————-Program developed by R.GR————//

      and end with the same. The mentioned line is not necessary to operate the project.

      You can copy the codes between the above mentioned line.

      Regards

      Reply
  62. kaushik maity says

    March 19, 2017 at 2:19 pm

    Dear swagatam ,
    Can you ask me ,how many times can i pogeram a aurdino ,or is there any chance to rectify the pogram after uploded

    Reply
    • Swagatam says

      March 20, 2017 at 2:40 am

      Dear Kaushik,

      there are no such restrictions, you can program as many times as you want and rectify the codes anytime after the upload

      Reply
  63. KONSTANTINOS PAPAKONSTANTINOU says

    February 18, 2017 at 10:46 am

    Good morning,
    Very good work. I want to ask if I want to put four relay;
    What change in the code;
    And command if(!(strncmp(str,"motor on",8))). The number 8 it says;
    I tried the code on A6 GSM and it works fine
    Thank you very much.

    Reply
    • Swagatam says

      March 20, 2017 at 2:37 am

      Thank you Konstantinos, I hope Mr. GR will see this comment and revert soon.

      Reply
  64. Unknown says

    February 18, 2017 at 10:42 am

    Good morning,
    Very good work. I want to ask if I want to put four relay;
    What change in the code;
    And command if(!(strncmp(str,"motor on",8))). The number 8 it says;
    I tried the code on A6 GSM and it works fine.
    Thank you very much.

    Reply
  65. Ranjan Sha says

    February 18, 2017 at 7:44 am

    But sir I shouldn't get any ring back sir.
    I think I purchage your module.
    Please sir send me your link from which you buy your module.

    Reply
    • GR says

      February 19, 2017 at 9:30 pm

      Hi ranjan,

      I don't remember URL, but I purchased from amazon. Try searching SIM 800 and you may see a module similar to mine which is shown the link:

      https://www.homemade-circuits.com/2016/09/how-to-send-sms-using-gsm-modem-and.html

      Regards

      Reply
  66. Ranjan Sha says

    February 16, 2017 at 8:08 am

    My link from which I purchase gsm module.
    http://www.amazon.in/gp/aw/d/B01MSVR7NJ/ref=mp_s_a_1_17?ie=UTF8&qid=1487232078&sr=8-17&pi=AC_SX118_SY170_QL70&keywords=gsm+module#

    Reply
    • GR says

      February 18, 2017 at 5:52 am

      Hi ranjan,

      Looks good,

      Insert the sim and call the number, you should get ring back. If this is done, try to send basic sms using your module from the link in previous comments.

      Regards

      Reply
  67. Ranjan Sha says

    February 10, 2017 at 7:36 am

    In this gsm module there are 3 led red,green,yellow and a buzzer.When i give supply to the gsm module the buzer is beep and red and yellow led is blink fast 3-4 time then off up to 30sec and the green led is always on

    Reply
  68. Ranjan Sha says

    February 10, 2017 at 4:18 am

    It has not any power button
    I also give phone number with our country code i.e.+91
    Its network led doesn't blink in 3 second

    Reply
    • GR says

      February 10, 2017 at 3:40 pm

      Hi ranjan,

      if the network LED is not blinking for every 3 second, there may be chance that your GSM modem is defective or the SIM is defective. Please confirm this before proceeding further steps.

      Your may check your GSM modem by sending basic SMS:

      https://www.homemade-circuits.com/2016/09/how-to-send-sms-using-gsm-modem-and.html

      If your GSM modem can send SMS then its error with your wire connection.

      Regards

      Reply
    • GR says

      February 10, 2017 at 3:44 pm

      can you please share your GSM modem's picture top and bottom view and share the link. Let me take a look….

      Reply
    • Ranjan Sha says

      February 11, 2017 at 6:27 am

      How I share the picture

      Reply
    • GR says

      February 12, 2017 at 5:19 am

      Hi Ranjan,

      You have a slightly different kind of GSM modem than what I imagined, no problem.

      you can test the GSM modem by following the link in the previous comment and comment your issues, let's resolve it.

      Regards.

      Reply
  69. Ranjan Sha says

    February 9, 2017 at 2:10 pm

    Dear GR sir,
    I copy the program and replace "xxxxxxxx" by phone no. and compiled it,uploaded by aurdino software 1.0.3 version
    Then I use gsm module sim800a
    It has 4 no. of pin Tx,Rx,gnd,5v
    I connect
    Rx of aurdino——->Tx of gsm
    Tx of aurdino——->Rx of gsm
    gnd of aurdino——->gnd of gsm
    5V of aurdino——->5V of gsm
    Then give the supply to aurdino uno board
    I use airtel 4g sim with 2g accessible
    But it doesn't give any reply to the programmed phone number

    Reply
    • GR says

      February 9, 2017 at 8:23 pm

      Hi Ranjan,

      Replace "XXXXX" with your phone number with +91 country code at beginning.

      Do NOT use 5V arduino supply to GSM modem. You should power it separately from a wall adapter with 9V.

      Let me know whether your GSM modem has power button, if so you should to press the power button for 3 seconds.

      Make sure that your sim card is latched into mobile network. You can confirm this by looking at network LED blinking once every 3 seconds and not blinking at faster rate continuously.

      Regards

      Reply
  70. Ranjan Sha says

    February 9, 2017 at 8:11 am

    please help me sir i want to give this project in my final year project
    I study in diploma 3rd year in ELECTRICAL

    Reply
  71. GR says

    February 7, 2017 at 6:55 pm

    Hi ranjan,

    Please check your wire connections. We can't spot the reason why your circuit didn't work. Please elaborate your quires.

    Regards

    Reply
  72. Ranjan Sha says

    February 7, 2017 at 2:40 pm

    Why gsm module don't send any acknowledgement message

    Reply
  73. ragavan ganapathy says

    January 2, 2017 at 10:52 am

    Dear Sir,

    As you told Circuit is working sir, I got the commend(System is ready to accept commands)when we switch "ON" the circuit.

    But after getting that how many calls I have to do? I tried calling that number (call is going) but Relay is not getting activated and LED is also not glowing. Please help me to solve this problem sir.

    Best Regards
    PG Ragavandir

    Reply
    • Swagatam says

      January 2, 2017 at 12:05 pm

      Dear Ragavan, Mr. GR will answer your question soon.

      Reply
    • GR says

      January 2, 2017 at 12:17 pm

      Hi Ragavan,

      Your system is working fine if you receive "System is ready to accept commands".

      You must send text SMS to the number not calling.

      Use /motor on/ to activate the relay.

      Use /motor off/ to deactivate the relay.

      Use /test/ for testing the response from the circuit.

      Start the command with”/” and end with “/” otherwise it won’t accept as valid request.

      Try to read the complete article as it is mentioned in the post 🙂

      Regards

      Reply
    • ragavan ganapathy says

      January 2, 2017 at 2:17 pm

      Dear Swagatam Sit & Radhakrishnan Sir,

      Thanks for your immediate reply.

      As you told I did sir but sorry for saying, same message is coming as ready,

      Now I connected Arduino with PC to check comment prompt. In that I gave comment as your instruction but same happening sir. Relay is not switching "ON or OFF"

      Sir if possible can you please share your phone number or Gmail ID so that call or chat. Please help

      Best Regards
      PG Ragavandir

      Reply
    • GR says

      January 3, 2017 at 12:55 pm

      Hi ragavan,

      I think you are totally confused!!!

      you must send SMS commands as mentioned earlier from your mobile (the number which you have entered in the code) to the number of sim card which you have inserted in GSM module. That's all, and you will receive an acknowledgement SMS from GSM module. Every time you power on you will get that test SMS.

      Command prompt??? you mean serial monitor? No need to type any comment on that and no need to connect arduino to PC other than uploading the code.

      Any problem we are here to help.

      Best Regards

      Reply
    • ragavan ganapathy says

      January 5, 2017 at 5:20 pm

      Dear Sir,

      Thanks for your reply, sorry for my late reply.

      I have to send SMS from my phone to the SIM in GSM number like "Motor ON & Motor OFF" right?

      Your right as you told I have typed in serial monitor only sir, sorry.

      Now will try and tell the result.

      Best Regards
      PG Ragavandir

      Reply
    • GR says

      January 6, 2017 at 5:27 am

      Hi ragavan,
      Send sms /motor on/, /motor off/
      Starting and ending with "/".
      Regards

      Reply
    • ragavan ganapathy says

      January 17, 2017 at 5:41 am

      Dear Sir,

      Working sir, thanks a lot, "HATS OFF" for both,

      but this is working through only sending SMS "motor ON" and "motor OFF"? or we can Call and control also?

      Best Regards
      PG Ragavandir

      Reply
    • GR says

      January 17, 2017 at 4:11 pm

      Hi ragavan,

      I am glad that it worked.

      It can be controlled only by SMS

      Regards.

      Reply
  74. ragavan ganapathy says

    December 6, 2016 at 5:13 pm

    Dear Sir,

    Thanks for your response for this circuit, and I thank Mr. Radhakrishnan too.

    I will try to make this, If I achieved this for sure will tell your name & Mr. Radhakrishnan's name to whom all I try to help.

    Great for you both, may GOD bless

    Thanks & Best Regards
    PG Ragavandir

    Reply
    • Swagatam says

      December 7, 2016 at 3:10 am

      You are welcome Ragavan! Wish you all the best…

      Reply
  75. Kesava Raj says

    November 21, 2016 at 7:08 am

    Instead of using PIR .I have one idea by using IR ,PHOTO DIODE and CD4017…when we give one postive pulse to PIN 14 the CD 4017 One channel will active i seen this circuit in Infrared using on off for home appliance…
    .I'm modifying the circuit..I'm using IR bulb it will continuously glow when we enter inside the ir will reflect the signal to photodiode . The photo diode will give signal to PNP transistor to activate the CD4017..now the o/p will be active…when we go outside of the room the reflection will happen again and the o/p will be off…

    I didn't try this circuit….If it's correct means i will try sir….pls give me SUGGESTIONS sir….

    Reply
    • Swagatam says

      November 21, 2016 at 8:34 am

      yes you can alternatively try other types of sensors for sensing an intrusion.

      you can try a proximity detector circuit for the same.

      surely a 4017 flip flop circuit can be used for implementing the toggling action of a relay by integrating it with any form of intrusion detector sensor.

      Reply
  76. Kesava Raj says

    November 21, 2016 at 7:00 am

    If u r using pir circuit pls give the link id sir

    Reply
  77. Kesava Raj says

    November 21, 2016 at 6:59 am

    Already i connected sir…10uf 63v electrolyatic capacitor…same prblm coming sir…..when i enter inside it glowing well the flashing will be stop…and after 3 min it will be off …after 1 hour it will be flashing.
    Sensor problem means it won't work when we enter…

    Reply
    • Swagatam says

      November 21, 2016 at 8:37 am

      try connecting a filter capacitor immediately across the supply pins of the PIR, and also connect an LED in series with the transistor base and PIR o/p pin…..just to monitor the PIR output response….

      Reply
    • Kesava Raj says

      November 21, 2016 at 10:39 am

      I'm using NPN transistor …
      Transistor base want to connect ANODE of LED ?
      and CATHODE of led to PIR o/p….

      We want to use resistor & led in series or only led in series

      Reply
    • Swagatam says

      November 22, 2016 at 2:51 am

      anode will connect with PIR o/p, and cathode towards the transistor base with the resistor in series…the resistor can come at the LeD anode or at the LeD cathode.

      PIR——>|—-^^^^—–base

      PIR——^^^^—–>|—–base

      Reply
    • Kesava Raj says

      November 22, 2016 at 2:46 pm

      In u r PIR post i see one..ckt
      In the transistor emitter and base across one capacitor 25V 470uf…

      I make in my circuit..Now its working fine sir…

      I want to know the reason ..
      1.Y its making flashing while I'm using 10uf capacitor…
      2.when we increase capacitor value it not flashing and working good..
      What is the function of capacitor in this PIR circuit…

      Now its working well..
      I'm so happy sir..

      Thank u very much sir..

      Reply
    • Swagatam says

      November 23, 2016 at 5:18 am

      Kesava, I am glad you could correct the fault, however flashing should not have happened, that's something you will have to identify yourself, or you can change the PIR and see if the fault persists.

      increasing the capacitor effectively grounded the stray signals which was causing the fluctuations, and therefore the flashing stopped

      Reply
  78. Naresh S says

    November 21, 2016 at 4:15 am

    Sir I need automatic water tank overflow control circuit Using microcontroller with full detailed coding.

    Reply
    • Swagatam says

      November 21, 2016 at 5:46 am

      Naresh, if possible I'll try to include it soon.

      Reply
  79. Kesava Raj says

    November 20, 2016 at 4:24 pm

    Sir i have one doubt abt PIR SENSOR…
    I bought from Amazon.Using rest room Pir sensor out..connected with transistor & relay its working well…but sometimes its flashing..
    While flashing time i enter inside its working well…whats the reason for flashing..

    Reply
    • Swagatam says

      November 21, 2016 at 2:29 am

      It could be due to some stray signal pick up, try connecting a 10uF or any high value capacitor across base/emitter of the transistor and check the response

      Reply
  80. Kesava Raj says

    November 20, 2016 at 4:17 pm

    Is there any book available sir

    Reply
    • Swagatam says

      November 21, 2016 at 7:40 am

      you can find many good online tutorials with videos…

      Reply
  81. Kesava Raj says

    November 20, 2016 at 5:57 am

    Hai sir…I'm new for Aurdino…
    So pls tell the Model no of Aurdino…
    And How to program the Aurdino sir…

    Reply
    • Swagatam says

      November 20, 2016 at 3:31 pm

      Hi Kesava, you will have to go through an extensive course to learn Arduino, it cannot be taught here in comments or through a few articles.

      Reply

Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic! Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Subscribe to New Circuit Ideas

Categories

  • Arduino Projects (87)
  • Audio and Amplifier Projects (132)
  • Automation Projects (17)
  • Automobile Electronics (101)
  • Battery Charger Circuits (83)
  • Datasheets and Components (104)
  • Electronics Theory (143)
  • Free Energy (37)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (19)
  • Health related Projects (25)
  • Home Electrical Circuits (12)
  • Indicator Circuits (14)
  • Inverter Circuits (87)
  • Lamps and Lights (142)
  • Meters and Testers (69)
  • Mini Projects (46)
  • Motor Controller (64)
  • Oscillator Circuits (27)
  • Pets and Pests (15)
  • Power Supply Circuits (108)
  • Remote Control Circuits (50)
  • Security and Alarm (64)
  • Sensors and Detectors (101)
  • Solar Controller Circuits (59)
  • Temperature Controllers (42)
  • Timer and Delay Relay (49)
  • Transmitter Circuits (29)
  • Voltage Control and Protection (37)
  • Water Controller (36)

Calculators

  • Battery Back up Time Calculator
  • Capacitance Reactance Calculator
  • IC 555 Astable Calculator
  • IC 555 Monostable Calculator
  • Inductance Calculator
  • LC Resonance Calculator
  • LM317, LM338, LM396 Calculator
  • Ohm’s Law Calculator
  • Phase Angle Phase Shift Calculator
  • Power Factor (PF) Calculator
  • Reactance Calculator
  • Transistor Astable Calculator
  • Transistor base Resistor Calculator
  • Voltage Divider Calculator
  • Wire Current Calculator
  • Zener Diode Calculator
  • Filter Capacitor Calculator
  • Buck Converter Calculator
  • Boost Converter Calculator
  • Solar Panel, Inverter, Battery Calculator
  • Wire Current Calculator
  • SMPS Transformer Calculator
  • IC SG3525, SG3524 Calculator
  • Inverter LC Filter Calculator

People Also Search

555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |

Recent Comments

  • Swagatam on Understanding SG3525 IC Pinouts
  • Dan on Understanding SG3525 IC Pinouts
  • Swagatam on High Current Wireless Battery Charger Circuit
  • Swagatam on Timer Based Cell Phone Charger Circuit
  • Nitesh Agrawal on Timer Based Cell Phone Charger Circuit

Company

  • Privacy Policy
  • Cookie Policy
  • About Me
  • Contact
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Quora
  • Stack Exchange
  • Linkedin
  • © 2025 · Swagatam Innovations