
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…

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.
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.
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 | Hosted website | GitHub | Role |
|---|---|---|---|
| SmartDB | Documentation | c-lydia/SmartDB | Hardware, firmware, backend/API and engineering documentation |
| SmartDB documentation | Current architecture · PCB downloads · API/team handoff | Documentation sources | Public documentation site |
| ByteLab | ByteLab Web | c-lydia/ByteLab | Related firmware development workspace; desktop and browser editions |
| SmartDB user dashboard | Not published yet | Repository not available yet | Owned 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.
| Path | Contents |
|---|---|
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 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.
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:
./setup.shChoose 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.
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.
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.
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.
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.shThe 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.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 5 | 330 | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R12, R16, R17, R18, R22 |
| 4 | M3 mounting | MountingHole:MountingHole_3.2mm_M3 | H1, H2, H3, H4 |
| 3 | 100k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R26, R27, R28 |
| 3 | 22uF 10V X7R | Capacitor_SMD:C_1206_3216Metric | C7, C8, C23 |
| 2 | 100 | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R6, R15 |
| 2 | 100nF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C3, C10 |
| 2 | 100nF | Capacitor_SMD:C_0603_1608Metric | C15, C18 |
| 2 | 100nF 10V X7R | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C6, C20 |
| 2 | 100uF 10V | Capacitor_SMD:CP_Elec_6.3x7.7 | C22, C24 |
| 2 | 10k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R13, R14 |
| 2 | 10k 1% | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R3, R4 |
| 2 | 10uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C2, C9 |
| 2 | 1k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R9, R21 |
| 2 | 1k 1% | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R1, R2 |
| 2 | 4.7k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R7, R8 |
| 2 | 4.7uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C16, C17 |
| 2 | 5.1k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R24, R25 |
| 2 | AO3400A | Package_TO_SOT_SMD:SOT-23 | Q1, Q2 |
| 2 | BAT54S | Package_TO_SOT_SMD:SOT-23 | D9, D10 |
| 1 | 046701.5NRHF 1.5A | Fuse:Fuse_0603_1608Metric | F1 |
| 1 | 0R 1A min | Resistor_SMD:R_0805_2012Metric | R29 |
| 1 | 100nF 25V X7R | Capacitor_SMD:C_0603_1608Metric | C21 |
| 1 | 10R 1% | Resistor_SMD:R_0603_1608Metric | R30 |
| 1 | 10uF 10V X7R | Capacitor_SMD:C_0805_2012Metric | C4 |
| 1 | 10uF 10V X7R | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C19 |
| 1 | 10uF 10V X7R | Capacitor_SMD:C_1206_3216Metric | C5 |
| 1 | 18 ohm 1% 0.25W | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R23 |
| 1 | 1uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C11 |
| 1 | 22.1k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R19 |
| 1 | 220nF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C1 |
| 1 | 47.5k | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R20 |
| 1 | 6.8uH SRP5030TA-6R8M | Inductor_SMD:L_Bourns_SRP5030T | L1 |
| 1 | ADC POWER | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D2 |
| 1 | ADC_3V3 | TestPoint:TestPoint_Pad_D1.5mm | TP4 |
| 1 | ADS1115IDGS | Package_SO:TSSOP-10_3x3mm_P0.5mm | U1 |
| 1 | AP63203WU-7 | Package_TO_SOT_SMD:TSOT-23-6 | U3 |
| 1 | BGND | TestPoint:TestPoint_Pad_D1.5mm | TP5 |
| 1 | BOOT | Button_Switch_SMD:SW_Push_1P1T_NO_CK_KMR2 | SW2 |
| 1 | Buzzer (3V3 type TBD) | Buzzer_Beeper:Buzzer_12x9.5RM7.6 | BZ1 |
| 1 | CP2102N-A02-GQFN28 | Package_DFN_QFN:QFN-28-1EP_5x5mm_P0.5mm_EP3.35x3.35mm | U5 |
| 1 | ESP32-S3-WROOM-1-N16R8 | SmartDB:ESP32_S3_WROOM_1_Edge | U4 |
| 1 | G5LE-1 DC5 | Relay_THT:Relay_SPDT_Omron-G5LE-1 | K1 |
| 1 | LOGIC_5V_FUSED | TestPoint:TestPoint_Pad_D1.5mm | TP1 |
| 1 | M7 (1N4007 SMD) | Diode_SMD:D_SMA | D1 |
| 1 | MCU_3V3 | TestPoint:TestPoint_Pad_D1.5mm | TP3 |
| 1 | POWER | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D5 |
| 1 | REGULATED 5V INPUT | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_Horizontal | J2 |
| 1 | RESET | Button_Switch_SMD:SW_Push_1P1T_NO_CK_KMR2 | SW3 |
| 1 | SCT-013-000 ONLY | Connector_Audio:Jack_3.5mm_CUI_SJ-3523-SMT_Horizontal | J1 |
| 1 | SMLVN6RGB1U1 | LED_SMD:LED_ROHM_SMLVN6 | D6 |
| 1 | SP0503BAHTG | Package_TO_SOT_SMD:SOT-143 | D7 |
| 1 | TEST_LOAD | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_Horizontal | J5 |
| 1 | THERMAL_I2C | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Horizontal | J3 |
| 1 | USB BRIDGE POWER | LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D8 |
| 1 | USB_C_Receptacle_USB2.0_14P | Connector_USB:USB_C_Receptacle_Amphenol_12401948E412A | J4 |
| 1 | VCC | TestPoint:TestPoint_Pad_D1.5mm | TP2 |

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…

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…

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

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.

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

greghulette/Wireless_Communication_Board-WCB
Repository for the Wireless Commuincation Board (WCB)

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.



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.
It measures 95 × 78 mm and has 4 copper layers, 1.6 mm thick.
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.
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.
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).