Sensor value equal 0

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
juju
Normal user
Posts: 24
Joined: 07 Jan 2021, 11:46
Location: France

Sensor value equal 0

#1 Post by juju » 04 Jan 2023, 21:19

Hi All,

First of all : Happy New Year 2023 ;)

I used since few year a VL53L0X sensor with espeasy. I don't have any problem with since the beginning until few weeks ago.
Sometimes, the sensor measures a value of 0 and the device is disabled.
If i restart it the value stay at 0 and I cannot enable it.

I have to remove power and restart it to get the right value and enable the device.


I don't see anything in logs even in verbose.

Device : Distance - VL53LOX [TESTING]
I2C Address : 0x29
Timing : VL53L0X_Normal_Timing
Build: 20103 - Mega
Libraries: ESP82xx Core 2_4_1, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3
GIT version: (custom)
Plugins: 43 [Normal] [Testing] [Development] [IR]
Build time:⋄ Feb 9 2019 16:39:22


Do you have any idea ?

User avatar
Ath
Normal user
Posts: 3418
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Sensor value equal 0

#2 Post by Ath » 04 Jan 2023, 21:25

Most likely the sensor is starting to fail or has gathered a lot of dust, causing the I2C bus to get stuck. There are a few solutions to that, but you will need to update to a more recent version of ESPEasy, as your current release is nearly 4 years old, and doesn't have the I2C ' un-stuck' reset feature.

For upgrading you will need to use the Collection B build, as that includes the VL53L0X sensor (Test builds have been separated into several sets, A..F, and renamed to Collection).

Edit:
Oh, and possibly that plugin was in a Development build only, that build is no longer available, but the VL53L0X has been added to the regular set of plugins: https://espeasy.readthedocs.io/en/lates ... al-plugins
Last edited by Ath on 04 Jan 2023, 21:51, edited 1 time in total.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sensor value equal 0

#3 Post by TD-er » 04 Jan 2023, 21:47

I looked at the datasheet, but I didn't find anything related to a suggested life time or suggested "on" time.
The sensor is using a laser and lasers have a rather limited number of "burn hours".
Typically this is about 8000 hours.
I have no idea how long the laser is on during a measurement, so it is hard to estimate.
But given you're running a build of 4 years ago, I guess the sensor has been running for roughly 4x 8000 hours.

Maybe good to try to find some estimate life time of this sensor to get some idea whether it may be considered "end of life" for this sensor and thus may need a replacement?

juju
Normal user
Posts: 24
Joined: 07 Jan 2021, 11:46
Location: France

Re: Sensor value equal 0

#4 Post by juju » 05 Jan 2023, 07:22

Thank you both of you for your quick answer.

@Ath : I'll update the version to see if there is any improvment. It could take days or weeks before the problem comes back
@Td-er : I didn't think about the sensor lifetime but it is also a good idea. Is there a configuration to "enable" the measure only when needed for example every 30 minutes instead of all the time ?

Edit : Maybe I can manage to pause the sensor with deep sleep configuration.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sensor value equal 0

#5 Post by TD-er » 05 Jan 2023, 14:42

I did notice when browsing through the datasheet, that there are indeed several power states.
So perhaps we can extend the plugin to support those.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sensor value equal 0

#6 Post by TD-er » 05 Jan 2023, 14:44

Just another thought...
What if it is indeed an issue with the I2C bus being stuck.
Then on the newer builds, you can enable "Try clear I2C bus when stuck" on the tools->Advanced page.
This has only been added a few months ago, so it is for sure not present on your build.

juju
Normal user
Posts: 24
Joined: 07 Jan 2021, 11:46
Location: France

Re: Sensor value equal 0

#7 Post by juju » 07 Jan 2023, 11:46

Hello,

I flash my sensor with the 20221224 - Mega version.
I also check the "Try clear I2C bus when stuck" option.

I'll have to wait if the issue comes back.

Thanks you for your answers !

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sensor value equal 0

#8 Post by TD-er » 07 Jan 2023, 11:57

Yeah, that feature is great at making it harder to reproduce this issue ;)

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 34 guests