Help with flow meter Stopped working.

Wolfw28

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 13, 2022
Messages
70
Reaction score
48
Review score
+0 /0 /-0
Location
Myakka City
I instaled my flow meter according robs tutorial here
Thread 'Flow Meter Addon for reef-pi'
https://www.reef2reef.com/threads/flow-meter-addon-for-reef-pi.812932/
work fine for a month then stop working
went through complete install and config several time
still not working
changed ports on Robo-Tank sensor module from 6 to port 5 which is known good port.
Reef-pi set it up as a Analog input to me that would be A 0-5 V input
attached a 10k ohm Potentiometer in place of the flow sensor and adjust it slowly from 0 to 5vstill no reading and reef-pi.
im getting these error messages
Thread 'Flow Meter Addon for reef-pi'
D5DD98AD-E372-43F1-A64F-10D14F36A943.png

And these are my settings
039B31F6-B9BC-46E2-BC73-AB43AAF4EA10.jpeg
9F1B8ABC-085E-451D-A967-78611AE82F8D.png
3131DCE9-8C75-4790-81FB-B272DEC0D67D.png
277329EA-8566-46F2-AEB8-43FD2C73D06B.png

any help would be Great.
 
Last edited:
AquaCave Logo Banner
OP
Wolfw28

Wolfw28

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 13, 2022
Messages
70
Reaction score
48
Review score
+0 /0 /-0
Location
Myakka City
I instaled my flow meter according robs tutorial here
Thread 'Flow Meter Addon for reef-pi'
https://www.reef2reef.com/threads/flow-meter-addon-for-reef-pi.812932/
work fine for a month then stop working
went through complete install and config several time
still not working
changed ports on Robo-Tank sensor module from 6 to port 5 which is known good port.
Reef-pi set it up as a Analog input to me that would be A 0-5 V input
attached a 10k ohm Potentiometer in place of the flow sensor and adjust it slowly from 0 to 5vstill no reading and reef-pi.
im getting these error messages
Thread 'Flow Meter Addon for reef-pi'
D5DD98AD-E372-43F1-A64F-10D14F36A943.png

And these are my settings
039B31F6-B9BC-46E2-BC73-AB43AAF4EA10.jpeg
9F1B8ABC-085E-451D-A967-78611AE82F8D.png
3131DCE9-8C75-4790-81FB-B272DEC0D67D.png
277329EA-8566-46F2-AEB8-43FD2C73D06B.png

any help would be Great.
One of the things I find strange is in Reef-pi it set up an analog input , because in the automotive Industry the pulses are red either as a PMW input or hz input. You have to excuse me most of my electric knowledge comes from the automotive world and I’m older a lot of these Communication protocols and coding I haven’t kept up with the times on.
 

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
230
Reaction score
260
Review score
+0 /0 /-0
Location
Germany
haven’t set up my flow meter, so can’t help you much with Reef-Pi settings yet.

what I can tell you is that the slow potentiometer will probably not work, since it will expect rectangle pulses with more or less steep flanks from 0-5V as far as I understand. So for Testing you would have to supply something like a rectangle wave with a few hertz frequency.

you should probably test the sensor. Supply it 5 V, make sure there is flow and the wheel inside the sensor is turning and measure the output signal. It should give you some AC voltage with a frequency proportional to the flow. If that’s not the case the sensor is maybe broken or blocked.
 
CLICK TO VIEW LIVESTREAM
OP
Wolfw28

Wolfw28

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 13, 2022
Messages
70
Reaction score
48
Review score
+0 /0 /-0
Location
Myakka City
haven’t set up my flow meter, so can’t help you much with Reef-Pi settings yet.

what I can tell you is that the slow potentiometer will probably not work, since it will expect rectangle pulses with more or less steep flanks from 0-5V as far as I understand. So for Testing you would have to supply something like a rectangle wave with a few hertz frequency.

you should probably test the sensor. Supply it 5 V, make sure there is flow and the wheel inside the sensor is turning and measure the output signal. It should give you some AC voltage with a frequency proportional to the flow. If that’s not the case the sensor is maybe broken or blocked.
Thank you for your reply yes I’m very Familiar with how the flow sensor works it’s a haul effect device Producing a square wave signal or a digital signal on off on off and so on that’s why I thought it was odd that in robo-Tank/Reefpi yes it would be configured under the analog signal which is usually use for potentiometers thermistors linear sensor etc. The reason I tried the potentiometer is because my thoughts were as the pulses got faster the voltage would go up a little bit and as the pulses got slower the voltage would go down like I said I don’t know how the internals of the Robo-Tank is designed and exactly what it’s looking at. One thing I forgot to mention is I am assuming because I replaced The flow sensor with a new one that the problem is either software related or hardware related other than the sensor. It doesn’t mean the new one is bad or good I can’t count how many times I’ve help somebody out the problem on their car or another mechanic who installed a new part didn’t fix it because the new part was bad. If I had an oscilloscope at home I would know for sure what’s going on but unfortunately I don’t it’s on my wish list. Thank you again for your reply if anybody else has any suggestions my ears are open.
 

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
230
Reaction score
260
Review score
+0 /0 /-0
Location
Germany
Thank you for your reply yes I’m very Familiar with how the flow sensor works it’s a haul effect device Producing a square wave signal or a digital signal on off on off and so on that’s why I thought it was odd that in robo-Tank/Reefpi yes it would be configured under the analog signal which is usually use for potentiometers thermistors linear sensor etc. The reason I tried the potentiometer is because my thoughts were as the pulses got faster the voltage would go up a little bit and as the pulses got slower the voltage would go down like I said I don’t know how the internals of the Robo-Tank is designed and exactly what it’s looking at. One thing I forgot to mention is I am assuming because I replaced The flow sensor with a new one that the problem is either software related or hardware related other than the sensor. It doesn’t mean the new one is bad or good I can’t count how many times I’ve help somebody out the problem on their car or another mechanic who installed a new part didn’t fix it because the new part was bad. If I had an oscilloscope at home I would know for sure what’s going on but unfortunately I don’t it’s on my wish list. Thank you again for your reply if anybody else has any suggestions my ears are open.
There are very simple Oscilloscopes out there, like This or This.

As far as I understood from @robsworld78 the input has a level shifter to bring the sensor‘s 5V down to the PI‘s 3.3V. There is also an optional pull-up resistor switch labeled „p-u“. That one shouldn’t be activated I think, as it might interfere with the sensors operation.
 

Dan_P

2500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Sep 21, 2018
Messages
3,718
Reaction score
4,118
Review score
+0 /0 /-0
I instaled my flow meter according robs tutorial here
Thread 'Flow Meter Addon for reef-pi'
https://www.reef2reef.com/threads/flow-meter-addon-for-reef-pi.812932/
work fine for a month then stop working
went through complete install and config several time
still not working
changed ports on Robo-Tank sensor module from 6 to port 5 which is known good port.
Reef-pi set it up as a Analog input to me that would be A 0-5 V input
attached a 10k ohm Potentiometer in place of the flow sensor and adjust it slowly from 0 to 5vstill no reading and reef-pi.
im getting these error messages
Thread 'Flow Meter Addon for reef-pi'
D5DD98AD-E372-43F1-A64F-10D14F36A943.png

And these are my settings
039B31F6-B9BC-46E2-BC73-AB43AAF4EA10.jpeg
9F1B8ABC-085E-451D-A967-78611AE82F8D.png
3131DCE9-8C75-4790-81FB-B272DEC0D67D.png
277329EA-8566-46F2-AEB8-43FD2C73D06B.png

any help would be Great.
Does the fact that the system worked initially point to a fouling issue? Biofilms and solids can quickly accumulate on all surfaces in an aquarium.
 
www.dinkinsaquaticgardens.com

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
230
Reaction score
260
Review score
+0 /0 /-0
Location
Germany
To answer your other questions:

  • the pH error is probably an I2C problem between Robo-Tank pH and the Raspberry Pi:
    • you can alleviate that by making sure that I2C is activated and slowed down, like in the pH-error-while-running Thread
  • The File-Input and Analog Input are needed, because Reef-Pi can't natively handle the Pulse input from the GPIO
    • Robsworld78's manual starts a script in the background that counts the pulses from the flow meter
    • this count is converted to a number that's regularly written into a file
    • Reef-Pi reads that file with a driver (file-input)
    • Reef-Pi uses that input as an analog value (analog-input)
    • This is needed, I think, because other drivers, like the PWM circuit PCA9685, needs one driver, but provides 16 outputs. So you tell him where to find the PCA9685 and then you create outlets as needed.
  • In robsworld's guide that you linked he mentions, that you need to put the GPIO pins in the settings.txt to the right values:
    • "First setting is how many flow meters you have, default is 0 so you must change. You can run up to 10 flow meters but easy to increase limit."
      • => you have inserted 1, as should be
    • "Second is the GPIO pin numbers you use, the first 6 defaults are for my controller sensor ports 1-6 but can be any GPIO number between 5 and 27. The pins must be in the order you use them, for example pin 5 is defaulted to flow 7, if you only have one flow but use pin 5 you must put 5 for flow 1. If you have 3 flow meters it'll use the top 3 pins only."
      • => That means, if you only have 1 flow meter, the script only uses the GPIO pin listed under Flow1.
      • Since you connected the flow meter to sensor input 5 or 6, I think that you need to change the first line to:
      • Flow 1 GPIO = '26' (for sensor input 5)
      • Flow 1 GPIO = '21' (for sensor input 6)
 
Last edited:
OP
Wolfw28

Wolfw28

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 13, 2022
Messages
70
Reaction score
48
Review score
+0 /0 /-0
Location
Myakka City
To answer your other questions:

  • the pH error is probably an I2C problem between Robo-Tank pH and the Raspberry Pi:
    • you can alleviate that by making sure that I2C is activated and slowed down, like in the pH-error-while-running Thread
  • The File-Input and Analog Input are needed, because Reef-Pi can't natively handle the Pulse input from the GPIO
    • Robsworld78's manual starts a script in the background that counts the pulses from the flow meter
    • this count is converted to a number that's regularly written into a file
    • Reef-Pi reads that file with a driver (file-input)
    • Reef-Pi uses that input as an analog value (analog-input)
    • This is needed, I think, because other drivers, like the PWM circuit PCA9685, needs one driver, but provides 16 outputs. So you tell him where to find the PCA9685 and then you create outlets as needed.
  • In robsworld's guidethat you linked he mentions, that you need to put the GPIO pins in the settings.txt to the right values:
    • "First setting is how many flow meters you have, default is 0 so you must change. You can run up to 10 flow meters but easy to increase limit."
      • => you have inserted 1, as should be
    • "Second is the GPIO pin numbers you use, the first 6 defaults are for my controller sensor ports 1-6 but can be any GPIO number between 5 and 27. The pins must be in the order you use them, for example pin 5 is defaulted to flow 7, if you only have one flow but use pin 5 you must put 5 for flow 1. If you have 3 flow meters it'll use the top 3 pins only."
      • => That means, if you only have 1 flow meter, the script only uses the GPIO pin listed under Flow1.
      • Since you connected the flow meter to sensor input 5 or 6, I think that you need to change the first line to:
      • Flow 1 GPIO = '26' (for sensor input 5)
      • Flow 1 GPIO = '21' (for sensor input 6)
Thank you again but this is the 6 sensor in put for Robo-Tank according to the manual that i used when I first setup the flow sensor. Thank you for the link for the oscilloscopes didn’t realize there were some cheap one out there. I have a Fluke 88 meter at work so when I think oscilloscope I automatically thing Fluke which are around $2000.I wonder how they compare to each otherI’m going to get to the bottom of this. Set on I found a link on setup and programming an arduino witch works the same way you described. counting the digital signal or number of pulses to calculate flow rate. If that works then I might bring home one of our scanners that also has the capability of signal generating to simulate the flow rate sensor.

E665F57D-88D4-40C0-B698-E8B12AEFC94B.png
 

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
230
Reaction score
260
Review score
+0 /0 /-0
Location
Germany
Alright, seems my info was outdated, sry for that ^^

The comparison is that Fluke's can measure higher Frequencies (20 MHz or more), so they measure (much) more often per second. They probably also have higher frequency and voltage resolution and the values they give you are much more reliable and reproduceable when you switch to another Fluke Oscilloscope.
The cheap ones can only measure reliably to a few 100 kHz or less and have less frequency and voltage resolution. They are also less accurate, meaning if they measure 1V AC with 1kHz, it might actually be +/- a few percent off.
For hobby things like Reef-Pi and such, where you just need to check whether something looks vaguely right, they are absolutely perfect. The cheap ones don't always come with a USB interface however to get the data onto a PC.
 
Last edited:
Top Shelf Aquatics
OP
Wolfw28

Wolfw28

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 13, 2022
Messages
70
Reaction score
48
Review score
+0 /0 /-0
Location
Myakka City
Does the fact that the system worked initially point to a fouling issue? Biofilms and solids can quickly accumulate on all surfaces in an aquarium.
problem with the sensor was my first thought so I replaced it. If it was a simple solution then I wouldn’t have wasted my time posting this and
I instaled my flow meter according robs tutorial here
Thread 'Flow Meter Addon for reef-pi'
https://www.reef2reef.com/threads/flow-meter-addon-for-reef-pi.812932/
work fine for a month then stop working
went through complete install and config several time
still not working
changed ports on Robo-Tank sensor module from 6 to port 5 which is known good port.
Reef-pi set it up as a Analog input to me that would be A 0-5 V input
attached a 10k ohm Potentiometer in place of the flow sensor and adjust it slowly from 0 to 5vstill no reading and reef-pi.
im getting these error messages
Thread 'Flow Meter Addon for reef-pi'
D5DD98AD-E372-43F1-A64F-10D14F36A943.png

And these are my settings
039B31F6-B9BC-46E2-BC73-AB43AAF4EA10.jpeg
9F1B8ABC-085E-451D-A967-78611AE82F8D.png
3131DCE9-8C75-4790-81FB-B272DEC0D67D.png
277329EA-8566-46F2-AEB8-43FD2C73D06B.png

any help would be Great.

taking up your time reading this.
Does the fact that the system worked initially point to a fouling issue? Biofilms and solids can quickly accumulate on all surfaces in an aquarium.
that was my first thought, forgot to say that in my original post. Also verified my wiring no shorts or excessive Resistance. It all comes back to sensor module and software. It seams from the error message I get may be the sensor module.
 
OP
Wolfw28

Wolfw28

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 13, 2022
Messages
70
Reaction score
48
Review score
+0 /0 /-0
Location
Myakka City
I instaled my flow meter according robs tutorial here
Thread 'Flow Meter Addon for reef-pi'
https://www.reef2reef.com/threads/flow-meter-addon-for-reef-pi.812932/
work fine for a month then stop working
went through complete install and config several time
still not working
changed ports on Robo-Tank sensor module from 6 to port 5 which is known good port.
Reef-pi set it up as a Analog input to me that would be A 0-5 V input
attached a 10k ohm Potentiometer in place of the flow sensor and adjust it slowly from 0 to 5vstill no reading and reef-pi.
im getting these error messages
Thread 'Flow Meter Addon for reef-pi'
D5DD98AD-E372-43F1-A64F-10D14F36A943.png

And these are my settings
039B31F6-B9BC-46E2-BC73-AB43AAF4EA10.jpeg
9F1B8ABC-085E-451D-A967-78611AE82F8D.png
3131DCE9-8C75-4790-81FB-B272DEC0D67D.png
277329EA-8566-46F2-AEB8-43FD2C73D06B.png

any help would be Great.
Replaced flow sensor for the 3rd time. Ohm out all my wiring no shorts to power or ground no resistance ,verified all the settings in the software. According to the error messages the software is looking for the sensor input , but is not getting it. Which leds me to believe that the problem might be in the Robo-Tank sensor module.
 

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
230
Reaction score
260
Review score
+0 /0 /-0
Location
Germany
Replaced flow sensor for the 3rd time. Ohm out all my wiring no shorts to power or ground no resistance ,verified all the settings in the software. According to the error messages the software is looking for the sensor input , but is not getting it. Which leds me to believe that the problem might be in the Robo-Tank sensor module.
Can you post the error message for @robsworld78 ?

BTW, just found a quick method to check the sensor for part of their functioning without an oscilloscope:
- apply 5 V and measure the AC voltage on the signal pin with a multimeter.
- apply flow through the sensor (e.g. by blowing a bit of air through and hearing the wheel spin)
- the voltage should jump to around 2,7V AC and fall back down when the wheel stops (at least mine did)
 
Last edited:
Orphek OR3 reef aquarium LED bar

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
834
Reaction score
1,116
Review score
+0 /0 /-0
Location
Edmonton, Canada
Thanks for helping out @Sral. All the info @Sral provided is valid except for the GPIO pins, those changed on v3 so you have the correct ones @Wolfw28.

A few things, the Pi doesn't have any analog pins, they only read low or high, I believe it starts reading high if 1.8v or greater is applied to the GPIO. Reef-pi uses that terminology because it has a driver that will support the ADS1015 which adds analog pins. This section is also used for other drivers that aren't necessarily analog such as the file driver like you use for the flow meters.

The flow meter is read using interrupts on the GPIO, this is what counts the number of pulses and gets converted to flow. As @Sral mentioned if you power up the flow meter, blow through it while checking voltage on the data line you should see something and it drops off when the flow meter stops. This should verify it's working.

Maybe the problem is you have the sensor port setup as an "inlet" connector as well in reef-pi, that would likely mess it up. When you use the flow meter reef-pi shouldn't know that GPIO pin exists.

If you stop the flow meter service and then run the following commands I think the script will output data in the SSH terminal, do you see anything there?

cd /var/lib/reef-pi/flowmeters/

./flowmeters


On that pH error you need to make that change @Sral pointed out, that should get rid of that error.
 

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
230
Reaction score
260
Review score
+0 /0 /-0
Location
Germany
Since you never answered that I would still ask for the Pull-Up (PU) or Pull-down (PD) setting. Not sure, but I think the sensor needs Pull-down or nothing and if the setting is different on Sensor Port 5 than 6, or if something changed there, it might keep the sensor from functioning.
 
OP
Wolfw28

Wolfw28

Community Member
Review score
+0 /0 /-0
View Badges
Joined
Mar 13, 2022
Messages
70
Reaction score
48
Review score
+0 /0 /-0
Location
Myakka City
Terminal response after
./flowmeters
terminate called after throwing and instance of ‘std :: invalid _ argument’
what() : stof
Aborted

after this response from terminal and testing all six ports ,plus the 2 DC ports on the DC 6/2 extension
flowmeters: all fail to work
optical: all work
Noncontact: all work
which leads me to believe that the hardware is working. and that it’s somewhere in the software not working properly. That’s beyond my abilities at the moment I would actually like to learn programming and get under the hood of Reef-pi. That’s a bonnet in Europe I think.
should I try to uninstall flow meters or try reinstalling it again? If so I don’t know how to uninstall flow meters. I’m not even sure if this is Python or something else. Any help would help I would like to have a flow meter to see what’s the difference is between my pump output,using the controller it came with vs and the variable speed controller I’m setting up to work with Reefpi. The first variable speed brushless motor controller I tried only flowed half as much as the factory controller. I would really like to get this fixed so I can read the flow rate now, before I install the controller for the pump.
 
www.dinkinsaquaticgardens.com

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
230
Reaction score
260
Review score
+0 /0 /-0
Location
Germany
Your are right, sounds like a software error. Seems like either the code or the data files are corrupted.

Looking at the code that @robsworld78 provided in the Flow Meter Guide it seems like either an incorrect calibration setting or a corrupted TotalFlow File. Could you post your settings.txt and your TotalFlow file ?
The latter should be in the folder "/var/lib/reef-pi/flowmeters/"

Solution would be to either correct the setting to a correct value that he can read as a float number (like '4.5', including quotation marks) or correct the content of the Total flow file to the same (like '0.0', without quotation marks). If that doesn't help you will have to delete the Total Flow file, but that might cause further errors, so let's leave that for later.
 
Last edited:

robsworld78

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Feb 14, 2020
Messages
834
Reaction score
1,116
Review score
+0 /0 /-0
Location
Edmonton, Canada
Can you try reinstalling the flow script again, I added a setting to debug. You shouldn't need to uninstall it (that's just deleting all the files and disabling the Pi service) when you install it should overwrite. This time when you setup the settings.txt file go to the bottom and change "debug" to 1. Then run the following 3 commands to run the script manually. It should output the data from the flow sensor now.

sudo systemctl stop flowmeters.service

cd /var/lib/reef-pi/flowmeters/

./flowmeters


It might also be worth deleting the 3 text files that store the data, these are created via the script so it's ok it they aren't there.
 
Corals.com

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
230
Reaction score
260
Review score
+0 /0 /-0
Location
Germany
Did exactly what you said and I’m still getting the same invalid_argument.
Did you do what I said or what @robsworld78 said ? ^^
Also: did you try deleting the data files ?

I expected @robsworld78's new scripts not to work, since the script always reads the file first, before saving the new value. So I would implore you to
- send the contents of both the settings file and the total_flow file
- Try replacing the content of the total flow file with a 0.0 (no quotation marks)
- if that doesn't help delete the total flow file
 

What are all the ways you "filter" your reef aquarium?

  • Chemical Filter Media

    Votes: 188 47.4%
  • Skimmer

    Votes: 327 82.4%
  • Natural Methods (rock, sand etc)

    Votes: 341 85.9%
  • Algae Scrubber/Reactor

    Votes: 53 13.4%
  • Rollermats

    Votes: 68 17.1%
  • Filter Socks/Pads

    Votes: 218 54.9%
  • UV Sterilizer

    Votes: 120 30.2%
  • HOB or Canister

    Votes: 56 14.1%
  • Ozone Generator

    Votes: 15 3.8%
  • Coral

    Votes: 202 50.9%
  • Other (please explain)

    Votes: 7 1.8%
  • Refugium

    Votes: 154 38.8%
  • Water Changes

    Votes: 278 70.0%
Sea Dwelling Creatures
Top