2022-11-29 05:51 AM
Hi,
I am getting started with VL53L4CD so as to improve our system under ambient daylight conditions, which is performing poorly due to current sensor VL6180x under such condditions.
My application is:
I have found some range results that are not documented in API (values 7 and 255):
DEBUG LIMITS [MP: 5] [Signal min: 1496] [Sigma max: 45] [ROI with: 4]
-DEBUG-: [ 32,911 s] DATA: Status = 7, Estimated distance = 396 mm, Signal = 13080 kcps, AmbSignal = 3888 kcps, Sigma = 26 mm
-DEBUG-: [ 32,917 s] RANGE KO
-DEBUG-: [ 32,921 s] [L1] : No detect !
I am using UltraLow power driver [en.STSW-IMG034].
I have tested in ambient light conditions and found some troubles comapred to indoor results.
I would like to know if there are specific settings for ambient daylight conditions? If so, could you share it so I can test them?
Regards, Ramón.
2022-11-29 06:03 AM
Ramón -
You have stumbled across the most difficult situation - sunlight.
The ToF system works by emitting a tiny bit of 940nm light, which hits the target and bounces back.
But the sun emits a lot of 940nm light - along with every other frequency.
And that 'ambient' light triggers the photon detectors, and with enough sunlight, there is no way to find the signal we are looking for.
Do you neeed the ULP driver - or was that just the handy one?
I would think the normal driver would work to 130mm or so. Even in sunlight.
It does use more power - unfortunately.
But try the normal driver - and if it works for you, there is a power setting in the ULP driver that wil get you closer to normal driver.
So if you read high ambient, then you can turn up the power to get a detect. And you can turn it down when the ambient is low.
Would that work for you?
2022-11-29 07:36 AM
Hi John,
Thanks for your superfast answer.
We have not tried yet in the final housing with glass cover and all, but I wanted to check that we are in the right path and see if custom setting can help.
Yes, I can try the normal driver. I think you mean the IMG026, right?
In case we want to detect this situation where sunligth is higher than normal we could use the
ambLigth
value extracted from the ranging result, right?
I will get back when tested.
Regards, Ramon.
2022-11-29 08:47 AM
Exactly correct. As you dig into it you will notice that the ULP adn the ULD are really similar. The ULP is just tuned to integrate for a really short period of time. So short, you really don't get much accuracy.
But it does save a lot of power. My guess is you can increase the timing budget (integration) to where you get an OK answer in sunlight. And you can alter the timing budget based on how much ambient you have.
Good luck.
2023-01-31 06:33 AM
Hi,
Is it possible to do it the other way aorund? I mean, I would increase the integration time (Macrotiming) under high AmbLight scenarios but still using the ULP driver. Is it possible?
Regards, Ramon.
2023-01-31 08:09 AM
If you do your 'normal' ranging you can get the ambient light from a call to:
uint8_t VL53L4CD_ULP_DumpDebugData(
uint16_t dev,
uint8_t *p_measurement_status,
uint16_t *p_estimated_distance_mm,
uint16_t *p_sigma_mm,
uint16_t *p_signal_kcps,
uint16_t *p_ambient_kcps)
{
If the ambient is high, you can increase the macro timing with:
uint8_t VL53L4CD_ULP_SetMacroTiming(
uint16_t dev,
uint16_t macro_timing)
But I'm not sure it's going to help. All you can do is try it. In my experiments the worst case is having the sun behind the sensor, so all the sunlight hits the target and reflects back. So set up that experiment and try to vary the timing. See if you can get a result you are satisfied with.