

Terrain Profiler
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
4CH340C
SOP-16-20℃~+70℃ 2Mbps 3.3V、5V 50uA 7mA Transceiver USB 2.0 SOP-16 USB Converters ROHSWCH (Nanjing Qinheng Microelectronics)USB ConvertersESP32-WROOM-32D
-- WiFi Modules ROHSEspressif SystemsWiFi ModulesAMS1117-3.3
SOT-223-40℃~+125℃ 0.003%Vout 1 1.1V@(800mA) 15V 1A 3.3V 5mA 72dB@(120Hz) Fixed Over Current Protection、Short Circuit Protection、Thermal shutdown Positive SOT-223 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSAdvanced Monolithic SystemsVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsPN2222A
TO-92-3-55℃~+150℃ 1 NPN 1A 300MHz 300mV 40V 625mW NPN TO-92-3 Bipolar (BJT) ROHSNTE ElectronicsBipolar (BJT)
README
README.mdAutonomous 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.

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| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | 100nF | easyeda2kicad:CAP-TH_L13.0-W6.0-P10.00-D1.0 | C1, C2, C5, C6 |
| 3 | 10uF | easyeda2kicad:CAP-TH_L5.5-W3.8-P5.08-D0.5 | C3, C4, C7 |
| 3 | 220 | easyeda2kicad:RES-TH_BD2.5-L6.5-P10.50-D0.6 | R1, R2, R3 |
| 2 | 10K | easyeda2kicad:RES-TH_BD2.5-L6.5-P10.50-D0.6 | R6, R7 |
| 2 | 5.1k | easyeda2kicad:RES-TH_BD2.5-L6.5-P10.50-D0.6 | R8, R9 |
| 2 | LED | LED_THT:LED_D5.0mm | GREEN1, RED1 |
| 2 | SW_Push | easyeda2kicad:SW-TH_5P-L6.0-W6.0-P4.50-LS6.5 | SW1, SW2 |
| 1 | 1K | easyeda2kicad:RES-TH_BD2.5-L6.5-P10.50-D0.6 | R4 |
| 1 | 2K | easyeda2kicad:RES-TH_BD2.4-L6.3-P10.30-D0.6 | R5 |
| 1 | AMS1117-3.3 | easyeda2kicad:SOT-223-3_L6.5-W3.4-P2.30-LS7.0-BR | U2 |
| 1 | Buzzer | easyeda2kicad:BUZ-TH_BD14.1-P7.62-D1.0-FD | BZ1 |
| 1 | CH340C | easyeda2kicad:SOP-16_L10.0-W3.9-P1.27-LS6.0-BL | U3 |
| 1 | Conn_01x04 | easyeda2kicad:HDR-TH_4P-P2.54-V-F | J1 |
| 1 | ESP32-WROOM-32D | easyeda2kicad:WIFIM-SMD_39P-L25.5-W18.0-P1.27-BL | U1 |
| 1 | Motor_Servo | easyeda2kicad:HDR-TH_3P-P2.54-V-F | M1 |
| 1 | PN2222A | easyeda2kicad:TO-92-3_L4.8-W3.7-P1.27-L | Q1 |
| 1 | USB_C_Receptacle_USB2.0_14P | easyeda2kicad:USB-C-TH_SHOUHAN_TYPE-C-14PLC-H10.0 | J3 |
Similar boards
- 2 layers99.5 × 90.5 mm

- 2 layers102 × 102 mm

- 2 layers99.1 × 55.4 mm

ESP32 Plotter Controller revB1 unrouted
MarkJB/ESP32_Plotter_Controller
An ESP32/TMC2130 based 2 axis controller designed for pen plotters
53 parts9MIT - 4 layers62.9 × 88.6 mm

Bit block
Citrullin/Sovereign_Bunny_Stack
From web 3 unicorn fantasy to federated web 2.5 reality.
169 parts4 - 2 layers40 × 98 mm

- 2 layers86 × 65 mm

- 2 layers133 × 106 mm

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 mm

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.