ESP distance measurement
alexelmi·ESP_distance_measurement·Hardware/KiCad_Files/Distance_Measurement_V2.kicad_pcb
About the ESP distance measurement PCB
ESP distance measurement is an open source ESP8266 PCB design by alexelmi, published on GitHub under the MIT license. It is a 2-layer board measuring 116 × 64 mm, with 8 components from 8 distinct parts.
Its main chip is the WeMos_D1_mini, from the ESP8266 family. By type, the board carries 2 resistors, 1 IC, 1 transistor, 1 connector, 1 battery holder and 1 speaker.
It belongs with the test & measurement designs in this gallery.
From the project
handy distance measurement with ESP8266
A tiny handheld ultrasonic "distance radar" built on a WeMos D1 mini. The closer you hold it to an object, the faster it blinks and beeps.
So I sat down and designed the circuit and the PCB in KiCad:
The next day we put the components together and loaded the first test sketch onto the WeMos D1 mini. (I have to admit I didn't test it before. 🙂)
- Ultrasonic distance measurement (~2 cm … 5 m) with an HC-SR04. - LED + buzzer feedback that speeds up as the object gets closer; solid when very close and silent when nothing is in range. - Distance also printed over Serial at 115200 baud.

Main components on the ESP distance measurement
ESP distance measurement bill of materials (BOM)
8 components, 8 distinct parts.
| Qty | Part | Footprint | Refs |
|---|---|---|---|
| 1 | WeMos_D1_mini | WEMOS_D1_mini_light | U1 |
| 1 | 2N5109 | TO-92_Inline_Wide | Q1 |
| 1 | Conn_01x04_Female | PinSocket_1x04_P2.54mm_Vertical | J1 |
| 1 | 18650 | BatteryHolder_MPD_BH-18650-PC2 | BT1 |
| 1 | Speaker_Crystal | Piezo_Transducer_THT_PS1240P02BT | LS1 |
| 1 | LED | LED_D3.0mm | D1 |
| 1 | 220 | R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R1 |
| 1 | 1k | R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R2 |
ESP distance measurement design files
The KiCad project lives in the alexelmi/ESP_distance_measurement repository on GitHub; these links point at the commit this page was built from.
ESP distance measurement: common questions
What microcontroller does the ESP distance measurement use?
The ESP distance measurement is built around the WeMos_D1_mini, from the ESP8266 family.
How big is the ESP distance measurement PCB?
The ESP distance measurement measures 116 × 64 mm, has 2 copper layers and is 1.6 mm thick.
How many components are on the ESP distance measurement?
8 components, from 8 distinct parts. The full bill of materials is listed on this page.
Where can I download the ESP distance measurement design files?
From the alexelmi/ESP_distance_measurement repository on GitHub, which has the KiCad layout; the links under Design files point to each one.
Can I use the ESP distance measurement design in my own project?
Yes, under the terms of its MIT license, which alexelmi chose for the repository.
Can I test firmware for the ESP distance measurement without the hardware?
Yes. HardLabs builds a simulation of the board from its netlist and BOM, so you can run and debug ESP8266 firmware against it before you order a PCB.
Similar boards
ESP8266
ESP8266ControllerCircuit
stuartpittaway
75 × 30 mm20 parts2LCC-BY-NC-4.01.1kESP8266
HASwitchPlate
aderusha
60 × 40 mm8 parts2LMIT738ESP8266
Goatgdo
Kaldek
32.9 × 53.3 mm23 parts2LMIT506ESP8266
RatGDO-OpenSource-Bare-ESP8266
Kaldek
55 × 82.7 mm20 parts2LMIT506ESP8266
RatGDO-OpenSource-D1Mini-ESP8266
Kaldek
47.8 × 63.3 mm12 parts2LMIT506ESP8266
Iaq board
nkitanov
70.1 × 43.2 mm17 parts2LNo license398