The Impossible Takes a Little Longer

Now that we have our indoor gardens on wheels fully operational it was time to think of technical refinements. Maintaining a log of actual water usage suddenly seemed like a good idea. I could think of several benefits of measuring water usage, including:

  • Learn how much water is optimal for each plant so we can reproduce healthy watering patterns in the future;
  • Know if there is a leak; automatically shut off the pump;
  • Know when the water tank is empty; automatically shut off the pump to prevent it from overheating.

Of course, the plants would be perfectly happy without this feature, but I was thinking of my own happiness: I love to dabble. Besides I can justify such automation on the grounds we’re away from our home for up to two months at a time. We don’t want to come home to sad plants.

Traditional irrigation water meters are expensive, and would not produce meaningful data with our watering system. We’re watering potted plants, not big, thirsty lawns; irrigation meters are designed for lawns.

Epiphany

My epiphany moment came when I learned via The Google that Hall Effect flow meters are cheap, and measure lower flows than irrigation meters. The meter produces the wrong kind of signal for our irrigation system, so I would have to use a computer to translate the Hall Effect signal into a signal that would be understood by our irrigation system. A cheap Arduino computer fits the bill exactly.

Millions of Aruino computers are used around the world, including by students. They’re a useful tool to learn about the the Internet of Things. The Hall Effect was discovered by Edwin Hall in 1879. It can be found in action in countless devices including drinks dispensers, automobiles, and on-demand water heaters.

Cheap + cheap came to about $25 delivered by Amazon Prime. Had I shopped more carefully, the cost could’ve been brought down to under $20. I also splashed out on a $3 relay to electrically isolate the Arduino from the rest of our irrigation system.

First Prototype

I quickly set about writing a program to do the necessary signal translation. I tracked down snippets of code I could modify and assemble into a larger program.

The parts arrived and I set about throwing together my first prototype. The blue cord, exiting stage left, connects to a laptop. I had prepared the program using the laptop, and used the cord to first load the program into the Arduino, then monitor what the program was doing.

First prototype, Hall Effect flow sensor in foreground, Arduino computer at the top, relay on the left.

After a few program tweaks, the system started to work. I blew into the flow meter, the computer counted pulses, the relay occasionally clicked.

This is not rocket science; OK, it’s basic computer science. To maintain perspective, kids in grade schools are working with Arduino computers. Generally they’re using visual programming environments which are a little more friendly than the traditional coding environment I was using. However, a motivated kid could do this, and a lot more.

My mind was racing ahead. Once I’d finished prototyping, the circuitry would no longer look thrown together. I started searching for an aesthetic project box to protect the circuitry. I even found myself wishing I had a 3D printer so I could build a box that maxed out fit and form.

But what about function? It was time for the next prototype.

Second Prototype

I plumbed the sensor into the main flow line of the irrigation system, and wired it to the Arduino computer.

A little more robust than the first effort, but still temporary.

I turned on an irrigation zone via a tablet and monitored progress on the laptop

The numbers in the left pane represent pulses from the flow sensor. Every 18 pulses, the computer momentarily powered the relay.

It became obvious the sensor was under-reading the flow. With our orchid zone, the meter did not even register the few cubic centimeters flowing every minute.

I quickly realized the sensor did not hack it. At 1 liter per minute, the claimed accuracy is ±2%. I knew the accuracy would deteriorate with low flows, but had not expected the thing to stall entirely. This sensor was not suitable for this application.

Back to the Drawing Board

I Googled around for alternatives. Of course there’s flow meters that measure lower flows but they would constrict the water flow. Other meters that do measure low flow, would not be suitable for higher flows.

I had reached an impasse. It was time to put the project aside until I found a better solution. I removed the meter, and disassembled the prototype: vestigial parts in the system are a no-no.

I’m easily distracted. My new project is to build an ultrasonic meter to log the water level in the supply tank. This solves both the leak and tank empty requirements listed at the top of this post. Today, ultrasonic distance sensors (five for $9) will arrive in the mail room downstairs. I’ll wire one into the Arduino.

It’s a sure bet prototyping will reveal issues I never imagined.

2 comments

    1. In these difficult times, I find myself frequently verifying “facts.” I checked, you are correct, I did not know this. I find 40 fluid-flow prototypes just a bit daunting.

Leave a comment

Your email address will not be published. Required fields are marked *