Skip to the content
4 layers141 × 90 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
141 × 90 mm
Copper layers
4
Thickness
1.6 mm
Parts
67
Nets
86
Pads
282
Tracks, vias
543, 133
Pours
5
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 141 × 90 mm with 67 parts on 86 nets, routed with 543 tracks and 133 vias.

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

Main components

8

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

67
QtyValueFootprintReferences
5330Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR12, R16, R17, R18, R22
4100nFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC3, C10, C15, C18
3100kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR26, R27, R28
3100nF 10V X7RCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC6, C8, C20
2100Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR6, R15
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
210uF 10V X7RCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC7, C19
21kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR9, R21
21k 1%Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR1, R2
21uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC4, C11
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
118 ohm 1% 0.25WResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR23
11N4007Diode_THT:D_DO-41_SOD81_P10.16mm_HorizontalD1
122.1kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR19
1220nFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC1
14.7uF 10V X7RCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC5
147.5kResistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolderR20
1ADC POWERLED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolderD2
1ADS1115IDGSPackage_SO:TSSOP-10_3x3mm_P0.5mmU1
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-N16R8RF_Module:ESP32-S3-WROOM-1U4
1Fuse (rating TBD)Fuse:Fuse_0805_2012Metric_Pad1.15x1.40mm_HandSolderF2
1G5LE-1 DC5Relay_THT:Relay_SPDT_Omron-G5LE-1K1
1LDL1117S33RPackage_TO_SOT_SMD:SOT-223-3_TabPin2U3
1POWERLED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolderD5
1PTC (rating TBD)Fuse:Fuse_0805_2012Metric_Pad1.15x1.40mm_HandSolderF1
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

More from c-lydia/SmartDB

2
  • 4 layers95 × 78 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…

    82 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 layers106 × 63.5 mmBrineomatic, the printed circuit board in 3D

    Brineomatic

    hoeken/brineomatic

    Open Source Watermaker Controller.

    323 parts47LGPL-2.1
  • 4 layers144 × 127 mmFrothfet, the printed circuit board in 3D

    Frothfet

    hoeken/frothfet

    Yarrboard load controller board with current sense, volt sense, fuses, and sender support.

    394 parts14GPL-3.0
  • 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

Questions

How big is the Smart db PCB?

It measures 141 × 90 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Smart db use?

67 parts, built around the ESP32-S3-WROOM-1-N16R8, ADS1115IDGS, CP2102N-A02-GQFN28 and LDL1117S33R. 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/archive/bench_before_compact_2026-10-08/smart_db/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).