cancel
Showing results for 
Search instead for 
Did you mean: 

Ranging results values for VL53L4CD

Jhern.1
Associate II

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:

  • Waking up device when target detected closer than 130 mm or so.
  • There is a fixed flat target at 150mm (part of the housing itself). Device is calibrated so as to avoid waking up when ranging at this this distance.
  • No need to high acuracy.

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.

5 REPLIES 5
John E KVAM
ST Employee

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?

  • john

Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'
Jhern.1
Associate II

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?

0693W00000WJllZQAT.pngIn 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.

John E KVAM
ST Employee

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.

  • john

Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'
Jhern.1
Associate II

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.

John E KVAM
ST Employee

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.

  • john

Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'