Skip to the content
PCBKitNew board
2 layers30 × 100 mmMoskill, the printed circuit board in 3D

MosKill - Smart Mosquito Swatter with BLE, Kill Counting & Statistics | ESP32-C3 + KiCad PCB + UniApp

Size
30 × 100 mm
Copper layers
2
Thickness
1.6 mm
Parts
95
Nets
63
Pads
308
Tracks, vias
810, 85
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
9 Jun 2026
Updated
9 Jun 2026

Overview

Moskill is an open-source printed circuit board by telagod, from the telagod/moskill repository on GitHub. It is a 2-layer board of 30 × 100 mm with 95 parts on 63 nets, routed with 810 tracks and 85 vias.

It is built around the ESP32-C3-LYRA, AHT20 and DW01A, with the ME6211C33R5G, NE555 and TP4056 among its other parts. Its parts include 36 resistors, 24 capacitors, 13 diodes, 8 ICs and 5 transistors. It belongs with the radio and wireless boards and the ESP32 and RISC-V boards of this library.

Main components

12

README

README.md

MosKill Logo

MosKill

Smart Mosquito Swatter with BLE, Kill Counting & Statistics
ESP32-C3 Firmware + KiCad PCB + UniApp Cross-Platform Client

ESP32-C3 BLE 5.0 KiCad 9 UniApp 2000V BOM Cost MIT


System Architecture

System Architecture

Features

  • Kill Detection — Current pulse analysis, 4-class classification (S Fruit Fly / M Mosquito / L House Fly / XL Moth)
  • Statistics Engine — Total kills, streak records, hourly heatmap, size distribution, efficiency scoring
  • Environment Correlation — AHT20 temp/humidity sensing, mosquito activity vs. environment cross-analysis
  • BLE 5.0 — Real-time kill notifications, stats read, device config, OTA firmware update
  • UI Feedback — WS2812B color-coded kill effects, streak rainbow animation, buzzer sound FX
  • Power Management — 18650 Li-ion USB-C charging, 5-min auto deep sleep (5uA)
  • Cross-Platform App — WeChat Mini Program / Android / iOS / H5, i18n (zh/en), dev mode
  • Fully AI-Designed — From empty directory to manufacturable Gerber, zero human intervention

PCB Design

30 x 100 mm narrow strip designed to fit inside a mosquito swatter handle. 91 components, dual-layer with full GND pour.

PCB 3D Top      PCB 3D Bottom      PCB Flat Top      PCB Flat Bottom

Left to right: 3D Top, 3D Bottom, Flat Top, Flat Bottom

Hardware

ComponentPartFunction
MCUESP32-C3-MINI-1RISC-V 160MHz, BLE 5.0, 4MB Flash
HV BoostNE555 + AO3400 + EE13 Transformer (10:200)3.7V -> ~2000V DC
HV Multiplier3-stage Cockcroft-Walton (UF4007 + 1nF/2kV)Voltage tripler
Current Sense0.1ohm + LMV358 (Gain=20) + BAT43 Peak DetKill waveform capture
Env SensorAHT20 (I2C)Temp +/-0.3C / Humidity +/-2%RH
Power18650 + TP4056 + ME6211 LDOUSB-C charging, 3.3V regulated
Battery ProtectDW01A + FS8205AOver-charge/discharge/current protection
LEDWS2812BRGB status + kill effects
BuzzerKCG0601 Passive PiezoKill sound FX + streak rising tone

Full schematic: hardware/kicad/moskill.kicad_sch | BOM: hardware/bom/BOM.csv | Gerber: hardware/kicad/moskill-gerbers.zip

Project Structure

text
moskill/
├── firmware/                        # ESP-IDF v5.4 firmware (938KB binary)
│   ├── main/                        # Entry point, 6 FreeRTOS tasks
│   └── components/
│       ├── kill_detector/           # 4-state kill detection FSM
│       ├── stats_engine/            # Statistics + NVS sharded storage
│       ├── ble_service/             # BLE GATT server + OTA handler
│       ├── env_sensor/              # AHT20 I2C driver (thread-safe)
│       ├── power_mgmt/             # Battery curve, HV control, deep sleep
│       └── hv_driver/              # WS2812B RMT driver
├── hardware/
│   ├── kicad/                       # KiCad 9 schematic + PCB (30x100mm)
│   ├── bom/BOM.csv                  # 48 line items, ~¥24.48
│   └── renders/                     # 3D and flat PCB renders
├── app/                             # UniApp cross-platform client
│   └── src/
│       ├── pages/                   # 7 pages (dashboard, stats, rank, control, ota, ...)
│       ├── components/MkIcon.vue    # SVG icon component (38 icons)
│       ├── utils/
│       │   ├── ble.js               # BLE communication layer (128-bit UUIDs)
│       │   ├── icons.js             # SVG icon definitions
│       │   ├── i18n.js              # Chinese/English auto-switch
│       │   └── mock.js              # Dev mode mock data generator
│       └── store/index.js           # Vuex state management

Build Firmware

bash
# Install ESP-IDF v5.4+
# https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/get-started/

cd firmware
idf.py set-target esp32c3
idf.py build                         # -> build/moskill.bin (938KB)
idf.py -p /dev/ttyUSB0 flash monitor

Build App

bash
cd app
npm install
npx uni build                        # H5 build
npx uni build -p mp-weixin           # WeChat Mini Program
npx uni dev:h5                       # H5 dev server

# Dev mode: no device needed, uses mock data for UI development

Kill Detection Pipeline

text
ADC 1kHz sampling -> Threshold trigger -> Sustain check (>=5ms)
    -> Peak capture -> Envelope match -> Classification -> Stats update
    -> BLE notify -> LED + Buzzer feedback

Classification by peak ADC:
  S  (< 800)    Fruit Fly
  M  (800-2000) Mosquito
  L  (2000-3200) House Fly
  XL (> 3200)   Moth / Beetle

BLE Protocol

128-bit custom UUIDs (base e3a1XXXX-f5e8-4c8a-9b3d-2c1f7b8a6d50), packed wire format for efficiency.

ServiceUUID ShortDescription
MosKill Main0x1B00Kill count (notify), session/lifetime stats, kill log, environment
Config0x1B11Sensitivity, LED, buzzer, streak effects + time sync
OTA0x1B21Firmware update (start/write/verify/abort with CRC32)
Battery0x180FStandard Battery Service

Full protocol spec: protocol/ble_protocol.md

BLE Debug Tool

bash
cd tools/ble_debug
pip install -r requirements.txt

python moskill_ble.py scan                          # Scan devices
python moskill_ble.py stats <ADDR>                  # Read statistics
python moskill_ble.py monitor <ADDR>                # Real-time kill monitor
python moskill_ble.py config <ADDR> -s 2 -b 3      # Set sensitivity/buzzer
python moskill_ble.py ota <ADDR> firmware.bin       # BLE OTA update

License

MIT

Parts

95
QtyValueFootprintReferences
101MR_0805_2012MetricR16, R17, R18, R19, R20, R21, R22, R23, R24, R25
810KR_0402_1005MetricR2, R3, R13, R15, R26, R30, R31, R34
7100nFC_0402_1005MetricC8, C9, C11, C14, C18, C19, C20
61nF/2kVC_0805_2012MetricC1, C2, C3, C4, C5, C6
6UF4007D_SMAD1, D2, D3, D4, D5, D6
4100RR_0402_1005MetricR10, R11, R29, R36
410uFC_0805_2012MetricC7, C10, C16, C17
310nFC_0402_1005MetricC21, C22, C23
31KR_0402_1005MetricR7, R9, R35
32N7002SOT-23Q3, Q4, Q5
34.7KR_0402_1005MetricR14, R27, R28
3FiducialFiducial_1mm_Mask2mmFID1, FID2, FID3
2100KR_0402_1005MetricR6, R12
25.1KR_0402_1005MetricR32, R33
2M2MountingHole_2.2mm_M2_PadH1, H2
10R1_2WR_2512_6332MetricR1
11.5KR_0402_1005MetricR5
1100pFC_0402_1005MetricC24
119KR_0402_1005MetricR8
11nFC_0402_1005MetricC15
11uFC_0402_1005MetricC13
12KR_0402_1005MetricR4
14.7uFC_0805_2012MetricC12
1AHT20Sensirion_DFN-4_1.5x1.5mm_P0.8mm_SHT4x_NoCentralPadU2
1AO3400ASOT-23Q1
1BAT43D_SOD-323D8
1BAT54SSOT-23D7
1BZX84C3V3SOT-23D9
1ButtonSW_SPST_PTS645SW1
1BuzzerMagneticBuzzer_Kingstate_KCG0601BZ1
1DW01ASOT-23-6U5
1EE13 1:20L_Bourns_SRR1208_12.7x12.7mmT1
1ESP32-C3-LESP32-C3-MINI-1U1A
1FS8205ATSSOP-8_4.4x3mm_P0.65mmQ2
1LED_STDBYLED_0402_1005MetricD13
1LMV321/LMV358SOT-23-5U6
1ME6211C33SOT-23-5U3
1NE555SOIC-8_3.9x4.9mm_P1.27mmU7
1SMBJ24AD_SMBD10
1SS34D_SMAD11
1TP4056SOIC-8_3.9x4.9mm_P1.27mmU4
1USB-CUSB_C_Receptacle_XKB_U262-16XN-4BVC11J1
1USBLC6-2SC6SOT-23-6U8
1WS2812BLED_WS2812B_PLCC4_5.0x5.0mm_P3.2mmD12

Questions

How big is the Moskill PCB?

It measures 30 × 100 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Moskill use?

95 parts, built around the ESP32-C3-LYRA, AHT20, DW01A and ME6211C33R5G. 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 Moskill KiCad files?

From the telagod/moskill repository on GitHub, at the commit this page was made from: the board is hardware/kicad/moskill.kicad_pcb and its schematic hardware/kicad/moskill.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Moskill design in my own project?

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

Similar boards

  • 2 layers61.3 × 89.6 mmQuakeGuard PCB, the printed circuit board in 3D

    QuakeGuard PCB

    GiZano/QuakeGuard

    Distributed Earthquake Early Warning (EEW) system built on low-cost ESP32-C3 IoT sensors with Zero-Trust security, multi-node epicenter triangulation, and on-premise AI emergency reports.

    17 parts24AGPL-3.0
  • 2 layers70 × 40 mmPRAHARI, the printed circuit board in 3D

    PRAHARI

    P-r-i-t-h-v-i/PRAHARI

    Prototype carrier PCB for PRAHARI, The Countdown Band (Point Break, SIH 2026, PS 26181).

    38 parts
  • 2 layers50 × 50 mmMfx link, the printed circuit board in 3D

    Mfx link

    GBert/misc

    miscellaneous stuff / unsorted

    59 parts99
  • 2 layers68 × 89 mmParanoiaBox, the printed circuit board in 3D

    ParanoiaBox

    profdc9/ParanoiaBox

    A standalone elliptic curve/AES file encryption and decryption device

    60 parts17
  • 2 layers156.5 × 67.5 mmNixieScanDisplay, the printed circuit board in 3D

    NixieScanDisplay

    profdc9/NixieClock

    A Nixie clock that uses IN-14 tubes and very generic components that can be easily sourced.

    106 parts10
  • 2 layers97.8 × 73.7 mmClock test breakout, the printed circuit board in 3D

    Clock test breakout

    Iver-Iscariot/TideWatchEink

    E-ink display version of my tidal water wrist watch

    228 parts
  • 2 layers63 × 46 mmPi485, the printed circuit board in 3D

    Pi485

    bvarner/pi485

    An open-source TTL UART <-> RS485 converter, intended for a Raspberry Pi or Arduino

    31 parts41MIT
  • 12 layers160.1 × 233.5 mmVme wren, the printed circuit board in 3D

    Vme wren

    KiCad/kicad-source-mirror

    This is an active mirror of the KiCad development branch, which is hosted at GitLab (updated every time something is pushed). Pull requests on GitHub are not accepted or watched.

    1,508 parts3.1kGPL-3.0