GSM Pump Motor Controller Circuit using Arduino Part-2

This Arduino GSM water pump controller 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.

By Girish Radhakrishnan

 

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:

 

GSM Water Pump Controller with Call Back Alert

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:

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

6 thoughts on “GSM Pump Motor Controller Circuit using Arduino Part-2

  1. Have questions? Please feel free to post them through comments! Comments will be moderated and solved ASAP.
    • Sir how to implement this design for bore well motor where a momentary start and stop button type 3 phase starter is used.

      • Pranab, you can configure the GSM relay output with a programmable timer, and use the programmable timer output to toggle the start/stop buttons

  2. please my a new gsm base starter i receive a sample piece to delhi
    this starter included function is
    1.after call press 1111 load set to pump
    2.after call press 4444 reset the hour meter
    3.after call press 6666 report to motor runing hour thru to sms
    4.after call press 7 than motor start
    5. after call press 9 than motor stop
    6. is most important function
    mobile no.add to receving sms 4 moble no.
    send a sms to type #1234#A+91xxxxxxxxx
    send a sms to type #1234#B+91xxxxxxxxx
    send a sms to type #1234#C+91xxxxxxxxx
    send a sms to type #1234#D+91xxxxxxxxx
    AND INFORMATION PLEASE CALL 9728566937
    PLEASE MAKING THIS PROGRAM



Leave a Comment