• 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 | Hire Me | 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 June 30, 2026 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
      • Video Clip:
    • 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;    // Status LED pin
int motor = 9;    // Motor relay control pin

int temp = 0;     // Flag to indicate end of command reception
int i    = 0;     // Index for command buffer

char str[15];     // Buffer to store received SMS command

//----------------------------------------------------------------
void setup()
{
  Serial.begin(9600);          // GSM module baud rate

  pinMode(motor, OUTPUT);     // Motor relay output
  pinMode(LED, OUTPUT);       // LED output

  digitalWrite(motor, LOW);   // Motor OFF initially
  digitalWrite(LED, LOW);     // LED OFF initially

  // Give GSM module enough time to register to network
  delay(20000);
  delay(20000);
  delay(20000);

  // Enable new SMS indication directly on serial
  Serial.println("AT+CNMI=2,2,0,0,0");
  delay(1000);

  // Set SMS text mode
  Serial.println("AT+CMGF=1");
  delay(500);

  // Send startup confirmation SMS
  Serial.println("AT+CMGS="+91xxxxxxxxxx"r"); // Replace x with your mobile number
  delay(1000);
  Serial.println("System is ready to receive commands.");
  delay(100);
  Serial.println((char)26);   // CTRL+Z to send SMS
  delay(1000);
}

//----------------------------------------------------------------
void loop()
{
  // If a full command is received
  if (temp == 1)
  {
    check();        // Process the received command
    temp = 0;       // Reset flag
    i = 0;          // Reset buffer index
    delay(1000);    // Small delay for stability
  }
}

//----------------------------------------------------------------
// Automatically called when serial data is received
void serialEvent()
{
  while (Serial.available())
  {
    // Look for starting delimiter '/'
    if (Serial.find("/"))
    {
      delay(1000);  // Wait for complete message

      while (Serial.available())
      {
        char inChar = Serial.read();
        str[i++] = inChar;   // Store character

        // Look for ending delimiter '/'
        if (inChar == '/')
        {
          temp = 1;          // Command received completely
          return;
        }
      }
    }
  }
}

//----------------------------------------------------------------
// Function to compare received command and take action
void check()
{
  // Command: motor on
  if (!(strncmp(str, "motor on", 8)))
  {
    digitalWrite(motor, HIGH);   // Turn motor ON
    digitalWrite(LED, HIGH);     // LED ON

    delay(1000);
    Serial.println("AT+CMGS="+91xxxxxxxxxx"r");
    delay(1000);
    Serial.println("Motor Activated");
    delay(100);
    Serial.println((char)26);
    delay(1000);
  }

  // Command: motor off
  else if (!(strncmp(str, "motor off", 9)))
  {
    digitalWrite(motor, LOW);    // Turn motor OFF
    digitalWrite(LED, LOW);      // LED OFF

    delay(1000);
    Serial.println("AT+CMGS="+91xxxxxxxxxx"r");
    delay(1000);
    Serial.println("Motor deactivated");
    delay(100);
    Serial.println((char)26);
    delay(1000);
  }

  // Command: test
  else if (!(strncmp(str, "test", 4)))
  {
    Serial.println("AT+CMGS="+91xxxxxxxxxx"r");
    delay(1000);
    Serial.println("The System is Working Fine.");
    delay(100);
    Serial.println((char)26);
    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:

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:

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 ----------------//

// Pin definitions (do NOT change to keep circuit intact)
int motor = 8;      // Relay / Motor control pin
int LED   = 9;      // Status LED
int ack   = 7;      // Acknowledgement feedback pin

// Variables for SMS parsing
int temp = 0;       // Flag to indicate full command received
int i = 0;          // Index for character buffer

char str[15];       // Buffer to store incoming SMS command

void setup()
{
  // Initialize serial communication with GSM module
  Serial.begin(9600);

  // Pin configuration
  pinMode(ack, INPUT);
  pinMode(motor, OUTPUT);
  pinMode(LED, OUTPUT);

  // Ensure outputs start in OFF state
  digitalWrite(motor, LOW);
  digitalWrite(LED, LOW);

  // GSM module startup delay (network registration time)
  delay(20000);
  delay(20000);
  delay(20000);

  // Configure GSM module for direct SMS display
  Serial.println("AT+CNMI=2,2,0,0,0");
  delay(1000);

  // Set SMS text mode
  Serial.println("AT+CMGF=1");
  delay(500);

  // Send startup confirmation SMS
  Serial.println("AT+CMGS="+91xxxxxxxxxx"r"); // Replace with your number
  delay(1000);
  Serial.println("System is ready to receive commands.");
  delay(100);
  Serial.println((char)26);   // CTRL+Z to send SMS
  delay(1000);
}

void loop()
{
  // If a complete command is received
  if (temp == 1)
  {
    check();        // Process the command
    temp = 0;       // Reset flag
    i = 0;          // Reset buffer index
    memset(str, 0, sizeof(str)); // Clear buffer
    delay(1000);
  }
}

// This function automatically runs when serial data arrives
void serialEvent()
{
  while (Serial.available())
  {
    // Look for starting delimiter '/'
    if (Serial.find("/"))
    {
      delay(1000);

      while (Serial.available())
      {
        char inChar = Serial.read();

        // Store character safely in buffer
        if (i < sizeof(str) - 1)
        {
          str[i++] = inChar;
          str[i] = ' ';   // Always keep string terminated
        }

        // End delimiter '/' detected
        if (inChar == '/')
        {
          temp = 1;        // Signal full command received
          return;
        }
      }
    }
  }
}

// Command processing function
void check()
{
  // Turn motor ON command
  if (!(strncmp(str, "motor on", 8)))
  {
    digitalWrite(motor, HIGH);
    delay(100);

    // Check acknowledgement feedback
    if (digitalRead(ack) == 1)
    {
      digitalWrite(LED, HIGH);
      delay(1000);

      Serial.println("AT+CMGS="+91xxxxxxxxxx"r");
      delay(1000);
      Serial.println("Motor Activated");
      delay(100);
      Serial.println((char)26);
      delay(1000);
    }
  }

  // Turn motor OFF command
  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");
      delay(1000);
      Serial.println("Motor deactivated");
      delay(100);
      Serial.println((char)26);
      delay(1000);
    }
  }

  // System test command
  else if (!(strncmp(str, "test", 4)))
  {
    Serial.println("AT+CMGS="+91xxxxxxxxxx"r");
    delay(1000);
    Serial.println("The System is Working Fine.");
    delay(100);
    Serial.println((char)26);
    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:

  • Robot armHow to Make a Wireless Robotic Arm using Arduino
  • Automatic Curtain Open-Close Circuit
  • High Current Motor Control Circuit using Arduino
  • arduino sketchBlinking an LED with Delay – Arduino Basics

Filed Under: Arduino Projects, Motor Controller Tagged With: Arduino, Controller, GSM, Motor, Pump

About Swagatam

I am an electronics engineer and doing practical hands-on work from more than 15 years now. Building real circuits, testing them and also making PCB layouts by myself. I really love doing all these things like inventing something new, designing electronics and also helping other people like hobby guys who want to make their own cool circuits at home.

And that is the main reason why I started this website homemade-circuits.com, to share different types of circuit ideas..

If you are having any kind of doubt or question related to circuits then just write down your question in the comment box below, I am like always checking, so I guarantee I will reply you for sure!



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

Reader Interactions

Questions & Answers

Total Posts: 200
Newest Oldest
Abdul Salam
June 7, 2019 • 7 years ago #67497

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
SwagatamAdmin
June 7, 2019 • 7 years ago #67498

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
ashfaq
May 16, 2019 • 7 years ago #67058

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

Reply
SwagatamAdmin
May 16, 2019 • 7 years ago #67060

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

Reply
Sylvester
April 25, 2019 • 7 years ago #66657

What is the price of project?

Reply
mahendhar
March 21, 2019 • 7 years ago #65995

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
SwagatamAdmin
March 21, 2019 • 7 years ago #65997

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
Shubham
March 6, 2019 • 7 years ago #65769

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
SwagatamAdmin
March 6, 2019 • 7 years ago #65770

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
Partap
February 22, 2019 • 7 years ago #65605

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
SwagatamAdmin
February 22, 2019 • 7 years ago #65606

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
February 22, 2019 • 7 years ago #65607

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

Reply
SwagatamAdmin
February 22, 2019 • 7 years ago #65609

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

Reply
Partap
February 23, 2019 • 7 years ago #65618

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

Reply
SwagatamAdmin
February 23, 2019 • 7 years ago #65619

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
Krishna P
February 1, 2019 • 8 years ago #65289

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

Reply
Stephen Buadee
January 10, 2019 • 8 years ago #64942

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
SwagatamAdmin
January 10, 2019 • 8 years ago #64948

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

Reply
Stephen Buadee
January 10, 2019 • 8 years ago #64935

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
SwagatamAdmin
January 10, 2019 • 8 years ago #64937

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

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

Reply
Stephen Buadee
January 9, 2019 • 8 years ago #64930

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
SwagatamAdmin
January 10, 2019 • 8 years ago #64934

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
Francis
August 21, 2018 • 8 years ago #62598

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
SwagatamAdmin
August 22, 2018 • 8 years ago #62603

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

Reply
mohan
August 16, 2018 • 8 years ago #62477

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

Reply
SwagatamAdmin
August 17, 2018 • 8 years ago #62480

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

Reply
I Sudheer
July 27, 2018 • 8 years ago #61952

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
SwagatamAdmin
July 27, 2018 • 8 years ago #61953

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

Reply
Sudheer
July 28, 2018 • 8 years ago #61976

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

Reply
SwagatamAdmin
July 28, 2018 • 8 years ago #61977

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
Sudheer
July 28, 2018 • 8 years ago #61975

can i use sim800l module for this project

Reply
SwagatamAdmin
July 28, 2018 • 8 years ago #61978

sorry I have no idea about it….

Reply
Madhu Sk
July 20, 2018 • 8 years ago #61807

Sir how to control 3 phase motor by using this project

Reply
SwagatamAdmin
July 20, 2018 • 8 years ago #61810

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

Reply
Madhu Sk
July 20, 2018 • 8 years ago #61812

Push button

Reply
SwagatamAdmin
July 20, 2018 • 8 years ago #61813

start and stop type??

Reply
Madhu Sk
July 21, 2018 • 8 years ago #61829

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

Reply
SwagatamAdmin
July 21, 2018 • 8 years ago #61830

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

Reply
Mandira
July 12, 2018 • 8 years ago #61632

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
GR
July 12, 2018 • 8 years ago #61645

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
July 17, 2018 • 8 years ago #61734

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
July 17, 2018 • 8 years ago #61738

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
Mandira
July 16, 2018 • 8 years ago #61714

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
SwagatamAdmin
July 16, 2018 • 8 years ago #61715

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

Reply
SwagatamAdmin
July 12, 2018 • 8 years ago #61633

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

Reply
Madha sk
July 6, 2018 • 8 years ago #61473

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

Reply
SwagatamAdmin
July 6, 2018 • 8 years ago #61479

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

Reply
Eman
June 25, 2018 • 8 years ago #61160

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

Reply
SwagatamAdmin
June 25, 2018 • 8 years ago #61162

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

Reply
Massarath
May 6, 2018 • 8 years ago #60290

The usb frm laptop to arduino provides 12v ?

Reply
Mandira
July 17, 2018 • 8 years ago #61735

No it provides 5v

Reply
Nikhil Mer
April 27, 2018 • 8 years ago #60060

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
SwagatamAdmin
April 27, 2018 • 8 years ago #60076

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
madhu shankar
April 23, 2018 • 8 years ago #59971

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
SwagatamAdmin
April 23, 2018 • 8 years ago #59975

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

Reply
Suman
April 10, 2018 • 8 years ago #59700

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
SUMAN
April 10, 2018 • 8 years ago #59684

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
April 10, 2018 • 8 years ago #59694

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
madhu shankar
April 10, 2018 • 8 years ago #59681

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
April 10, 2018 • 8 years ago #59696

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
randhir
March 20, 2018 • 8 years ago #59205

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 – rkrun1987@gmail.com
Thanks in advance.

Reply
Jyoti
March 16, 2018 • 8 years ago #59131

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
SwagatamAdmin
March 17, 2018 • 8 years ago #59134

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
ravindra balme
January 21, 2018 • 9 years ago #57842

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
SwagatamAdmin
January 21, 2018 • 9 years ago #57848

Ravindra,

you can try eh following circuit

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

Reply
Rahul
January 5, 2018 • 9 years ago #57386

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
Rahul
January 5, 2018 • 9 years ago #57372

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
GR
January 5, 2018 • 9 years ago #57375

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
SwagatamAdmin
January 5, 2018 • 9 years ago #57374

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

Reply
Rahul
January 2, 2018 • 9 years ago #57312

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
GR
January 4, 2018 • 9 years ago #57341

Hi rahul,

I will try to design as per your requirements soon.

Regards

Reply
Rahul
January 4, 2018 • 9 years ago #57345

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
SwagatamAdmin
January 2, 2018 • 9 years ago #57313

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

Reply
Anne
December 28, 2017 • 9 years ago #57143

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
SwagatamAdmin
December 28, 2017 • 9 years ago #57170

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

Reply
SwagatamAdmin
December 28, 2017 • 9 years ago #57149

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
Anupam Dasgupta
December 14, 2017 • 9 years ago #56722

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
Krishna P
February 4, 2019 • 8 years ago #65324

This code was showing error pls help

Reply
SwagatamAdmin
February 4, 2019 • 8 years ago #65325

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

Reply
SwagatamAdmin
December 14, 2017 • 9 years ago #56723

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
December 14, 2017 • 9 years ago #56726

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
SwagatamAdmin
December 15, 2017 • 9 years ago #56728

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
Anupam Dasgupta
December 12, 2017 • 9 years ago #56663

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
SwagatamAdmin
December 12, 2017 • 9 years ago #56666

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
December 12, 2017 • 9 years ago #56667

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
GR
December 13, 2017 • 9 years ago #56682

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
December 13, 2017 • 9 years ago #56683

*that not “than”

Reply
SwagatamAdmin
December 12, 2017 • 9 years ago #56669

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
December 12, 2017 • 9 years ago #56672

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
SwagatamAdmin
December 13, 2017 • 9 years ago #56679

OK,Mr. GR will reply you soon…

Reply
Anupam Dasgupta
December 10, 2017 • 9 years ago #56582

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
Anupam Dasgupta
December 10, 2017 • 9 years ago #56557

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
GR
December 10, 2017 • 9 years ago #56576

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
SwagatamAdmin
December 10, 2017 • 9 years ago #56563

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

Reply
Subhash Bandgar
December 5, 2017 • 9 years ago #56400

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
December 5, 2017 • 9 years ago #56413

Hi Subhash,

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

Regards

Reply
View Older Comments

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



Categories

  • Arduino Projects (95)
  • Audio and Amplifier Projects (134)
  • Automation Projects (18)
  • Automobile Electronics (104)
  • Battery Charger Circuits (90)
  • Datasheets and Components (109)
  • Electronics Theory (150)
  • Energy from Magnets and Earth (41)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (20)
  • Health related Projects (27)
  • Home Electrical Circuits (13)
  • Indicator Circuits (16)
  • Inverter Circuits (100)
  • Lamps and Lights (163)
  • Meters and Testers (72)
  • Mini Projects (28)
  • Motor Controller (68)
  • Oscillator Circuits (30)
  • Pets and Pests (15)
  • Power Supply Circuits (91)
  • Remote Control Circuits (50)
  • Security and Alarm (65)
  • Sensors and Detectors (107)
  • SMPS and Converters (46)
  • Solar Controller Circuits (62)
  • Temperature Controllers (44)
  • Timer and Delay Relay (50)
  • Voltage Control and Protection (44)
  • Water Controller (37)
  • Wireless Circuits (31)



Circuit Simulator

circuit simulator image



Subscribe to get New Circuits in your Email



Other Links

  • Privacy Policy
  • Cookie Policy
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap

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 Simple Walkie Talkie Circuit
  • Adil on Simple Walkie Talkie Circuit
  • Vali on Proximity Detector using Hall Effect Sensor Circuit
  • Ike on The Bubble Current Machine: A way to harvest energy from gravity
  • Swagatam on How To Calculate and Connect LEDs in Series and Parallel

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Stack Exchange
  • Linkedin

© 2026 · Swagatam Innovations