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 for current signal (optional in PDF)
- π¨ 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)
- Voltage/Current ripple
- Power factor estimation
- Load impedance estimation
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
# 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!





