Dear All,
I have a basic setup where I measure the level and the flow rate of a water reservoir (which is located far from my house) and transmit these values to a receiver located in my house.
I am using two Arduino ProMicro boards and two nRF24L01+ for the RF link.
The system is working fine, but, for some unknown reason I have to add an "empirical correction factor" to correct the flow rate displayed.
I started using the FlowMeter sketch from Sebastian Kraus (GitHub - sekdiy/FlowMeter: Arduino flow meter library that provides calibrated liquid flow and volume measurement with flow sensors.) and noticed that the displayed value was off by about 30%.
Since I could not find the mistake and there was no reference to this behaviour on the Internet, I decide to try another code.
I choose to use one from Jaycar (Jaycar Water Flow Gauge | Freetronics).
My thought was that since it was used in a "comercial product", it should have been tested by many buyers and all mistakes been corrected.
To my surprise, I need also to use a correction factor in this case.
I test the setup by injecting a pulse stream of known frequency to simulate the hall sensor output for the flow measuring device, which is a YF-S201.
According to the datasheet: Q(l/m) = F(Hz) / 7
But to obtain the correct values I have to multiply the calculated value by 1.636.
Another strange behaviour that I noticed is that this "correction factor" is dependent of the code used, because I have, in fact, two reservoirs that I monitor and each transmitter side measures different variable an use very different codes (apart from the flow measurement snippet).
My guess is that this issue is caused by the use of the RFnetwork.h or other part of the code that interferes with the interrupt, but the Jaycar code is supposed to correct for that.
Any ideas?
best regards,
Roger
YF-S201.pdf (50 KB)
Caixa_Superior_NewFlow_rev_1.ino (10.9 KB)