Sump Pump, Aquaponics & Aquarium water level monitoring

I seem to like flooding my basement… Usually by overfilling one of my aquariums, or intentionally putting 55 gallons of water in a 45 gallon aquarium. Sometimes, I overfill the swimming pool in the back yard.

So I decided to put together a monitoring system. It will monitor my sump pump, letting me know when it is getting used hard so I know to pay it more attention. It will monitor my Aquaponics grow bed, telling me when my flood and drain / ebb & flow grow bed isn’t functioning correctly. It will also monitor my fish tank water levels and let me know when the water is getting low, or more importantly when I am filling it and it gets to where it ought to be.

This is put together with Raspberry Pis. An older original B model for the fish tank because I have it and it’s close enough to Ethernet that I can run a wire to it. The Sump Pump is getting a Zero W as it is further away, and I needed to buy something and it was the cheapest option ($10).

I am measuring water height by 2 methods. An ultrasonic distance meter and a differential pressure setup.

I coded up the project a couple of different ways, learning as I went along. I ended up starting with the hardest methods first, and moving towards easier methods. Starting at OS level triggering of shell scripts, moving through python programming, and finally landed on Node Red. I am happy for the path I took as I now have a solid understanding of what a Raspberry Pi can do for me and how to control it at multiple levels. Node Red is how I will be building most of my projects going forward as it’s easier for the kids to understand.

Node Red

Node Red is a graphical programming environment that you use with a web browser. This means a quick tweak can be made from your cell phone! Not the best experience, a cell phone, but doable.

The core concept  of Node Red, is you drag ‘nodes’ or blocks onto your screen and set them up with the particular details that node needs. Configuration settings such as the specific pins on the raspberry pi you have a sensor plugged into, a login for an online service, etc.

You then connect the different ‘nodes’ together with lines, and the whole thing just starts working. Amazing, really.

You program a computer using the same methods you would use to explain a process to another person. Draw a bunch of boxes saying this box does this thing, and connect the various boxes together with lines showing how different events are chained together.

When you use the Node Red menu in the Raspberry Pi, it opens up a text window, with a bunch of stuff on the screen. In amongst that text, is instructions on how to set Node Red up to turn itself on automatically when the Pi starts. Now you have automatic monitoring even if the power goes out and comes back on.

Direct reading of water level via sonar

Ultrasonic distance meters turn to out to measure the distance to a water surface fairly well. The water needs to be reasonably flat & calm for it to work reliably.  The thing basically beeps at a high enough frequency that we can’t hear it, and listens to see how long until it hears it’s echo back. A little bit of math, which computers happen to be good at, and you have a distance measurement!

I picked up a bunch of HC-SR04 sensors for cheap from eBay.  You can get them from reputable sources for around $5 each.

The HC-SR04 sensor tutorial I followed when writing code is found at

If you want to learn about all of this, it is good to work through the tutorial. I ended up dropping the tutorial method and used Node Red.

HC-SR04 Node Red sensor, calibration, and logging flow.

Node Red needs an add-on node to ‘talk’ to the sensor. The one I found is . Install it according to the instructions, restart Node Red (or the Raspberry Pi if you haven’t figured out how to restart Node Red) and reload your browser window for it, and you can now start taking distance measurements.

Differential Pressure water level method

Have you ever noticed that if you hold your finger over the end of a straw, stick it in your glass, the water goes up the straw only a little bit? When you do that, you are increasing the air pressure inside the straw.

If you compare that air pressure inside the straw, to the air pressure outside the straw, you are working with differential pressure.  We can use this to simply see the cycle of water rising and falling, or calculate the actual height of the water inside the pipe. I don’t know what physics principle to use to do the math for calculating actual water height.

I used a BMP280 temperature and pressure sensor. The adafruit library didn’t work well for me. I did however find which worked well.

The Node Red library has a bug in it at the moment. When you try to use it with the BMP280 module, it crashes Node Red. If you see this happen, the fix is simple, you need to call in the bigNumbers.js library in the right spot.  Once you do this, things work correctly.

The BMP280 had some issues with longish wires. I ended up using some Cat5 with the tip from for how to pick the wires to get the best performance. This worked well, if a bit time consuming to pigtail the doubled up wires so I only had 1 wire to solder onto the printed circuit boards.

Seeing the data

I logged the data to using MQTT. The library I used is found at for coding things the hard way. Node Red has a built in MQTT node as well.

I used Adafruit’s IO tool because it’s cheap (free) and easy, and is great for learning how to do all of this. There are other options available from Amazon,  Azure, Google, IBM, and many many more. Adafruit’s tool is great to start out with.

Sensor readings in a Bell Auto Siphon Fail to Break mode
Sensor readings in a Bell Auto Siphon Fail to Break mode. The ‘gap’ in the middle of the chart is from the auto-siphon failing to break siphon. We see it in both the upper graph measuring the actual water height plus the lower graph measuring the pressure elevation in the stand pipe.



Anybody else try the SOL Escape Bivy? I found one on clearance for $35 shipped and…

Anybody else try the SOL Escape Bivy? I found one on clearance for $35 shipped and thought I'd give it a try. $50 is too rich for my blood given the mixed reviews and stories how it's a tight fit. Only been wanting one for 2 years.

The features I liked in the ads are the unobtrusive green color, heat reflective construction, and waterproof while being breathable.

I ran it through it's paces as best as I can with the temps running around 0 outside.

Initial test. I filled the stuff sack with water. The sack is made of the same material, without the nicer seams. The water poured out the seems, but no seeping on the main material. Sticking your hand in the bag, you do feel the 'space blanket' effect with nearly instantly warmer hands.

First night I climbed in it in bed, and tossed my usual quilt and wool blanket over me and the bag. I felt decidedly warmer than usual even with lots of skin contact to the bag. In the morning there was no clamminess so the breath-ability claim is substantiated in my book. If it didn't breath, I should have been swimming like a fish.

For the 2nd night, I decided to 'camp out' in my basement with my oldest 2 girls. The basement runs mid 60s during the winter. I rigged up a pair of hammocks for my girls out of bed sheets and lots of blankets. 
I slept in a hammock and the bivy wearing sweatpants and a tshirt. I froze! My trip out in 3 degree weather and strong winds in  down bags had me less chilled (although much colder in spots) than 65 degrees with this bivy. 3 am, I folded and grabbed my light down jacket and wool hat. Covering my torso and arms and I slept great the rest of the night.

This again confirms what I've known for a while. Space blankets need space in order to work. This bag is SO tight on me that I doubt I can get my summer weight down bag and myself stuffed inside. Warm thin clothes is the best I can hope for.

I think I may modify the bag by adding a heavy space blanket diamond to the bottom. Slit the bag about 3 feet and tape in a diamond shaped patch maybe 6 inches wide. I am going to try to seal the stuff sack with some Gorilla brand clear repair tape to see how well it sticks and durability before I cut the bag.

This isn't a down bag, for sure. I don't foresee any use for this in cold weather. It is also not a comfortable bag. Given the size and weight, it will be my ultralight summer setup. I will be using this bag a lot I expect simply because it's so svelte. Cowboy camping in my future in this bag for sure!

Anybody else try this bag?

In album 2015-02-22

244 grams for a waterproof bivy/sleeping bag seems like a great way to go ultralight.

Shiny on the inside. Supposed to reflect radiant heat back at you. As long as you don’t touch it.

Overnight in the hammock hung in the basement, 63-65f, and I froze wearing sweatpants and a tshirt. 3am I had to get my down jacket and a wool hat, and then I was good the rest of the night.

Some nice details such as nice finished seems on the inside, and a dart at the end of the 1/4 length zipper. Six foot four 235lbs for 2 nights really pushes out on the bag and the seems only settled a little bit.

I rigged up a pair of bedsheet hammocks for the girls, tied off the treadmill. They enjoyed it OK. Not a fan of the hammock yet. Practicing camping with them so they do better when we go for real.

I rebuilt the extruder on my Delta #RepRap again

I rebuilt the extruder on my Delta #RepRap again. Trying different things to find something that works for me. This is a cable-laced short bowden tube with no 'real' connectors. Quick and dirty, but it seems to be working well so far.

In album Repaired stubby bowden tube

The cable lacing is where the hold-it-all-together should happen. This is with Spectra fishing line. Same as I used for the drive-line. Low stretch. Should keep the two halves from being pushed apart.

Boom! Wonderful printing all of a sudden.

Installed. The idea is to balance the weight of the motor over the effector so the printer doesn’t have to sling all that weight around.

I used some self vulcanizing rubber tape to try to get some traction on the tube. It should also stiffen up the joints a bit so there is less flex at either end and more in the middle.

This is the prior iteration. The nylon kept wanting to stretch so I kept twisting the extruder around to tighten up the cable lacing. 2.5 full turns here! The nylon also dug into the plastic a bit as well.

The RepRap revolution started 6 years ago, today.

6 years ago, today is when the first ‘child’ printer was created.

6 years ago, today, the RepRap revolution started.

RepRaps, or Reproducing Rapid Prototypers are 3d printers that are designed in such a way that you can use one to make a copy of itself. The goal is to be able to use ‘stuff’ that is easily available locally. Today, I could make one using parts bought from Radio Shack, Home Depot, Walmart, and junk inkjet printers sitting in people’s closets, and my existing 3d printer. It’s easier and cheaper to order parts of ebay, but I can cobble one together after a couple hour bike ride.

The hardware is open source –  that means I can download, view, edit, and distribute my changes to the machine for free & legally.

The software is open source – that means I can download, view, edit, and distribute my changes to the software for free & legally.

There are thousands of people who are actively making tweaks and adjustments to the printers & software every single day. Thousands of people who are making these 3d printers better, every day, just for the fun of it.

6 years ago today, the first RepRap begat the 2nd RepRap and the world changed forever.

My college, MSOE, had the largest Rapid Prototyping lab in the world at that time if memory serves correctly. They had millions of dollars in equipment. I remember walking past the glassed windowed RPC and looking at the cool stuff they where making there. Engines for GM, hands for NASA to fit gloves, skulls to solve murder mysteries.

2 years ago, I got my first RepRap for as much money as the TV in my living room – I ordered a kit of parts, and built it over the course of 2 days with help from strangers who where also putting their printers together at the same time.

6 years ago today, RepRaps started a revolution that made 3d printers accessible to me, in my home. My children will grow up never not knowing having having easy access to 3d printers. In their home. My dad remembers when he got indoor plumbing growing up, I remember when our house got it’s own phone number and not a shared number with several of the neighbors. My kids will never not remember a 3d printer or two in their house. This blows my mind. The paradigm shift in their thought processes is revolutionary –

I’ve come up with a few ideas of my own – hybrid drivelines, hooking up my printer to my fish tank, and a temp monitoring idea across the printer as a hole.

The people who have made the RepRap revolution possible deserve much gratitude. I’ve been able to meet in person many of the ‘key’ people who have made RepRaps possible – the (re)designers of the hardware, the (re)designers of the firmware, the (re)designers of the electronics.

Today, today is Mr. Bowyer’s day. Thank you. We will probably never meet in person, but you have changed my life & my children’s life. For that, Thank you.

I went to the Midwest RepRap Fest (#MRRF) in Goshen Indiana this year

I was asked to go by a friend last year, but couldn't afford a hotel at the time. 

Work found out (I have a big mouth) and offered to be a sponsor! A big bonus to this, I got to bring one of our very expensive ROMER arms with a  laser scanner. 

The show was a blast! I am still recuperating.

Considering I own nearly half of the 3d printers I'd seen running in person, the show was EPIC. So many machines! So many people.  The people there listed like my version of a hollywood blockbuster movie!   Prusa, Tonokip, Logxen, Seward, Os1r1s, and more!

I brought my 2 printers. Each has something a bit unique. One has a water cooled hot end, which is rare. The other uses both belts and fishing line on the save drive line, which I have not seen done before.

I didn't even get a chance to take many photos. Disappointing, but an excuse to go again next year.

There was  a local who had lost his hands to bacterial meningitis a few years ago. A last minute project was to have the people who brought printers there print out a pair of robot hands for him. I had the scanner, so I scanned in his arms. By the time the show was over, there was half of one arm printed. It was just SO crazy busy that we just couldn't get it done at the show. The project is getting finished after the show.

In album MRRF2014

This is my portable robot building fastener set. It has many of the the important bits besides structural components. The most important tool is the brain-juice!

Yeah, that’s right, I had lunch with the guy with the reddit Up Vote Orange Challenger.  Crazy cool!

The first Makergear M2 I’ve seen in person. I like it.

Packing up for the show. My Mendal 3D printer fits into a plastic case I’d rescued from a dumpster. It fits perfectly, like they where designed for each other.

All loaded up and ready to go. Two 3D printers, a laser scanner, a couple of computers & tablets, My robot building kit, some stools & a case of Mt Dew.

Here I am scanning a print to see how accurately the printer was able to hit the design. It did pretty darn good. There is a little bit of ‘shrink’ as the ABS plastic cools, and we can see that.

This came off of one of the printers at the show. I compared the file to the print and it came out quite nicely. Undersized, but the profile matched really nicely.

This printer is just wild! It’s made from really common bolts, fishing line, guitar tuners and massive amounts of creativity.

The Simpson printer really looks like a spider, spinning a web. I just love this thing.

This is another pretty cool printer.

I can’t imagine writing the gcode for this, to push out the coordinates as the bed raises.

This is a twisty machine. The linear rods are also the drive. The math makes my brain hurt!

I like this plastic bowden capture.

I got my printer working off of a cheap tablet. This is going to be SO nice!

I got ALL the nylons…