
Blinky
hdsjulian/sparkles-old
Autonomous blinky devices that triangulate via soundd

PCB ESP32 quadcopter: KiCad hardware + Madgwick IMU firmware + WiFi web UI
Esp32 dron is an open-source printed circuit board by Sagaz0501, from the Sagaz0501/esp32-drone repository on GitHub, published under the MIT licence. It is a 2-layer board of 43.6 × 43.6 mm with 75 parts on 92 nets, routed with 665 tracks and 136 vias.
It is built around the ESP32-WROOM-32D-N4, FT231XQ-R and AMS1117-3.3, with the MBR0520L, MPU-6050 and CC0603KRX7R9BB104 among its other parts. Its parts include 28 resistors, 13 capacitors, 8 transistors, 7 diodes and 6 connectors. It belongs with the robots and motor control and radio and wireless boards and the ESP32 boards of this library.
A micro-drone where the PCB is the frame: a small square with four arms, each carrying pads for a coreless brushed motor. I designed the whole thing end-to-end — schematic, PCB layout, fabrication files, my own flight controller firmware and a PC ground-station tool — as a deliberate jump from hardware QA into full-stack embedded development.
Built as a solo learning project. Hardware is adapted from the open-source
drone_meishibusiness-card drone by FumiLab (@fumi_maker); all firmware and tools here are my own.
It touches the entire embedded stack in one build:
Click the schematic for the full-resolution SVG.
| Block | Part | Notes |
|---|---|---|
| MCU + Radio | ESP32-WROOM-32D | Runs the flight loop (core 1) and Bluetooth (core 0) |
| IMU | MPU-6050 | 6-axis, I²C @ 400 kHz (addr 0x68) |
| Motors | 4× coreless brushed | N-channel MOSFET (AO3400A) low-side + 1N4148W flyback, direct 20 kHz PWM — no ESCs |
| Power | 1S LiPo → AMS1117-3.3 LDO | motors run straight off +BATT |
| Programming | USB-C → FT231XQ (USB-UART) | auto-reset via 2× MMBT3904 |
| Power path | AO3401A P-MOSFET + MBR0520 Schottky | USB-or-battery selection |
"Front" = the side opposite the USB-C connector.
| GPIO | Function | GPIO | Function | |
|---|---|---|---|---|
| IO13 | Motor M1 — front-right (CCW prop) | IO21 | I²C SDA (MPU-6050) | |
| IO12 | Motor M2 — front-left (CW prop) | IO22 | I²C SCL (MPU-6050) | |
| IO14 | Motor M3 — rear-left (CCW prop) | IO18 | LED1 | |
| IO15 | Motor M4 — rear-right (CW prop) | IO19 | LED2 | |
| IO32 | LiPo ADC (10k/10k divider, ÷2) | IO0 / EN | Boot / Reset |
⚠️ The pin map differs from the
drone_meishireference (which uses IO34 for the battery and a different PWM order). The table above matches this PCB.
firmware/dron_fc/ (ESP-IDF, C)The main firmware: written from scratch in plain C on ESP-IDF v5.5. Each module keeps
its headers in include/ and its sources in src/.
main/
├── include/config.h every pin, limit and default gain in one place
├── src/main.c boot + the 500 Hz flight loop
├── bluetooth/ DualSense: connection, stick/button mapping, lightbar + rumble
├── sensors/ MPU-6050 driver (raw registers, no library) + battery ADC
├── estimation/ Madgwick quaternion filter → roll / pitch / yaw
├── control/ PID (D-on-measurement, filtered D, anti-windup),
│ cascaded angle→rate controller, Quad-X mixer with desaturation
├── actuators/ LEDC PWM motors (20 kHz / 11-bit) + status LEDs
└── system/ flight state machine, failsafes, NVS settings,
live PID tuning, telemetry, serial commands from the PCControl loop (every 2 ms): IMU → Madgwick → gamepad → failsafe + state machine → cascaded PID (ANGLE self-level by default, ACRO optional) → mixer → motors.
Safety: arming only with zero throttle, a level drone, a working IMU and a connected gamepad; motors cut on gamepad loss (>250 ms), IMU failure, or a crash/flip (>70° sustained); a dedicated KILL button; low/critical battery warnings.
| Control | Action | Control | Action | |
|---|---|---|---|---|
| L2 (analog) | Throttle | R2 | Arm | |
| Left stick X | Yaw | R1 | Disarm | |
| Right stick | Roll / pitch | ✕ | KILL (always cuts motors) | |
| D-pad | Live PID tuning (±10%) | ○ | Level calibration | |
| Options | Save PID to flash | □ | Motor test mode | |
| △ | ANGLE ↔ ACRO | Create | CSV telemetry on/off |
Bluepad32 (with its BTstack submodule) lives outside the repo:
git clone --recurse-submodules https://github.com/ricardoquesada/bluepad32.git "$env:USERPROFILE\esp\bluepad32"
cd firmware/dron_fc
idf.py set-target esp32
idf.py -p COM7 flash monitor # console runs at 921600 baudSee firmware/dron_fc/README.md for the bring-up phases
(Bluetooth → IMU axes → motor test → first flight → PID tuning). That README is in Spanish.
Interesting bugs fixed along the way:
btstack_stdio_init() reconfigures the console UART on the 1 MHz REF_TICK clock for any
baud ≤ 1 Mbaud, which can't produce 921600 → everything after Bluetooth init came out as
garbage. Fixed by re-applying the UART config on the APB clock right after it.tools/dron_monitor/ (Python + Qt)Live telemetry over USB serial: flight state, artificial horizon, per-motor output, battery, setpoint-vs-actual plots for PID tuning, the PID table, an event console and CSV recording.
CMD CAL_LEVEL, CMD MTEST ON/OFF, CMD MOTOR n pct). There is a 30% power cap,
and a 400 ms watchdog stops a motor if the PC stops refreshing the command.--demo mode simulates a drone, so the UI can be explored without hardware.cd tools/dron_monitor
pip install -r requirements.txt
python main.py --demo # no hardware
python main.py --port COM7 # with the dronefirmware/imu_web_ui/ (Arduino/PlatformIO)The first bring-up firmware: IMU + Madgwick + LEDs + a WiFi Access Point with a WebSocket artificial-horizon web page. Kept as a reference. Note that its pin map predates the verified table above.
cd firmware/imu_web_ui
pio run -t uploadesp32-drone/
├── firmware/
│ ├── dron_fc/ # flight controller — ESP-IDF, C (current)
│ └── imu_web_ui/ # first bring-up firmware — PlatformIO (legacy)
├── tools/
│ └── dron_monitor/ # Python/Qt ground station
├── hardware/
│ ├── kicad/ # KiCad schematic + PCB + symbol/footprint libs
│ ├── gerbers/ # fabrication gerbers + drill
│ └── esp32_dron_board.step
├── bom/ # bill of materials (prototype + JLCPCB variants)
└── docs/images/ # schematic + PCB rendersFirmware and tools released under the MIT License. Hardware adapted from the
open-source drone_meishi reference design — see credits above. Bluepad32 and BTstack are
used under their own licenses (BTstack is free for non-commercial use).
| Qty | Value | Footprint | References |
|---|---|---|---|
| 14 | 10K | esp32_dron:R0603 | R2, R4, R6, R8, R11, R16, R19, R20, R21, R22, R23, R24, R26, R27 |
| 10 | 0.1u | esp32_dron:C0603 | C1, C2, C3, C4, C5, C8, C9, C11, C12, C13 |
| 10 | 1K | esp32_dron:R0603 | R1, R3, R5, R7, R9, R10, R12, R14, R15, R25 |
| 4 | 1N4148W | esp32_dron:SOD-123F_L2.7-W1.6-LS3.8-RD | D1, D2, D3, D4 |
| 4 | AO3400A | esp32_dron:SOT-23-3_L2.9-W1.3-P1.90-LS2.4-BR | Q1, Q2, Q3, Q4 |
| 4 | Conn_01x02_Pin | esp32_dron:MotorPad_SMD_1x02 | J1, J2, J3, J4 |
| 3 | 10u | esp32_dron:C0603 | C6, C7, C10 |
| 2 | 2.1K | esp32_dron:R0603 | R17, R18 |
| 2 | 5.1K | esp32_dron:R0603 | R28, R29 |
| 2 | MMBT3904 | esp32_dron:SOT-23-3_L2.9-W1.3-P1.90-LS2.4-BR | Q6, Q7 |
| 2 | TS-1187A | esp32_dron:SW-SMD_4P-L5.1-W5.1-P3.70-LS6.5-TL_H1.5 | SW1, SW2 |
| 1 | AMS1117-3.3 | esp32_dron:SOT-223-3_L6.5-W3.4-P2.30-LS7.0-BR | U2 |
| 1 | AO3401A | esp32_dron:SOT-23_L2.9-W1.3-P1.90-LS2.4-BR | Q5 |
| 1 | BLM18PG | esp32_dron:L0603 | L1 |
| 1 | Blue_LED | esp32_dron:LED0603-RD_BLUE | LED3 |
| 1 | Conn_01x03_Socket | Connector_PinSocket_2.00mm:PinSocket_1x03_P2.00mm_Vertical | J5 |
| 1 | ESP32-WROOM-32D | esp32_dron:WIFIM-SMD_39P-L25.5-W18.0-P1.27-BL | U4 |
| 1 | FT231XQ-R | esp32_dron:QFN-20_L4.0-W4.0-P0.50-BL-EP2.2 | U3 |
| 1 | Green_LED | esp32_dron:LED0603-RD_GREEN | LED2 |
| 1 | LiPo_Conn | esp32_dron:CONN-TH_B2B-PH-K-S | CN1 |
| 1 | MBR0520L | esp32_dron:SOD-123_L2.7-W1.6-LS3.7-RD-1 | U1 |
| 1 | MMBT3904-C20526 | esp32_dron:SOT-23-3_L2.9-W1.3-P1.90-LS2.4-BR | Q8 |
| 1 | MPU-6050_C24112 | esp32_dron:QFN-24_L4.0-W4.0-P0.50-BL-EP2.7 | U5 |
| 1 | Red_LED | esp32_dron:LED-SMD_L1.6-W0.8-R-RD | LED1 |
| 1 | TYPE-C 16PIN 2MD | esp32_dron:USB-C-SMD_TYPE-C-16PIN-2MD-073 | USB1 |
The 71 most common of 75 parts.

hdsjulian/sparkles-old
Autonomous blinky devices that triangulate via soundd

hdsjulian/sparkles
This repo theoretically contains everything to build, assemble and run the sparkling forests light installation.

OrbitalCommons/gumstick
Gumstick: ESP32 + iCE40UP5K FPGA module (v1 DF40 board-to-board, v2 M.2 gold-finger draft) and its programming carrier. KiCad 10.

Miroeilola/vallox-rs485-controller
Replacement control panel for legacy Vallox SE ventilation units. Vallox DIGIT RS-485 protocol, bus-powered, ESP32, Home Assistant.




PubInv/krake
The Krake™ is a Wi-Fi–enabled server using an MQTT broker, which means it can be controlled remotely by other devices ("clients") via the internet.
It measures 43.6 × 43.6 mm and has 2 copper layers, 1.6 mm thick.
75 parts, built around the ESP32-WROOM-32D-N4, FT231XQ-R, AMS1117-3.3 and MBR0520L. 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.
From the Sagaz0501/esp32-drone repository on GitHub, at the commit this page was made from: the board is hardware/kicad/esp32_dron.kicad_pcb and its schematic hardware/kicad/esp32_dron.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).