Is there a way to add a water flow sensor to the system to detect if water is flowing or not? I’d be nice to have with in the app to be able to know if water has blocked or turned off
If I well understood, you will have two flow sensors, one close to the "tap" and the other to the "well".
Assuming you are using the flow sensor I have listed in the hardware page of my website, the system can read the sensor frequency, so the number of rotation of the sensor per minute which is related to the flow, you can have two graphs one for each sensor.
Dear Angelo!I would have a question about how I want to measure a "tap water" amount from a flow sensor and how much a "well water" amount is consumed.Can I set this up somehow, and can I put a separate viewer on this home page?I apologize for the amateurism I am a beginner in the subject.Regards Attila
Well, this is something I also evaluated when I was implementing the circuit.
According to specs, the GPIO PIN of the Raspberry supports up to 3.3v. If you connect the flow sensor to the 5v, it indeed provides an output around 4.2v which is quite high for the GPIO PIN, first I used a small resistor partition to reduce the voltage and it worked ok.
In later testing I forgot to use this voltage divider (yes, I hate that) but everything still worked properly and I just decided to not use it anymore. Now it's connected to my system for months and things still working properly.
You can also power the sensor with the 3.3v, but I did not test it.
Conclusion: Yes you should use something to reduce the voltage if you want to be safe. If you do not use it, then you stretch the limit of the board but still works.
Please note that I made some changes in the latest SW releases respect to the video. In case you need to make some specific configuration, let me know, I'll support.
Hello, congratulations on your fantastic project!! I wanted to use the water flow sensor in my irrigation system design and watched the video you linked in the post above. You mention that you used 5V and GND connections on the Rpi to power the sensor and a GPIO pin for data. However, I came across another video on the subject where an author advises to use a voltage divider circuit to protect the Rpi against the damage:
The testing is made with one single Water Flow sensor, but the system can handle multiple sensors. Just in case multiple sensors are used at same time, performances at high water flow might be affected, in case multiple sensors are used in different time, no performance degradation should be expected.
After some SW optimization I reached a counting speed of about 40 pulses per second. if each pulse is equivalent to 2.25 ml, the max water speed flow that the system can reliably measure is one liter per 11.1 second. This is quite slow for the capacity of the raspberry and mostly is due to the python code and my program itself which is build to be more general purpose.
For higher performances it should be possible to introduce some more hardware like for example the Attiny micro-controller to act as a counter for the raspberry.
Anyway for the current solution without additional hardware I'll get more accurate numbers when finally I get the flow sensor for testing.
Here some updates about the water flow sensor support. The sensor provides "pulses" every given amount of water passing through it. The standard way to detect the pulses is to count the raising or falling edge of the pulse which is then sent as an interrupt to the controller (in this case the raspberry). I made some testing with interrupt detection on the raspberry, first testing purpose was to assess the speed at which the raspberry could detect consecutive interrupts reliably. Have to say that being the raspberry a full computer, I was expecting a quite slow interrupt interval detection, and it was. Now I'm trying some tricks to optimize the code. Anyway still waiting to test with real sensor which is not arrived yet.
This is the irrigation system I will install, so you have our full support to any doubt about the interaction and needs.Please include the option to add as many valves and Flow Sensors that the irrigation design could need.Best regards and Happy New Year!!Roberto C
The sensor comes with three wires: red (5-24VDC power), black (ground) and yellow (Hall effect pulse output). By counting the pulses from the output of the sensor, you can easily track fluid movement: each pulse is approximately 2.25 milliliters. Note this isn't a precision sensor, and the pulse rate does vary a bit depending on the flow rate, fluid pressure and sensor orientation. It will need careful calibration if better than 10% precision is required.This sensor work for fertilizer dosing or water volume in a tank.
For example: I have an hydroponic crop of 250 strawberry plants that requieres 250 Liter of irrigation water. I have 4 tank stock solution that I need that should be dosed at 1%. So, I will need 2.5 Liter of stock solution from each tank per irrigation cycle.
To solve the problem I can install in each tank an electrovalve with a flow sensor to calculate the amount of solution that is supplying the Tank and when the sensor complete the amount of cycles that I select in the interface for the amount of solution, the system close the electrovalve and continue with the filling of the principal irrigation tank with 250 liter.
Hi,
The goal would be to know how many L we might use this for a limit setting later.
Hi There,
If I well understood, you will have two flow sensors, one close to the "tap" and the other to the "well".
Assuming you are using the flow sensor I have listed in the hardware page of my website, the system can read the sensor frequency, so the number of rotation of the sensor per minute which is related to the flow, you can have two graphs one for each sensor.
If this is the case I can provide the setting.
Ciao,
Angelo
Dear Angelo! I would have a question about how I want to measure a "tap water" amount from a flow sensor and how much a "well water" amount is consumed. Can I set this up somehow, and can I put a separate viewer on this home page? I apologize for the amateurism I am a beginner in the subject. Regards Attila
Hello,
Well, this is something I also evaluated when I was implementing the circuit.
According to specs, the GPIO PIN of the Raspberry supports up to 3.3v. If you connect the flow sensor to the 5v, it indeed provides an output around 4.2v which is quite high for the GPIO PIN, first I used a small resistor partition to reduce the voltage and it worked ok.
In later testing I forgot to use this voltage divider (yes, I hate that) but everything still worked properly and I just decided to not use it anymore. Now it's connected to my system for months and things still working properly.
You can also power the sensor with the 3.3v, but I did not test it.
Conclusion: Yes you should use something to reduce the voltage if you want to be safe. If you do not use it, then you stretch the limit of the board but still works.
Please note that I made some changes in the latest SW releases respect to the video. In case you need to make some specific configuration, let me know, I'll support.
Regards,
Angeloi
Hello, congratulations on your fantastic project!! I wanted to use the water flow sensor in my irrigation system design and watched the video you linked in the post above. You mention that you used 5V and GND connections on the Rpi to power the sensor and a GPIO pin for data. However, I came across another video on the subject where an author advises to use a voltage divider circuit to protect the Rpi against the damage:
https://youtu.be/wpenAP8gN3c?t=118
I couldn't quite follow why is he doing that, what is your opinion?
Thanks again.
Finally I got the water flow sensor and made some testing/integration.
Uploaded a video with the testing and the configuration info:
https://youtu.be/knE6Wkhxe4g
The testing is made with one single Water Flow sensor, but the system can handle multiple sensors. Just in case multiple sensors are used at same time, performances at high water flow might be affected, in case multiple sensors are used in different time, no performance degradation should be expected.
After some SW optimization I reached a counting speed of about 40 pulses per second. if each pulse is equivalent to 2.25 ml, the max water speed flow that the system can reliably measure is one liter per 11.1 second. This is quite slow for the capacity of the raspberry and mostly is due to the python code and my program itself which is build to be more general purpose.
For higher performances it should be possible to introduce some more hardware like for example the Attiny micro-controller to act as a counter for the raspberry.
Anyway for the current solution without additional hardware I'll get more accurate numbers when finally I get the flow sensor for testing.
Here some updates about the water flow sensor support. The sensor provides "pulses" every given amount of water passing through it. The standard way to detect the pulses is to count the raising or falling edge of the pulse which is then sent as an interrupt to the controller (in this case the raspberry). I made some testing with interrupt detection on the raspberry, first testing purpose was to assess the speed at which the raspberry could detect consecutive interrupts reliably. Have to say that being the raspberry a full computer, I was expecting a quite slow interrupt interval detection, and it was. Now I'm trying some tricks to optimize the code. Anyway still waiting to test with real sensor which is not arrived yet.
I'll keep the post updated.
Thanks for showing the project, I'll update this post when the SW will start to support the flow sensor.
Happy New Year!
Angelo
Hydrosys4, I would be more than happy to help you improve the system. https://youtu.be/siFtoSSAaR8
This is the irrigation system I will install, so you have our full support to any doubt about the interaction and needs. Please include the option to add as many valves and Flow Sensors that the irrigation design could need. Best regards and Happy New Year!! Roberto C
I am glad to read this wonderful article.
Hi!
The sensor comes with three wires: red (5-24VDC power), black (ground) and yellow (Hall effect pulse output). By counting the pulses from the output of the sensor, you can easily track fluid movement: each pulse is approximately 2.25 milliliters. Note this isn't a precision sensor, and the pulse rate does vary a bit depending on the flow rate, fluid pressure and sensor orientation. It will need careful calibration if better than 10% precision is required. This sensor work for fertilizer dosing or water volume in a tank.
For example: I have an hydroponic crop of 250 strawberry plants that requieres 250 Liter of irrigation water. I have 4 tank stock solution that I need that should be dosed at 1%. So, I will need 2.5 Liter of stock solution from each tank per irrigation cycle.
To solve the problem I can install in each tank an electrovalve with a flow sensor to calculate the amount of solution that is supplying the Tank and when the sensor complete the amount of cycles that I select in the interface for the amount of solution, the system close the electrovalve and continue with the filling of the principal irrigation tank with 250 liter.
Looks like an interesting feature to add, I'm not so familiar with sensor flows, do you have something to suggest?
Thanks