Hello, I am trying to get a per day usage on my water tank. I have a 0-10v pressure sensor installed in the tank hooked up to a Shelly Uni and I then use a Compensation in Home Assistant to get a litre reading to display.
I want to get a total of the water used per day (resetting at midnight). I have tried using a utility meter but the quantity is no where near accurate. I think that it is counting water used every time the tank level changes slightly, if the level goes down 100 litres for a minute or so and then back up 100 litres it counts that as water used even though no water has been used. This obviously happens a lot throughout the day giving inaccurate readings. If I use no water throughout the day the usage will still say 1000 plus litres used.
Is there any way to set this up so that it will take a reading at midnight and keep comparing it to the current reading to give me a daily total.
Thanks.
If your sensor is inaccurately measuring the usage, and oscillating around a small threshold, maybe smoothing your data would be an option, otherwise measuring once a day, and the measurement is wrong does not seem to be attractive.
Is the measurement needed for both tank fill and use?
The Uni has 12bits resolution (4096 steps) but that is over a 30v range, and you only have a 10v sensor, so you are missing out on potential resolution.
Consider other options such as higher resolution AtoD converter, alternate methods of measurement such as tank levels using ultrasonic, TOF or LIDAR sensors, or water passing through an appropriately rated turbine pulse sensor to get more accurate results. Each of these solutions are widespread and relatively cheap to implement.