I built a water level sensor for my 80,000 litre water tank based on the JSN-SR04T-2.0 ultrasonic sensor about six months ago. It is powered by 3 AA alkalines and therefore relies on being in sleep mode for most of the time.
![alt text]( image url)
I have experienced similar problems to many on this forum with the apparent unreliability of this sensor. In general the device spends most of the time reporting the correct water level but then has episodes of spurious reading which normally present as a depth to water level of around 220 mm. I had been thinking that I was plagued with condensation effects and I have been attending to reducing condensation with some limited success. In the last few days I have been seeing a pattern where temperature change might be influencing rogue behaviour.
I have included a thermistor in my water level sensing package so that I can do some temperature compensation of readings. This has the spin-off that I can monitor the air temperature in the tank. I have noticed over the last 5 or so days a distinct pattern where the 220 mm anomalous reading occurs when the temperature is in the range of say 13 degrees to 20 degrees celsius. Looking at the attached chart which superimposes temperature and depth to water readings it can be seen that the correct water level is being reported over night but as the morning warms up it goes bad when the temperature hits 12 to 15 degrees and stays bad until the temperature warms up to about 20 degrees. The reading then stays good during the middle of the day but as the temperature falls below 20 degrees the reading goes bad again and stays bad until the temperature has fallen to below 12 degrees or so.
I would be very interested to learn of anyone else who has observed a similar temperature influence on water level readings.