Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Sump pit water alarm - Kicad 9

lilimike

Member
A long time ago, I was using Eagle to design my circuits. Then I moved to EasyEDA and then the Pro version but now I started working with Kicad 9 and so far so good. I figured I would make my next project on the later. I figured I would share and perhaps get some feedback. I didn't invent anything, just replicating readily available modules. I am not a pro at this, I am an IT consultant close to retirement and trying to keep busy.

The project

Version 1:
A simple D1-Mini ESP8266 connected to an LED and 2 reed switches. The switches are inside a pvc pipe and a magnet/foam float around the pipe triggers the switches as the water level goes up. The low switch indicate that water is going up. The second switch is just above the level where the pump should start. This device is configured under ESPHome, connected remotely at my son's house and via his Wifi it then connects to Wireguard VPN to my network where it reports to Home Assistant.
The down side is if the power goes out, so does the pump and the D1-Mini.

Version 2:
I replaved the D1-Mini with ESP32-S module and made it so that it is backed up with a battery. (note that his modem/wifi are on a UPS) Since my device have a battery it needs to keep the charge up so I am using the circuit from TP4056 with over charge/under voltage protection. Since my device will be plugged in all the time I added the P-chanel Mosfet to separate the load from the battery when plugged in as seen all over the net. Then I realised I needed to lower the voltage to 3.3 volts so at the end I figured I might as well create a full circuit with all the bits and pieces I could find on the Internet and make it a single PCB.

Version 3:
If all goes well with V2, V3 will integrate a miniature camera to look at the pit and possibly move this out of Home Assistant/ESPHome and create an APP for Android and Iphone.

But here is my circuit for version 2, I would appreciate some feedback, anything to prevent a fire... I'ld rather have a flood than a fire !

wdv2.jpg
 
I recently completed a sump pump design that deviated from designs I have
seen to date.

On SSN583 we cycled pumps periodically because shaft/bearings would, over
time, become unable to startup. Corrosion, metal migration, contaminants....
Over the years in my home I have gone thru several pumps for this specific
reason, many I could not repair because they were designed to be un-repairable.

So I used simple float. Then added code to :

1) Implement pump learning in cycling it for longer times depending on
how implemented cycling was not moving flow.

2) Added short daily pump cycle, once basement dry, to tackle shaft freeze issue.
Until such time as I turn it off once season done.

3) Detected float position freeze.

4) Limited total hours pump could run.

5) Cycle design to let pump turn off to cool periodically.

6) Kept track of cycles of float and total pump on time.

7) Plan on finishing adding server services to it so I can monitor it from
easy chair or phone.

I used Tuniot on an ESP32 and Multitasking which made the coding much
simpler and clean, in my opinion.

1752795083345.png


Prior to that wrapped up a fire alarm SMS based for smoke and gas, runs in my
sons home, shop, and Cabin, and my home. Again used Tuniot. Using ESP8266
in that case. It also facilitated using standard ION chamber alarm inout to trigger
a SMS as well. Employing a # of features I have not found in other alarm systems.

Loads of fun, contemplating selling designs....
 
Last edited:
The programming part is not an issue for me but I was tempted to look into Tuniop however that website not beeing secure is a concern to me.
A quick story... I have owned my house for 21 years and never saw a drop of water in the pit nor ever heard the pump. In December of 2024 I figured I would take a look at that pump and as expected it was jammed and unusable so I replaced it. In August of the same year we had a couple of days with rain pooring like I never seen in my live and as expected the sump pump was kicking every minute. At that moment I said to myself how lucky I was to have replaced it in time but little as I knew, the power went out and that lasted 12 hours... So I said to myself it won't happen again so I installed a transfer switch and a 9kw generator. Nothing is automated but in the near future I will work on that. In the mean time, my son bought a house and I am now concerned about his basement so that is the reason I started this project.
 
A thought about the reed switches in a pipe.....

Is there some distance between the switches, such that only one is on at a time? That would leave unknown states. For example, the high level sensor turns off, so both high and low sensors are off. Is the pump getting the level down, and it hasn't reached the low sensor level yet? Or is the water exceeding the pump capacity and has risen above the high sensor?

A line of magnets such that the low turns on, then both turn on would alleviate that problem.

Low --> low & high --> low = water level falling

Low -->low & high --> high --> neither = water level increasing.
 
To start off, the reed switches are on as the magnets are on both switches when there is no water. I will put a snap ring or something to prevent the foam/magnet from the bottom switch to reach the top switch so if the water level goes up, the bottom switch will turn off and trigger a warning. If the water contnues to go up to the point where the top float turns off the top switch it will trigger an alarm. In that configuration it is impossible for the top switch to go off without the bottom being off. The position is setup so that the top switch is just above the level where the pump should start, therefore if the top switch goes off, it means the pump is either not working or not pumping enough water to lower the level. The switches are about 5 inches apart. In my version 1 I had 2 pipes and the switches were $1 from aliexpress but in version 2 I will build them myself and have them both in the same pipe. This is what v1 looks like (just missing the top enclosure)

v1.jpg
.
 
Last edited:
Oh, I see. I pictured a donut with a magnet floating around the pipe.
 

Latest threads

New Articles From Microcontroller Tips

Back
Top