Skip to the content
2 layers63.5 × 101.5 mmTerrain Profiler, the printed circuit board in 3D

Custom 2-layer ESP32 PCB (KiCad) with a servo-swept HC-SR04 ultrasonic sensor for 180 degree obstacle detection, buzzer/LED proximity alerts. Includes USB-C programming circuitry (CH340C, AMS1117) and C++ firmware for sweep control and threshold-based alerts.

Size
63.5 × 101.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
28
Nets
58
Pads
135
Tracks, vias
289, 58
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
14 Jul 2026
Updated
14 Jul 2026

Overview

Terrain Profiler is an open-source printed circuit board by CameronNix, from the CameronNix/Autonomous-Terrain-Profiler repository on GitHub. It is a 2-layer board of 63.5 × 101.5 mm with 28 parts on 58 nets, routed with 289 tracks and 58 vias.

It is built around the CH340C, ESP32-WROOM-32D and AMS1117-3.3, with the PN2222A among its other parts. Its parts include 9 resistors, 7 capacitors, 3 ICs, 2 connectors and 2 switches. It belongs with the robots and motor control boards and the ESP32 boards of this library.

Main components

4

README

README.md

Autonomous Terrain Profiler

Servo-mounted ultrasonic obstacle-detection system on a custom 2-layer PCB. Sweeps a 180 degree arc with an HC-SR04, flags close objects with a buzzer + LEDs.

Overview

MCU: ESP32-WROOM-32D (bare module, custom board — not a dev board) Sensor: HC-SR04 ultrasonic, mounted on a servo for continuous bidirectional 180 degree sweep Alerts: Transistor-switched (PN2222A) LEDs and passive buzzer, threshold-based proximity warnings PCB: Custom 2-layer board designed from schematic to layout in KiCad

Hardware

  • ESP32-WROOM-32D — Bare module, GPIO-safe pin allocation (avoided strapping pins 0/2/5/12/15 and flash pins 6–11)
  • CH340C — USB-UART bridge for programming, manual boot/reset via EN/GPIO0 buttons
  • AMS1117-3.3 — Voltage regulator, SOT-223, 10µF in/out caps
  • USB-C connector — SHOU HAN TYPE-C 14-pin THT, 5.1kΩ CC1/CC2 pull-downs
  • HC-SR04 — Echo line level-shifted 5V→3.3V via 1kΩ/2kΩ voltage divider
  • Servo — PWM control, GPIO12
  • PN2222A (x2) — NPN low-side switches for buzzer (GPIO27) and LEDs (GPIO21/22)

All footprints sourced from LCSC part numbers and pulled into KiCad via the easyeda2kicad CLI tool for exact manufacturer-match footprints.

Firmware

Written in C++ (Arduino framework). Core logic:

ESP32Servo for sweep positioning HCSR04_ESP for ultrasonic timing/distance Threshold-based alert logic (buzzer/LED) tied to sweep angle and distance

See firmware/terrain_profiler.ino.

Sweep demo

Hardware Design Files

Complete KiCad schematic and PCB layout in hardware/. The board was fully designed and verified for manufacturability (footprints checked, DRC clean) but not fabricated, the project's firmware and sweep logic were validated on a breadboard prototype instead.

Author

Cameron Nix — Electrical and Computer Engineering, Oregon State University

Parts

28
QtyValueFootprintReferences
4100nFeasyeda2kicad:CAP-TH_L13.0-W6.0-P10.00-D1.0C1, C2, C5, C6
310uFeasyeda2kicad:CAP-TH_L5.5-W3.8-P5.08-D0.5C3, C4, C7
3220easyeda2kicad:RES-TH_BD2.5-L6.5-P10.50-D0.6R1, R2, R3
210Keasyeda2kicad:RES-TH_BD2.5-L6.5-P10.50-D0.6R6, R7
25.1keasyeda2kicad:RES-TH_BD2.5-L6.5-P10.50-D0.6R8, R9
2LEDLED_THT:LED_D5.0mmGREEN1, RED1
2SW_Pusheasyeda2kicad:SW-TH_5P-L6.0-W6.0-P4.50-LS6.5SW1, SW2
11Keasyeda2kicad:RES-TH_BD2.5-L6.5-P10.50-D0.6R4
12Keasyeda2kicad:RES-TH_BD2.4-L6.3-P10.30-D0.6R5
1AMS1117-3.3easyeda2kicad:SOT-223-3_L6.5-W3.4-P2.30-LS7.0-BRU2
1Buzzereasyeda2kicad:BUZ-TH_BD14.1-P7.62-D1.0-FDBZ1
1CH340Ceasyeda2kicad:SOP-16_L10.0-W3.9-P1.27-LS6.0-BLU3
1Conn_01x04easyeda2kicad:HDR-TH_4P-P2.54-V-FJ1
1ESP32-WROOM-32Deasyeda2kicad:WIFIM-SMD_39P-L25.5-W18.0-P1.27-BLU1
1Motor_Servoeasyeda2kicad:HDR-TH_3P-P2.54-V-FM1
1PN2222Aeasyeda2kicad:TO-92-3_L4.8-W3.7-P1.27-LQ1
1USB_C_Receptacle_USB2.0_14Peasyeda2kicad:USB-C-TH_SHOUHAN_TYPE-C-14PLC-H10.0J3

Similar boards

  • 2 layers99.5 × 90.5 mmMRR ESPA, the printed circuit board in 3D

    MRR ESPA

    maplerainresearch/MRR_ESPA

    A basic 3D printer control board based on ESP32

    130 parts59
  • 2 layers102 × 102 mmMRR ESPE, the printed circuit board in 3D

    MRR ESPE

    maplerainresearch/MRR_ESPE

    MRR ESPE 3D printer control board

    168 parts39
  • 4 layers62.9 × 88.6 mmBit block, the printed circuit board in 3D

    Bit block

    Citrullin/Sovereign_Bunny_Stack

    From web 3 unicorn fantasy to federated web 2.5 reality.

    169 parts4
  • 2 layers40 × 98 mmAirquality, the printed circuit board in 3D

    Airquality

    LukasLendvorsky/airquallity-esphome

    WIFI airquality sensor with ESP32

    59 parts3GPL-3.0
  • 2 layers86 × 65 mmIwaki hardware, the printed circuit board in 3D

    Iwaki hardware

    ahsanu123/iwaki

    🐟 IWAKI, automated fish cultivation system.

    91 parts
  • 2 layers133 × 106 mm8-channel relay, the printed circuit board in 3D

    8-channel relay

    akashh218/ESP32-8-Channel-Smart-Switch-PCB

    ESP32-based 8-channel smart switch PCB for wireless control of multiple electrical loads, featuring relay interfaces and a compact PCB design.

    86 parts
  • 2 layers84.3 × 57.5 mmATM90E36A V1, the printed circuit board in 3D

    ATM90E36A V1

    ClaudioSeda/ATM90EEnergy

    Atm EnergyMeter

    80 parts

Questions

How big is the Terrain Profiler PCB?

It measures 63.5 × 101.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Terrain Profiler use?

28 parts, built around the CH340C, ESP32-WROOM-32D, AMS1117-3.3 and PN2222A. 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 Terrain Profiler KiCad files?

From the CameronNix/Autonomous-Terrain-Profiler repository on GitHub, at the commit this page was made from: the board is hardware/Terrain_Profiler.kicad_pcb and its schematic hardware/Terrain_Profiler.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Terrain Profiler design in my own project?

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