

Drone
Drone design for automatic position in space with UWB
- Size
- 115 × 115 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 49
- Nets
- 88
- Pads
- 245
- Tracks, vias
- 456, 103
- Pours
- 1
- Routed
- Yes
- KiCad
- KiCad 8.0 (file 20240108)
- Created
- 12 Feb 2023
- Updated
- 17 Sep 2026
Overview
Drone is an open-source printed circuit board by rmingon, from the rmingon/drone-uwb repository on GitHub. It is a 2-layer board of 115 × 115 mm with 49 parts on 88 nets, routed with 456 tracks and 103 vias.
It is built around the CH340C, DWM1000 and ESP32-WROOM-32, with the BMP280, LM1117MP-3.3 and MPU-6050 among its other parts. Its parts include 16 resistors, 9 capacitors, 6 ICs, 6 diodes and 6 transistors. It belongs with the robots and motor control boards and the ESP32 boards of this library.
Main components
10CH340C
SOP-16-20℃~+70℃ 2Mbps 3.3V、5V 50uA 7mA Transceiver USB 2.0 SOP-16 USB Converters ROHSWCH (Nanjing Qinheng Microelectronics)USB ConvertersDWM1000
SMDSMD RF Modules ROHSDecaWaveRF ModulesESP32-WROOM-32
SMD,18x25.5mm-40℃~+85℃ -98dBm 2.4GHz 2.7V~3.6V 20dBm Bluetooth4.2 ESP32-DOWDQ6 UART、SDIO、SPI、I2C、GPIO、PWM、ADC、DAC SMD,25.5x18mm WiFi Modules ROHSEspressif SystemsWiFi ModulesBMP280
LGA-8(2x2.5)-40℃~+85℃ 0.12hpa 1.5pa/K 1.71V~3.6V 1hpa 300nA 30Kpa~1.1bar I2C、SPI Integrated ADC and digital interface、On-chip calibration and non-volatile storage、Standby mode、On-chip temperature output LGA-8(2x2.5) Pressure Sensors ROHSBoschPressure SensorsLM1117MP-3.3
SOT-2230℃~+125℃@(Ta) 1 1.2V@(800mA) 15V 3.3V 5mA 75dB@(120Hz) 800mA 99uVrms Fixed Over Current Protection、Over Temperature Protection Positive SOT-223 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSTexas InstrumentsVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsMPU-6050
QFN-24-EP(4x4)-40℃~+85℃ 16bit 1KB 2.375V~3.46V 5uA Accelerometer Gyroscope I2C X,Y,Z X,Y,Z ±16g ±2000dps QFN-24-EP(4x4) Accelerometers ROHSTDK InvenSenseAccelerometersSI2319CDS
SOT-23-55℃~+150℃ 1 P-Channel 108mΩ@4.5V 2.5V 2.5W 21nC@10V 4.4A 40V 595pF 61pF 76pF P-Channel SOT-23 MOSFETs ROHSVishay IntertechnologyMOSFETsBSS138
SOT-23-55℃~+150℃ 1 N-channel 1.1Ω@10V、1.2Ω@4.5V 1.2V 1.7nC@10V 17.5pF 340mA 350mW 50V 6.5pF N-Channel SOT-23 MOSFETs ROHShongjiachengMOSFETs1N4148W
SOD-123150mA 1A 1V@50mA 1uA@75V 400mW 4ns 75V Independent SOD-123 Switching Diodes ROHSSTMicroelectronicsSwitching DiodesWS2812B
5mm X 5mm Surface Mount RGB LED with Intelligent ControlWorldsemiUncategorised
README
README.mdAUTOMATIC DRONE FLY PROJECT
A quadcopter that knows where it is, to the centimetre, without GPS.
Ultra wide band anchors on the ground, a tag on the drone, and time of flight ranging between them.
Demos
How it works
GPS stops at the door and drifts by metres. Ultra wide band does not: a DW1000 timestamps a radio pulse to 15.65 picoseconds, which is 4.7 mm of flight time. Measure the round trip between two radios and you get a distance, not a guess from signal strength.

The ranging cycle
Anchors are chained. A tag walks the whole chain on every cycle and comes out with one distance per anchor:
drone (tag) anchors
|
| blink -------------------------------> main anchor
| <--------------- short address ------ main anchor
| |
| <==== two way ranging ====> anchor 1 | measures, reports
| <==== two way ranging ====> anchor 2 | measures, reports
| <==== two way ranging ====> anchor 3 | measures, reports
| |
| <------------- back to blinking ------- last anchorEvery anchor computes its own distance and pushes it to the server over UDP. Three clear distances are enough to place the drone on a plane, four to place it in space.
The anchors also measure each other
Between tag cycles, each anchor plays tag towards its peers. That gives the distance matrix of the installation itself, and the server turns it into coordinates, so nobody has to measure a room with a tape:
anchor 1 ---- 5.50 m ---- anchor 2 first anchor -> origin
| \ / | second -> on the X axis
5.10 7.00 4.62 7.23 third -> in the XY plane
| \ / | the rest -> trilaterated
anchor 4 ---- 5.37 m ---- anchor 3Distances alone cannot tell a layout from its mirror image, so the convention above is part of the answer rather than a measurement.
Why the distance can be trusted
| Time of flight | The distance comes from an asymmetric two way ranging exchange, not from RSSI. Typical accuracy is around 10 cm once calibrated. |
| Bias correction | The APS011 range bias table is applied to every measurement, worth 10 to 20 cm at short range. |
| Median filter | Each anchor reports the median of its last 5 exchanges, so a single multipath reflection cannot move the result. |
| Line of sight check | A measurement whose first path power sits more than 6 dB below the total receive power is flagged, and the server keeps it out of the position fix. |
| Antenna delay calibration | Stored per board in NVS and pushed over the network, see below. |
Repository map
| Path | What it is |
|---|---|
base/code | Anchor firmware, ESP-IDF. Runs the ranging chain and reports distances. |
base/ | Anchor board, with and without battery (KiCad) |
code/drone | Drone firmware, Arduino. Flight control, plus the UWB tag on its own task. |
code/server | Bun server. Collects distances, solves the layout and the drone positions. |
code/front | Web interface, Vue and TresJS 3D view |
drone_with_esc | Drone board with 30 A ESCs (KiCad) |
drone | Drone board with integrated drivers (KiCad) |
drone_2s | Drone board for a 2S battery (KiCad) |
Quick start
Anchors
Flash one board per anchor, each with its own address. One of them, and only one, is the main anchor.
cd base/code
$EDITOR src/config.h # wifi, server, ANCHOR_ADDRESS, ANCHOR_IS_MAIN
pio run -t upload
pio device monitorThe chain is described entirely in src/config.h. The last anchor sets
ANCHOR_NEXT_ADDRESS to 0, which sends the tag back to blinking:
// anchor 1 anchor 2 anchor 3 (last)
ANCHOR_ADDRESS 1 ANCHOR_ADDRESS 2 ANCHOR_ADDRESS 3
ANCHOR_IS_MAIN 1 ANCHOR_IS_MAIN 0 ANCHOR_IS_MAIN 0
ANCHOR_NEXT_ADDRESS 2 ANCHOR_NEXT_ADDRESS 3 ANCHOR_NEXT_ADDRESS 0Drone
cd code/drone
$EDITOR src/config.h # wifi, websocket endpoint
pio run -t uploadServer and front
cd code/server && bun install && bun run src/index.ts
cd code/front && bun install && bun run devThe interface shows the anchors, the distances they measure between themselves
and the drones, in 3D. With no hardware running, open it with ?demo=1 to see
it against generated data.

Radio profiles
Both ends of every link have to agree on every radio setting, so the profile
lives in a single file that is kept identical in
base/code/src/uwb_profile.h and
code/drone/src/uwb_profile.h.
| long range (default) | fast | |
|---|---|---|
| Data rate | 110 kbps | 850 kbps |
| Preamble | 2048 symbols | 256 symbols |
| Pulse frequency | 64 MHz | 16 MHz |
| SFD | Decawave (non standard) | standard |
| Preamble code | 9 | 3 |
| Frame airtime | about 4 ms | about 0.5 ms |
| Link budget | about 6 dB better | baseline |
| Usable range | roughly 2x | baseline |
| Air time per cycle | roughly 8x more | baseline |
Switch by flipping UWB_PROFILE_LONG_RANGE and UWB_PROFILE_FAST in that
header, on every board. The channel (5) is the same on both, so the two profiles
share the same spectrum, just not the same air time.
Changing profile invalidates the antenna delay. It depends on the pulse frequency, so a board calibrated at 16 MHz is not calibrated at 64 MHz. The anchors store the value under a per profile key so the two calibrations never get mixed up, but each one still has to be measured.
Calibrating an anchor
Antenna delay is the single largest source of constant error. One unit is about 4.7 mm, so a board left on the generic 16436 is easily half a metre off, and no amount of filtering will fix a constant offset.
- Put an anchor and the drone at a known distance, in clear line of sight, both antennas in the same orientation.
- Read what the anchor reports on its serial monitor.
- Correct it. Roughly 213 units per metre of error, and a longer delay reports a shorter range, so increase it when the anchor reads long:
echo -n '{"antenna_delay": 16450}' | nc -u -w1 <anchor ip> 7051- Repeat until it settles. The value lands in NVS and survives reboots.
DW1000_ANTENNA_DELAY in src/config.h is only the fallback for a board that
has never been calibrated.
Getting the rest of the accuracy
Calibration and filtering only go so far; the antenna installation does the rest.
- No ground plane under the DWM1000 antenna, module on the board edge, 1 cm of clearance around it.
- Same antenna orientation on anchors and drone. Ninety degrees of rotation costs several dB of polarisation mismatch.
- Anchors high, with a direct view of the flight volume, not flat against a wall or on the floor.
- Solid decoupling: the DW1000 draws peaks of about 160 mA while transmitting.
- For a 3D fix, four anchors that are not coplanar. A barometer on the drone fixes the altitude and brings that back down to three.
Protocol
Anchors talk to the server over UDP on port 7051, in both directions.
Anchor to server, wrapped in {"uniq": "<anchor mac>", "type": ..., "data": {...}}:
| type | data | when |
|---|---|---|
anchor | {"address": 1, "main": true} | at boot |
tag | {"eui": "aabbccddeeff0001", "address": 5} | main anchor, when it hands a short address to a tag |
range | {"address": 5, "range": 3.42, "raw_range": 3.51, "rx_power": -82.3, "fp_power": -85.1, "los": true} | every completed exchange with a tag |
peer | same shape, address being another anchor | every completed exchange with a peer anchor |
Server to anchor:
| payload | effect |
|---|---|
{"reboot": true} | restarts the board |
{"antenna_delay": 16450} | stores a calibration in NVS and applies it |
A secondary anchor only ever sees the short address the main anchor handed out, which is why the main anchor publishes the address to EUI mapping. The drone announces the same EUI when it connects, and that is what ties a distance back to a drone.
Status
| Anchor firmware, ESP-IDF | builds, not yet flown |
| Two way ranging, both ends | builds, awaiting bench validation |
| Anchor self survey | builds, not yet flown |
| Distance collection on the server | working, covered by tests |
| Anchor layout and drone position | working, covered by tests |
| Web interface | working, 3D view of anchors, distances and drones |
| Autonomous flight | the goal |
Hardware
Anchors

Board views
Schematic

PCB

3D

Drone with 30 A ESCs

Board views
Schematic

PCB

3D

Drone with integrated drivers

Board views
Schematic

PCB

3D

Real board

Drone for a 2S battery

Credits
Thank you to PCBWay for sponsoring the PCB production of this prototype. The boards turned out very nicely: the green solder mask looks solid and the grill holes are perfect.
The DW1000 driver is a port of
F-Army/arduino-dw1000-ng (MIT),
vendored in base/code/components/DW1000Ng.
Parts
49| Qty | Value | Footprint | References |
|---|---|---|---|
| 10 | R_Small | Resistor_SMD:R_0603_1608Metric | R1, R2, R3, R4, R5, R6, R14, R15, R16, R17 |
| 9 | C | Capacitor_SMD:C_0603_1608Metric | C1, C2, C3, C4, C5, C6, C7, C8, C9 |
| 4 | 10K | Resistor_SMD:R_0603_1608Metric | R7, R8, R9, R10 |
| 4 | 1N5819 | Diode_THT:D_DO-41_SOD81_P10.16mm_Horizontal | D1, D2, D3, D4 |
| 4 | Conn_01x02 | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J3, J4, J5, J6 |
| 4 | Si2319CDS | Package_TO_SOT_SMD:SOT-23 | Q1, Q2, Q3, Q4 |
| 2 | 100K | Resistor_SMD:R_0603_1608Metric | R12, R13 |
| 2 | BSS138 | Package_TO_SOT_SMD:SOT-23 | Q5, Q6 |
| 1 | 1N4148W | Diode_SMD:D_SOD-123 | D6 |
| 1 | BMP280 | Package_LGA:Bosch_LGA-8_2x2.5mm_P0.65mm_ClockwisePinNumbering | U4 |
| 1 | CH340C | Package_SO:SOIC-16_3.9x9.9mm_P1.27mm | U6 |
| 1 | Conn_01x02 | Connector_AMASS:AMASS_XT30U-F_1x02_P5.0mm_Vertical | J2 |
| 1 | DWM1000 | RF_Module:DWM1000 | U3 |
| 1 | ESP32-WROOM-32 | RF_Module:ESP32-WROOM-32 | U1 |
| 1 | LM1117MP-3.3 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U5 |
| 1 | MPU-6050 | Sensor_Motion:InvenSense_QFN-24_4x4mm_P0.5mm | U2 |
| 1 | USB_B_Micro | Connector_USB:USB_Micro-B_Amphenol_10118194_Horizontal | J7 |
| 1 | WS2812B | LED_SMD:LED_WS2812B_PLCC4_5.0x5.0mm_P3.2mm | D5 |
More from rmingon/drone-uwb
3Similar boards
- 2 layers97 × 97 mm

- 4 layers82 × 100 mm

Falcon Edge
rmingon/Falcon-Edge
A 3D-printable flying-wing airframe with a custom ESP32 flight computer—open hardware you can solder, screw together, and fly.
48 parts11 - 2 layers100 × 100 mm

- 2 layers56 × 65 mm

- 4 layers26.5 × 57.4 mm

MotorDriver
Kmshanley/MiniRobots
Firmware and PCB desgin for mini robots with UWB localization and lidar mapping
50 parts1 - 2 layers45 × 45 mm

- 2 layers151.6 × 151.7 mm

Dron V1
FrancoStrappazzon/Drones
Repositorio para proyectos de drones, desde el más simple hasta mas complejos
70 parts - 2 layers50 × 50 mm

Questions
How big is the Drone PCB?
It measures 115 × 115 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Drone use?
49 parts, built around the CH340C, DWM1000, ESP32-WROOM-32 and BMP280. 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 Drone KiCad files?
From the rmingon/drone-uwb repository on GitHub, at the commit this page was made from: the board is drone_2s/drone.kicad_pcb and its schematic base/base_with_battery/base.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Drone design in my own project?
Its repository states no licence, so its author keeps all rights: ask rmingon before reusing the design.

