Water flow sensor, YF-S401, YF-S402, Flow meter, air from the pump
Hi, I have a problem with the flow meter
Generally the flow meter catches air, which makes me unable to take accurate measurements.
Correction, maybe not so much that the flow meter is catching air, because there is no signal on the logic state analyser during air. The signal is only there when water is actually flowing.
I am attaching a screenshot where I have set the pump to take a measured 20ml three times, and let's say this would agree with the measurements I used to take "dry", i.e. without a water pump just pouring into the sensor And then it agreed that:
ML = totalImpulses * 0.48 ;

I got rid of the pins that the water pump was giving by adding a 10nF capacitor between the pump supply

Below I attach the code I uploaded to the STM32L432KCU6 nucleo
And the stm32CUBEide settings

The components I am using:
* Pump: https://botland.store/pumps/7206-liquid-pump-12v-110l-h-7mm-5904422335595.html
Video:
https://drive.google.com/file/d/1n6x9XY8-xxHOtbEWO173gqmJYZqNjTSB/view?usp=sharing
Does anyone know what I am doing wrong? How do I correctly count the liquid already flowed?
