Skip to the content
PCBKitNew board
2 layersAssignment Nano, the printed circuit board in 3D

Custom KiCad PCB (ESP32 + Arduino Nano via I²C) with reactive Mbot maze-navigation in C++ — ELEC73151 Autonomous Intelligent Vehicles

Copper layers
2
Thickness
1.6 mm
Parts
9
Nets
50
Pads
85
Tracks, vias
82, 4
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
25 Jun 2026
Updated
25 Jun 2026

Overview

Assignment Nano is an open-source printed circuit board by KordbamTech, from the KordbamTech/embedded-autonomy-pcb-navigation repository on GitHub. It is a 2-layer board with 9 parts on 50 nets, routed with 82 tracks and 4 vias.

Its parts include 4 resistors, 1 IC and 1 connector. It belongs with the ESP32 and AVR (ATmega, ATtiny) boards of this library.

README

README.md

Embedded Autonomy: PCB Design and Ultrasonic-Driven Navigation

MSc Autonomous Intelligent Vehicles | ELEC73151 | University of Staffordshire | January 2025

A two-part embedded autonomy project: a custom KiCad PCB integrating ESP32 and Arduino Nano via I²C for ultrasonic-driven servo actuation, and a maze-navigation algorithm on the Mbot robot using reactive obstacle avoidance and differential drive.

PCB Gerber Files (Google Drive) →


Overview

TaskDescriptionOutcome
Task 1Custom PCB — ESP32 + Arduino Nano via I²C, HC-SR04 ultrasonic, servo actuationAll 6 validation conditions met
Task 2Mbot maze navigation — reactive algorithm, differential drive, 27 cm thresholdConsistent maze completion across multiple runs

Task 1: PCB Design and Development

System Architecture

text
HC-SR04 Ultrasonic (5V)
        |
    Voltage divider (5V → 3.3V echo)
        |
      ESP32 (3.3V) ──── I²C (3.3kΩ pull-ups) ──── Arduino Nano (5V)
        |                                                   |
   Sensing + logic                               Servo motor (7V external)

The ESP32 handles sensing and decision logic. The Arduino Nano drives the servo — mirroring the distributed ECU architecture of real autonomous vehicles, where perception modules feed into steering/actuation units.

Component Voltage Map

ComponentVoltageNotes
ESP323.3 VSensitive GPIO
Arduino Nano5 V5 V-tolerant
HC-SR045 VEcho output stepped down via voltage divider
Servo Motor7 VExternal supply required

PCB Design (KiCad 9.0)

Designed as a single-sided board with:

  • 0.8 mm track widths with 45° bend pattern for current handling and clean machining
  • 3.3 kΩ pull-ups on I²C lines tied to ESP32 3.3 V rail
  • Short, direct I²C routing to minimise noise susceptibility
  • Clearance around ESP32 Wi-Fi antenna to reduce RF interference
  • Jumper points where trace crossovers would otherwise be needed
  • Gerber files generated and PCB successfully fabricated

Behaviour

  • Obstacle detected < 12 cm → ESP32 sends command via I²C → Arduino Nano rotates servo to 90° (evasive steer)
  • No obstacle → servo holds at 0° (straight ahead)
  • All validation conditions met: stable I²C, correct voltage compatibility, consistent servo actuation

Industrial Comparison

PrototypeIndustrial Equivalent
I²C communicationCAN, FlexRay, Automotive Ethernet
Voltage dividerLevel-shifter ICs, galvanic isolation
Single-sided PCBMultilayer PCBs with ground planes
Basic groundingEMC-optimised grounding (CISPR 25, ISO 11452)
External servo supplyAutomotive-grade power management

Task 2: Mbot Maze Navigation

Algorithm

Reactive obstacle avoidance in C++ (Arduino IDE) using the Mbot's built-in motor drivers and ultrasonic sensor.

text
while true:
    if distance > 27 cm  →  moveForward()
    else                 →  stop → turnLeft() or turnRight() → resume

Threshold: 27 cm — selected after 5 iterative tuning runs balancing early detection against over-rotation.

Tuning History

IterationThresholdMotor Speeds (L/R)Outcome
115 cm−50 / 200Too late — frequent collisions
220 cm−50 / 200Still clipping walls
325 cm−50 / 200Fewer collisions, over-rotation
425 cm−30 / 150Smoother, occasional drift
527 cm−30 / 150Stable — selected

Differential Drive Turning

cpp
void turnLeft() {
    leftMotor.run(-50);   // Slower left
    rightMotor.run(200);  // Faster right
}
void turnRight() {
    leftMotor.run(-200);  // Faster left
    rightMotor.run(50);   // Slower right
}

Results

ConditionExpectedMet?
Forward motion — no obstaclesSmooth, stable✓
Obstacle at threshold (< 27 cm)Stop + turn✓
Ultrasonic readings in mazeReliable wall/corner detectionPartial
Full maze traversalStart to finish✓
Repeated runsConsistent path✓
Dead-end handlingReverse or turn away✓

Full Mbot source code: src/mbot_maze_navigation.ino


Tech Stack

text
PCB Design     KiCad 9.0
Microcontrollers  ESP32 (sensing/logic), Arduino Nano (actuation)
Sensor         HC-SR04 ultrasonic
Robot platform Mbot (Makeblock)
Language       C++ (Arduino IDE)
Protocol       I²C
Standards ref  ISO 26262, CISPR 25, ISO 11452

Files

PathDescription
src/mbot_maze_navigation.inoFull Mbot C++ source — maze nav + line follower
kicad/KiCad project files (schematic + PCB layout)
Gerber Files →Fabrication files for PCB manufacturing

Academic Context

Module: ELEC73151 – Autonomous Intelligent Vehicles Institution: University of Staffordshire Instructors: Dr. Masum Billah · Dr. Manilka Jayasooriya Author: Oluwakorede Solomon Bamidele (ID: b023666p)

Parts

9
QtyValueFootprintReferences
33.3KResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR2, R3, R4
11.8KResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P5.08mm_HorizontalR1
1Arduino_Nano_ESP32Module:Arduino_NanoA1
1Conn_01x02Connector_PinHeader_2.00mm:PinHeader_1x02_P2.00mm_HorizontalJ2
1Conn_01x04Connector_PinHeader_2.00mm:PinHeader_1x04_P2.00mm_VerticalUltrasonic1
1ESP32-38PINLibrary ESP32:ESP32-38PIN-ESPRESSIF1U1
1Motor_Servo_Grapner_JRConnector_PinHeader_1.27mm:PinHeader_1x03_P1.27mm_HorizontalM1

Questions

What parts does the Assignment Nano 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 Assignment Nano KiCad files?

From the KordbamTech/embedded-autonomy-pcb-navigation repository on GitHub, at the commit this page was made from: the board is kicad/Assignment Nano/Assignment Nano.kicad_pcb and its schematic kicad/Assignment Nano/Assignment Nano.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Assignment Nano design in my own project?

Its repository states no licence, so its author keeps all rights: ask KordbamTech before reusing the design.

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