Skip to content

Raywizzy/PowerGuard-IoT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PowerGuard IoT

Smart industrial electrical load monitoring and fault detection dashboard.

This is a portfolio project for demonstrating electrical engineering, embedded systems, IoT telemetry, and practical software delivery. The first MVP uses browser-based simulated telemetry so the dashboard and detection logic can be tested before adding hardware.

PowerGuard IoT dashboard

MVP Features

  • Live three-phase voltage/current simulation
  • Fault scenarios for overcurrent, phase imbalance, and undervoltage
  • Rule-based fault detection
  • Testable Python fault detection module
  • Sample telemetry replay tool
  • CSV fault event report exporter
  • SQLite fault event storage and query tools
  • GitHub Actions CI for tests and sample replay
  • KPI cards for voltage, current, power factor, and load balance
  • Per-phase measurement table
  • Browser dashboard with no external dependencies
  • Arduino/STM32-ready firmware stub

Why This Project Exists

PowerGuard IoT is designed as an electrical engineering portfolio project, not just a web dashboard. It demonstrates how a graduate electrical engineer can combine power distribution knowledge, embedded telemetry, fault detection logic, technical documentation, and software delivery into one practical system.

For a concise project pitch, see docs/portfolio-summary.md.

Run Locally

Open index.html in a browser.

For a local static server:

python3 -m http.server 5173

Then visit:

http://localhost:5173

Run Engineering Checks

Run the Python fault detector tests:

python3 -m unittest discover -s tests

Replay sample telemetry through the same detection rules:

python3 tools/replay_sample.py

Export a sample fault report:

python3 tools/export_fault_report.py

The sample report is written to:

reports/sample_fault_report.csv

Store replayed events in SQLite and query them:

python3 tools/store_fault_events.py --reset
python3 tools/query_fault_events.py

Engineering Thresholds

Initial rule thresholds:

  • Overcurrent: phase current >= 35 A
  • Undervoltage: phase voltage <= 207 V
  • Critical undervoltage: phase voltage <= 200 V
  • Phase imbalance warning: current spread >= 35%

These values are for prototype demonstration only and must be recalculated for any real installation.

Current Architecture

Simulated 3-phase panel
        |
        v
Browser telemetry generator
        |
        v
Fault detection rules
        |
        v
Live dashboard, alerts, and phase table

The Python test module mirrors the rule-based detector so the engineering logic can be verified outside the browser:

sample telemetry -> src/powerguard_faults.py -> tests + replay report

Reporting layer:

JSONL telemetry -> src/powerguard_reports.py -> CSV fault event report

Storage layer:

fault events -> src/powerguard_storage.py -> SQLite event database

Planned hardware architecture:

Voltage/current sensors -> MCU firmware -> Serial/Wi-Fi telemetry -> Backend service -> Dashboard + reports

Planned Hardware Path

  1. Replace simulated telemetry with serial input from Arduino or STM32.
  2. Add current sensor calibration constants.
  3. Add voltage sensing through safe isolated measurement hardware.
  4. Stream JSON telemetry to a Python or Node service.
  5. Store events in SQLite.
  6. Export fault reports as PDF.

Safety Note

Do not connect hobby electronics directly to mains voltage. Any real electrical measurement must use properly rated isolation, protection, enclosure design, and supervision by a qualified person.

Project Roadmap

  • Add a Python telemetry receiver for serial JSON packets.
  • Export fault event reports as PDF.
  • Add calibration documentation for CT sensors.
  • Add wiring diagrams and enclosure notes.
  • Add automated tests for fault detection rules.

Releases

No releases published

Packages

 
 
 

Contributors