I have a water flow sensor that uses a rotor with a Hall sensor (ATS177 SIP-3 Hall effect sensor latch). The problem is that the rotor keeps spinning for some time after the water flow stops.

Video on the problem: https://youtu.be/33CNrsudbgc At 1 sec in the syringe stop but the rotor is still spinning.

I think this is a problem for all flowmeter sensor. Is this why they write that its a 10% error reading? If no how do they fix this with some algorithms? If this is the case. Can anyone help me how an algorithm will look like.

My question How do I solve this wrong measurements? Do I need to make a design change of the rotor case? If I need to make it work with some script, it’s more the general idea how the script will work. Not specific script language.

  • 1
    \$\begingroup\$ Erik Andershed - Hi, Please can you edit your question to add more details of the sensor, a schematic for your design, details of how you are reading the sensor, and exactly where you are stuck. You ask how to write "a script" but you don't specify a language (Python? Bash shell script? Something else?). Depending on your overall design, the solution might be code in another language or even some hardware changes, rather than a script. So although an algorithm similar to debouncing a push-switch is probably applicable, it would help readers if you can add more details & context. Thanks. \$\endgroup\$
    – SamGibson
    Sep 14, 2021 at 15:55
  • \$\begingroup\$ The only thing that would allow the rotor to keep spinning is if it were in air or a vacuum but then only for a short time. How do you know if the rotor is still spinning. Post a schematic of your test circuit, not a frizzy picture. \$\endgroup\$
    – Gil
    Sep 14, 2021 at 16:54
  • \$\begingroup\$ I’m voting to close this question because it's a software question - "How do I write a script", not an electronics question. \$\endgroup\$
    – brhans
    Sep 14, 2021 at 17:30
  • 1
    \$\begingroup\$ I will update this question with more data to show the problem tomorrow. Please wait \$\endgroup\$ Sep 14, 2021 at 19:37
  • 1
    \$\begingroup\$ @ErikAndershed - Hi, I watched the video, but at only 2 s long, it's too short & too "zoomed in" for me to properly see the flow of liquid around the various parts, to understand the system. Also clear liquid is hard to see. It's unclear which parts of the design are yours e.g. the rotating part? This seems to be more of a mechanical issue than an electronics one, if (as you seem to be saying) with stationary liquid the rotor is still moving - clearances too big? You seem unsure too, as you ask about whether to change the rotor case, but that's not an electronics problem, is it? Sorry. \$\endgroup\$
    – SamGibson
    Sep 16, 2021 at 6:46

1 Answer 1


I don't think you will find an off-the-shelf algorithm for this.

You will need to conduct an experiment with various flow rates, durations, ramp rates, etc, and measure the error in these cases. If you can quantify it, you can cancel it out.

Unfortunately the properties of the rotor may also change over time as the bushing wears, but if you want the best possible accuracy it's not uncommon to test and re-calibrate any sensor periodically.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.