EdgePowerMeter is a complete power monitoring solution designed to measure voltage, current, and power consumption of embedded devices running AI inference workloads. Perfect for benchmarking FPS-per-Watt (FPS/W) efficiency of machine learning models at the edge.
- Precision Measurements: INA226 power monitor with configurable averaging
- Real-time Visualization: Modern desktop app with live graphs
- Data Export: CSV and PDF report generation
- Timestamped Logs: DS3231 RTC for accurate time synchronization
- Open Source: Full hardware schematics and software included
- 🔋 INA226 high-precision power monitor (I²C)
- 🕐 DS3231 real-time clock for accurate timestamps
- 📺 SSD1306 OLED display (128×32) for live readings
- ⚡ ESP32-C3 microcontroller with WiFi/BLE capability
- 🔧 0.01Ω shunt resistor for current sensing
- 📊 Real-time voltage, current, and power graphs
- 🚀 OpenGL accelerated rendering for smooth 60+ FPS
- 📈 Live statistics with min/max/average values
- 💾 CSV data export with full measurement history
- 📂 CSV import to reload and re-analyze data
- 📄 Professional PDF report with graphs included
- 📉 FFT spectrum analysis optimized for DC systems with dynamic loads
- ⚡ Power supply quality analysis - voltage ripple, load regulation, settling time
- 🎯 Sampling rate control - configurable subsampling from device rate
- 🎨 Dark and Light theme support
- ⚙️ Persistent settings - preferences saved automatically
- 🔌 Auto-reconnect with OS event-based port monitoring
- 🔍 Zoom and pan on X-axis (Y-axis auto-scales)
- 🖱️ Cursor values on hover with crosshair
- 📐 Selection region for detailed analysis
- ⏱️ Time-based scrolling window (configurable)
The EdgePowerMeter desktop application provides a modern interface for real-time power monitoring and data analysis.
The main window displays three synchronized graphs showing:
- Voltage (V) - Blue trace
- Current (mA) - Orange trace
- Power (mW) - Green trace
Real-time statistics are displayed in dedicated cards:
Each measurement type shows:
- Minimum value
- Maximum value
- Average value
- Total energy consumed (Wh)
Advanced calculations including:
- Sampling rate (Hz) - real-time display with configurable subsampling
- Voltage/Current ripple - percentage and absolute values
- Power supply quality - ripple, load regulation, settling time, stability rating
- Spectrum analysis - dominant frequencies in load variations
- Power factor estimation - for AC/DC systems
- Load impedance estimation - dynamic resistance calculation
Export your data in multiple formats:
- CSV: Full measurement history with timestamps
- PDF: Professional report with statistics summary
| Component | Model | I²C Address | Description |
|---|---|---|---|
| MCU | ESP32-C3 SuperMini | - | Main microcontroller |
| Power Monitor | INA226 | 0x40 | Voltage/Current sensing |
| Display | SSD1306 | 0x3C | 128×32 OLED |
| RTC | DS3231 | 0x68 | Real-time clock |
| Shunt | R2512 | - | 0.01Ω current sense |
| File | Description |
|---|---|
Manufacture/BOM.csv |
Bill of Materials |
Manufacture/PickAndPlace.csv |
Pick and Place coordinates |
Schematics/EdgePowerMeter.fzz |
Fritzing schematic |
Schematics/EdgePowerMeter_bom.csv |
Schematic BOM |
firmware/firmware.ino |
Arduino firmware with libraries |
All I²C devices share a common bus:
- SDA: GPIO8 (ESP32-C3)
- SCL: GPIO9 (ESP32-C3)
- VCC: 3.3V common rail
- GND: Common ground
The INA226 monitors voltage across the shunt resistor via VIN+ (high side) and VIN- (low side).
Download the latest release for your platform from the Releases page:
| Platform | File |
|---|---|
| Linux (Snap Store) | sudo snap install edgepowermeter |
| Linux (Debian/Ubuntu) | edgepowermeter_x.x.x_amd64.deb |
| Linux (Other) | EdgePowerMeter (standalone) |
| Windows | EdgePowerMeter.exe |
| macOS (Intel) | EdgePowerMeter-macos-x86_64.zip |
| macOS (Apple Silicon) | EdgePowerMeter-macos-arm64.zip |
sudo snap install edgepowermeter
sudo snap connect edgepowermeter:raw-usb # Required for USB serial access
edgepowermetersudo dpkg -i edgepowermeter_1.0.0_amd64.deb
edgepowermeterchmod +x EdgePowerMeter
./EdgePowerMeter# Clone the repository
git clone https://github.com/DanielRossi1/EdgePowerMeter.git
cd EdgePowerMeter
# Install Python dependencies
pip install PySide6 pyqtgraph pyserial reportlab matplotlib numpy scipy
# Optional: Install PyOpenGL for GPU-accelerated rendering
pip install PyOpenGL PyOpenGL_accelerate
# Run the application
python run.py- Install ESP32 board support
- Install required libraries:
INA226by Rob TillaartAdafruit_GFXAdafruit_SSD1306RTClibby Adafruit
- Open
firmware/firmware.ino - Select board:
ESP32C3 Dev Module - Upload
# Compile
arduino-cli compile --fqbn esp32:esp32:esp32c3 firmware
# Upload
arduino-cli upload -p /dev/ttyUSB0 --fqbn esp32:esp32:esp32c3 firmwarepio run --target uploadTo build standalone executables for distribution:
# Install build dependencies
pip install pyinstaller
# Build executable + .deb package (Linux)
python build.py all
# Or just the executable
python build.py exeOutput files are created in dist/:
EdgePowerMeter- Standalone executableedgepowermeter_1.0.0_amd64.deb- Debian package
📖 See docs/BUILD.md for detailed build instructions, including:
- Building on Windows and macOS
- Creating installers
- CI/CD integration
- Troubleshooting
- Connect hardware to your computer via USB
- Launch the app:
python run.pyor run the executable - Select serial port from the dropdown
- Click Start to begin recording
The firmware outputs CSV data at 921600 baud with millisecond-precision timestamps:
Timestamp,Voltage[V],Current[A],Power[W]
2025-11-30 12:34:56.123,5.0123,0.2500,1.2531
2025-11-30 12:34:56.223,5.0118,0.2498,1.2525
The timestamp uses the DS3231 RTC with SQW sync for ±2ppm accuracy.
# Using screen
screen /dev/ttyUSB0 921600
# Using cat
stty -F /dev/ttyUSB0 921600 && cat /dev/ttyUSB0FPS/W = Inference_FPS / Average_Power_W
Example: 30 FPS inference with 2.5W average = 12 FPS/W
⚠️ IMPORTANT: This project involves electrical connections. Incorrect wiring can cause damage, fire, or injury.
- ❌ NOT designed for AC voltages
- 🔌 Disconnect power before changing connections
- 🔍 Verify polarity with a multimeter before powering
- ⚡ Use appropriate fuses for your application
- 💧 Keep device dry and away from conductive materials
- 👨🔧 Seek professional help if unsure
The author assumes no responsibility for damage or injury resulting from improper use.
Key configuration in firmware/firmware.ino:
namespace Config {
constexpr float SHUNT_RESISTANCE = 0.010f; // Ohms
constexpr float CURRENT_LSB_MA = 0.100f; // mA resolution
constexpr uint16_t INA226_AVERAGING = 16; // Samples averaged
constexpr uint32_t MEASUREMENT_INTERVAL = 10; // ms between readings
constexpr uint32_t SERIAL_BAUD = 921600; // High-speed serial
}Set FORCE_RTC_UPDATE = true in firmware to sync RTC with compile time on first boot.
| Parameter | Value |
|---|---|
| Voltage Range | 0 - 36V |
| Current Range | ±3.2A (with 0.01Ω shunt) |
| Resolution | 1.25mV / 0.1mA |
| Sampling Rate | ~100 Hz |
| Serial Baud | 921600 |
| Display Update | 100ms |
EdgePowerMeter/
├── firmware/ # Arduino firmware folder
│ ├── firmware.ino # Main firmware sketch
│ ├── PrecisionTime.h/cpp # Millisecond-precision timing library
│ └── OLEDStatus.h/cpp # OLED display library
├── run.py # Application entry point
├── build.py # Build script for executables
├── app/
│ ├── main.py # Application bootstrap
│ ├── version.py # Version info
│ ├── serial/
│ │ └── reader.py # Serial communication
│ └── ui/
│ ├── main_window.py # Main GUI
│ ├── theme.py # Dark/Light themes
│ ├── settings.py # Settings dialog
│ ├── report.py # PDF/CSV export & import
│ └── widgets/ # Reusable UI components
│ ├── plot_widget.py
│ ├── plot_buffers.py
│ ├── stat_card.py
│ └── port_discovery.py
├── assets/
│ └── prototype/ # Screenshots and photos
├── docs/
│ ├── BUILD.md # Build instructions
│ ├── HARDWARE.md # Hardware documentation
│ └── SOFTWARE.md # Software documentation
├── Manufacture/ # PCB production files
└── Schematics/ # Circuit diagrams
Contributions are welcome! Please feel free to submit issues and pull requests.
- 3D printed enclosure design
- Mobile app companion
- Data logging to SD card
- Improved PCB design
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Made with ❤️ for the embedded AI community
⭐ Star this repo if you find it useful!





