Flow Meter Addon for reef-pi

OP
OP
robsworld78

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
Hi Rob - looking at two of these.
https://h2oprotech.com/products/ha-1044-flow-meter-3-wire?variant=7121431593018

is this correct?
these are 3/4inch.
thanks
Hi @Dukereefnz, those look and sound like the correct type however they don't say Hall Effect so I'm not 100%, not really sure if there's different types. It talks about pulses per gallon, plus they mention it's just general purpose and show pic of connecting to a microcontroller so it should be ok.

This is the type I recommend, as you can see they are very similar to the H2Opro.

 

Urtoo

Well-Known Member
View Badges
Joined
Jul 1, 2019
Messages
688
Reaction score
924
Rating - 0%
0   0   0
Wish there was a 1" meter. theirs get a tad expensive.
May look at an adapter for this to be implemented.. Following along
 

Weasel1960

Valuable Member
View Badges
Joined
Aug 22, 2020
Messages
2,139
Reaction score
9,995
Location
Monticello, WI
Rating - 0%
0   0   0
There are cheaper ones on Amazon up to 1.5” I think. You need to check their ratings though. They often give a gallon per minute rating but most f the hobby works in gallon per hour. Just be mindful of that and do the conveersion
 
OP
OP
robsworld78

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
There are cheaper ones on Amazon up to 1.5” I think. You need to check their ratings though. They often give a gallon per minute rating but most f the hobby works in gallon per hour. Just be mindful of that and do the conveersion
I've seen the cheap ones up to 2" but just a few minutes ago I read in some reviews that the 1" goes down to 0.5" internally so there will be some back pressure which might not be good for a pump. I've been looking around for large ones that don't tapper but haven't found any that say that.
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
I forgot to explain how to connect a flow meter directly to a Raspberry Pi. Flow meters need 5v to operate, the Pi is only 3.3v so you need to add a couple resistors to drop the 5v to 3.3v.

The +5v goes to your power supply and the ground to the Pi.

flow8.png
Something very special:
I will have a 4-channel level shifter anyway (BSS138, has 10k pull-up resistors, so I might have to add another 10k to bring it to the ~5k from the Adafruit Guide), so I'm thinking about putting this on one of them next to the temperature probes on the other channels. That by itself should do the trick of level shifting for the PI.

That way, however, the sensor almost always pulls the signal to GND and I have almost permanent current flow through the pull-up resistors. Does anybody know whether I could invert that logic ?

I'm thinking about putting a MOSFET between pull-up and GND, triggered by the flow sensor signal. That pulls the signal line to GND every time a pulse comes in. The program should still work, since it only looks for either a rising or falling flank, which is still there, just inverted.
 
Last edited:
OP
OP
robsworld78

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
Something very special:
I will have a 4-channel level shifter anyway (BSS138, has 10k pull-up resistors, so I might have to add another 10k to bring it to the ~5k from the Adafruit Guide), so I'm thinking about putting this on one of them next to the temperature probes on the other channels. That by itself should do the trick of level shifting for the PI.

That way, however, the sensor almost always pulls the signal to GND and I have almost permanent current flow through the pull-up resistors. Does anybody know whether I could invert that logic ?

I'm thinking about putting a MOSFET between pull-up and GND, triggered by the flow sensor signal. That pulls the signal line to GND every time a pulse comes in. The program should still work, since it only looks for either a rising or falling flank, which is still there, just inverted.
The BSS138 won't work with DS18B20 sensors, the signal seems to get lost through them but you can use them for I2C. I think the flows don't like them either as they use interrupts but I could be wrong about that one, the voltage divider works for sure though. Not sure about using the mosfet for that, guess there's one way to find out. :)
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
The BSS138 won't work with DS18B20 sensors, the signal seems to get lost through them but you can use them for I2C. I think the flows don't like them either as they use interrupts but I could be wrong about that one, the voltage divider works for sure though. Not sure about using the mosfet for that, guess there's one way to find out. :)
Thx for the input !
I'll have to testit in a dry run with header pins for example. Maybe you really need to bring the pull up down to ~5k to make it work. I'll keep you updated :)
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
Thx for the input !
I'll have to testit in a dry run with header pins for example. Maybe you really need to bring the pull up down to ~5k to make it work. I'll keep you updated :)
Just as an update: the BSS138 level shifter works with both the DS18B20 temperature sensor and the Seedstudio flow meter I have.
 

Dunducatti

New Member
View Badges
Joined
Oct 25, 2022
Messages
3
Reaction score
7
Location
USA
Rating - 0%
0   0   0
That's all I need and things could get pretty interesting quick. I was playing with Node.js, if I run the js file with node in terminal it does what it should but I wasn't able to fire it from the web page using ajax.
I hope you did well and gained valuable experience with Node.js I usually go to a friend who is very good at it he said that to work in Node he goes to a company that build him everything, he even showed https://zenbit.tech/services/nodejs-development-company/ not sure how relevant it is but I'll leave it!
 
OP
OP
robsworld78

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
I hope you did well and gained valuable experience with Node.js I usually go to a friend who is very good at it he said that to work in Node he goes to a company that build him everything, he even showed https://zenbit.tech/services/nodejs-development-company/ not sure how relevant it is but I'll leave it!
Thanks, I didn't do a lot with Node.js, was able to work it out with c++, I'm by far most comfortable with it. C++, php, javascript, html, css and mysql is plenty enough for me to keep track of. At one time I was messing with python which I found the most difficult as it basically goes against everything I know with c++.
 

Dunducatti

New Member
View Badges
Joined
Oct 25, 2022
Messages
3
Reaction score
7
Location
USA
Rating - 0%
0   0   0
Thanks, I didn't do a lot with Node.js, was able to work it out with c++, I'm by far most comfortable with it. C++, php, javascript, html, css and mysql is plenty enough for me to keep track of. At one time I was messing with python which I found the most difficult as it basically goes against everything I know with c++.
I admire the amount of knowledge you have of languages, I think that now you can be called a polyglot in a sense!))
 

Wolfw28

Active Member
View Badges
Joined
Mar 13, 2022
Messages
201
Reaction score
138
Location
Myakka City
Rating - 0%
0   0   0
Hey @robsworld78 I have been using 4 flow sensor that the calibration factor is 7.5 just bought 2 large diameter one and the is 4.5 .in your program it only allows for one. If I stay with the 7.5 what equation would I use to calculate the 4.5 into gallons per hour. Thank you for all your help.
 

Sral

Valuable Member
View Badges
Joined
May 2, 2022
Messages
1,006
Reaction score
976
Location
Germany
Rating - 0%
0   0   0
Hey @robsworld78 I have been using 4 flow sensor that the calibration factor is 7.5 just bought 2 large diameter one and the is 4.5 .in your program it only allows for one. If I stay with the 7.5 what equation would I use to calculate the 4.5 into gallons per hour. Thank you for all your help.
If you set the script to output gallons per hour, just with the calibration factor of 7.5 instead of 4.5, you need a factor of 1.6666667 ( ~ 7.5 / 4.5 )
E.g. Correct Value = 1.666667*Incorrect Value
 

Wolfw28

Active Member
View Badges
Joined
Mar 13, 2022
Messages
201
Reaction score
138
Location
Myakka City
Rating - 0%
0   0   0
If you set the script to output gallons per hour, just with the calibration factor of 7.5 instead of 4.5, you need a factor of 1.6666667 ( ~ 7.5 / 4.5 )
E.g. Correct Value = 1.666667*Incorrect Value
So for Dummies like me just multiple the reading I get by 1.666667 and that the correct flow reading. Thank you again my friend.
 

Reefing threads: Do you wear gear from reef brands?

  • I wear reef gear everywhere.

    Votes: 15 19.5%
  • I wear reef gear primarily at fish events and my LFS.

    Votes: 2 2.6%
  • I wear reef gear primarily for water changes and tank maintenance.

    Votes: 0 0.0%
  • I wear reef gear primarily to relax where I live.

    Votes: 13 16.9%
  • I don’t wear gear from reef brands.

    Votes: 39 50.6%
  • Other.

    Votes: 8 10.4%
Back
Top