Help with flow meter Stopped working.

Wolfw28

Active Member
View Badges
Joined
Mar 13, 2022
Messages
193
Reaction score
137
Location
Myakka City
Rating - 0%
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.
 
Last edited:
OP
OP
Wolfw28

Wolfw28

Active Member
View Badges
Joined
Mar 13, 2022
Messages
193
Reaction score
137
Location
Myakka City
Rating - 0%
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.
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

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,000
Reaction score
969
Location
Germany
Rating - 0%
0   0   0
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.
 
OP
OP
Wolfw28

Wolfw28

Active Member
View Badges
Joined
Mar 13, 2022
Messages
193
Reaction score
137
Location
Myakka City
Rating - 0%
0   0   0
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

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,000
Reaction score
969
Location
Germany
Rating - 0%
0   0   0
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

5000 Club Member
View Badges
Joined
Sep 21, 2018
Messages
6,540
Reaction score
6,994
Rating - 0%
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.
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,000
Reaction score
969
Location
Germany
Rating - 0%
0   0   0
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
OP
Wolfw28

Wolfw28

Active Member
View Badges
Joined
Mar 13, 2022
Messages
193
Reaction score
137
Location
Myakka City
Rating - 0%
0   0   0
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

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,000
Reaction score
969
Location
Germany
Rating - 0%
0   0   0
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:
OP
OP
Wolfw28

Wolfw28

Active Member
View Badges
Joined
Mar 13, 2022
Messages
193
Reaction score
137
Location
Myakka City
Rating - 0%
0   0   0
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
OP
Wolfw28

Wolfw28

Active Member
View Badges
Joined
Mar 13, 2022
Messages
193
Reaction score
137
Location
Myakka City
Rating - 0%
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.
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

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,000
Reaction score
969
Location
Germany
Rating - 0%
0   0   0
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:

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,280
Location
Edmonton, Canada
Rating - 0%
0   0   0
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

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,000
Reaction score
969
Location
Germany
Rating - 0%
0   0   0
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
OP
Wolfw28

Wolfw28

Active Member
View Badges
Joined
Mar 13, 2022
Messages
193
Reaction score
137
Location
Myakka City
Rating - 0%
0   0   0
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.
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,000
Reaction score
969
Location
Germany
Rating - 0%
0   0   0
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
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,280
Location
Edmonton, Canada
Rating - 0%
0   0   0
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.
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,000
Reaction score
969
Location
Germany
Rating - 0%
0   0   0
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
 
OP
OP
Wolfw28

Wolfw28

Active Member
View Badges
Joined
Mar 13, 2022
Messages
193
Reaction score
137
Location
Myakka City
Rating - 0%
0   0   0
All but deleted data files I don’t know how to do what you are asking to do. I don’t know how to navigate or the commands. The software part i don’t know.
 

Aquatic acrobat in your aquarium: Have you ever kept an eel?

  • I currently keep an eel in my tank.

    Votes: 29 14.3%
  • I have kept an eel in my tank in the past.

    Votes: 35 17.2%
  • I have not kept an eel in my tank, but I hope to in the future.

    Votes: 36 17.7%
  • I have no plans to keep an eel.

    Votes: 100 49.3%
  • Other.

    Votes: 3 1.5%
Back
Top