• 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 / SMS Based Pump Controller with Automatic Dry Run Shut Off

SMS Based Pump Controller with Automatic Dry Run Shut Off

Last Updated on December 5, 2024 by Swagatam 17 Comments

In this post I will show how to construct a SMS based water pump controller with automatic shutdown of pump when no water flow through the pump is detected.  We will also construct another much simpler automatic dry run preventer circuit without GSM in the next half of the article.

Table of Contents
  • What is Dry Run in Motors
  • Circuit for SMS based pump control:
  • Program for GSM based design:
  • Here is the tested SMS while prototyping:
  • Circuit Diagram:
  • Program for simple pump dry run preventer:

What is Dry Run in Motors

We have already discussed on GSM based pump controller on this website check it out if haven’t yet. Here we are adding an additional feature on existing design, which will prevent the motor from dry running.

Dry running means running the water pump without liquid flow. The consequence can be serviceable damage to unserviceable damage depending on how long the motor was running without pumping the water and the quality of the water pump.

Yes, the water pumps are not cheap and if you are an agriculturist who irrigate the field every day, then a small issue with your water pump can land you in economic loss.

Servicing the pump may take some time and money, so it is better to follow the famous slogan “prevention is better than cure”.

Motor dry run is a very common problem, when there is not enough water to flow through the pump, over heating of mechanical components as well as electrical components will occur.

At a point the mechanical components will start to melt and also may cause short circuit.

Such disaster may be prevented using the circuit, proposed in this project.

To detect the flow of water, we are utilizing YF-S201 water flow sensor. When no water flow is detected by the sensor, it cuts off the power supply to water pump and send an SMS acknowledgement to the recipient about the dry run shut off.

With this GSM based control you can turn on and off the pump and also the circuit acknowledges about the pump dry run issue.

Circuit for SMS based pump control:

Circuit for SMS based pump control:

The circuit consists of AC to DC converter using 9V transformer, bridge rectifier a smoothing capacitor of 1000 uF and a LM7809 9V regulator. Two DC jacks are provided for powering Arduino board and SIM 800 / SIM 900 GSM module.

Never power the GSM module with 5V pin of Arduino to 5V pin of GSM module as the Arduino board cannot provide enough current.

The connection between Arduino and GSM module as follows:

Arduino TX ---------------------- RX SIM 800 / 900

Arduino RX --------------------- TX SIM 800 / 900

Arduino GND ------------------- GND SIM 800 / 900

The main supply is provided by the LM 7809 regulator.

The LED indicator will glow if the relay is activated and turns off when the relay is deactivated.

The diode IN4007 will absorbed high voltage spike which occurs while switching the relay on and off.

The water flow sensor is connected to A0 pin of Arduino, 5V and GND provided from Arduino board.

Program for GSM based design:

//----------------Program developed by R.Girish------------//
int motor = 8;
int LED = 9;
int temp = 0;
int i = 0;
int j = 0;
int k = 0;
int X = 0;
int Y = 0;
int mtr_on = 0;
float Time = 0;
float frequency = 0;
const int input = A0;
const int test = 6;
char str[15];
void setup()
{
Serial.begin(9600);
pinMode(motor, OUTPUT);
pinMode(LED, OUTPUT);
digitalWrite(motor, LOW);
digitalWrite(LED, LOW);
analogWrite(test, 100);
for (k = 0; k < 60; k++)
{
delay(1000);
}
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);
}
if (mtr_on == 1)
{
X = pulseIn(input, HIGH);
Y = pulseIn(input, LOW);
Time = X + Y;
frequency = 1000000 / Time;
if (isinf(frequency))
{
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. Dry Run Shut Off!");// The SMS text you want to send
delay(100);
Serial.println((char)26); // ASCII code of CTRL+Z
mtr_on = 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
for (j = 0; j < 20 ; j++)
{
delay(1000);
}
mtr_on = 1;
}
else if (!(strncmp(str, "motor off", 9)))
{
digitalWrite(motor, LOW);
digitalWrite(LED, LOW);
mtr_on = 0;
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------------//

You have to place the code with recipient’s 10 digit mobile phone number.

Serial.println("AT+CMGS=\"+91xxxxxxxxxx\"\r");  // Replace x with mobile number

You need place the mobile number in such 5 places in the code.

SMS commands:

·        Your SMS must always start with  “/” and end with “/”

·        /motor on/ for activating the motor.

·        /motor off/ for deactivating the motor.

·        /test/ for testing the circuit.

Here is the tested SMS while prototyping:

tested SMS while prototyping

The following things we can observe from the screen shot:

·        First the motor is turned on and the circuit acknowledged with a reply.

·        The motor is deactivated and the circuit is acknowledged with a reply.

·        Again the motor is activated and unplugged the sensor to simulate dry run situation, the circuit turns the pump off and replied with pump dry run acknowledgement.

·        Finally a test SMS has sent and the circuit replied with “System is Working Fine”.

I would suggest installing the water flow sensor after couple of meters after the water pump.

That concludes the GSM based pump dry run preventer.

Now let’s take a look at simple water pump dry run preventer without GSM, this could be the easier of the two.

Circuit Diagram:

SMS Based Pump Controller with Automatic Dry Run Shut Off

Nothing much about to explain here, just wire up as per the schematic. The power supply can be a 9V wall adapter with at-least 500 mA or the supply which illustrated in the GSM based controller schematic.

The push button is provided to turn the pump on and off.

Once you press the button to turn on the pump, the circuit waits till 20 seconds initially to detect the flow of water, during that time the push button is disabled for 20 seconds.

After the initial 20 seconds the push button is enabled and you may turn OFF the pump manually by pressing the push button again.

If water flow is detected the circuit keeps the pump ON after 20 seconds, otherwise the circuit cuts the power supply to the motor. Also the circuit can cut off the supply at any instant, if no water flow detected.

If the circuit shut off due to dry run, the LED blinks rapidly.

Program for simple pump dry run preventer:

//--------------------------Program Developed by R.GIRISH------------------------//
int X = 0;
int Y = 0;
int i = 0;
int mtr_on = 0;
float Time = 0;
float frequency = 0;
const int input = A0;
const int test = 6;
const int button = A1;
const int LED = 8;
const int motor = 9;
void setup()
{
Serial.begin(9600);
pinMode(input, INPUT);
pinMode(test, OUTPUT);
pinMode(LED, OUTPUT);
pinMode(motor, OUTPUT);
analogWrite(test, 100);
digitalWrite(button, HIGH);
}
void loop()
{
if (digitalRead(button) == LOW && mtr_on == 0)
{
Serial.println("Motor Activated");
digitalWrite(LED, HIGH);
digitalWrite(motor, HIGH);
for (i = 0; i < 20; i++)
{
delay(1000);
}
mtr_on = 1;
}
if (digitalRead(button) == LOW && mtr_on == 1)
{
Serial.println("Motor Deactivated");
digitalWrite(LED, LOW);
digitalWrite(motor, LOW);
mtr_on = 0;
delay(1000);
}
if (mtr_on == 1)
{
X = pulseIn(input, HIGH);
Y = pulseIn(input, LOW);
Time = X + Y;
frequency = 1000000 / Time;
if (isinf(frequency))
{
Serial.println("Dry run shut off");
digitalWrite(motor, LOW);
digitalWrite(LED, LOW);
mtr_on = 0;
while (true)
{
digitalWrite(LED, HIGH);
delay(500);
digitalWrite(LED, LOW);
delay(500);
}
}
}
}
//--------------------------Program Developed by R.GIRISH------------------------//

That concludes the both the designs.

If you have any specific questions regarding this SMS based pump controller with automatic dry run shut down circuit, please express in the comment section, you may receive a quick reply.

You'll also like:

  • 1.  Types of Arduino Boards with Specifications
  • 2.  High Current Motor Control Circuit using Arduino
  • 3.  Introduction to EEPROM in Arduino
  • 4.  Monitoring State of a Switch (Digital Read Serial) – Arduino Basics
  • 5.  How to Drive High Watt LEDs with Arduino
  • 6.  Line Follower Robot Circuit without Microcontroller or Arduino

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: « 4 Simple Proximity Sensor Circuits – Using IC LM358, IC LM567, IC 555
Next Post: Incubator Using Arduino with Automatic Temperature and Humidity control »

Reader Interactions

Comments

  1. Jedidiah says

    March 10, 2025 at 8:46 pm

    Hello Sir. I have a project: “INTELLIGENT GLASS SYSTEM FOR THE BLIND” I need a Camera to capture images, send them to a server and Optical Character Recognition (OCR) work to convert the text into audio feedback. The audio is then relayed back to the user, allowing them to ‘read’ text through sound via a speaker. All this should be done offline. I have found that at least no arduino is capable of such.

    what should I do Sir?
    Thank you.

    Reply
    • Swagatam says

      March 11, 2025 at 7:54 am

      Hello Jedidiah,
      The idea looks very good and innovative, but it seems to be beyond the level of my expertise, I have no idea how to handle the server transmission and the related parameters.

      Reply
  2. sam says

    February 19, 2018 at 12:31 pm

    i had connected all the connections but motor starts as soon as give the supply to ckt i (is the relay connections right i think it should to n/o)

    Reply
    • Swagatam says

      February 19, 2018 at 1:22 pm

      please check it by swapping the relay contact, check it with a bulb first, if everything works then you can connect the actual load.

      Reply
  3. Madhav says

    December 27, 2017 at 9:05 pm

    Hello Sir,
    is there any other ways to check the pump is running in dry state or not. I heard that few industrial dry run sensor are actually calculating voltage difference or amp difference when pump is in normal vs in dry state.

    Reply
    • Swagatam says

      December 27, 2017 at 10:02 pm

      Hi Madhav, Checking the amp difference is the best and the most reliable way according to me…another way is by monitoring motor temperature

      Reply
      • Madhav says

        December 28, 2017 at 9:10 pm

        Thanks for the replay Sir,
        How can monitor the same, I mean is there any we can input the current amp feed to arduino and analysing it take action.
        Thanks in advance .

        Reply
        • Swagatam says

          December 29, 2017 at 9:34 am

          Madhav, monitoring it through wireless method can be a lot complicated, however an arrangement can be made where the motor will be automatically switched OFF and an SMS sent to your mobile regarding the same..

          Reply
  4. Mr. Fali K. Khatao says

    December 27, 2017 at 7:55 pm

    i want to learn to code the arduino UNO board i recently purchased. this is some thing i want to do before i die. i am 80 years old. so if you can help u better hurry. many thanks in advance.

    Reply
    • Swagatam says

      December 27, 2017 at 9:58 pm

      I wish I could teach you, however I am myself in the learning stages of Arduino so cannot provide much help, nevertheless If possible i’ll try to publish a related post which will help understanding Arduino easier for all the interested readers like you

      Reply
      • fali says

        December 28, 2017 at 8:56 am

        much obliged. God Bless, Fali

        Reply
  5. rushikesh says

    November 21, 2017 at 7:14 pm

    Help me sir I want both sms and call control 3 phase water pump with automatic dry shut off I’m farmer I’m try to this project my own farm plzz sir help me

    Reply
    • Swagatam says

      November 21, 2017 at 8:39 pm

      Hi Rushikesh, you can use the same circuit and code and build it for your 3 phase motor.

      The only change you need to implement is:

      Replace BC548 with a TIP122, and replace the single relay with three 30 amp relays in parallel (coils in parallel)…the 1N4007 can be a common diode for all the 3 coils in parallel.

      After this you can wire the 3 separate contacts of the relay with the 3 wires of the 3 phase motor.

      Alternatively you can replace the relay with a single TTTP relay or a triple throw triple contact relay (30 amp)

      Reply
  6. wireless says

    October 15, 2017 at 5:59 pm

    thank u for ur reply sir, but pls wot is d value of c1, c2, c3 d1, d2 in d above 555 voltage doubler if i want to use it to power 35v from 12v or 15v transformer.

    Reply
    • Swagatam says

      October 16, 2017 at 8:47 am

      you can use C1 = 0.1uF, C2, C3 = 100uF/25V, D1, D2 = 1N4007

      Reply
  7. wireless says

    October 15, 2017 at 11:32 am

    pls sir can i power 35v dc from 15v or 12v transformer by using voltage doubler. and pls can u give me d circuit diagram of d voltage doubler i am suppose to use in dat situation. tnx

    Reply
    • Swagatam says

      October 15, 2017 at 12:04 pm

      wireless, yes you can do that by using the circuit explained in the following links:

      https://www.homemade-circuits.com/?s=voltage+doubler

      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 How to Make Dog Barking Preventer Circuit using High Frequency Deterrence
  • Swagatam on How to Buy and Use RF Remote Control Modules – Control Any Electrical Gadget Remotely
  • Swagatam on How to Generate PWM Using IC 555 (2 Methods Explored)
  • Swagatam on Understanding SG3525 IC Pinouts
  • Dan on Understanding SG3525 IC Pinouts

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