FAQ
TL;DR: The VL53L1X fires 50 distance samples per second [Elektroda, efi222, post #20674854] and lights each stair almost instantly; “PIR in such a system is a misunderstanding” [Elektroda, efi222, post #20674854] Set the detection range (≤135 cm) over Wi-Fi without reprogramming.
Why it matters: Faster, browser-configurable sensing means safer, smarter stair lighting.
Quick Facts
• Sampling rate: 50 Hz (20 ms per read) [Elektroda, efi222, post #20674854]
• Short-mode range: 0–135 cm [Elektroda, efi222, post #20674854]
• PIR delay: 1–2 s before trigger [Elektroda, efi222, post #20674854]
• VL53L1X current draw: ≈20 mA during ranging [ST Datasheet, 2021]
• Typical module price: US $7–12 [Mouser Catalog, 2023]
Why choose a VL53L1X laser sensor over a PIR for stair lighting?
VL53L1X reacts in under one frame (≈20 ms), while PIR needs 1–2 s, letting users climb three steps before lights engage [Elektroda, efi222, post #20674854] The laser’s defined 135 cm cone avoids false triggers from nearby hallways. An engineer notes, “PIR in such a system is a misunderstanding” [Elektroda, efi222, post #20674854]
What range and accuracy can I expect in short mode?
Short-mode covers 0–135 cm with ±5 mm resolution on white targets, according to the ST datasheet [ST Datasheet, 2021]. Dark matte surfaces may cut usable range to ≈80 cm (edge-case) because reflected photons drop below the sensor’s threshold [ST Datasheet, 2021].
How fast does the sensor update and trigger the lights?
The ESP8266 polls the VL53L1X roughly every 20 ms (50 Hz) [Elektroda, efi222, post #20674854] GPIO01 toggles low after each reading, so your controller can react well under 100 ms, which feels instantaneous to users.
Can I connect this project to the SUPLA smart-home platform?
Yes. SUPLA’s GG firmware already supports the VL53L0X; adapting to VL53L1X only needs I²C address and driver tweaks [Elektroda, madamsz1, post #20675708] Community code examples are collected in the SUPLA forum thread linked by the author [Elektroda, efi222, post #20676028]
How do I build the browser-based configuration page?
Serve an HTML/CSS/Ajax file from ESP8266FS; include ESP8266WebServer.h to handle GET/POST calls [Elektroda, efi222, post #20683445] The author names the file “configuration_sensor.h”, but you can save it as .html and edit in any text editor. Ajax lets you change range values without refreshing the whole page.
Quick 3-step calibration procedure?
- Power the device and connect to the ESP AP.
- Open 192.168.4.1, move an object to desired distance, click “Save”.
- Reboot; the new threshold loads from EEPROM.
That’s it—no code upload required.
What libraries are required on the ESP8266 side?
Include: 1. Wire.h for I²C; 2. ESP8266WebServer.h for HTTP; 3. Adafruit_VL53L1X or Pololu_VL53L1X for sensor access; 4. EEPROM.h to store thresholds. All compile under Arduino IDE 1.8+.
What power and level-shifting does the sensor need?
VL53L1X runs at 2.6–3.5 V and draws ≈20 mA while ranging [ST Datasheet, 2021]. Use the breakout’s onboard regulator or supply 3.3 V directly. Its I²C lines are 3.3 V-tolerant, so no level shifter is required with ESP8266.
Are there alternative sensors and why were they rejected?
Ultrasonic HC-SR04 worked for one user at 20–80 cm but is bulkier and audible [Elektroda, andrzej18k, post #20683188] An IR beam gave 3 ms response yet needed aligned Tx/Rx across the stair entrance [Elektroda, efi222, post #20674854] PIR was slow and triggered by hallway traffic [Elektroda, efi222, post #20674854]
What edge cases can cause false or missed detections?
Highly absorbing black fabric can drop reflectivity below 5 %, cutting range to 80 cm [ST Datasheet, 2021]. Direct sunlight into the sensor saturates the SPAD array; ST specifies derating accuracy above 60 klux (failure scenario). Shield the module or add an IR-cut filter.
How else are makers using VL53L1X modules?
One forum member tracks sitting time: if he stays >50 min or leans <35 cm from the screen, an alarm sounds [Elektroda, dktr, post #20678040] The same distance data also dims other room lights when the desk is vacant.
What is the typical BOM cost for a single-stair detector?
VL53L1X breakout: US $9, ESP-01S: US $2, regulator and misc parts: ≈US $3. Total ≈US $14 per step [Mouser Catalog, 2023].
Comments
Would it be possible to make this work with SUPLA? [Read more]
In GG Supli there is support for VL53L0X. [Read more]
I have a lot of electronics in my house. I don't have any central system, so I can't help with Supel. But there is a thread on the Supla forum about laser sensors and their use. https://forum... [Read more]
A very nice projection. I use these sensors to detect how long I sit in front of the PC :) https://obrazki.elektroda.pl/1557343500_1690957788_thumb.jpg [Read more]
Well, I would not have thought that you can register "sitting" in front of the computer :D Well, someone likes it. [Read more]
I often forgot myself, so if I sit for more than 50 minutes, the system reminds me to take a break. Similarly, sitting in an unhealthy position, too close to the screen for a long time also causes an alarm... [Read more]
Very cool idea with configuration via the browser. I once faced a similar problem. The solution for me were ultrasonic sensors HC-SR04. They are subordinated in a box soldered from a laminate oiled with... [Read more]
I haven't heard of such GUI generators, but maybe there are :) The keywords for such a menu are html, CSS and if the page is to be interactive in real time, also Ajax. In other words, sending data... [Read more]