Extension board · Sensors and inputs
A laser distance sensor board: it times invisible light to a surface and reports the distance, up to 4 m in the dark. It connects to an I2C socket or a Qwiic cable. Reading it needs your own driver.
| Purpose | Measuring the distance to a surface without touching it |
| Sensor | ST VL53L1X time-of-flight module, 940 nm Class 1 laser |
| Range | From 4 cm; up to 4 m on a white target in the dark, about 73 cm in strong ambient infrared light (data sheet, long-range mode). Quoted ranging error ±20 to ±25 mm |
| Field of view | 27° diagonal, typical; software can narrow it to 15° |
| Rate | Up to 50 readings per second |
| Interface | I2C up to 400 kHz, address 0x29; interrupt output and shutdown input |
| Supply | 3.3 V only, 40 mA peak |
| Pull-ups | 3.3 kΩ on SDA and SCL, removable |
| Connectors | Two Gadgeteer type I sockets (Samtec SHF-105, 1.27 mm), Qwiic, and holes for a 1×4 2.54 mm header |
| Size | 40 × 40 mm, four M3 holes on a 30 × 30 mm square |
| Works with | Smoothieboard V2 Prime header GG electrically; no firmware driver |
| Licence | Open hardware, CERN-OHL-S-2.0 |
Every figure with its basis is in the electrical specifications appendix; hole positions are in the mounting dimensions appendix.
The numbers on the drawing match the list below it. The board is shown from the component side.
1Input socket I IN — The ribbon cable from the controller goes here.
2Chain socket CHAIN — Passes the bus on to the next board.
3Distance sensor — The VL53L1X module. Remove the protective film on top, and keep everything out of its view.
4Supply capacitors — Smooth the supply right next to the module.
5Interrupt and shutdown resistors — Hold both lines high when nothing drives them.
6Bus pull-ups — 3.3 kΩ; disconnect them with the two links underneath.
7Power light PWR — Green while 3.3 V is present.
8Interrupt light INT — Blue while the sensor pulls its interrupt line low.
92.54 mm header — Ground, 3.3 V, SDA, SCL, for jumper wires. Solder it only if you want it.
10Qwiic connector — The same bus on a four-way cable.
11Mounting hole — One of four M3 holes.
Everything on this board is 3.3 V. Check contact numbering with the power removed.
| Contact | Signal | Use | Prime header GG |
|---|---|---|---|
| 1 | 3.3 V | Board supply | 3.3 V |
| 2 | 5 V | Not used, passed to the chain | 5 V |
| 3 | INT | Interrupt from the sensor | PH2 |
| 4, 5, 7 | Passed through | Not used | PH4, PC0, PH3 |
| 6 | XSHUT | Low holds the sensor in shutdown | PF15 |
| 8 | SDA | I2C data | PF0 (I2C2_SDA) |
| 9 | SCL | I2C clock | PF1 (I2C2_SCL) |
| 10 | GND | Ground | GND |
Both carry the same four signals.
| Pin | Signal |
|---|---|
| 1 | GND |
| 2 | 3.3 V |
| 3 | SDA |
| 4 | SCL |
Peel the protective film off the sensor module.
Four M3 screws, sensor facing the target.
Ribbon cable from header GG to I IN.
After power on, the green PWR light is on.
At I2C address 0x29, read one byte from register address 0x010F (the register address is two bytes long).
It reads 0xEA, the model ID.
Start ranging with ST’s driver for the VL53L1X or your own, then move a sheet of paper in front of it.
The distance follows the paper.
| You want | Module | Example |
|---|---|---|
| Read a distance | None | No Smoothieware driver for this sensor |
There is nothing to add to config.ini. The wiring and driver settings for each use are in the next section.
Both sensors answer at address 0x29 after power-up. The board lets the controller hold one of them in shutdown while it gives the other a new address.
| Board | Link on the underside | Set to |
|---|---|---|
| A (next to the controller) | INT-3 (JP12) | open |
| A | CHAIN P3 (JP3) | closed |
| B (second) | INT-3 (JP12) | open |
| B | XS-6 (JP13) | open |
| B | XS-3 (JP14) | closed |
| B | PULLUP SDA and SCL (JP1, JP2) | open |
Then A is enabled by contact 6 (PF15) and B by contact 3 (PH2). In your own driver: drive both low; release PF15; write the new 7-bit address of A (for example 0x30) into register 0x0001; release PH2; B answers at 0x29. Repeat after every power cycle. The register is the one used by the Pololu driver library; the ST data sheet only states that the address can be changed. Neither interrupt reaches the controller in this arrangement.
Chain a 9-axis IMU board behind the sensor to measure how far away a surface is and how the carrier is tilted.
| Setting | Value |
|---|---|
| Sensor address | 0x29 |
| IMU address | 0x28, with the address link JP4 on the IMU board left open (closed gives 0x29, which clashes) |
| Pull-ups | Keep one set: open JP1 and JP2 on one of the two boards |
| Interrupt on contact 3 | Used by the sensor. The IMU interrupt does not reach the controller through the open CHAIN P3 link |
A Qwiic or STEMMA QT cable, or the four-pin 2.54 mm header, connects the board to any 3.3 V I2C host, such as a development board used to try a driver.
The shutdown line then stays high through its on-board resistor and the sensor starts by itself. Driver check: after at least 1.2 ms, the model ID byte at register address 0x010F (a 16-bit address) reads 0xEA.
With your own driver the readings can show whether a lid is open, how much material is left on a spool, or whether a part is in place. The sensor sees a patch of the target, not a point: at 27 degrees the patch is about 48 mm across at 100 mm (calculated). It is not precise enough to level a print bed or set a tool height, and it must never guard a person or stop a machine for safety.
The VL53L1X contains an infrared laser, a receiver made of many small light detectors and a processor. It measures how long the light takes to come back, so the reading depends much less on the colour of the target than a brightness-based sensor does; colour and ambient light still change the maximum range. It runs directly from 3.3 V.
The shutdown line (XSHUT) is held high on the board, so the sensor starts by itself unless the controller pulls it low. The interrupt line is open drain: the sensor can only pull it low. Which level means a new reading depends on how the driver sets its polarity.
Behind a cover window, use a material that passes 940 nm light, keep the air gap small and calibrate for crosstalk as ST’s application note AN5231 describes. Mechanical parts must stay outside a cone above each of the two sensor openings: at a height h above the module, about 0.54 mm + 0.36 × h from the centre of the opening (calculated from the data sheet), plus your assembly tolerance.
All links are on the underside. For one sensor, leave them as delivered. Open JP1 and JP2 when another board on the bus already has pull-ups.
| Link | What it does | As delivered |
|---|---|---|
| JP1 | Connects the SDA pull-up | Closed |
| JP2 | Connects the SCL pull-up | Closed |
| JP3 | Passes contact 3 to the chain socket | Open |
| JP6 | Passes contact 6 to the chain socket | Open |
| JP8 | Continues SDA to the chain | Closed |
| JP9 | Continues SCL to the chain | Closed |
| JP10 | Powers the green light | Closed |
| JP11 | Powers the blue light | Closed |
| JP12 | Sends the interrupt to contact 3 | Closed |
| JP13 | Takes shutdown from contact 6 | Closed |
| JP14 | Takes shutdown from contact 3. Close only with INT-3 and XS-6 open | Open |
The CHAIN socket carries the same contact numbers as the input: nothing shifts. Power, contacts 4, 5 and 7 go straight across. SDA and SCL cross through closed links. Contacts 3 and 6, which this board uses, stop here until you close their links. Two boards must never drive the same contact.
| Contact | Signal | On CHAIN |
|---|---|---|
| 1, 2, 10 | Power and ground | Same contact, always connected |
| 3 | Interrupt | Contact 3, only if CHAIN P3 (JP3) is closed |
| 4, 5, 7 | Free | Same contact, always connected |
| 6 | Shutdown | Contact 6, only if CHAIN P6 (JP6) is closed |
| 8, 9 | I2C | Same contact, through closed links JP8 and JP9 |
| Symptom | Likely cause | What to check |
|---|---|---|
| PWR light off | No 3.3 V, cable reversed, or JP10 open | Cable orientation and the +3V3 test pad |
| No answer at 0x29 | Wiring, shutdown line held low, or less than 1.2 ms since power on | XSHUT test pad should read 3.3 V |
| Reads a short distance all the time | Film still on the sensor, or something in its view or a window reflecting | Remove the film; check the view and calibrate for the window |
| Short range or noisy | Sunlight or other infrared light, dark target | Shade the sensor; use the long timing budget |
| Two boards, one answers wrongly | Both still at 0x29 | Follow the two-sensor link table and release one at a time |
| Light | PWR | INT |
|---|---|---|
| Where | Right edge, upper | Right edge, lower |
| Lit means | 3.3 V is present | The sensor is pulling its interrupt line low |
| Dark means | No 3.3 V, or its link is open | The line is high, or its link is open |
Still stuck? Read how to ask for help or see the general troubleshooting guide.
| File | What it is |
|---|---|
| Schematic (PDF) | The circuit diagram |
| Parts list (CSV) | Every component with its value, footprint and part number where one is chosen |
| Board drawing (PNG) | The top view used on this page |
For drilling a mounting plate or designing an enclosure. Positions are hole centres, in millimetres, measured from the top-left corner with the board seen from the component side. Leave the space above the sensor open.
| Hole | X (mm) | Y (mm) | Diameter | Use |
|---|---|---|---|---|
| 1 | 5.00 | 5.00 | 3.2 mm, not plated | Mounting, M3 screw |
| 2 | 35.00 | 5.00 | 3.2 mm, not plated | Mounting, M3 screw |
| 3 | 5.00 | 35.00 | 3.2 mm, not plated | Mounting, M3 screw |
| 4 | 35.00 | 35.00 | 3.2 mm, not plated | Mounting, M3 screw |
Every figure is a design value, a calculated or simulated value, or a manufacturer’s data sheet value, as the last column says. A dash means no figure is given.
| Parameter | Applies to | Lower | Nominal | Upper | Basis |
|---|---|---|---|---|---|
| Supply | J1 contact 1 | 2.6 V | 3.3 V | 3.5 V | ST data sheet |
| Absolute maximum, any pin | Supply and signals | — | — | 3.6 V | ST data sheet |
| Peak current, sensor | 3.3 V | — | — | 40 mA | ST data sheet, at 2.8 V |
| Average while ranging | 3.3 V | — | 16 mA | 18 mA | ST data sheet, at 2.8 V |
| Pull-up current, both lines low | 3.3 V | — | 2.0 mA | — | Calculated |
| Power light current | PWR | — | 1.3 mA | — | Simulated, assumed light model |
| Interrupt light current | INT | — | 0.85 mA | — | Simulated, assumed light model |
| Rise time, one pull-up set, 100 pF | SDA, SCL | — | 280 ns | 300 ns | Simulated; limit for 400 kHz |
| Low level, two pull-up sets | SDA, SCL | — | 0.12 V | 0.4 V | Simulated |
| Operating temperature, sensor | Module | -20 °C | — | 85 °C | ST data sheet; the board is not rated |
| Part | Limit | Use on this board |
|---|---|---|
| Any sensor pin | 3.6 V maximum | Never connect 5 V logic or a 5 V supply |
| Capacitors | 10 V and 16 V | 3.3 V |
Bus loading and indicator currents were simulated with ngspice, with 100 pF of bus capacitance.
| Result | Simulated value | Limit | Outcome |
|---|---|---|---|
| Rise time 30 to 70 %, one pull-up set, 100 pF (400 kHz limit 300 ns) | 280 ns | at most 300 ns | Within |
| Rise time with two pull-up sets | 140 ns | at most 300 ns | Within |
| Low level with two pull-up sets | 0.12 V | at most 400 mV | Within |
| Power LED current (assumed diode model) | 1.3 mA | 200 µA to 2.5 mA | Within |
| Interrupt LED current with GPIO1 low (assumed diode model) | 0.85 mA | 50 µA to 2 mA | Within |
| GPIO1 low level with the LED and 10 k pull-up, 60 ohm output | 70.3 mV | at most 400 mV | Within |
Not simulated: the sensor, its optics and range, cover windows and cable crosstalk.
The first page of the sensor data sheet. Click the page to open the PDF.
For a wider, sound-based measurement, see the ultrasonic distance sensor.
See all boards on the extension boards page.