Water tank level monitoring + Node Red

Hi Jon, Mat here from London. I just came across this post after some googling, not sure exactly what the forum is for but joined anyway to throw in my thoughts. Sorry if these thoughts are a bit basic. I haven’t read all subsequent comments, which may be more advanced than my own.

But I have recently made a sump level monitoring system. We have three basement sumps; in the UK our building regulations mean that a “high level alert” system must be included in the design. Rather than paying too much money for a very basic float system with an audible alarm, I decided to make my own using ultrasonic distance sensors, Arduino, and Node-RED.

My rationale for using distance sensors was:

  • regular messages mean I can create a “watchdog”, which will inform me if we don’t get a reading. This seems more reliable than a basic float. With a basic float, the sumps should never fill up beyond a certain level, which means the alarm floats should never be used (except in the emergency situation which we hope never happens), so how would you know if they failed? My distance sensor solution sends regular messages every 3 seconds, for up-to-date info.

  • distance sensor provides a linear measurement, rather than some of the ideas I read here which rely on a discreet number of sensors. Or worse still, a high level float alarm, which is binary data. I can actually see how quickly the pumps evacuate water, I can calibrate to see how much water has actually entered the sump during a given time period, etc.

  • more fun, more data

Here’s what it does in more detail:

  • takes a reading in mm from each sump, every 100ms and displays this on a 16x2 LCD
  • you send a JSON “calibration” message over MQTT to the Arduino, with values for max level, min level, and alarm trigger level (i.e. remote calibration)
  • every 5 seconds, send the actual readings (in mm and %) by MQTT back to my server
  • if we have received a calibration, change the onboard display to show % full, instead of mm distance
  • sound alarm when the level rises above the trigger level set remotely. Also send an alarm status back to the server

On Node-RED I also have gauges and graphs on the dashboard, showing current levels and history. Also there’s the ability in Node-RED to arm / disarm the alarm (for testing).

It has been operational for about 2 weeks now. 2 out of 3 sensors work fine, one is alternating between 2 quite different values, but we have done a lot of concrete work around that sump and I haven’t even opened up the lid to check the sensor is still pointing in the same direction. So I’m hoping it’s an issue of mechanical fixing, or not quite pointing in the right direction. The system itself has been reliable so far.

I’ve made a little enclosure with display. Let me know if you’d like to see pics / screenshots etc. and I can post them here by the end of the week.

Thanks Mat.
Apologies it has taken me a while to respond, what with work and moving house, projects have kinda had to take a back seat for a while.

Core is a local electronics parts shop that is run by makers (sorry @Graham if Ive over simplified), attached to it is this forum - an excellent source of knowledge for all things Pi, LoRaWAN and a raft of other things.

Thanks for your explanation of how you’ve done things - what always strikes me as great is the multitude of ways their are to do the same thing! I have all my code written, and had my parts on the breadboard - all went well during testing, I now need to solder onto a board and package up so I can deploy into the tank. Just need a bit of time:)

R
Jon

1 Like