IntermediateTest and Measurement
INA219 USB Power Monitor
Measure bus voltage and current for a small low-voltage USB load and calculate power in watts.
Parts from the database
- INA219AIDCNR × 1High-side current and voltage monitor; use on a breakout
- Raspberry-Pi-Pico × 1Microcontroller
- SSD1306 × 1Optional OLED
Other supplies
- INA219 breakout with known shunt valueCommon build supply
- Pico development boardCommon build supply
- USB breakout/test lead rated for the intended currentCommon build supply
- small USB loadCommon build supply
- optional OLEDCommon build supply
- jumper wiresCommon build supply
Amazon links may be affiliate links. As an Amazon Associate, Electronics Hobby Hub earns from qualifying purchases.
Connections
- Put the INA219 breakout's VIN+ and VIN− in series with the positive supply lead to the test load; never place the module across the supply as a short.
- Connect module logic VCC to 3V3, GND to common ground, SDA to GP4 and SCL to GP5.
- Start with a small load and keep within the breakout shunt's current and power ratings.
Build steps
- Install Adafruit INA219 library and run its example without a load.
- With power disconnected, insert the breakout in series and inspect polarity.
- Reconnect a low-current USB load and record voltage/current; calculate P = V × I.
- Compare with a second meter if available and label your display with the module's measurement range.
Software and firmware setup
Firmware is required, but a complete display sketch is not included yet. Start by reading bus voltage and shunt current from the INA219 breakout, then add the display. This guide's I2C pins are for a Pico running an Arduino-compatible core; the breakout's shunt-current limit remains the limiting factor.
Test your build
The reading should rise when a load is added. This module is for small DC experiments; it is not a 12 V car battery or 2,000 W amplifier current meter.
Troubleshooting
- Negative current usually means VIN+ and VIN− are reversed.
- If the board is not detected, verify the breakout is powered and run an I²C scan.
- Large errors at low current can come from shunt tolerance, calibration, or wiring resistance.
Safety and limitations
Do not place this small breakout in a car starter or high-current amplifier circuit. Keep USB wiring fused and within the breakout's rating.
Manufacturer and platform documentation
Community Notes for This Project
These are unverified visitor contributions, separate from the build guide and manufacturer specifications. Verify technical advice against the linked datasheets before relying on it.
Set up the comments service to load community notes.