GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
Doryphore
Normal user
Posts: 20
Joined: 20 Feb 2021, 08:51
Location: Cambrai, France

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#51 Post by Doryphore » 09 Mar 2021, 19:57

Hello,

It's great of you ! ;)
I will test this week as soon as I have time and I will return to give the result.

I can't wait to see the result....

Best regards

Doryphore
Normal user
Posts: 20
Joined: 20 Feb 2021, 08:51
Location: Cambrai, France

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#52 Post by Doryphore » 10 Mar 2021, 18:06

Hello,

I installed the firmware ESP_Easy_mega_20210308_normal_ESP8266_4M1M_VCC, connected the VL53L1X from the CQrobot brand http://www.cqrobot.wiki/index.php/VL53L ... nce_Sensor

I have nothing in the I2 scan log :
Image

and nothing in the log....

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

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#53 Post by Ath » 10 Mar 2021, 21:17

The device descriptions are left out to save space in the bin file. The device is there at 0x29.
How did you configure the device?
/Ton (PayPal.me)

Doryphore
Normal user
Posts: 20
Joined: 20 Feb 2021, 08:51
Location: Cambrai, France

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#54 Post by Doryphore » 30 Mar 2021, 20:09

Hello,

Excuse me for the delay in response, I was overwhelmed with work.

here is a screenshot of the module configuration in espeasy, the address is in 0x29c

Image

Image

I have 2 sensors of different brands, no measurement, the value remains at zero

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

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#55 Post by Ath » 30 Mar 2021, 21:15

The problem is most likely that the library for VL53L0X does not work with a VL53L1X device.
I have ordered a VL53L1X device and expect it in a couple of days. After it arrives I'll see if I can get the specific library (SparkFun) working in a separate plugin.
/Ton (PayPal.me)

Doryphore
Normal user
Posts: 20
Joined: 20 Feb 2021, 08:51
Location: Cambrai, France

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#56 Post by Doryphore » 31 Mar 2021, 12:35

Hello Ath,

Thank you for your precious help !!!, it would indeed be amazing if you could get the VL53L1X to work with espeasy for people like me who don't have this skill.

Best regards

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

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#57 Post by Ath » 05 Apr 2021, 16:21

My VL53L1X arrived last week, so I cobbled up a plugin for it in this PR#3570.
First testing it seems to work fine, though it is quite sensitive 8-)
It is not currently included in a build, mostly because of .bin-size restrictions, but it can be added to a Custom build if you can create your own build (and pull in this PR).
/Ton (PayPal.me)

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

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#58 Post by Ath » 05 Apr 2021, 17:29

I've created a testbuild for those who would like to test with the VL53L1X sensor. Attached here.

Updated build in post #61
Last edited by Ath on 06 Apr 2021, 21:09, edited 1 time in total.
/Ton (PayPal.me)

Ben
New user
Posts: 3
Joined: 05 Apr 2021, 20:43

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#59 Post by Ben » 06 Apr 2021, 18:55

Hello Ath,

many thanks for the implementation of the VL53L1X device. I've downloaded and compiled my own build and..... it's working.
That what I've noticed is that, within the device settings, timing must be chosen as big as possible (in my case I use 500ms).
The short eg. 100ms will cause a "hanging system" with the result that the, in my case nodeMCU, is not reachable anymore.

Again many thanks and regards,

Ben (Munich)

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

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#60 Post by Ath » 06 Apr 2021, 19:18

If you set the Interval to a value > 0 seconds, the unit should be reachable again. I might take that 'optional' off of the interval, so this situation shouldn't happen. The default value for interval is 0 when the value is optional.
/Ton (PayPal.me)

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

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#61 Post by Ath » 06 Apr 2021, 21:07

I've updated the build so that Interval is no longer optional. Includes the VL53L1X sensor plugin.

Edit: Latest build appended to message #69, below.
Last edited by Ath on 10 Apr 2021, 20:04, edited 1 time in total.
/Ton (PayPal.me)

Ben
New user
Posts: 3
Joined: 05 Apr 2021, 20:43

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#62 Post by Ben » 07 Apr 2021, 05:19

thanks, just installed your latest build and the unit is reachable.

Doryphore
Normal user
Posts: 20
Joined: 20 Feb 2021, 08:51
Location: Cambrai, France

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#63 Post by Doryphore » 09 Apr 2021, 09:50

it works !!!!!!

Thank you very much, Ath, you are a god!

What does the value of "Ambient" correspond to?

Image

Doryphore
Normal user
Posts: 20
Joined: 20 Feb 2021, 08:51
Location: Cambrai, France

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#64 Post by Doryphore » 10 Apr 2021, 09:44

Hello,

Unfortunately after a while, the value increases no longer work.

A change in timing or a reboot of the wemos fixes this problem, but comes back.

Best regards

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

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#65 Post by TD-er » 10 Apr 2021, 10:27

@Ath:
Some sensors need a re-init every now and then. Maybe you can "ping" the sensor to see if it still responds or maybe outputs exactly the same distance constantly.

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

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#66 Post by Ath » 10 Apr 2021, 10:34

I'll see what I can do here.
/Ton (PayPal.me)

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

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#67 Post by Ath » 10 Apr 2021, 12:11

Doryphore wrote: 10 Apr 2021, 09:44 Unfortunately after a while, the value increases no longer work.
What is the size of 'after a while', minutes, hours, days?
Doryphore wrote: 10 Apr 2021, 09:44 A change in timing or a reboot of the wemos fixes this problem, but comes back.
There is a setting to generate an event even when the value doesn't change (Send event when value unchanged). Do you have that checked or unchecked?
Doryphore wrote: 09 Apr 2021, 09:50 What does the value of "Ambient" correspond to?
From the documentation (in the PR): "The Ambient lighting condition during measurement is available in Ambient. The unit is kcps (Photons per second, recalculated to kilo count per second)"
/Ton (PayPal.me)

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

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#68 Post by Ath » 10 Apr 2021, 13:57

Additional question:

Do you have the ESPEasy log available, at the time it "doesn't respond"?
When a measurement is read the current settings and distance are logged, what are the values you see there?

It should look like this:

Code: Select all

4814814 : Info   : VL53L1X: Address: 0x29 / Timing: 100 / Long Range: 0 / Distance: 122
4816814 : Info   : VL53L1X: Address: 0x29 / Timing: 100 / Long Range: 0 / Distance: 122
4818814 : Info   : VL53L1X: Address: 0x29 / Timing: 100 / Long Range: 0 / Distance: 122
4820640 : Info   : WD   : Uptime 80 ConnectFailures 0 FreeMem 17376 WiFiStatus WL_CONNECTED ESPeasy internal wifi status: Conn. IP Init
4820815 : Info   : VL53L1X: Address: 0x29 / Timing: 100 / Long Range: 0 / Distance: 122
4822814 : Info   : VL53L1X: Address: 0x29 / Timing: 100 / Long Range: 0 / Distance: 122
I'm using the default settings here, Interval = 2 sec., and have the sensor at a 'fixed' distance (ca. 122 mm) of a mostly white surface at ~90 degree angle.

NB: I'm working on a Trigger delta setting, that suppresses event generation unless at least a +/- delta difference is measured (default = 0, like it is now).
/Ton (PayPal.me)

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

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#69 Post by Ath » 10 Apr 2021, 20:03

I've been running the sensor now for over 7 hours without issues (Uptime: 436 minutes):

Code: Select all

26178814 : Info   : VL53L1X: Address: 0x29 / Timing: 100 / Long Range: 0 / Distance: 121
26180641 : Info   : WD   : Uptime 436 ConnectFailures 0 FreeMem 17208 WiFiStatus WL_CONNECTED ESPeasy internal wifi status: Conn. IP Init
26180819 : Info   : VL53L1X: Address: 0x29 / Timing: 100 / Long Range: 0 / Distance: 121
(I've had the interval set on 2 seconds.)
So I don't expect that a re-init is needed to keep it alive, but if desired I could add an option like that.

I've added a new feature 'Trigger delta', that allows to make it react a little less 'nervous' by adding some hysteresis to the Distance before generating an event.
Last edited by Ath on 14 Apr 2021, 20:51, edited 1 time in total.
/Ton (PayPal.me)

Ben
New user
Posts: 3
Joined: 05 Apr 2021, 20:43

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#70 Post by Ben » 14 Apr 2021, 05:59

Hello Ath,

just downloaded the latest bin-file. Can it be that something went wrong? After uploading it, I can't find the VL53L1X anymore.

groeten en fijne dag,

Ben

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

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#71 Post by Ath » 14 Apr 2021, 14:49

I may have forgotten to enable that plugin for this build, I'll update the attachment later today.
/Ton (PayPal.me)

Doryphore
Normal user
Posts: 20
Joined: 20 Feb 2021, 08:51
Location: Cambrai, France

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#72 Post by Doryphore » 14 Apr 2021, 19:37

Hello, Ath

Thank you very much

I answer your questions:
- What is the size of 'after a while', minutes, hours, days?
==> minutes, less than 30 minutes

- There is a setting to generate an event even when the value doesn't change (Send event when value unchanged). Do you have that checked or unchecked?
==> I just restarted the sensor simply by changing the timing, and I just ticked the box "Send event when value unchanged:"

-Do you have the ESPEasy log available, at the time it "doesn't respond"?
==> espeasy always responds, moreover it had been running for several days, I just restarted the sensor, I wait for it to stop and I would go and see the log that I would post

-I'm using the default settings here, Interval = 2 sec., and have the sensor at a 'fixed' distance (ca. 122 mm) of a mostly white surface at ~90 degree angle.
==>I put an interval of 5 seconds, the sensor is 8 cms from a fixed wall, I do not touch anything


Best regards

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

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#73 Post by Ath » 14 Apr 2021, 20:50

An updated build, this time is does include the VL53L1X plugin (checked), as the previous bin seems to have not included it.

Also includes latest mega updates.
Attachments
ESP_Easy_mega_20210414_normal_ESP8266_4M1M.zip
(600.21 KiB) Downloaded 274 times
/Ton (PayPal.me)

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

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#74 Post by Ath » 14 Apr 2021, 20:59

Doryphore wrote: 14 Apr 2021, 19:37 -Do you have the ESPEasy log available, at the time it "doesn't respond"?
==> espeasy always responds, moreover it had been running for several days, I just restarted the sensor, I wait for it to stop and I would go and see the log that I would post
I'd be interested to see the log of the sensor once the values are no longer updated, as long as the sensor is enabled, there should be a steady stream of log messages showing the measured distance, like I've shown before.

My earlier logs also show that my (cheap-ass AliExpress-) sensor worked for over 7 hours without disturbance, and values where constantly updated when changing, even hours after first start, and I tested that a couple (~5) of times. It may be that your sensor is damaged or malfunctioning in some way, making it unresponsive after a while.

Please install the latest build, you'll also see some new options (if you haven't updated since your last message)
/Ton (PayPal.me)

Patou
Normal user
Posts: 106
Joined: 21 May 2018, 10:33

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#75 Post by Patou » 22 Apr 2021, 01:56

Hello,
I am trying to use the plugin with a Gy 530 Vl51L0X but get the message on the serial log : VL53L1X: Sensor not found, init failed for 0x29
The i2c scanner recongnize the Gy530 on port 0x29.
I am using the last bin downloaded from this post :
Here is the serial log :

Code: Select all

INIT : Booting version:  (ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support)
77 : Info   : INIT : Free RAM:34328
78 : Info   : INIT : Warm boot #5 Last Action before Reboot: Background Task Last systime: 1619033821 - Restart Reason: External System
80 : Info   : FS   : Mounting...
105 : Info   : FS   : Mount successful, used 75802 bytes of 957314
129 : Info   : CRC  : SecuritySettings CRC   ...OK
217 : Info   : INIT : Free RAM:30688
219 : Info   : INIT : I2C
219 : Info   : INIT : SPI not enabled
244 : Info   : VL53L1X: Sensor not found, init failed for 0x29
336 : Info   : INFO : Plugins: 48 [Normal] (ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support)
338 : Info   : EVENT: System#Wake
348 : Info   : WIFI : Connecting WiFi-PP_plus 50:64:2B:2E:26:2E Ch:11 (RTC)  attempt #0fpm close 3

453 : Info   : WIFI : Set WiFi to STAmode : sta(8c:aa:b5:7c:af:85)
add if0
sleep enable,type: 2

639 : Info   : IP   : Static IP : 192.168.1.168 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 8.8.8.8
644 : Info   : WIFI : Arduino wifi status: WL_DISCONNECTED ESPeasy internal wifi status: DISCONNECTED
647 : Info   : Webserver: start
650 : Info   : Time set to 1619033821.000
652 : Info   : Current Time Zone:  DST time start: 2021-03-28 02:00:00 offset: 120 min STD time start: 2021-10-31 03:00:00 offset: 60 min
655 : Info   : Local time: 2021-04-21 21:37:01
659 : Info   : EVENT: System#Boot
724 : Info   : VL53L1X: Address: 0x29 / Timing: 200 / Long Range: 0 / Distance: 0
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 12
cnt
1726 : Info   : EVENT: TaskInit#D=1,0

connected with WiFi-PP_plus, channel 11
Here is the bin file info from the main info :

Code: Select all

Firmware
Build:⋄	20112 - Mega
System Libraries:⋄	ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support
Git Build:⋄	
Plugin Count:⋄	48 [Normal]
Build Origin:	Self built
Build Time:⋄	Apr 14 2021 20:39:07
Binary Filename:⋄	ESP_Easy_mega_20210414_normal_ESP8266_4M1M
Build Platform:⋄	Windows-10-10.0.19041-SP0
Git HEAD:⋄	'feature/P113-add-vl53l1x-tof-sensor_9b469c1'
Is this new build only for the 1x and not for the 0x ?

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

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#76 Post by Ath » 22 Apr 2021, 09:36

The VL53L0X and VL53L1X are not compatible, software-wise, so you need the separate Distance plugin for using this sensor. You can scroll back up to a previous post where I posted a build containing the VL53L0X plugin.
/Ton (PayPal.me)

Patou
Normal user
Posts: 106
Joined: 21 May 2018, 10:33

Re: GY-530 VL53L0X Laser Ranging Sensor Time-of-Flight

#77 Post by Patou » 23 Apr 2021, 13:25

Hello
With this bin file : ESP_Easy_mega_20210308_normal_ESP8266_4M1M_VCC it works perfect.
Thanks for your work I will order a VL53L1X to test also the more sophistocated sensor
Patou

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests