The Planted Tank Forum banner

Flow sensor (meters) for filter - Arduino/Raspberry Pi project

5K views 16 replies 7 participants last post by  PhysicsDude55 
#1 ·
Ok, I'm bored. Starting a new tank may be interesting but it doesn't go fast, so I've been experimenting with controlling the Current LED+ light with a Raspberry PI (working), and thought to add some sensor(s).

Except the cheap sensors are boring (temperature -- hey, look -- it's still 78), and the interesting ones like water chemistry for nitrates are outrageously expensive.

But (I think) how about water flow through the canister. I can both provide quick alerts (e.g. email) if it stops, and also monitor its trend to see if it is slowing too much and may need maintenance early.

Has anyone used flow meters?

And in particular -- does the general gunk that builds up in a tank eventually clog them?

Here's the one I was going to try first, since it's cheap:

http://www.adafruit.com/products/828

I've found a bazillion articles about using it and similar, but none in aquarium, usually in beer.

Which leads to two theories -- no one else is quite as bored as I am. Or they quickly fill with gunk and don't work.

Any experience or pointers?

PS. It arrives today, but I assume it takes weeks or months before the gunk theory plays out one way or another.
 
See less See more
#2 ·
PS. If anyone's curious, here's what the device will look like on a web page (which could be PC, tablet, phone, etc.). The core idea of the scheduler though is for it to handle lighting changes unattended. The Raspberry Pi has no display or buttons, it's just a black box on the network (WiFi or wired).

The data in this photo on the plot is simulation data testing the sensor circuit, not real flow.

 
#3 ·
I've considered getting some of these as well for my Pi based controller. Temp is boring to keep an eye on, but I'll be using it to control heaters.

as far as the flow meter is concerned, I was going to hook mine up to the outlet side of my co2 reactor. in theory, there should be very little gunk built up. I certainly wouldn't put it on the inlet.

the outlet should give you the best reading anyway. without anything gunking it up it should give you the best flow rate into the tank. as the canister itself gets gunked up your outlet flow rate will drop and you'll know it's time to clean the canister.

it would be interesting to the tie the flow rate sensor into a variable speed pump. this would give you the ability to set a flow rate and have the controller dictate pump speed. then you could tell it to go to a "feeding flow rate" to cut the rate down for 15-20 minutes for feeding time.
 
#4 ·
the outlet should give you the best reading anyway. without anything gunking it up it should give you the best flow rate into the tank. as the canister itself gets gunked up your outlet flow rate will drop and you'll know it's time to clean the canister.
Exactly. I've heard anywhere from clean it every 2 weeks to every 3 months, and while I suspect there's a happy medium, reduced flow rate certainly is part of it.

I just don't want the reduced flow rate to be because the flow sensor itself is getting clogged.

Glad to know there's someone else out there experimenting with this stuff.

I keep wondering if I could get it small enough and battery powered, could I produce a drone for roaming the tank and taking photos. :D Then reality comes calling (aka my spouse to drag me away from my desk on some mission of higher importance).

Will WiFi work under water?
 
#5 ·
I bet wifi would work under water. but here's the thing... don't use wifi. Use a radio signal, or maybe an XBee.

I had the idea of creating a bunch modules that used the XBEE to talk to the raspberry pi. imagine if you had a standard looking power strip with 8 completely controllable outlets on it, wirelessly talking to the controller. now you wouldn't need to wire the entire thing in a box. a sensor box with multiple sensors could send readings to the Pi. water proof internal devices could communicate as well.

that will be phase 3 or 4 of my controller. right now i'm still prototyping in an electrical box lol. I'll be needing to have a chat with you about your satellite controls once I get around to DIY'ing a complete RGB LED high light fixture
 
#6 ·
that will be phase 3 or 4 of my controller. right now i'm still prototyping in an electrical box lol. I'll be needing to have a chat with you about your satellite controls once I get around to DIY'ing a complete RGB LED high light fixture
Actually I think that would be completely different. What I did was simulate the physical remote control that came with the LED+, so I'm not trying to drive the LED's, but just one IR LED to drive the light. Works fine, and the physical remote still works that way. But I may have been better off with a real DIY light set and drive the lights.

Incidentally, I've been extremely happy with the pigpio routines, they work well up into the 100kHz range sensing and sending pulses (simultaneously) without saturating it. Looks like it could nicely do PWM control of LED intensity out of the box (Well, with the suitable power circuits).

But I'm here, any time. I'm just discovering this world of the small computer (I'm a big database sort myself).
 
#8 ·
Pretty interesting idea.
Read the following: This specific chapter describes your meter http://www.omega.com/literature/transactions/volume4/T9904-08-MECH.html#mech_4
That is a short white paper on flow meters. It looks like it should work well for our purposes. You can probably correct for the inaccuracy by putting some hysteresis into your sketch. Instantaneous readings are going to be a bit "bouncy"
 
#9 ·
That is a short white paper on flow meters. It looks like it should work well for our purposes. You can probably correct for the inaccuracy by putting some hysteresis into your sketch. Instantaneous readings are going to be a bit "bouncy"
I've been working with a simulated signal so far, waiting for the meter, but I'm capturing 5 minute averages, then doing a 10 point rolling average (that's the green line).

The calibration however may be a problem. The $9 meter disclaims being accurate, but I've read people have calibrated it by measuring different flow rates vs pulse counts. I'm not quite sure how I am going to do that in place in the tank, however, so am planning to try to rig it up on a sink somehow first.

But that begs back to that "gunk" issue -- does the wheel get clogged and slow down for the same flow?

I guess the way to really know is run it a few months.
 
#10 ·
OK... this is a complete non-starter with the adafruit flow monitor.

I got the flow monitor, I spent a couple hours doing calibration runs with a garden hose and a marked container, then put it inline with the Fluval 306.

The flow through the 306 dropped by at least 50%, based on an eyeball estimate of the nozzle's flow into the tank. It was a huge difference.

That's replacing a 4" piece of 1/2" PVC threaded pipe with the flow meter, so nothing else changed, it was 1/2" all the way.

The flow it measured was about 130 gph, against the rated flow of 305gph (which of course is suspect, just because it's the manufacturer's number and probably best case).

I don't at all trust myself as "twice" by eye, but it was immediately obvious (once I made sure everything was open and flowing) that it had to come out.

So ... no flow meter. I suspect the other cheap ones have a similar problem, and it's not important enough for one of the $100 ones.

But it was an interesting exercise.
 
#14 ·
I had seen that. Note the one you listed is 1.25", so it's a rather huge inlet you would need to plumb in. The 1/2 is similar in price to the adafruit, and actually if you look at it, it is suspiciously similar.

I don't know the effect of going with a much bigger one. It might help a lot, as there's less constriction in terms of size, but there's more inertia from the larger paddle wheel.

I may get ambitious and try later, but am hoping someone may come along who has already been there and done that and will share. This evening I'm stripping out the flow meter code and going to just let the LED+ run for a while.
 
#16 ·
I tried one of those Sparkfun meters (same as Adafruit I think) too and had pretty much the same experience. It did not lower my output by quite that much (measured about 1/5 reduction), but it required too much maintenance for my liking. Taking it out every few weeks got rather annoying..
The accuracy was pretty decent when using a long sampling time though, so if you have one of those 'clean' tanks without a massive buildup of algae in the tubes you might be able to use one.
 
#17 ·
A much easier way to measure this is to get a water pressure sensor.

It doesn't impede the flow, and the water pressure changes at about the same rate the water flow does, so you can still monitor your filter's output.

By my experimenting, a pretty good flowing filter will flow something like 2 maybe 3 PSI max, so you want a very sensitive water pressure transducer. There's a variety of 5 PSI pressure transducers easily available on ebay or whathave you that just put out a 0-5V signal that can easily be read by a microcontroller.
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top