Skip to the content
4 layers95 × 78 mmSmart db, the printed circuit board in 3D

A distribution board system designed for automatic electrical fault monitoring using Digital Signal Processing (FFT analysis), Isolation Forest, and YOLO thermal imaging detection with a Mobile App, alerting system, and automatic cutoff.

Size
95 × 78 mm
Copper layers
4
Thickness
1.6 mm
Parts
82
Nets
89
Pads
305
Tracks, vias
0, 0
Pours
8
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
1 Jul 2026
Updated
13 Oct 2026

Overview

Smart db is an open-source printed circuit board by c-lydia, from the c-lydia/SmartDB repository on GitHub, published under the Apache-2.0 licence. It is a 4-layer board of 95 × 78 mm with 82 parts on 89 nets.

It is built around the ESP32-S3-WROOM-1-N16R8, ADS1115IDGS and CP2102N-A02-GQFN28, with the AO3400A, BAT54S and SMLVN6RGB1U1 among its other parts. Its parts include 27 resistors, 21 capacitors, 8 diodes, 5 connectors and 4 ICs. It belongs with the ESP32 boards of this library.

Main components

7

README

README.md

SmartDB

SmartDB is a household electrical fault detection and protection system spanning ESP32 firmware, KiCad hardware, a device-ingestion gateway, API examples, and engineering reference material.

Project links

ProjectHosted websiteGitHubRole
SmartDBDocumentationc-lydia/SmartDBHardware, firmware, backend/API and engineering documentation
SmartDB documentationCurrent architecture · PCB downloads · API/team handoffDocumentation sourcesPublic documentation site
ByteLabByteLab Webc-lydia/ByteLabRelated firmware development workspace; desktop and browser editions
SmartDB user dashboardNot published yetRepository not available yetOwned by the frontend team; links will be added when available

ByteLab is a development companion, not SmartDB's user dashboard. The optional local SmartDB developer console is for API testing and is not publicly deployed.

Repository map

PathContents
backend/Python CoAP/CBOR ingestion gateway and tests
cloud/Implemented Firebase HTTP API, emulator launcher and frontend integration guide
dashboard/Optional developer console; user dashboard belongs to the frontend team
esp_idf/smartdb_fusion/PlatformIO ESP-IDF v2 system firmware and separate ESP32-CAM firmware; build/flash guide
smart_db/Earlier KiCad design and historical manufacturing outputs
smart_db_v2/Selected hardware revision; review findings and ESP32-S3 module decision
postman/User-facing HTTP API requests, OpenAPI contract, and collection guide
docs/System architecture and engineering references

Run the backend locally

Run sh system.sh from this folder (Node.js 22 LTS and Java 21+ required). It starts Firebase emulators and the optional developer console, prints a local administrator login, and preserves local data on clean shutdown. The API is at http://127.0.0.1:5000/api/v1. See the team API handoff for integration, Postman, device provisioning, configuration commands and deployment. The frontend team owns the user dashboard.

Set up the two boards

The web documentation source includes the setup guide, hardware notes, API guide and architecture. Rebuild it with ./docs/build.sh and open docs/_build/html/index.html; see website maintenance.

Open esp_idf/smartdb_fusion as the VS Code project folder, then choose Terminal → Run Task → SmartDB: Setup. Alternatively, launch the menu from that folder:

sh
./setup.sh

Choose 1 to enter Wi-Fi settings, 2 to set up the ESP32-CAM, then 3 to set up the SmartDB main board. The menu selects ports, offers the initial firmware flash, saves settings and checks Wi-Fi. Use 4 for protection limits. Later connection changes are saved over USB without rebuilding. The camera and main board each need their own firmware; PlatformIO combines their source files automatically.

Connect each board directly to the computer for setup. The main board's J6 camera socket supplies power only and cannot program the camera. See the firmware guide for connections, configuration, recovery and calibration. The full architecture separates implemented bench behavior from production requirements; the backend guide covers the separate CoAP ingestion gateway.

Current hardware

SmartDB v2 is being corrected for an ESP32-S3-WROOM-1-N16R8 module supplied and assembled by JLCPCB. The existing ESP32-WROOM-32 development board is separate test hardware, not the selected PCB module. The module replacement is applied in the KiCad schematic and PCB, with corrected reset/boot wiring and an updated pin map. The current revision targets a low-voltage bench load, with corrected 5 V logic power, USB, CT input and a separate normally-open relay contact connector. The permanent v2 project now contains the 95 × 78 mm compact redesign with an AP63203 buck supply, four copper layers, and the SmartDB logo and connector labels. All PCB connections are routed, with wider signal and power traces and continuous inner ground planes. ERC, DRC, connectivity and schematic parity checks report zero issues. See the v2 review for current validation results, previews and the archived previous board. It is not a mains protection board.

Project maturity

The v2 bench firmware now covers SCT-013 isolated low-voltage AC monitoring, MLX90640 thermal sensing, local relay protection with physical re-arm, persistent configuration/events, registered RGB–thermal fusion and optional HTTPS diagnostic telemetry using the Postman contract. Build smartdb_s3 for the main board and esp32cam for the separate camera. See the firmware guide for configuration, flashing, calibration and implementation limits. Source/build verification is complete; physical bench validation remains pending. The PCB logic supply is DC; the CT measurement is AC-only.

This is an engineering-stage repository, not a production-certified safety device. The backend's secure transport integration and several firmware/hardware validation activities remain explicit pre-production work. Do not use it as the sole protective mechanism for a live electrical installation.

Code style

Maintained application code uses two-space indentation for JavaScript, CSS, and shell, four spaces for Python and C, and a 100-column target. Prettier handles the web/API code, Ruff formats and checks Python, clang-format handles the current firmware, and shfmt formats shell scripts. Editor defaults are in .editorconfig.

C code uses an open, Python-like layout: one statement per line, spaces around operators, braced control-flow blocks, and blank lines between functions and logical steps.

Install the development tools with npm ci and, inside a Python virtual environment, python -m pip install -r requirements-dev.txt. Install clang-format and shfmt separately; the formatting baseline uses clang-format 23.1.0 and shfmt 3.13.1.

sh
npm run format        # Apply formatting
npm run format:check  # Check formatting and Python imports/errors without rewriting files
npm run build        # Build the developer console
npm test             # Run the cloud API tests using local Firebase emulators
python -m pytest backend/tests
sh esp_idf/smartdb_fusion/tools/check.sh

The formatting commands cover backend, cloud, dashboard, documentation support scripts/styles, launchers, and first-party code in esp_idf/smartdb_fusion. They exclude generated outputs, local firmware configuration, upstream sensor drivers, legacy firmware examples, hardware design files, archives, and Postman exports.

Related projects

Parts

82
QtyValueFootprintReferences
5330Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR12, R16, R17, R18, R22
4M3 mountingMountingHole:MountingHole_3.2mm_M3H1, H2, H3, H4
3100kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR26, R27, R28
322uF 10V X7RCapacitor_SMD:C_1206_3216MetricC7, C8, C23
2100Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR6, R15
2100nFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC3, C10
2100nFCapacitor_SMD:C_0603_1608MetricC15, C18
2100nF 10V X7RCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC6, C20
2100uF 10VCapacitor_SMD:CP_Elec_6.3x7.7C22, C24
210kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR13, R14
210k 1%Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR3, R4
210uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC2, C9
21kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR9, R21
21k 1%Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1, R2
24.7kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR7, R8
24.7uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC16, C17
25.1kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR24, R25
2AO3400APackage_TO_SOT_SMD:SOT-23Q1, Q2
2BAT54SPackage_TO_SOT_SMD:SOT-23D9, D10
1046701.5NRHF 1.5AFuse:Fuse_0603_1608MetricF1
10R 1A minResistor_SMD:R_0805_2012MetricR29
1100nF 25V X7RCapacitor_SMD:C_0603_1608MetricC21
110R 1%Resistor_SMD:R_0603_1608MetricR30
110uF 10V X7RCapacitor_SMD:C_0805_2012MetricC4
110uF 10V X7RCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC19
110uF 10V X7RCapacitor_SMD:C_1206_3216MetricC5
118 ohm 1% 0.25WResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR23
11uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC11
122.1kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR19
1220nFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC1
147.5kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR20
16.8uH SRP5030TA-6R8MInductor_SMD:L_Bourns_SRP5030TL1
1ADC POWERLED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolderD2
1ADC_3V3TestPoint:TestPoint_Pad_D1.5mmTP4
1ADS1115IDGSPackage_SO:TSSOP-10_3x3mm_P0.5mmU1
1AP63203WU-7Package_TO_SOT_SMD:TSOT-23-6U3
1BGNDTestPoint:TestPoint_Pad_D1.5mmTP5
1BOOTButton_Switch_SMD:SW_Push_1P1T_NO_CK_KMR2SW2
1Buzzer (3V3 type TBD)Buzzer_Beeper:Buzzer_12x9.5RM7.6BZ1
1CP2102N-A02-GQFN28Package_DFN_QFN:QFN-28-1EP_5x5mm_P0.5mm_EP3.35x3.35mmU5
1ESP32-S3-WROOM-1-N16R8SmartDB:ESP32_S3_WROOM_1_EdgeU4
1G5LE-1 DC5Relay_THT:Relay_SPDT_Omron-G5LE-1K1
1LOGIC_5V_FUSEDTestPoint:TestPoint_Pad_D1.5mmTP1
1M7 (1N4007 SMD)Diode_SMD:D_SMAD1
1MCU_3V3TestPoint:TestPoint_Pad_D1.5mmTP3
1POWERLED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolderD5
1REGULATED 5V INPUTTerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_HorizontalJ2
1RESETButton_Switch_SMD:SW_Push_1P1T_NO_CK_KMR2SW3
1SCT-013-000 ONLYConnector_Audio:Jack_3.5mm_CUI_SJ-3523-SMT_HorizontalJ1
1SMLVN6RGB1U1LED_SMD:LED_ROHM_SMLVN6D6
1SP0503BAHTGPackage_TO_SOT_SMD:SOT-143D7
1TEST_LOADTerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_HorizontalJ5
1THERMAL_I2CConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_HorizontalJ3
1USB BRIDGE POWERLED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolderD8
1USB_C_Receptacle_USB2.0_14PConnector_USB:USB_C_Receptacle_Amphenol_12401948E412AJ4
1VCCTestPoint:TestPoint_Pad_D1.5mmTP2

More from c-lydia/SmartDB

2
  • 4 layers141 × 90 mmSmart db, the printed circuit board in 3D

    Smart db

    c-lydia/SmartDB

    A distribution board system designed for automatic electrical fault monitoring using Digital Signal Processing (FFT analysis), Isolation Forest, and YOLO thermal imaging detection with a Mobile App, alerting system, and…

    67 partsApache-2.0
  • 2 layersSmart db, the printed circuit board in 3D

    Smart db

    c-lydia/SmartDB

    A distribution board system designed for automatic electrical fault monitoring using Digital Signal Processing (FFT analysis), Isolation Forest, and YOLO thermal imaging detection with a Mobile App, alerting system, and…

    49 partsApache-2.0

Similar boards

  • 4 layers82.6 × 47.6 mmESP32 VESC Controller, the printed circuit board in 3D

    ESP32 VESC Controller

    jawedhakimi/Hiking_trailer

    Custom 4-layer PCB, 82.65 × 47.63 mm, 4 × M2.5 mounting holes (75 × 40 mm).

    108 parts
  • 4 layers230 × 135 mmVancontroller, the printed circuit board in 3D

    Vancontroller

    Camperlux/vancontroller

    VanController: ESP32-S3 12 V campervan controller board (6 fused relays, 6 PWM dimmers, CAN, RS485, GPS) - KiCad 10 design, manufacturing files and enclosure. Free for non-commercial use.

    259 parts
  • 2 layers50 × 100 mmSpoke, the printed circuit board in 3D

    Spoke

    FeruzTopalov/spoke

    Standalone LoRa-based real-time off-grid relative GPS navigation for group of up to 5 people. Improved version of LRNS Eleph

    143 parts16GPL-3.0
  • 4 layers60 × 60 mm3117 AUSIGN, the printed circuit board in 3D

    3117 AUSIGN

    r4hulrr/ausign

    Real-time Auslan (Australian Sign Language) to English speech translation glove. Built with ESP32-S3, flex sensors, IMU on a custom PCB, and a Bluetooth-connected Python GUI.

    151 parts3MIT
  • 4 layers352.3 × 159.3 mmTubender PCB, the printed circuit board in 3D

    Tubender PCB

    smvumbaco/Tubender-FA24

    Generate Hardware - Tubender Fall 2024

    264 parts2
  • 4 layers45 × 81 mmRAM R2, the printed circuit board in 3D

    RAM R2

    nimishcoder1232/Bedroom-Engineering-Propulsive-Landing-Project

    This repo has everything that I made for my rocket that can propulsive landing, while still being under ITAR restrictions.

    78 parts

Questions

How big is the Smart db PCB?

It measures 95 × 78 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Smart db use?

82 parts, built around the ESP32-S3-WROOM-1-N16R8, ADS1115IDGS, CP2102N-A02-GQFN28 and AO3400A. 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 Smart db KiCad files?

From the c-lydia/SmartDB repository on GitHub, at the commit this page was made from: the board is smart_db_v2/smart_db/work/resume_backup/smart_db.kicad_pcb and its schematic smart_db/.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Smart db design in my own project?

Its repository publishes it under the Apache-2.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).