Skip to the content
2 layersSmart 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.

Copper layers
2
Thickness
1.6 mm
Parts
49
Nets
47
Pads
143
Tracks, vias
273, 0
Pours
1
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 2-layer board with 49 parts on 47 nets, routed with 273 tracks and 0 vias.

It is built around the ADS1115IDGS, AMS1117 and IRLZ44N. Its parts include 13 connectors, 9 resistors, 8 capacitors, 4 ICs and 3 switches. It belongs with the ESP32 boards of this library.

Main components

3

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

49
QtyValueFootprintReferences
7Conn_01x02_PinConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ2, J4, J5, J10, J11, J12, J13
410u 25VCapacitor_THT:CP_Radial_D5.0mm_P2.50mmC1, C4, C6, C8
3100Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR7, R8, R9
3100n 25VCapacitor_THT:C_Disc_D3.0mm_W1.6mm_P2.50mmC3, C5, C7
310kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR2, R3, R4
3Screw_Terminal_01x02TerminalBlock_RND:TerminalBlock_RND_205-00276_1x02_P5.00mm_VerticalJ1, J7, J9
2250V 1AButton_Switch_THT:SW_PUSH_1P1T_6x3.5mm_H5.0_APEM_MJTP1250SW1, SW2
2Conn_01x01_PinConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalJ6, J8
1100Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_VerticalR6
110n 25VCapacitor_THT:C_Disc_D3.0mm_W1.6mm_P2.50mmC2
11N4007Diode_THT:D_DO-41_SOD81_P10.16mm_HorizontalD1
1200mA/400mAFuse:Fuse_Bourns_MF-RHT050F2
1220Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P2.54mm_VerticalR5
133Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1
1500mA/1AFuse:Fuse_Bourns_MF-RHT050F1
15V 0.1ATerminalBlock_RND:TerminalBlock_RND_205-00276_1x02_P5.00mm_VerticalM1
1ADS1115IDGSPackage_SO:TSSOP-10_3x3mm_P0.5mmU1
1AMS1117Package_TO_SOT_SMD:SOT-223-3_TabPin2U4
1Conn_01x04_PinConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ3
1ESP32-DEVKIT-V1devkit v1:MODULE_ESP32_DEVKIT_V1U2
1Fujitsu_FTR-LYAA005xRelay_THT:Relay_SPST-NO_Fujitsu_FTR-LYAA005x_FormA_VerticalK1
1IRLZ44NPackage_TO_SOT_THT:TO-220-3_VerticalQ1
1LED_KRGBLED_THT:LED_D5.0mm-4_RGBD2
1LOGOLOGOG***
1PC817Package_DIP:DIP-4_W7.62mmU3
1Transformer_1P_1STerminalBlock_RND:TerminalBlock_RND_205-00278_1x04_P5.00mm_VerticalT1

The 45 most common of 49 parts.

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
  • 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

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
  • 2 layers100 × 100 mmSmopla PTN2, the printed circuit board in 3D

    Smopla PTN2

    klaus-liebler/labathome

    Der kleine Bruder von lab@home. Ermöglicht das Experimentieren mit PT1...PTn-Gliedern, die intern als RC-Kombination (entkoppelt über Operationsverstärker) ausgeführt sind.

    83 parts5MIT
  • 2 layers35 × 1.5 mmDeltavr controller, the printed circuit board in 3D

    Deltavr controller

    oxy-2/deltavr

    deltavr is a project I've poured my heart into where I've built an open source slam tracked tiny open source headset with customs pcbs, and with every part except a few all 3d printable, also massive credit to my…

    53 parts2
  • 2 layers151 × 118 mmOBQAS, the printed circuit board in 3D

    OBQAS

    diminDDL/OBQAS

    Open Battery Quantification and Analysis System

    204 parts1MIT
  • 2 layers100 × 80 mmRobot main, the printed circuit board in 3D

    Robot main

    johnugbor/RoboSolar

    SKiDL-generated draft v0.1. NOT FOR FABRICATION — see blockers below.

    78 partsMIT
  • 2 layersPipe, the printed circuit board in 3D

    Pipe

    IslamHUFE/ROV-1

    ROV project

    21 parts2
  • 2 layers91.3 × 59 mmV1 XIAO MAINBOARD, the printed circuit board in 3D

    V1 XIAO MAINBOARD

    NB6RULES/fabacademy-backup

    ▶️ Watch the presentation video — also embedded live on the Final Project page

    14 parts

Questions

What parts does the Smart db use?

49 parts, built around the ADS1115IDGS, AMS1117 and IRLZ44N. 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/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).