Arduino Pump Saver

by acieus in Circuits > Arduino

267 Views, 1 Favorites, 0 Comments

Arduino Pump Saver

20200201_201722_resized.jpg
5398787437_d447fb6bfe_b.jpg

On a harsh winter day, my wife and I were sitting in the living room reading, when she looked over and me and asked "What is that sound?" Something was running steady in the house that we thought didn't sound familiar, so I went downstairs to investigate. As it turned out, the outside water outlet for my basement sump pump had frozen solid, and the sump pump had been continually working to do what was no longer possible, and getting very hot in the process.

As I was dismantling the outlet hose and thawing it out, I thought this might be a great opportunity to build a circuit to monitor my pump and shut it off if this happened again in the future, to prevent it from burning out. After a month of research, ordering parts and testing, the Arduino Pump Saver came to be.

The attached Arduino sketch "PumpSaver.ino" is configured to monitor the current drawn from the pump, and if it exceeds 1 amp for more than a minute, the relay will trip to stop the pump, an LED will light, and an alarm tune will play from an attached speaker every 5 minutes to let you know something is wrong.

At this point I would like to warn all readers, it is always a good idea to have a backup pump installed in case the primary fails, on its own power supply (mine is a battery backup unit). Obviously you don't want your basement to flood in case something goes wrong with the system itself.

Supplies

1 x Arduino Uno (I used an Uno R3) and a power supply to run it

1 x 5v relay switch module (jqc-3ff-s-z)

1 x 4N36 transistor optocoupler, along with an IC socket to support it

1 x ACS712 current sensor module

1 x 8 ohm speaker (and grill cover, should you wish to have it on the wall)

1 x LED with 470 ohm resistor (should you want a visual system trip indicator)

a small printed circuit project board

a project box

speaker wire

My PumpSaver.ino script!

surge bar (recommended but optional)

Transfer the .ino Script to Your Arduino Uno R3

Using the Arduino IDE software, transfer the attached PumpSaver.ino sketch to your Arduino Uno R3. Refer to the Arduino website for any connectivity related issues.

Downloads

The Schematic

20200217_165857_resized.jpg
Capture.PNG

Following this schematic, complete the wiring of this circuit, being sure to lay it out in a way that will work with your enclosure. I used a hobby printed circuit board alongside the UNO and a few extension cord ends that I had laying around. All of the components are quite easily found on Ebay or Amazon.

The 4N36 opto-transistor is required as the input for these relay modules will trigger even when the output digital pin on the Arduino is LOW. Basically we're just separating the overly-sensitive relay module input pin from the Arduino digital pin 10 by sending it through an optically controlled transistor, fed from pin 10 itself.

A note about the LED: DO NOT connect the LED directly to digital output pins on the Arduino - make sure you use the resistor. An LED by itself will most certainly damage your Arduino UNO.

Make sure that you determine the current that your sump pump draws before selecting your current module. Mine is rated at 30 amps, which is more than enough for my submersible pump. If you browse through the Arduino sketch, you'll find that it also contains a comment about modifying the mVperAmp variable should your current sensor be a 20 amp model instead.

The sketch will also feed data to the serial monitor should you want to test while connected to your computer.

Finish the Assembly and Test

20200328_162213.jpg
20200217_165838_resized.jpg

To complete the assembly, I chose to install a surge bar to supply the system. In our region, the electricity isn't always reliable so I figured it would be better safe than sorry.

For a final touch, I ordered a nice little speaker grill for my 8 ohm speaker and mounted it on the wall in the living space. To test the assembly, I grabbed a portable heater and connected it, leaving it run for over a minute. The system worked as designed, disconnecting the heater and alarming me that it had exceeded the time limit.


NOTE: The sketch can be edited inside the Arduino IDE software to extend the run time for however long it takes your sump pump to typically drop the water level to where your float cuts it out. For me this was never over a minute, but yours may be different.