Introduction: Pump Automation With Email Notification.
This project started out of necessity, to Keep water level under my house as low as possible.
The water is accumulated in a buried barrel after each rain fall, By using a simple sump pump with float, water must raise the float around 1meter so pump will start , and when float drop to 400mm the pump will stop.
This was working BUT if water level stops at 950mm, then float will not activate pump and I ll have this much water sitting there for long time till next rain.
So I decided to Automate the process, and to send me a notification when pump start and stop.
Step 1: Float Must Be Always ON.
Attached the float to the hose to keep the float vertical an float switch always ON
Step 2: Installed Electronic Laser Level.
Because I had laser level handy, I used it, otherwise any type of water level could be used, but it should have some sort of Normally Open (N.O) contact.
Will talk about connections later.
Step 3: Spread Small Pieces of Styrofoam on Water Surface.
Because water is transparent , laser was not getting reflection from water surface, I decided to break down styrofoam to small pieces and spread them evenly on water surface.I got my styrofoam from grocery shop, it is used in food packaging.
Step 4: PLC As the Logic Controller.
Because I had a Simple PLC, Programmable Logic Controller, I decided to use it, otherwise a simple relay with N.O and N.C (Normally Close) contacts and couple of timers will do the job.
The Laser Level will give a signal to PLC inputs when required Level is reached, PLC will activate first split power outlet where pump is connected.
At the same time second power outlet will loose power, that's where my samsung cell phone is connected to, about this later.
A few thing to mention here:
To consider a valid signal from level, this signal must be ON for couple of seconds, in my case 5sec.
I ran into trouble when a fly will trigger the laser, and give a false signal.
When pump starts, water level will go down and laser signal will go off, at this point a timer must continue running the pump for extra time, that time must be decided by experimenting, so not to leave pump running for long time without water.
I achieved water level of 50mm or so, again that depend on pump model , some can lower the level even more.
Step 5: Sending Email Notification.
As I said earlier one power outlet will go OFF when pump will start, a smart software called MACRODROID
http://www.macrodroid.com/ will sense the loss of charging power and will fire an Email to my personal address.
This is achieved by creating a macro in Macrodroid:
that will link Trigger (loss of power to phone) with a Task (Sending E-mail).
The possibilities are endless, I used variables and simple IF logic in the Macros as well.
Macrodroid will work with Android Phones only.
Phone must be plugged to the outlet all the time.
Phone Must have WIFI connection all the time
Phone Must Have Internet connection all the time.
If there is no WIFI around a SIM card is require with Data capability.
Step 6: Next.....
Next I will try to use raspberry pi 3 because it has WIFI and ability to execute IN/OUT command depending on programing.
So I don't need a phone and a split power outlet.