Just a thought: If a certain amount of liquid has been fed through the meter, the "propeller" in the meter will keep going for a while without liquid, due to inertia resulting in false pulses. An up-stream flow switch in series with signal wire will avoid this.
utoopuser, in "normal" use you would not have a case of "without liquid". Your pump for example would experience priming problems etc.. still yet the remaining wettness inside would avoid it to keep going. What you're suggesting is not applicable for taking instantaneous flow measurements. If you were measuring, lets say 20 liters, inertia would still not cause any problems at all too. Other things might imply but not inertia. How and why do you think you will have air in your water line?
thanks for your prompt reply. I was just watching your calibration methodology, but I missed the part where you replenished the supply bucket, hence the air question.
tonguç hocam selamlar YF-S201 sensörlü bir uygulama yapıyorum yardımınıza ihtiyacım var sıvıyı pompa ile bastırıyorum pompa diyaframlı tip hava basıncı ile calısıyor . pompa akısı degiştiginde akıs sensörü dogru saymıyor.ne yapabilirim
Hi, im doing the similar project. My problem is the sensor doesn't show any reading at all the water flow slow/small. i've been looking on the internet, all the suggestions lead to change sensor model. If i need to change the model which spec should i look into? Is the impeller size in the sensor effect the reading? my current water flow sensor model is SEN-HZ321WA.
Hi, That's a very good point. You should first consider your project to determine your water flow sensor specification requirements. You need to consider things like water pressure, approximate flow and pipe diameter. If you will only have to deal with low flow, you should probably use a smaller diameter sensor and pipe anyways. However, the rest of the code, procedure would be the same. Your only problem seems to be an inappropriate sensor. You probably need something like the following: www.aliexpress.com/wholesale?SearchText=HZ83C+flow+sensor
Good afternoon Sir I have a only one roof tank in that how to connect three floors Because I given for rental and also I want to check monthly so how much people are using water I just want to check in database in little. And also Example electricity bill will come some amount and also water what im going to do I will total those bill and I will split to all the floors according to flow sensor so kindly help me How to do sir
0:32 if this sensor works by just blowing air inside then it will detect water flow when there's no water in the line. I want to use this for water pump automation to work only when there is water coming in from the line. When the pump does run dry, im sure the air flow will fool the sensor and the pump will keep running. I need your thoughts on this.
Aun Raza You might not have that problem. I would want to see if your pump might be able to move the sensor. I was blowing very hard and the air flow needed to move the sensor I believe is much higher than the water flow it normally detects. In the worst case you might need to put something else in line next to the sensor in your case to detect when there is liquid in line because ultimately this is a flow meter not a liquid sensor.
Hi, actually I wanted to make a water billing system using rfid and water flow sensor.. what I need to do is as soon as I pour water through sensor the quantity flown is recorded and according to preset rates of the liquid user is asked for swiping the card so the required amount get deducted.. The main problem iam facing is handling interrupts of water flow sensor..How do I avoid continuous printing of water flown on serial monitor and coordinate my water flow loop with rfid loop
harshit rathod Your project actually is very similar to temperature loggig with a temperature sensor. since I understand from your comment that you need time information as well as the logged data, you need to consider the flow data or otherwise volume data being as always available similar to a temperature sensor. You just need to determine how often you need to log your data. if you try to determine for example each session of handwashing you might get faulty wash session data if someone turns on and off the water couple times for each hand wash so as a solution ultimately you simply need a log of water usage overtime. just determine how often you want cumulative volume to be recorded similar to electricity billing. add the rfid/used data as an additioanl field to your logs. i alwyas use a cheapo esp8266+wifi network for logging data to thingspeak.com. if you dont have wifi than sd card. usage is same. once you have data logged you need to make another program/web app/system etc to view your data. i hope this was helpful.
thanks for the video! Whenever I write a 1 to an Arduino from a raspberry pi, it sends me data over serial. If I now add an interrupt in the code for this flow meter...will this effect my attempts to get data from arduino when I write to it to get data to the pi?
Does it might have an effect that you connected the sensors in series? There is a work done against the propellers inside, and volume of the sensor cavity might alter the pressure? What do you think? My mind drifted to maybe be to connect them in parallel and use gravity as a constant force. Eline saglik :)
The biggest issue in my setup actually was the fluctuation of the mains voltage. So the biggest improvement to this setup would actually be done by adding a mains voltage regulator which would eliminate changes in pump performance and flow due to voltage fluctuation. Both the flow calculation and measurement had the same amount of sensors which has a zero effect in total. Similarly the 'Hydraulic Head' and the gravity effect was the same in both scenarios which also resulted in zero effect in total. If you have more than one sensor and want to measure all of them together, you should never connect them in parallel since you would be dividing the amount of water flowing by an unknown ratio and you can never be sure about how much flow you'll have on each sensor. In an ideal and unrealistic case you should have the flow divided by the number of parallel connections but that would never be the case in a real world case and it would only complicate your setup for no good reason. Teşekkürler ;-)
every time it gives different reading for example if i displaced 500ml(measured 500ml),it gives 0.42 L on second test it gives 0.63 L,on third test it gives 0.52 L for same amount of liquid of 500ml.. is there any way to resolve this issue??
Wasif Ahmed, some fluctuation is expected due to noise from sensor components material and design quality however, another reason could be due to mains voltage fluctuation depending on your location and quality of electrical service provided. Try using a voltage regulator on your pump while determining the calibration coefficient for your specific sensor. Also watch the source water level, if level changes that will affect the flow rate due to head loss.
if you want to use it for the total water amount, I think it's a much better approach to simply count the total pulses rather than dealing with averages and flow to total conversion etc.
Hi, very nice video, is it possible to determine the accuracy of this solution? if it is put beside a water meter, will they show the same water consumption?
Thnx a lot. The specification for this sensor says: error:±5%. However, I think that error is the variance from sensor to sensor. I'm not sure if the values I obtained could be obtained by a professional calibration service. However, I think to get calibration values with higher sensitivity, a voltage regulator should be used for the water flow pump to avoid voltage fluctuations negatively affecting flow stability. Also, I don't know if the calibration values of these sensors drift in time or they stay same and their variance from one another is only due to fabrication. I will check again maybe in another 6 or 8 months and see if these calibration values change in time. They are $3~$4 and I think they are great for that price. I use them to monitor performance and determine maintenance time for my aquarium filters.
Also, in my video at 10:10 I was able to adjust and set the calibration value for the flow from 4.46lpm to 4.49lpm which equates to a stable adjustment with 1% sensitivity. I think that's awesome for a $4 flow sensor ;-)
mohammed alsheikh, let's consider you're calculating flow every 1 second, then the amount of water passed is equal to the flow rate (L/sec) since second is 1. So just add that amount to a variable every second and you'll have total water amount.
ivan janka, i think this was clearly explained in the video. The sensor outputs pulses relative to the flow. You can use whatever unit you want. In my example i used liters per minute but you can use gallons per hour if you like.
There shouldn't be any reason why you shouldn't be able to do the same in a raspberry pi. However I consider raspberry pi to be a lot more expansive and unnecessarily more complex than using a simple micro-controller. You have to deal with an operating system, possible file corruption due to power loss, boot issues, security etc. I would consider a raspberry pi a bit of an overkill for this application however it should still work. I also wouldn't really expect to get great performance with using an interpreted language/environment such as PHP which sits on top of an OS for interrupt driven time sensitive measurements which is done very easily with a micro-controller as in an Arduino since the code is executed and interrupts are measured very close to the GPIOs. There is nothing in between your code and the chip pins. Your code only has some performance overhead caused by the C compiler. The only way to make this measurement any better on an Arduino would be to write the code in machine language which would actually be very cool in my opinion since the code would be run very efficiently without any overhead but definitely another overkill too :-)
Как у Вас со стабильностью показаний, плавают? Я заметил что в зависимости от давления, значение имп/литр изменяется. Делал так ua-cam.com/video/zfS6MxKpct8/v-deo.html
Hey! This is the best flow sensor video in the internet! Thanks a lot man. 🙏
Thanks a lot. I'm planning on making another one with more info.
@@Mr_ToR That would be great 👍
Superb Video for newer and lerner
Just a thought: If a certain amount of liquid has been fed through the meter, the "propeller" in the meter will keep going for a while without liquid, due to inertia resulting in false pulses. An up-stream flow switch in series with signal wire will avoid this.
utoopuser, in "normal" use you would not have a case of "without liquid". Your pump for example would experience priming problems etc.. still yet the remaining wettness inside would avoid it to keep going. What you're suggesting is not applicable for taking instantaneous flow measurements. If you were measuring, lets say 20 liters, inertia would still not cause any problems at all too. Other things might imply but not inertia.
How and why do you think you will have air in your water line?
I was thinking of your calibration methodology, not real time. I missed the part where you were replenishing your feeder bucket.
thanks for your prompt reply.
I was just watching your calibration methodology, but I missed the part where you replenished the supply bucket, hence the air question.
instead of quantity can i use it for getting measurements for fluctuations in flow rate?
Can you share same for Nodemcu ESP8226 v3? I am having issues while calibrating
is there any chance you can kindly share the 3rd example for the two flow meters at the same time ?
tonguç hocam selamlar YF-S201 sensörlü bir uygulama yapıyorum yardımınıza ihtiyacım var sıvıyı pompa ile bastırıyorum pompa diyaframlı tip hava basıncı ile calısıyor . pompa akısı degiştiginde akıs sensörü dogru saymıyor.ne yapabilirim
Hi, im doing the similar project. My problem is the sensor doesn't show any reading at all the water flow slow/small. i've been looking on the internet, all the suggestions lead to change sensor model. If i need to change the model which spec should i look into? Is the impeller size in the sensor effect the reading? my current water flow sensor model is SEN-HZ321WA.
Hi, That's a very good point. You should first consider your project to determine your water flow sensor specification requirements. You need to consider things like water pressure, approximate flow and pipe diameter. If you will only have to deal with low flow, you should probably use a smaller diameter sensor and pipe anyways. However, the rest of the code, procedure would be the same. Your only problem seems to be an inappropriate sensor. You probably need something like the following:
www.aliexpress.com/wholesale?SearchText=HZ83C+flow+sensor
sir what type or name of tube you used to connect with flow sensor? thanks
hello sir, i have some questions, how u get the calibration factor in 6.9?, please answer this question, thanks
Halo, do already know to get the calibration factor? Please let me know how to
good vid bro thanks for all the help
Good afternoon Sir I have a only one roof tank in that how to connect three floors Because I given for rental and also I want to check monthly so how much people are using water I just want to check in database in little.
And also Example electricity bill will come some amount and also water what im going to do I will total those bill and I will split to all the floors according to flow sensor so kindly help me How to do sir
how can I get the Volume of water flowed by sensor?
but i want total only after the water got flowed through the sensor..kindly help me
Great video.
0:32 if this sensor works by just blowing air inside then it will detect water flow when there's no water in the line. I want to use this for water pump automation to work only when there is water coming in from the line. When the pump does run dry, im sure the air flow will fool the sensor and the pump will keep running. I need your thoughts on this.
Aun Raza You might not have that problem. I would want to see if your pump might be able to move the sensor. I was blowing very hard and the air flow needed to move the sensor I believe is much higher than the water flow it normally detects. In the worst case you might need to put something else in line next to the sensor in your case to detect when there is liquid in line because ultimately this is a flow meter not a liquid sensor.
@@Mr_ToR trying to detect liquid is exactly what i want to do but I don't know what i should use. I'm not sure if i can get a flow switch that small.
Hi, actually I wanted to make a water billing system using rfid and water flow sensor.. what I need to do is as soon as I pour water through sensor the quantity flown is recorded and according to preset rates of the liquid user is asked for swiping the card so the required amount get deducted.. The main problem iam facing is handling interrupts of water flow sensor..How do I avoid continuous printing of water flown on serial monitor and coordinate my water flow loop with rfid loop
harshit rathod Your project actually is very similar to temperature loggig with a temperature sensor. since I understand from your comment that you need time information as well as the logged data, you need to consider the flow data or otherwise volume data being as always available similar to a temperature sensor. You just need to determine how often you need to log your data. if you try to determine for example each session of handwashing you might get faulty wash session data if someone turns on and off the water couple times for each hand wash so as a solution ultimately you simply need a log of water usage overtime. just determine how often you want cumulative volume to be recorded similar to electricity billing. add the rfid/used data as an additioanl field to your logs. i alwyas use a cheapo esp8266+wifi network for logging data to thingspeak.com. if you dont have wifi than sd card. usage is same. once you have data logged you need to make another program/web app/system etc to view your data. i hope this was helpful.
You know that flow sensor attaches to a device that digitally shows the flow in GPH/LPH, right?
thanks for the video! Whenever I write a 1 to an Arduino from a raspberry pi, it sends me data over serial. If I now add an interrupt in the code for this flow meter...will this effect my attempts to get data from arduino when I write to it to get data to the pi?
Hi. I found your test from one sensor im github but i cant get the final code from two sensors. Can you please share with us that code? Thanks
did you find code for two sensors? i need too!!
Same here
Does it might have an effect that you connected the sensors in series? There is a work done against the propellers inside, and volume of the sensor cavity might alter the pressure? What do you think?
My mind drifted to maybe be to connect them in parallel and use gravity as a constant force.
Eline saglik :)
The biggest issue in my setup actually was the fluctuation of the mains voltage. So the biggest improvement to this setup would actually be done by adding a mains voltage regulator which would eliminate changes in pump performance and flow due to voltage fluctuation. Both the flow calculation and measurement had the same amount of sensors which has a zero effect in total. Similarly the 'Hydraulic Head' and the gravity effect was the same in both scenarios which also resulted in zero effect in total. If you have more than one sensor and want to measure all of them together, you should never connect them in parallel since you would be dividing the amount of water flowing by an unknown ratio and you can never be sure about how much flow you'll have on each sensor. In an ideal and unrealistic case you should have the flow divided by the number of parallel connections but that would never be the case in a real world case and it would only complicate your setup for no good reason.
Teşekkürler ;-)
I have a similar issue with YF-S401 flow sensor, he is not showing smooth changes of voltages when I blow slow or fast
I bought 6 of them and all have different calibration values.
sir we have new designee flow sensor requirement than mail me vishal@broiltech.com
every time it gives different reading for example if i displaced 500ml(measured 500ml),it gives 0.42 L
on second test it gives 0.63 L,on third test it gives 0.52 L for same amount of liquid of 500ml..
is there any way to resolve this issue??
Wasif Ahmed, some fluctuation is expected due to noise from sensor components material and design quality however, another reason could be due to mains voltage fluctuation depending on your location and quality of electrical service provided. Try using a voltage regulator on your pump while determining the calibration coefficient for your specific sensor. Also watch the source water level, if level changes that will affect the flow rate due to head loss.
if you want to use it for the total water amount, I think it's a much better approach to simply count the total pulses rather than dealing with averages and flow to total conversion etc.
good project
Interesting. Thanks.
Hi, very nice video,
is it possible to determine the accuracy of this solution? if it is put beside a water meter, will they show the same water consumption?
Thnx a lot. The specification for this sensor says: error:±5%. However, I think that error is the variance from sensor to sensor. I'm not sure if the values I obtained could be obtained by a professional calibration service. However, I think to get calibration values with higher sensitivity, a voltage regulator should be used for the water flow pump to avoid voltage fluctuations negatively affecting flow stability. Also, I don't know if the calibration values of these sensors drift in time or they stay same and their variance from one another is only due to fabrication.
I will check again maybe in another 6 or 8 months and see if these calibration values change in time.
They are $3~$4 and I think they are great for that price. I use them to monitor performance and determine maintenance time for my aquarium filters.
Also, in my video at 10:10 I was able to adjust and set the calibration value for the flow from 4.46lpm to 4.49lpm which equates to a stable adjustment with 1% sensitivity. I think that's awesome for a $4 flow sensor ;-)
Thanks for the reply... I hope I can use this sensor in my home to help me find any abnormal water usage... :-)
no problem. watch out for the water pressure since the sensor is rated 2Mpa = 20 Bar which should be ok for most cases anyways.
how to change the pins?
byte sensorInterrupt = 0; // 0 = digital pin 2? if i want it to be on pin 7 wut is sensorinterrupt?
ivan janka, www.arduino.cc/reference/en/language/functions/external-interrupts/attachinterrupt/
Tonguç Endem thanks!
Hello Endem, am having a problem programming two flow rate sensors. Please share your test3 code. Thank you
lol
Thanks you!!!
You shouldn't use millis function. the more time pass, the more the calculation duration becomes high and the calcul become bad
how to calculate the amount of water from the flowmeter reading? thanks
mohammed alsheikh, let's consider you're calculating flow every 1 second, then the amount of water passed is equal to the flow rate (L/sec) since second is 1. So just add that amount to a variable every second and you'll have total water amount.
sir how to calculate the calculation factor.please we badly need it
benjie pagolong, which part of the video is unclear? If you have problem doing this, use the supplied value from manufacturer spec. sheet
im sorry.in the calibration part sir.
what is the unit of the output? ml/h? l/h? ml/s?
ivan janka, i think this was clearly explained in the video. The sensor outputs pulses relative to the flow. You can use whatever unit you want. In my example i used liters per minute but you can use gallons per hour if you like.
could i have the code for the two sensors?
Im searching the same
hi sir do have like this project in raspberry pi 3?
There shouldn't be any reason why you shouldn't be able to do the same in a raspberry pi. However I consider raspberry pi to be a lot more expansive and unnecessarily more complex than using a simple micro-controller. You have to deal with an operating system, possible file corruption due to power loss, boot issues, security etc. I would consider a raspberry pi a bit of an overkill for this application however it should still work. I also wouldn't really expect to get great performance with using an interpreted language/environment such as PHP which sits on top of an OS for interrupt driven time sensitive measurements which is done very easily with a micro-controller as in an Arduino since the code is executed and interrupts are measured very close to the GPIOs. There is nothing in between your code and the chip pins. Your code only has some performance overhead caused by the C compiler. The only way to make this measurement any better on an Arduino would be to write the code in machine language which would actually be very cool in my opinion since the code would be run very efficiently without any overhead but definitely another overkill too :-)
thanks you.!!! ^^
Как у Вас со стабильностью показаний, плавают? Я заметил что в зависимости от давления, значение имп/литр
изменяется. Делал так ua-cam.com/video/zfS6MxKpct8/v-deo.html
Hi. I found your test from one sensor im github but i cant get the final code from two sensors. Can you please share with us that code? Thanks