
Object Detection PCB
nuzubab/Object-Detection-PCB
Prototype of Arduino Nano RP2040 Connect based high-accuracy object detection system.

Prototype of Arduino Nano RP2040 Connect based high-accuracy object detection system.
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.
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:
The project was designed in KiCad and is intended to provide programmable distance sensing with a switched output signal of approximately 11 V.
+----------------------+
| 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 |The main PCB contains:
The Nano is powered from the regulated supply generated from the main input voltage.
The output is controlled by Arduino pin:
D9The simplified switching path is:
Nano D9
|
v
BSS138
|
v
BSS84
|
v
VO10| D9 | Output Stage | VO10 |
|---|---|---|
| LOW | OFF | ~0 V |
| HIGH | ON | ~VCC11 / approximately 11 V |
VO10 is intended as the external output signal.
| J2 Pin | Signal |
|---|---|
| 1 | VO10 |
| 2 | GND |
Important: VO10 can reach approximately 11 V. It must never be connected directly to a 3.3 V Nano RP2040 GPIO input.
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:
SDA
SCL
XSHUT
GPIO1 / INT
3.3 V
GND| Nano / Main Board | Sensor Board | Function |
|---|---|---|
| D4 | XSHUT | Sensor shutdown/reset |
| D2 | GPIO1 | Interrupt / status |
| A4 | SDA | I²C data |
| A5 | SCL | I²C clock |
| 3.3 V | 3.3 V | Sensor supply |
| GND | GND | Common ground |
A common ground between both boards is essential for reliable I²C communication.
The firmware is intended to support all three VL53L1X distance modes:
Designed for shorter-distance measurements and improved immunity to strong ambient light.
Mode: SHORTProvides a compromise between maximum detection range and ambient-light tolerance.
Mode: MEDIUMProvides the longest available ranging distance.
Mode: LONGThe active mode can be selected through firmware depending on the application requirements.
The intended firmware workflow is:
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
|The output stage can be controlled using:
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:
D9 HIGH -> VO10 approximately 11 V
D9 LOW -> VO10 approximately 0 VThe default 7-bit I²C address expected from the VL53L1X is:
0x29An I²C scanner should therefore detect:
I2C device found at address 0x29before the distance-measurement firmware is expected to operate correctly.
The firmware should keep the external output disabled whenever the distance sensor cannot be initialized.
Example:
while (!initSensor()) {
setOutput(false);
Serial.println(
"Retrying sensor initialization in 2 seconds..."
);
delay(2000);
}This produces:
Sensor unavailable
|
v
D9 LOW
|
v
VO10 OFFThis prevents an unintended output condition when sensor communication is unavailable.
Test the output stage independently before testing the sensor.
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:
D9 HIGH -> VO10 ≈ 11 V
D9 LOW -> VO10 ≈ 0 VIf this works, the Nano-to-output switching stage is functioning.
Before running the complete firmware, scan the I²C bus.
The important expected device address is:
0x29for 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.
Check the VL53L1X XSHUT signal.
D4 LOW -> Sensor shutdown
D4 HIGH -> Sensor enabledAfter initialization, XSHUT should remain HIGH for normal communication.
Check the following signals:
A4 -> SDA
A5 -> SCLTypical troubleshooting checks include:
The main controller and output architecture have been established.
The current debugging stage is focused on reliable VL53L1X communication.
The expected VL53L1X address is:
0x29During previous testing, the I²C scanner detected:
0x60
0x6Awhile:
0x29was not detected.
Therefore, the current troubleshooting focus is:
Sensor power
+
Common ground
+
XSHUT
+
SDA / SCL
+
Pull-ups
+
Sensor soldering
|
v
VL53L1X detection at 0x29Once 0x29 is detected reliably, the complete distance-detection and output-control firmware can be validated.
For easier debugging, test each subsystem independently:
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 VO10The main goals of this project are to:
Planned improvements may include:
Technical implementation is based on documentation for:
This repository represents an embedded hardware prototype under active development.
Always verify:
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.
Suggestions, bug reports, hardware improvements, and firmware improvements are welcome.
If you find an issue, please open a GitHub Issue with:
| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | 4.7K | Resistor_SMD:R_0402_1005Metric | R6, R7 |
| 1 | 10 K | Resistor_SMD:R_0402_1005Metric | R8 |
| 1 | 100nF | Capacitor_SMD:C_0402_1005Metric | C3 |
| 1 | 10K | Resistor_SMD:R_0402_1005Metric | R5 |
| 1 | 4.7uF | Capacitor_SMD:C_0805_2012Metric | C2 |
| 1 | Power | Connector_JST:JST_EH_B2B-EH-A_1x02_P2.50mm_Vertical | J4 |
| 1 | Sensor Signal | Connector_JST:JST_EH_B4B-EH-A_1x04_P2.50mm_Vertical | J5 |
| 1 | VL53L1CXV0FY1 | Sensor_Distance:ST_VL53L1x | U1 |
It measures 16 × 18 mm and has 2 copper layers, 1.6 mm thick.
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.
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.
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).

nuzubab/Object-Detection-PCB
Prototype of Arduino Nano RP2040 Connect based high-accuracy object detection system.



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

VoronDesign/Voron-Hardware
Cool Hardware designed by the Voron Design group

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



adamws/kicad-kbplacer
KiCad plugin for automatic keyboard's key placement and routing