Am I implementing this liquid level detection right?
I am impementing a water level detection in the sub 1 meter range down to ~50 mm closest distance.
My environment is consistently pretty dark concerning visible light. There is no change in time of ambient light.
There is very little dynamics in level height. Bubbles and turbidity are no problem. Also I expect a relatively smooth surface.
I have to compensate for tilt and temperature changes. The container I am measuring in does not have mirroring walls or bottom.
Tilting angle can change +/- 15° in every direction and Temperature can change between 10°C and 30°C.
I decided to go with VL53L5CX over VL53L4CD as I would like to try compensate tilt with averaging over the complete FOV.
I do not have strong demands in accurate absolute distance measuring as I am wanting to calibrate the sensor with different liquid levels before putting it into action. As it is a quasi static measurement over time I need to achieve very repeatable results even with varying tilt and temperature. My measurements do need to lay within +/- 3 mm of actual distance after calibration repeatably.
The following are my current findings (note, all meaurements done without cover glass):
Temperature compensation: Not a big problem as offset of distance varies quite linear with change in temperature. ST noted in a white paper that offset due to temperature is independent from actual distance.
Tilt compensation: From a different post I recon @John E KVAM stating that it would be the best to only take the strongest signal for detecting water level. My findings are that with my demands I did achieve better results with only leaving out the edge pixels but averaging over the rest of pixels regardless of their signal strength. The nearer the surface gets to the sensor the more influence does tilt have on the measurement. My plan is to get tilt information of the 4 pixels strongest in signal forming a square. The further it gets out of the middle position the higher is the tilting angle.
Both compensations work relatively nicely on my desk.
- Can I derive real world behaviour from this?
- Am I going to be able to achieve measurements withing +/- 3 mm consistently with the VL53L5CX sensor in the environment descibed above?
- How much is the influence of VCC fluctuations? Is this a major concern with this sensor?
- Does the sensor behave as linear without a cover glass as with a cover glass applied in the sub 60 cm range after compensating XTalk?
- Would it be useful to weigh pixels according to their signal strength when averaging?
Thanks for discussing the topic!
