I have assembled a YF-B10 flowmeter and doing tests to perform the calibration I have realized that it measures differently depending on the flow that I tap.
I have filled a 0.5 liter bottle by opening the tap with a slow and fast flow.
But the equipment does not repeat the number of pulses that it counts for every 0.5 liters.
Can you tell me if something is missing or is the equipment not working well?I pass you the records of the number of pulses that it registers in 60 seconds, reaching 0.5 liters at different filling speeds.
test 1: 0,5liters ā 19 pulsos (tap 25% open)
test 2: 0,5liters ā 82 pulsos (tap 100% open)
test 3: 0,5liters ā 36 pulsos (tap 50% open)
test 4: 0,5liters ā 54 pulsos (tap 50% open)
test 4: 0,5liters ā 28 pulsos (tap 25% open)
test 4: 0,5liters ā 69 pulsos (tap 100% open)
With this variation of pulses depending on the demand, how can I calibrate the equipment to measure correctly?
'[09:44:03][D][pulse_counter:160]: 'consumo agua litros': Retrieved counter: 19.00 pulses/min
[09:44:03][D][sensor:113]: 'consumo agua litros': Sending state 19.00000 pulsos with 2 decimals of accuracy
[09:45:03][D][pulse_counter:160]: 'consumo agua litros': Retrieved counter: 82.00 pulses/min
[09:45:03][D][sensor:113]: 'consumo agua litros': Sending state 82.00000 pulsos with 2 decimals of accuracy
[09:48:03][D][pulse_counter:160]: 'consumo agua litros': Retrieved counter: 36.00 pulses/min
[09:48:03][D][sensor:113]: 'consumo agua litros': Sending state 36.00000 pulsos with 2 decimals of accuracy
[09:51:03][D][pulse_counter:160]: 'consumo agua litros': Retrieved counter: 54.00 pulses/min
[09:51:03][D][sensor:113]: 'consumo agua litros': Sending state 54.00000 pulsos with 2 decimals of accuracy
[09:53:03][D][pulse_counter:160]: 'consumo agua litros': Retrieved counter: 28.00 pulses/min
[09:53:03][D][sensor:113]: 'consumo agua litros': Sending state 28.00000 pulsos with 2 decimals of accuracy
[09:56:03][D][pulse_counter:160]: 'consumo agua litros': Retrieved counter: 69.00 pulses/min
[09:56:03][D][sensor:113]: 'consumo agua litros': Sending state 69.00000 pulsos with 2 decimals of accuracy'
If Q is the number of pulses then then from that equation the number of pulses is not linearly proportional to the flow rate, as assumed by the pulse counter. You will have to apply this:
I understand what you are saying, but I donāt see much sense that since the flow is not linear, does the formula say that multiplies the flow by 8 and subtracts 6?
new pulses/min= (6 * Q-8)
It does not say under what circumstances to push the regression.
this feels like an old thread, and i might be a little of topic here, but i came across it as it was the closes to what i am looking for.
i just started implementing the same sensor (not sure about the exact same āpulse counterā in it, as mine says its Flow rate : 1~30L/min), and need some help with the calibrations.
can someone share the steps for the calibration?
how do i figure my ālambda returnsā filter equation?
i got this sensor of aliexpress, and surprisingly enough - seller does not have any other info to give me as far as āQā goes. honestly - not really sure what it means myselfā¦ so donāt really know what to ask him to find out for meā¦
so i figured ill try our community instead, and figure this out for ourselvesā¦
Hi @tom_l
Thank you for that solution! If I write the lambda, I donāt need to do the measurement and write the calibration lines? Right now, I find crazy values ! Like 155 billion liters per minute with the lambda formula you gave.
What happens if the flow is getting more than 50 L per minute ? It is just imprecise but should stay more or less on the same curve, no?
No. The manufacturer has only specified an equation for the range 2-50 L/min. Outside that range it is uncharacterised. It could even stop being proportional.
Hi,
Iā, also struggeling with calibration of that device for some time. I follewd approach suggested by @tom_l .
y=Q(6Q-8).
I adapted it to my own project on Arduino as:
There seems to be 2 variants of the sensor: one with f=6xQ-8, the other one with f=8xQ-4.
f is the pulse frequency (pulses/second) and Q is the water flow in liters/minute.
For a water flow of 10 liters/minute you get 6x10-8=52 pulses/second or 3,120 pulses/minute, i.e. 312 pulses per liter. For the other variant itās 456 pulses per liter.
Somewhere, I also saw 476 pulses/liter (which is within the 5% margin of error of 456).
Deviding pulses/minute or the number of total pulses by this number gives you Liter/minute or total liter.
By the way, my sensor also works with 3.3 V input voltage (not to overload the ESP32). My (unprofessional) measurements were 470 pulses per liter, independent of the flow speed or flow/minute.
@Marc77 I got the YF-B10 and in the description of aliexpress it states:
F = 8Q - 4 and 476 pulses per liter.
Which formula did you use in your yaml?
Actually Iām using:
return (x + 4)/8/60;
I also read and saw that if I have X=0, the function doesnāt go to 0. A solution that I read is to put this condition to take in account the fact the range is 2-50 l/min
platform: pulse_counter
pin: x
unit_of_measurement: āl/minā
name: āLiter per minuteā
filters:
multiply: 0.001680672269
total:
unit_of_measurement: ālā
name: āTotal no of Literā
filters:
multiply: 0.001680672269
Its not very accurate in my case:(
Stream range: 2~50L|MIN$5%
Specification
Model: YF-B10
Interface size: G1
Rated voltage: DC3.5~24V
Inner/Outer Diameter: 24.38mm/32.9mm
Thread length: 13mm
Material: Stainless steel
Water pressure resistance: >1.75MPa
Output pulse high level: >DC4.7V (input voltage DC5V)
Output pulse duty cycle: 50%10%
Insulation resistance: >100M2
Stream range: 2~50L|MIN$5%
Airtightness: close each hole, add 1.7Mpa water pressure test for 1 minute without leakage and deformation Stream pulse characteristics: F=(10*Q-4)Ć·5%, F is the frequency Q is L/Min, that is, 595 pulses per liter of water