Skip to the content
2 layers99.7 × 35 mmPocket lightning detector, the printed circuit board in 3D

Pocket lightning detector

Matyas604/Pocket-lightning-detector1

A lightning detector that runs on a battery and fits in your pocket. It records the distance, energy and current time of a lightning strike, and you can then view this data via Bluetooth in mobile app. The time is synchronized via Bluetooth.

Size
99.7 × 35 mm
Copper layers
2
Thickness
1.6 mm
Parts
74
Nets
70
Pads
267
Tracks, vias
300, 36
Pours
3
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
15 May 2026
Updated
22 May 2026

Overview

Pocket lightning detector is an open-source printed circuit board by Matyas604, from the Matyas604/Pocket-lightning-detector repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 99.7 × 35 mm with 74 parts on 70 nets, routed with 300 tracks and 36 vias.

It is built around the ESP32-C3-MINI-1-N4, AP2112K-3.3 and DW01A, with the TP4056-42-ESOP8, USBLC6-2SC6 and TL2285EE among its other parts. Its parts include 18 capacitors, 18 resistors, 6 ICs, 4 switches and 3 diodes. It belongs with the power boards and the ESP32 and RISC-V boards of this library.

Main components

10

README

README.md

Pocket lightning detector

A while back, I was browsing websites with various components and modules when a lightning sensor cought my eye. I was really curious about how it works, so I started researching it. After watching a few Youtube videos about this module, I decided I had to try it out. Then I started thinking, and suddenly occurred to me that it would be really cool to create a small, portable, battery-powered device that fits in your pocket and detect lightnings. So why not? Why not just design my own PCB and build the entire device myself?

I really enjoyd this project because I tried out a lot of different thigs: studying datasheets and schematics, searching for and creating my own schematic, and designing the PCB and case.

Features

  • The entire device is powered by a Li-Po rechargeable battery
  • It uses the ESP-C3-MINI as the main microcontroller
  • Has USB-C port for programming and charging the device
  • AS3935 and MA5532-AE for lightning detection
  • Detects lightning strikes up to 40 km away
  • Records the distance, energy and current time of lightning strike
  • Everything is stored in the internal RTC memory, which can store up to 50 lightnings strikes
  • Communicates with a mobile via Bluetooth to synchronize the time and data
  • Has audio feedback when a lightning strike been detected or other thing happened
  • Various battery protections, such as overcharge, undercharge, over-discharge and overvoltage
  • It uses deep sleep mode to get the longest possible battery life

CAD model

Everything is stored in a case consisting of two parts: a base and a top cover. The top cover is secured with four M3 screws and heat inserts, along with the PCB, which is secured with two screws. The buttons are labeled with icons for clear identification of their functions. The dimensions are 106 mm in length, 60 mm in width, and 35 mm in height.

CAD model

Made in Fusion360

PCB

It includes two switches: one to turn on and of the device and other to activate Bluetooth. In the upper right corner, above the USB-C port, are chips for charging, protection, monitoring, and drawing power from the battery, there is also a connector for the battery. The lightning sensor communicates via I2C. The pull-up resistors are located under the ESP-32 near the edge of the PCB. The dimensions of PCB are 99.7 mm x 35 mm.

Schematic

PCB schematic

PCB

PCB

Made in KiCad

⚠️ The area around the lightning sensor antenna must be kept sufficiently far away from metal parts, as there could interfere with the antenna. For this reason, there si no GND copper area around it, and no screws are located nerby.

Poster

PCB

Made in Figma

Firmware

It uses standard C++ code. One button turns the device on, and the other activates Bluetooth to display lightnings data and synchronize the time. The time must be synchronized every time the device is turned on. Data cen be currently displayed via a serial monitor application. Once the device is connected, it automatically sends lightning data every 3 seconds. Time is synchronized by sending a command, and the board then retrieves the current time. Lightning strikes and the time are stored in RTC memory, so they are erased when the device is turned off. The device runs continuously in deep sleep mode and wakes up only when a lightning strike occurs to save data about the strike and the time it happened, then goes back into deep sleep. RTC memory is the only component that remains active even when the device is in deep sleep mode. The RTC memory stores a maximum of the last 50 lightning strikes to prevent it from becoming overloaded. My goal was to maximize battery life, so I chose Bluetooth over Wi-Fi because Bluetooth is much more power-efficient, and I use deep sleep mode as well (Once the device is finished, I’ll carefully measure its battery life). You can found further details in the comments within the code. After i finished the device, I’ll probably create a nice app where the lightnings will be saved and can be viewed back in time.

BOM

You can find it in .csv format here.

License

This project is licensed under the GNU GPL v3.

text
Matyas604/Pocket-lightning-detector - Battery-powered Pocket Lightning Detector
Copyright (C) 2026 Matyáš Caha

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

Made with ❤️ by @Matyas604

Parts

74
QtyValueFootprintReferences
7LOGOLOGOG***, G***, G***, G***, G***, G***, G***
510kResistor_SMD:R_0805_2012MetricR5, R7, R8, R9, R10
4100nFCapacitor_SMD:C_0805_2012MetricC5, C9, C10, C11
41kResistor_SMD:R_0805_2012MetricR13, R14, R16, R18
45.1kResistor_SMD:R_0805_2012MetricR1, R2, R11, R12
20.1uFCapacitor_SMD:C_0805_2012MetricC16, C17
2100RResistor_SMD:R_0805_2012MetricR6, R17
210uFCapacitor_SMD:C_0805_2012MetricC13, C18
24.7uFCapacitor_SMD:C_0805_2012MetricC3, C4
2470pFCapacitor_SMD:C_0805_2012MetricC14, C15
24uFCapacitor_SMD:C_0805_2012MetricC1, C2
2TBDCapacitor_SMD:C_0805_2012MetricC7, C8
2TL2285EEfootprints:SW_TL2285EES3, S4
2TS-1088-AR02016footprints:SW_TS-1088-AR02016S1, S2
10RResistor_SMD:R_0805_2012MetricR3
11.2kResistor_SMD:R_0805_2012MetricR15
1100uHfootprints:MA5532-AEL1
11uFCapacitor_SMD:C_0805_2012MetricC12
122uFCapacitor_SMD:C_0805_2012MetricC6
13.3VTestPoint:TestPoint_Pad_D2.0mm3.3V
15VTestPoint:TestPoint_Pad_D2.0mm5V
1AP2112K-3.3Package_TO_SOT_SMD:SOT-23-5U2
1AS3935Package_DFN_QFN:MLPQ-16-1EP_4x4mm_P0.65mm_EP2.8x2.8mmU4
1BuzzerBuzzer_Beeper:Buzzer_12x9.5RM7.6BZ1
1Conn_01x02_PinConnector_JST:JST_PH_S2B-PH-K_1x02_P2.00mm_HorizontalJ2
1CrystalCrystal:Crystal_SMD_3215-2Pin_3.2x1.5mmY1
1DW01APackage_TO_SOT_SMD:SOT-23-6U6
1ESP32-C3-MINI-1-N4footprints:XCVR_ESP32-C3-MINI-1-N4U1
1FS8205Afootprints:SOP65P640X120-8NQ1
1GNDTestPoint:TestPoint_Pad_D2.0mmGND
1LED BlueLED_SMD:LED_0805_2012MetricD3
1LED RedLED_SMD:LED_0805_2012MetricD2
1OUT+TestPoint:TestPoint_Pad_D2.0mmB+
1OUT-TestPoint:TestPoint_Pad_D2.0mmGND
1PESD5V0L1ULDDiode_SMD:D_SOD-882DD1
1RXTestPoint:TestPoint_Pad_D2.0mmRX
1SCLTestPoint:TestPoint_Pad_D2.0mmSCL
1SDATestPoint:TestPoint_Pad_D2.0mmSDA
1SS8550Package_TO_SOT_SMD:SOT-23Q2
1TBDResistor_SMD:R_0805_2012MetricR4
1TP4056-42-ESOP8Package_SO:SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.41x3.3mm_ThermalViasU5
1TXTestPoint:TestPoint_Pad_D2.0mmTX
1USBLC6-2SC6Package_TO_SOT_SMD:SOT-23-6U3
1USB_C_Receptacle_USB2.0_16PConnector_USB:USB_C_Receptacle_G-Switch_GT-USB-7010ASVJ1

The 72 most common of 74 parts.

Similar boards

  • 4 layers70.9 × 75 mmFlagshep Audio Player V1, the printed circuit board in 3D

    Flagshep Audio Player V1

    HYLDAIC/Flagshep-V1_Audio-Player

    A high fidelity semi-portable audio player student project with provided PCB files, 3D files and Code

    77 parts1CERN-OHL-P-2.0
  • 2 layers76.8 × 100 mmProject CV, the printed circuit board in 3D

    Project CV

    KazimGL/ESP32-PowerIoT-DevBoard

    ESP32 battery-powered IoT dev board with Li-ion charging, protection, and sensor support — designed in KiCad

    62 parts
  • 4 layers125 × 100 mmRC controller, the printed circuit board in 3D

    RC controller

    tyke01/bonk

    An open source RC controller.

    72 parts
  • 2 layers74.5 × 89.8 mmA3mesh kicad project, the printed circuit board in 3D

    A3mesh kicad project

    alcaaron/tfg_hardware

    My bachelor's thesis hardware part.

    63 parts
  • 4 layers45 × 34 mmTriangle flywheel balancer, the printed circuit board in 3D

    Triangle flywheel balancer

    RobbyV2/smart_latch_lock

    A self-closing bike lock built as a clamshell ring. A fixed arc bolts to the housing, a hinged arc swings 180 degrees to meet it, and a worm gearmotor closes the loop around the frame and rim on a button press or a BLE…

    70 parts
  • 2 layers51.1 × 95 mmTalk e, the printed circuit board in 3D

    Talk e

    milovanpms/talk-e

    📻 — A simple LoRa-based talkie-walkie built on ESP32, operating on the 433 MHz frequency band for long-range, low-power wireless communication.

    75 parts4
  • 2 layers186 × 132 mmEvereader, the printed circuit board in 3D

    Evereader

    Ezekiel0108/Evereader

    A small and portable dual screen e-reader

    74 parts1MIT
  • 2 layersSmartWatch, the printed circuit board in 3D

    SmartWatch

    AhmedOsama21998/SmartWatch-ESP32-S3-PCB

    ESP32-S3 smartwatch PCB with Li-ion battery charging, protection, and power management. Work in progress; sensor integration is planned.

    34 parts

Questions

How big is the Pocket lightning detector PCB?

It measures 99.7 × 35 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Pocket lightning detector use?

74 parts, built around the ESP32-C3-MINI-1-N4, AP2112K-3.3, DW01A and TP4056-42-ESOP8. 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 Pocket lightning detector KiCad files?

From the Matyas604/Pocket-lightning-detector repository on GitHub, at the commit this page was made from: the board is PCB/Pocket lightning detector.kicad_pcb and its schematic PCB/Pocket lightning detector.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Pocket lightning detector design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).