Hi all,
Lots of interesting ideas above!
I’ve finished my water tank level sensor and successfully read level in range, volume/litres, and %. My project is Wemos D1_mini based, and my level sensor is the JSN-SR20 (ultrasonic, waterproof, dual-sensor model of HC-SR04, around AU$8). This sensor has a dead band of ~5cm so can be readily mounted direct to the top of the tank - no cone or spacer required, simplifying installation. It also has a range over 4m, for those with tall tanks! I’ve added a DS18B20 for external air temp, to round things out, and a rainfall sensor to tell me when it’s raining.
To get reliability I’ve added the following parameters (not mentioned anywhere above, but in the sensor docs) for the ultrasonic sensor:
-
Pulse_time
extended to 20us. The default is 10us, whereas most sensors want a minumum of 20us. -
Timeout
set to 3m. The default is documented as 2m, but my sensor wouldn’t reliably report values over 1.80m without this.
I was getting regular “timeout” and “nan” values in my returns prior to adding these; none in the days since.
Others have noted time-of-day variability which would be temperature sensitivity - which I’m also seeing (tank level is currently 3cm overnight but 7cm when air temp is around 18C). There are arduino libraries to reduce temperature sensitivity, but not sure how to implement something like this in ESPHome. Has anyone had success in reducing temperature sensitivity?