2024-10-09 10:26 AM
Hello.
I’m utilizing the VL53L1 sensor to measure water level inside of a closed water bucket.
While using a 30cm tall white bucket half full, with the VL53L1 positioned at the top aiming down at the air-water interface, the sensor sometimes outputs incorrect distance values for long periods of time. During one test run, the sensor spent almost half an hour outputting distance values oscillating within a 1,5cm range around the real distance value, later stabilizing on the correct distance value. This kind of issue has happened multiple times already on similar tests.
Given the water level and surface is completely static, I was wondering whether there are any minimum range limitations, given I’m measuring distance to a liquid and also utilizing a small recipient. The only minimum distance information I was able to find on the sensor’s datasheet is its 4cm minimum guaranteed ranging system.
Thanks in advance.
Solved! Go to Solution.
2024-10-15 08:34 AM - edited 2024-10-15 09:19 AM
This conversation has drifted far from its origin. So after this let's open a new one.
Your problem stems from that wild swing in your signal strength. Assuming your environment is unchanging, that should not happen, but it clearly is. Our target is 20MCPS. And you have that on your good measurements, and half the time during the bad spots.
Before the sensor takes a new range, it goes through a Dynamic SPAD Selection. This DSS algo is going through some sort of oscillation. It decides the signal is not strong enough, adds more SPADs, then gets too strong a signal and goes back to the original number of SPADs. You get stuck in a non-converging cycle.
(SPAD is Single Photon Avalanche Diode array or the photon detectors.)
But you are lucky in one regard. Your scene is not changing all that much. You should never need to use that many SPADs.
Find out how many SPADs are allocated during the 'good measurements', add a few to account for a lower water measurement, and set that as your upper limit.
There is no specific 'max SPAD' setting, but there is a Region of Interest setting. Say you decided that 20 SPADs was your target. You could set your ROI to be a 4x5 region in the middle of your array.
Note that some SPADS are occluded, so maybe a 5x5 would work.
By limiting the max SPADS, the DSS will not make those wild decisions, and you should be all set.
2024-10-09 10:46 AM
The easy way to fix this is to switch to the VL53L4CD and try again.
So why?
The VL53L1 has a dual mode laser to get that wider field of view. And the outer area of the laser comes on just a touch after the main beam. Generally, this does not matter, but water is special.
When the photons hit the water dead on, they tend to bounce back. But if they hit as a slight angle, they will penetrate the liquid, hit the side or bottom of the bucket and reflect.
this issue is made worse by the fact that the photons are slowed down by the water.
The VL53L4CD avoids a lot of this issue by using a single-mode laser with an 18 degree FoV. So fewer photons hit at those wide angles.
If you are dead set on using the L1, you can reduce the Region of Interest. Specify only the 4x4 group of SPADS (Photon detectors) in the middle and you can avoid a lot of the stray photons.
If you want to be accurate to the bottom of the bucket, I suggest that you somehow blacken the bottom. It reduces the number of photons that reflect off the bottom.
- john
2024-10-09 07:15 PM
Hi,
In some circumstances, it can be practical to put a float in the water under the sensor, and range to it...
Kind regards
Pedro
2024-10-14 09:04 AM
Hello, thanks for the answers.
The easy way to fix this is to switch to the VL53L4CD and try again.
Unfortunately, I can't just swap the sensor. The tests I'm conducting are meant to evaluate at what conditions an already finished product using the sensor outputs correct measurements.
In some circumstances, it can be practical to put a float in the water under the sensor, and range to it...
Unfortunately, that's not an option as well.
If you are dead set on using the L1, you can reduce the Region of Interest. Specify only the 4x4 group of SPADS (Photon detectors) in the middle and you can avoid a lot of the stray photons.
If you want to be accurate to the bottom of the bucket, I suggest that you somehow blacken the bottom. It reduces the number of photons that reflect off the bottom.
I've been utilizing the "short" distance mode and a ROI of 16x16, as it had shown to be more stable than the 4x4 ROI, however I'll re-test using a smaller region.
I was already aware that undesired reflected photons and the white interior color could mess the sensor's measurement (as I'm about do graduate in engineering physics, which requires an in-depth study of light's behaviour). However, I'm trying to narrow down the practical limitations of the sensor, that's the reason for such a "worst case scenario" test.
On such scenario of water level measurement, is there a minimum liquid level or distance requirement for an accurate result? I found this answer regarding VL53L1 usage on a similar case when accessing its histograms, but none about usage without them.
2024-10-14 12:23 PM
The main difficulty is the sensor averages ALL the photons that are returned, including the ones that hit the sides, the water at odd angles and are slowed down.
But it's lucky for us that the photons that hit the water exactly perpendicular bounce back. From that we get the strongest signal.
But it also means that you are going to have to do a lot of calibration.
I'd fill the tank at a minimum of 10 levels. Then create a look-up table of actual vs measured.
Then interpolate between those points to get the true result.
It's going to take some work, but it can be done.
- john
2024-10-15 05:42 AM
Take a look at the graphs I attached to this reply.
For most of the test's duration, the sensor returns stable distance and signal intensity. Then, for long periods of time, both values oscillate around a random mean.
While calibrating the sensor like you mentioned would resolve a consistent measurement error, this isn't the case in the issue I'm facing. What I'm trying to figure out and want to know is if the behaviour highlighted on Figure_2 is due to measuring measuring water level on a white bottom recipient, measuring water level on a short recipient (30cm height) or if there is a different possible reason I'm not aware. Has a similar issue been brought up to you before when using this kind of sensor?
2024-10-15 08:34 AM - edited 2024-10-15 09:19 AM
This conversation has drifted far from its origin. So after this let's open a new one.
Your problem stems from that wild swing in your signal strength. Assuming your environment is unchanging, that should not happen, but it clearly is. Our target is 20MCPS. And you have that on your good measurements, and half the time during the bad spots.
Before the sensor takes a new range, it goes through a Dynamic SPAD Selection. This DSS algo is going through some sort of oscillation. It decides the signal is not strong enough, adds more SPADs, then gets too strong a signal and goes back to the original number of SPADs. You get stuck in a non-converging cycle.
(SPAD is Single Photon Avalanche Diode array or the photon detectors.)
But you are lucky in one regard. Your scene is not changing all that much. You should never need to use that many SPADs.
Find out how many SPADs are allocated during the 'good measurements', add a few to account for a lower water measurement, and set that as your upper limit.
There is no specific 'max SPAD' setting, but there is a Region of Interest setting. Say you decided that 20 SPADs was your target. You could set your ROI to be a 4x5 region in the middle of your array.
Note that some SPADS are occluded, so maybe a 5x5 would work.
By limiting the max SPADS, the DSS will not make those wild decisions, and you should be all set.
2024-10-15 09:01 AM
I think your reply was cut by the end, what did you mean to say at "But by limiting the "?