Tiny compact current, voltage and power meter module that will help you while designing and troubleshooting circuits.

The module utilizes the TI INA219B high side current sensor chip and a PIC24F16KA101 microcontroller to read out and display the data. Besides the meter function, the PCB can be used as a simple PIC24F16KA101 developement board.

Jump to design files ⇒

Power Monitor

Why bother to build such a device, when you could use a cheap multimeter or a bench power supply to do the same job?

In my opinion there are a few advantages/benefits:

  • Small and compact size of the module (5x5cm not including the LCD). Standard 5.5/2.1 center negative power jacks make it perfect to plug it between the PSU and your circuit, build it into your power supply, use it as a current monitor in your pedalboard, etc.
  • Highly tweakable architecture. By changing the value of the current sensing resistor and the INA219 interal calibration constants you can build many variations of the circuit, maintaning the relitavely good measurement precision (12bit AD converter built into the INA219).
  • Overcurrent ALARM FUNCTION - this feature may be extremely useful when debugging circuits, as the current consumption is often a much faster indicator of any possible malfunction. Ialarm (current threshold) value is set with a pot. When the alarm condition occurs (drawn current exceedes the threshold value) the module will kindly inform about that fact by blinking the current value and giving an acoustic signal. Please remember though, this is not a current limit function! It will only inform you that the current drawn by the circuit is more than you expected.
  • Data logging feature. The module sends the measurement results via UART in 1 second intervals. The readout is available in two formats.
  • Educational value. Besides being a useful bench tool, building the Power Monitor can be a good excercise in using the PIC24 microcontrollers, communitaion protocols (SPI, I2C), interfacing LCD displays and more. All the design files and the source code are released under Open Source Hardware license.

Basic application:

Power Monitor application

Technical specification (stock version):

  • Operating Voltage: 5 - 26V DC
  • Voltage measurement resolution: 10mV
  • Current sense range: 0 - 1A
  • Curent measurement resolution: 50µA
  • Power measurement resolution: 1mW
  • Alarm current range: 0 - 1A (pot set to max = alarm OFF)
  • Low dropout input polarity protection
  • Reverse power jack protection (DCin and DCout swapped)
  • 128x64 I2C 0.96" OLED display (SSD1306 controller chip)
  • 84x48 SPI LCD (PCD8544/Nokia5110)
  • Data readout via UART (9600baud, 8b, 1 stop bit, no parity)
  • INA219 recalibration option via UART
  • I2C, SPI, UART and Microchip ICSP headers

Two display types are already implemented in the firmware:

  • 128x64 SSD1306 I2C driven 0.96" OLED
  • SPI 84x48 PCD8554/Nokia5110 LCD.
Power Monitor - display types
Serial port (UART) is used to send the data to the PC (here via an UART-USB converter). Power Monitor + USB/Serial bridge
Measurement results are sent in two available formats: LCD (basically copy of the LCD screen). Power Monitor - Serial out data LCD
Or in RAW format, which is more useful for datalogging: Power Monitor - Serial data out RAW

Many other features can be controlled using serial port commands:

lcd data output format, copy of the LCD display
raw data output format, raw numbers separated by semicolons
stop stops updating the data via UART
start start/resume the data update in 1 second intervals
rstcnt resets the measurement counter to 0
getcnt returns the actual masurement counter value
calrst resets the INA219 calibration constant to theoretic calculated stock value (8192)
recal INA219 secodary recalibration mode used to increase the precision. Requires a separate at least 4.5 digit mA/A meter as a reference
getcal return the actual INA219 calibration constant value
y yep! I confirm
n no, thanks

In recalibration mode:

xxxx.xx waitts for the reference current value (xxxx.xx[mA] format)
exit cancel the calibration and return to NORMAL mode

Module built into a power supply. Power Monitor built into a PSU
  Power Monitor built into a PSU
In case the DC in and DC out jacks are swapped (power applied to the DC out) the module will inform about that fact on all fronts. Power Monitor - warning
Partially populated PCB (bottom layer, all SMT parts). Power Monitor v.1.0 PCB

Design files:

All design files including:

  • Schematic
  • PCB layout (50x50mm dual layer)
  • PCB Gerber files
  • Bill of materials
  • UART serial command list
  • INA219 recalibration procedure via UART

are avaialble on the Power Monitor GITHUB REPOSITORY.