Skip to the content
PCBKitNew board
2 layers16 × 18 mmPsensor, the printed circuit board in 3D

Prototype of Arduino Nano RP2040 Connect based high-accuracy object detection system.

Size
16 × 18 mm
Copper layers
2
Thickness
1.6 mm
Parts
9
Nets
7
Pads
31
Tracks, vias
73, 11
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
10 Sep 2026
Updated
11 Sep 2026

Overview

Psensor is an open-source printed circuit board by nuzubab, from the nuzubab/Object-Detection-PCB repository on GitHub, published under the MIT licence. It is a 2-layer board of 16 × 18 mm with 9 parts on 7 nets, routed with 73 tracks and 11 vias.

Its parts include 4 resistors, 2 capacitors, 2 connectors and 1 IC.

README

README.md

Nano RP2040 + VL53L1X Distance Sensing System

An embedded hardware and firmware project built around the Arduino Nano RP2040 Connect and VL53L1X Time-of-Flight (ToF) distance sensor.

The system is divided into two custom PCBs:

  • Main Control Board — Nano RP2040, power regulation, signal processing, and switched output stage
  • Sensor Board — VL53L1X ToF sensor, I²C interface, XSHUT control, interrupt signal, and supporting circuitry

The project was designed in KiCad and is intended to provide programmable distance sensing with a switched output signal of approximately 11 V.


333

Features

  • Arduino Nano RP2040 Connect based controller
  • VL53L1X Time-of-Flight distance sensing
  • I²C sensor communication
  • Programmable distance measurement
  • Short, Medium, and Long ranging modes
  • Hardware-controlled VL53L1X shutdown/reset
  • Optional GPIO interrupt support
  • MOSFET-based 11 V output switching
  • Serial Monitor debugging
  • Dedicated main and sensor PCBs
  • KiCad schematic and PCB design
  • Modular connection between controller and sensor boards
  • Firmware safety behavior when sensor initialization fails

System Architecture

text
              +----------------------+
              |      11 V Input      |
              +----------+-----------+
                         |
                         |
                 +-------v-------+
                 | Power Section |
                 | 11 V -> 5 V   |
                 +-------+-------+
                         |
                         v
             +-----------------------+
             | Arduino Nano RP2040   |
             |                       |
             | A4  <---- SDA         |
             | A5  ----> SCL         |
             | D4  ----> XSHUT       |
             | D2  <---- GPIO1       |
             | D9  ----> Output CTRL |
             +----------+------------+
                        |
              +---------v----------+
              | MOSFET Output Stage|
              | BSS138 + BSS84     |

Hardware

Main Control Board

The main PCB contains:

  • Arduino Nano RP2040 Connect
  • 11 V input power section
  • 5 V regulator for controller power
  • BSS138 N-channel MOSFET
  • BSS84 P-channel MOSFET
  • Sensor interface connector
  • VO10 output connector
  • Supporting resistors and power components

The Nano is powered from the regulated supply generated from the main input voltage. 2


Output Stage

The output is controlled by Arduino pin:

cpp
D9

The simplified switching path is:

text
Nano D9
   |
   v
BSS138
   |
   v
BSS84
   |
   v
VO10

Output Logic

D9Output StageVO10
LOWOFF~0 V
HIGHON~VCC11 / approximately 11 V

VO10 is intended as the external output signal.

Output Connector

J2 PinSignal
1VO10
2GND

Important: VO10 can reach approximately 11 V. It must never be connected directly to a 3.3 V Nano RP2040 GPIO input.


Sensor Board

The sensor PCB is based on the STMicroelectronics VL53L1X Time-of-Flight ranging sensor.

The VL53L1X provides absolute distance measurements using infrared Time-of-Flight technology and communicates with the main controller through I²C.

Main signals used by the design:

1
text
SDA
SCL
XSHUT
GPIO1 / INT
3.3 V
GND

Main Board to Sensor Board Interface

Nano / Main BoardSensor BoardFunction
D4XSHUTSensor shutdown/reset
D2GPIO1Interrupt / status
A4SDAI²C data
A5SCLI²C clock
3.3 V3.3 VSensor supply
GNDGNDCommon ground

A common ground between both boards is essential for reliable I²C communication.


VL53L1X Ranging Modes

The firmware is intended to support all three VL53L1X distance modes:

Short Mode

Designed for shorter-distance measurements and improved immunity to strong ambient light.

text
Mode: SHORT

Medium Mode

Provides a compromise between maximum detection range and ambient-light tolerance.

text
Mode: MEDIUM

Long Mode

Provides the longest available ranging distance.

text
Mode: LONG

The active mode can be selected through firmware depending on the application requirements.


Firmware Operation

The intended firmware workflow is:

text
START
  |
  v
Initialize Serial
  |
  v
Configure GPIO
  |
  v
Initialize I2C
  |
  v
Reset VL53L1X using XSHUT
  |
  v
Initialize VL53L1X
  |
  +---- Failed ----> D9 LOW / VO10 OFF
  |                       |
  |                       v
  |                 Retry Initialization
  |
 Success
  |

Basic Output Control

The output stage can be controlled using:

cpp
const int OUTPUT_PIN = 9;

void setup() {
    pinMode(OUTPUT_PIN, OUTPUT);
    digitalWrite(OUTPUT_PIN, LOW);
}

void loop() {
    digitalWrite(OUTPUT_PIN, HIGH);
    delay(3000);

    digitalWrite(OUTPUT_PIN, LOW);
    delay(3000);
}

With the hardware operating correctly:

text
D9 HIGH -> VO10 approximately 11 V
D9 LOW  -> VO10 approximately 0 V

I²C Address

The default 7-bit I²C address expected from the VL53L1X is:

text
0x29

An I²C scanner should therefore detect:

text
I2C device found at address 0x29

before the distance-measurement firmware is expected to operate correctly.


Safety / Fail-Safe Behaviour

The firmware should keep the external output disabled whenever the distance sensor cannot be initialized.

Example:

cpp
while (!initSensor()) {
    setOutput(false);

    Serial.println(
        "Retrying sensor initialization in 2 seconds..."
    );

    delay(2000);
}

This produces:

text
Sensor unavailable
        |
        v
     D9 LOW
        |
        v
    VO10 OFF

This prevents an unintended output condition when sensor communication is unavailable.


Debugging

Test 1 — Output Circuit

Test the output stage independently before testing the sensor.

cpp
const int OUTPUT_PIN = 9;

void setup() {
    pinMode(OUTPUT_PIN, OUTPUT);
}

void loop() {
    digitalWrite(OUTPUT_PIN, HIGH);
    delay(3000);

    digitalWrite(OUTPUT_PIN, LOW);
    delay(3000);
}

Expected:

text
D9 HIGH -> VO10 ≈ 11 V
D9 LOW  -> VO10 ≈ 0 V

If this works, the Nano-to-output switching stage is functioning.


Test 2 — I²C Bus

Before running the complete firmware, scan the I²C bus.

The important expected device address is:

text
0x29

for the VL53L1X.

If other I²C devices appear but 0x29 does not, the Nano I²C interface may be operational while the VL53L1X itself is not responding.


Test 3 — XSHUT

Check the VL53L1X XSHUT signal.

text
D4 LOW  -> Sensor shutdown
D4 HIGH -> Sensor enabled

After initialization, XSHUT should remain HIGH for normal communication.


Test 4 — I²C Lines

Check the following signals:

text
A4 -> SDA
A5 -> SCL

Typical troubleshooting checks include:

  • SDA continuity
  • SCL continuity
  • Common GND
  • Sensor supply
  • XSHUT state
  • I²C pull-up resistors
  • Solder bridges
  • VL53L1X orientation
  • Connector pin order

Current Development Status

The main controller and output architecture have been established.

The current debugging stage is focused on reliable VL53L1X communication.

The expected VL53L1X address is:

text
0x29

During previous testing, the I²C scanner detected:

text
0x60
0x6A

while:

text
0x29

was not detected.

Therefore, the current troubleshooting focus is:

text
Sensor power
     +
Common ground
     +
XSHUT
     +
SDA / SCL
     +
Pull-ups
     +
Sensor soldering
     |
     v
VL53L1X detection at 0x29

Once 0x29 is detected reliably, the complete distance-detection and output-control firmware can be validated.


Development Tools

Hardware Design

  • KiCad
  • Custom PCB design
  • Digital multimeter
  • Oscilloscope / logic analyzer for advanced debugging

Firmware

  • Arduino IDE
  • Arduino Nano RP2040 Connect
  • C / C++
  • Wire / I²C communication
  • VL53L1X driver

Recommended Test Sequence

For easier debugging, test each subsystem independently:

text
1. Verify 11 V input
        ↓
2. Verify regulated controller supply
        ↓
3. Verify Nano RP2040 operation
        ↓
4. Test D9 output
        ↓
5. Verify VO10 switching
        ↓
6. Verify sensor 3.3 V supply
        ↓
7. Verify XSHUT
        ↓
8. Scan I²C
        ↓
9. Confirm VL53L1X at 0x29
        ↓
10. Read distance values
        ↓
11. Test Short / Medium / Long modes
        ↓
12. Integrate distance detection with VO10

Project Goals

The main goals of this project are to:

  1. Develop a custom embedded distance-sensing platform.
  2. Interface the VL53L1X directly with an Arduino Nano RP2040.
  3. Support multiple programmable ranging modes.
  4. Generate an external switched signal based on sensor measurements.
  5. Separate the sensor and controller into modular PCBs.
  6. Provide reliable firmware-level fault handling.
  7. Develop a platform suitable for further embedded sensing experiments.

Future Improvements

Planned improvements may include:

  • Configurable detection threshold
  • Runtime Short / Medium / Long mode switching
  • Measurement filtering
  • Hysteresis around the detection threshold
  • Adjustable ON/OFF delay
  • Sensor timeout handling
  • Interrupt-based measurement
  • Improved startup diagnostics
  • Calibration support
  • More detailed Serial Monitor diagnostics
  • Error/status codes
  • Hardware revision documentation
  • PCB manufacturing files
  • Automated firmware tests

References

Technical implementation is based on documentation for:

  • Arduino Nano RP2040 Connect — Arduino
  • VL53L1X Time-of-Flight Ranging Sensor — STMicroelectronics
  • VL53L1X Datasheet / API Documentation — STMicroelectronics
  • KiCad Schematic and PCB Design Documentation — KiCad

Disclaimer

This repository represents an embedded hardware prototype under active development.

Always verify:

  • Supply voltages
  • GPIO voltage levels
  • MOSFET pinouts
  • Connector orientation
  • PCB continuity
  • Sensor supply requirements

before connecting external hardware.

In particular, the VO10 output can be significantly higher than the Nano RP2040's GPIO voltage and must not be connected directly to a 3.3 V GPIO.


Contributions

Suggestions, bug reports, hardware improvements, and firmware improvements are welcome.

If you find an issue, please open a GitHub Issue with:

  • Hardware revision
  • Firmware version
  • Serial Monitor output
  • Measured voltages
  • Description of the problem

Parts

9
QtyValueFootprintReferences
24.7KResistor_SMD:R_0402_1005MetricR6, R7
110 KResistor_SMD:R_0402_1005MetricR8
1100nFCapacitor_SMD:C_0402_1005MetricC3
110KResistor_SMD:R_0402_1005MetricR5
14.7uFCapacitor_SMD:C_0805_2012MetricC2
1PowerConnector_JST:JST_EH_B2B-EH-A_1x02_P2.50mm_VerticalJ4
1Sensor SignalConnector_JST:JST_EH_B4B-EH-A_1x04_P2.50mm_VerticalJ5
1VL53L1CXV0FY1Sensor_Distance:ST_VL53L1xU1

Questions

How big is the Psensor PCB?

It measures 16 × 18 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Psensor use?

9 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Psensor KiCad files?

From the nuzubab/Object-Detection-PCB repository on GitHub, at the commit this page was made from: the board is Psensor/.history/Psensor.kicad_pcb and its schematic Psensor/.history/Psensor.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Psensor design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

More from nuzubab/Object-Detection-PCB

1
  • 2 layers38 × 50 mmObject Detection PCB, the printed circuit board in 3D

    Object Detection PCB

    nuzubab/Object-Detection-PCB

    Prototype of Arduino Nano RP2040 Connect based high-accuracy object detection system.

    24 partsMIT

Similar boards

  • 2 layers103 × 30.5 mmTS Back Endcap, the printed circuit board in 3D

    TS Back Endcap

    EEVengers/ThunderScope

    ThunderScope GitHub Repo

    9 parts1.3kMIT
  • 2 layers31.8 × 47.6 mmNGC 38 connector, the printed circuit board in 3D

    NGC 38 connector

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    9 parts1.2k
  • 2 layers24 × 27.3 mmExpansion Card Retrofit, the printed circuit board in 3D

    Expansion Card Retrofit

    FrameworkComputer/ExpansionCards

    Reference designs and documentation to create Expansion Cards for the Framework Laptop

    9 parts1.1kCC-BY-4.0
  • 2 layers15.6 × 17.3 mmSKR Mini TFT Thermistor Board, the printed circuit board in 3D

    SKR Mini TFT Thermistor Board

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    9 parts1.1kGPL-3.0
  • 2 layers39.1 × 49.5 mmLearnoliver, the printed circuit board in 3D

    Learnoliver

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    9 parts915
  • 2 layers17.4 × 16.9 mmToolhead, the printed circuit board in 3D

    Toolhead

    tanaes/whopping_Voron_mods

    9 parts787GPL-3.0
  • 2 layers9.8 × 108 mmExpander, the printed circuit board in 3D

    Expander

    wntrblm/Castor_and_Pollux

    A Juno-inspired dual oscillator

    9 parts587
  • 2 layersKeyboard after, the printed circuit board in 3D

    Keyboard after

    adamws/kicad-kbplacer

    KiCad plugin for automatic keyboard's key placement and routing

    9 parts547GPL-3.0