Skip to the content
2 layers30 × 43 mmCurrentmeter, the printed circuit board in 3D

Mini Current Meter using INA228A ultra-precise digital power monitor

Size
30 × 43 mm
Copper layers
2
Thickness
1.6 mm
Parts
40
Nets
37
Pads
150
Tracks, vias
213, 47
Pours
4
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
25 Jul 2025
Updated
14 Jun 2026

Overview

Currentmeter is an open-source printed circuit board by hnz1102, from the hnz1102/mini-current-meter repository on GitHub. It is a 2-layer board of 30 × 43 mm with 40 parts on 37 nets, routed with 213 tracks and 47 vias.

It is built around the ESP32-C3-WROOM-02-N4, SPX3819M5-L and MH2029-601Y, with the NSR0340HT1G-HXY, SSM3J332R,LF and USB4105-GF-A among its other parts. Its parts include 17 resistors, 6 capacitors, 5 ICs, 3 diodes and 3 connectors. It belongs with the radio and wireless and power boards and the ESP32 and RISC-V boards of this library.

Main components

6

README

README.md

Mini Current Meter

Mini Current Meter - Mini Size High-resolution Digital Power Monitor and Logger

This tool provides a logging function that captures data on voltage, current and power consumption. Voltage input range is from 0 to 35V, maximum current input is 10A.

Features

High-resolution - By using Texas Instruments INA228 IC - 20-bit delta-sigma ADC, it can obtain measurement data with 195µV bus voltage and 163.84mV shunt voltage resolution.

Microcontroller on board - No need for a client PC when measuring. Data is sent directly to the server.

Transfer measurement data via WiFi - This logger can transfer data to a Linux PC via WiFi network and you can view the dashboard graph in InfluxDB.

WPS Support - WiFi credentials can be configured without editing firmware. On first boot (or after a factory reset), the device automatically starts WPS (Push Button Configuration). Press the WPS button on your router within 2 minutes to connect. Credentials are saved to non-volatile storage and reused on subsequent boots.

Calibration Function - Built-in calibration functionality with persistent storage. Long press the center button for 5–10 seconds to perform automatic calibration that corrects voltage and current measurement offsets. Calibration results are automatically saved to non-volatile storage and restored on power-up.

Factory Reset - Long press the center button for 10 seconds or more to erase all saved settings (calibration data, WiFi credentials, etc.) and reboot the device.

Change Channel - This logger allows you to change the measurement channel by pushing the center button with a pin. Once you push the center button, the channel will change to the next channel. The channel cycles through 1, 2, 3, 4, and back to 1.

Battery Powered - Uses LiPo battery. It can run for 12 hours on a single charge. The battery is charged via USB Type-C port.

Mini Size - The dimensions are 37mm(W) x 67mm(D) x 55mm(H). It can be used in various locations.

How to Use the Logger

PinOut

This meter has a pin socket with three pins: VBUS/VIN+, GND, and VIN-. The VBUS/VIN+ pin is connected to the voltage input or the current input. The GND pin is connected to the ground of the voltage or current input. The VIN- pin is connected to the load side of the voltage or current input.

DO NOT CONNECT THE VIN+ AND GND PINS IN REVERSE POLARITY. IF CONNECTED INCORRECTLY, THE ADC IC WILL BE DAMAGED.

How to connect

DO NOT CONNECT WITH REVERSE POLARITY BETWEEN VBUS/VIN+ AND GND. IF CONNECTED INCORRECTLY, THE ADC IC WILL BE DAMAGED.

The measurement interval time is fixed at 100ms. Each measurement data is sent to the server every 1 second.

The display shows the current voltage, current, power consumption, battery voltage, buffer consumption, WiFi connection status, and channel number. If the WiFi Access Point cannot establish a connection, the display will not show the WiFi indicator. If voltage is measured while WiFi is not connected, the data is stored in the logger's internal memory buffer. The buffer that is not being sent to the server is indicated by a buffer bar on the display. When the buffer is full (the bar reaches the right edge of the display), measurement stops automatically. When WiFi is connected and data is transmitted to the server, the buffer bar shrinks to the left. When the buffer is full and measurement is stopped, measurement will resume automatically after the buffer drops below 50%.

board

Display

If you send data to the server, you can see real-time data using the Dashboard in InfluxDB. If you have 3 meters, you can view data on the dashboard with different channels simultaneously.

These meters are small and light, so you can use them in various locations. For example, you can use them to measure circuit current on your breadboard, or you can measure the current at each measurement point on your breadboard circuit.

breadboard

dashboard

To charge the battery, simply connect to a USB Type-C port from a bus-powered USB port. During charging, the CHG LED is RED. After charging is complete, the FUL LED is GREEN and charging will stop automatically. However,

DO NOT CONTINUE CHARGING IF THE BATTERY IS FULL FOR A LONG TIME.

WiFi Setup (WPS)

The Mini Current Meter uses WPS Push Button Configuration (PBC) to connect to a WiFi network without requiring any code changes or configuration files.

First-Time Setup

  1. Power on the device. If no WiFi credentials are saved, the display shows WPS... and the device begins WPS negotiation.
  2. Press the WPS button on your router within 2 minutes.
  3. The device connects to the network, saves the SSID and password to NVS, and begins normal operation.

Subsequent Boots

The saved credentials are loaded from NVS automatically. WPS is skipped and the device connects directly.

Re-provisioning

To connect to a different access point, perform a Factory Reset (hold the button 10 s+). The stored credentials are erased and WPS runs again on the next boot.

Button Functions

The center button supports three functions depending on how long it is held.

Hold durationAction
< 5 secondsChange measurement channel (1 → 2 → 3 → 4 → 1)
5 – 10 secondsCalibration
10 seconds or moreFactory Reset (erase all NVS data + reboot)

While holding the button, the display shows a countdown timer and the name of the action that will be triggered when the button is released:

  • 0 – 4 s: CH x (current channel, no action on release yet)
  • 5 – 9 s: [CALIB] Xs — releasing in this window starts calibration
  • 10 s+: [RESET] Xs — releasing in this window performs factory reset

Calibration Function

The Mini Current Meter includes built-in calibration functionality to correct measurement offsets and improve accuracy.

How to Perform Calibration

  1. Prepare for calibration: Ensure no current is flowing through the shunt resistor and no voltage is applied to the measurement inputs (VBUS/VIN+ and GND should be at the same potential).

  2. Start calibration: Press and hold the center button for 5–10 seconds. The display shows [CALIB] Xs during this window.

  3. Release the button: Release while the display shows [CALIB] to trigger calibration. Holding beyond 10 seconds switches to factory reset mode.

  4. Calibration process: The device automatically takes 300 samples over 3 seconds to calculate average voltage and current offsets.

  5. Completion: When calibration is complete, the display will show "Calibration OK" for 2 seconds, and the offset values will be automatically saved to non-volatile storage.

Calibration Features

  • Automatic offset correction: Calibration corrects both voltage and current measurement offsets
  • Persistent storage: Calibration results are automatically saved to NVS (Non-Volatile Storage) and restored on power-up
  • High accuracy: Uses 300-sample averaging for precise offset calculation
  • User feedback: Real-time countdown and mode display during button hold

When to Calibrate

  • Initial setup: Perform calibration when first using the device
  • Temperature changes: Recalibrate if operating temperature changes significantly
  • Accuracy concerns: If measurements appear to have a systematic offset
  • After firmware updates: Recalibration recommended after major firmware changes

Note: Always ensure zero current flow and zero voltage difference during calibration for best results.

Factory Reset

Holding the button for 10 seconds or more and releasing it will:

  1. Erase all data stored in NVS (calibration offsets, WiFi credentials, channel settings)
  2. Reboot the device

The display shows [RESET] Xs while in this mode. The device boots as if fresh from the factory — WiFi re-provisioning via WPS will be required on first startup.

Recent Updates

Version 0.2.0 - WPS, Button Long-Press Redesign

  • WPS WiFi provisioning: First boot (or after factory reset) automatically starts WPS PBC; credentials saved to NVS for subsequent boots
  • Revised button timing: Short press (< 5 s) = channel change, 5–10 s = calibration, 10 s+ = factory reset
  • Live countdown display: Display shows elapsed hold seconds and the active mode ([CALIB] / [RESET]) while the button is held
  • Factory reset via button: Holding 10+ seconds erases all NVS data (calibration, WiFi credentials) and reboots; WPS runs automatically on next boot
  • Display improvements: Hold-mode indicator updates every second; normal measurement view resumes immediately on release if no action is triggered

Version 0.1.0 - Calibration and Accuracy Improvements

  • Added calibration functionality: Built-in calibration system with persistent storage
  • Improved measurement accuracy: Automatic offset correction for voltage and current readings
  • Enhanced button handling: Added debouncing and multi-function button support
  • NVS integration: Calibration data automatically saved and restored across power cycles
  • User interface improvements: Real-time calibration status display and user feedback
  • Error correction: Fixed voltage measurement accuracy issues and ADC offset handling

How to Build from Code and Install to the Unit

Using Ubuntu 22.04 LTS

  1. Install Rust Compiler
bash
sudo apt update && sudo apt -y install git python3 python3-pip gcc build-essential curl pkg-config libudev-dev libtinfo5 clang libclang-dev llvm-dev udev libssl-dev python3.10-venv
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

select No.1

After installation, you need to set the environment variable for Rust. Add the following line to your shell configuration file (e.g., ~/.bashrc, ~/.zshrc, etc.):

bash
source "$HOME/.cargo/env"
  1. Install toolchain for ESP32-C3
bash
cargo install ldproxy
cargo install espup
cargo install cargo-espflash

At this time (2025-07-25), espup cannot be compiled. If you get an error, please use the following command to install the toolchain.

bash
cargo install cargo-binstall
cargo binstall espup
bash
espup install
espup update

Then, run the following command to set the environment for the ESP32-C3 toolchain:

bash
. ./export-esp.sh
  1. Add UDEV rules
bash
sudo sh -c 'echo "SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"303a\", ATTRS{idProduct}==\"1001\", MODE=\"0666\"" > /etc/udev/rules.d/99-esp32.rules'
sudo udevadm control --reload-rules
sudo udevadm trigger
  1. Download Mini Current Meter code
bash
git clone https://github.com/hnz1102/mini-current-meter.git
cd mini-current-meter/code
  1. Setting WiFi SSID, Password, and InfluxDB Server IP Address

You need to set the WiFi SSID, password, and InfluxDB server IP address in the configuration file. You can find the configuration file 'cfg.toml.samp' in the code directory. You need to copy this file to cfg.toml and edit it.

bash
nano code/cfg.toml

[mini-current-meter]
wifi_ssid = "XXXXXXXXXXXX"  # Set your WiFi SSID.
wifi_psk = "XXXXXXXXXXXXX"  # Set your WiFi Password.
shunt_resistance = "0.005"
influxdb_server = "<IP Address>:8086"  # Set your InfluxDB server IP address.
influxdb_api_key = "<API_KEY>" # Set your InfluxDB API Key.
influxdb_api = "/api/v2/write?org=<ORG>&bucket=LOGGER&precision=ns" # Set your InfluxDB API URL. You must set <ORG> same as Initial Organization Name.
influxdb_tag = "ch"
influxdb_measurement = "minicurrent"
max_records = "1023"
  1. Connecting the Board and Setting Device and Toolchain
bash
Connect the mini-current-meter via USB to this build code PC. Then, 
$ cargo espflash board-info
select /dev/ttyACM0
Chip type:         esp32c3 (revision v0.4)
Crystal frequency: 40MHz
Flash size:        4MB
Features:          WiFi, BLE
MAC address:       xx:xx:xx:xx:xx:xx

$ rustup component add rust-src --toolchain nightly-2023-06-10-x86_64-unknown-linux-gnu
  1. Build Code and Write to Flash
bash
$ cargo espflash flash --release --monitor
App/part. size:    964,240/3,145,728 bytes, 30.23%
[00:00:00] [========================================]      12/12      0x0                                                                       
[00:00:00] [========================================]       1/1       0x8000                                                                    
[00:00:11] [========================================]     546/546     0x10000                                                                   [2023-11-11T10:17:05Z INFO ] Flashing has completed!

Automatically boots!

How to Install InfluxDB

  1. Download InfluxDB and Install
bash
$ wget https://dl.influxdata.com/influxdb/releases/influxdb2-2.7.0-amd64.deb
$ sudo dpkg -i influxdb2-2.7.0-amd64.deb
$ sudo service influxdb start
  1. Configure InfluxDB
text
Connect to 'http://<InfluxDB installed PC Address>:8086'

Click GET STARTED and set Username, Password, Initial Organization Name, and Initial Bucket Name

TermValue
UsernameSet login username as InfluxDB administrator web console
PasswordSet login password as InfluxDB administrator web console
Initial Organization NameOrganization Name ex. ORG
Initial Bucket NameLOGGER

After setting these, click CONTINUE.

  1. Copy the Operator API Token

You can see the operator API token in the browser. YOU WON'T BE ABLE TO SEE IT AGAIN! If you want to get a new API token, click API Tokens menu from Sources Icon, then click GENERATE API TOKEN and select All access token, click Save. You can see the new API token and copy it. After copying the token, click CONFIGURE LATER.

  1. Import the Dashboard Template

Click the Dashboard icon, and select Import Dashboard from the CREATE DASHBOARD menu.

Drop the mini-current-meter/dashboard/mini-current-meter.json file to Drop a file here, then click IMPORT JSON AS DASHBOARD.

You can see the Mini Current Meter Dashboard panel on the Dashboards page.

Click this panel, and you can see the Mini Current Meter Dashboard.

If you want to customize the dashboard design, click the configure mark. You can change the graph design.

  1. Start Mini Current Meter Logging and Send Data

Turn on the power switch. Logging data will be sent to InfluxDB. You can see the data on the dashboard.

Schematic, PCB Gerber and Container 3D Data

There is schematic data in the hardware directory including 3D printing data as 3MF format files.

Container

LICENSE

This source code is licensed under MIT. Other Hardware Schematic documents are licensed under CC-BY-SA V4.0.

Parts

40
QtyValueFootprintReferences
610KResistor_SMD:R_0603_1608MetricR108, R110, R202, R302, R303, R304
320K 1%Resistor_SMD:R_0603_1608MetricR106, R120, R121
20.1uFCapacitor_SMD:C_0603_1608MetricC111, C304
21uFCapacitor_SMD:C_0805_2012MetricC109, C113
2330Resistor_SMD:R_0603_1608MetricR118, R119
25.1KResistor_SMD:R_0603_1608MetricR103, R104
1100KResistor_SMD:R_0603_1608MetricR122
110uFCapacitor_SMD:C_0805_2012MetricC112
112K 1%Resistor_SMD:R_0603_1608MetricR107
12KResistor_SMD:R_0603_1608MetricR115
13.5x2.6 Tact SWtbctl:WS-TASV SMT Tact SwitchSW201
14.7uFCapacitor_SMD:C_0805_2012MetricC108
15mResistor_SMD:R_2512_6332Metric_Pad1.40x3.35mm_HandSolderR308
1BOOTTestPoint:TestPoint_Pad_D1.0mmTP202
1Conn_01x03Connector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_VerticalJ102
1ESP32-C3-WROOM-02-N4tbctl:IC18_ESP32-C3-WROOM-02-N4_EXPU101
1GNDTestPoint:TestPoint_Pad_D1.0mmTP101
1INA228Package_SO:VSSOP-10_3x3mm_P0.5mmU302
1LED GREENLED_SMD:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolderD103
1LED REDLED_SMD:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolderD102
1LiPo BATTERYConnector_JST:JST_PH_B2B-PH-K_1x02_P2.00mm_VerticalJ103
1MCP73831-2-OTPackage_TO_SOT_SMD:SOT-23-5U104
1MH2029-601YInductor_SMD:L_0805_2012MetricFB101
1NSR0340HT1GDiode_SMD:D_SOD-323_HandSolderingD104
1SLIDE_SWtbctl:SLIDE_SW_IS1235-GSW105
1SPX3819M5-LPackage_TO_SOT_SMD:SOT-23-5U102
1SSD1306_DISPLAYtbctl:OLED I2C DISPLAYU103
1SSM3J332RPackage_TO_SOT_SMD:SOT-23Q102
1USB4105-GF-Atbctl:USB_C_5077CR-16-SMC2-BK-TRJ101

Similar boards

  • 2 layers40 × 60 mmWakepc, the printed circuit board in 3D

    Wakepc

    hnz1102/wakepcbox

    Wake on LAN Controller Box

    45 parts4
  • 2 layers185 × 98 mmMosfetload, the printed circuit board in 3D

    Mosfetload

    hnz1102/electricload

    Electric Load and Logger

    96 parts5
  • 2 layers139 × 64 mmEEW display, the printed circuit board in 3D

    EEW display

    hnz1102/EEW-display

    ESP32-S3 firmware for a small earthquake-information display. It shows recent earthquakes and emergency earthquake warnings (緊急地震速報, EEW) from [P2P地震情報](https://www.p2pquake.net/), draws the epicenters on a Google map…

    47 parts
  • 2 layers91.7 × 70 mmCurrent logger, the printed circuit board in 3D

    Current logger

    hnz1102/current-logger

    This tool provides a logging function that gets data on voltage, current and power consumption. Voltage input range is from 0 to 85V, Maximum current input is 15A.

    64 parts18
  • 2 layers50 × 70 mmTemp logger, the printed circuit board in 3D

    Temp logger

    hnz1102/temp-logger

    Logging Thermocouple Temperature and Send Data to InfluxDB system.

    52 parts5
  • 2 layers46 × 54 mmMini power, the printed circuit board in 3D

    Mini power

    hnz1102/mini-power

    Mini-Power is a small, portable DC power supply unit designed to provide a convenient and reliable source of adjustable voltage for your electronic devices and breadboard experiments.

    52 parts3
  • 2 layers93 × 50 mmSsh bridge for raspberrypi, the printed circuit board in 3D

    Ssh bridge for raspberrypi

    hnz1102/ssh-serial-bridge

    Firmware for the ESP32-S3 that bridges an SSH connection (over Wi-Fi) to UART and USB CDC serial ports. Written in Rust (esp-idf-hal / esp-idf-svc) with a C component (wolfSSH) for the SSH server.

    37 parts3

Questions

How big is the Currentmeter PCB?

It measures 30 × 43 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Currentmeter use?

40 parts, built around the ESP32-C3-WROOM-02-N4, SPX3819M5-L, MH2029-601Y and NSR0340HT1G-HXY. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Currentmeter KiCad files?

From the hnz1102/mini-current-meter repository on GitHub, at the commit this page was made from: the board is hardware/currentmeter.kicad_pcb and its schematic hardware/currentmeter.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Currentmeter design in my own project?

Its repository states no licence, so its author keeps all rights: ask hnz1102 before reusing the design.