Main Content

Xiao Power Meter With INA219

This blog is about how to make a tiny power meter based on a INA219 current sensor. which will show the voltage, current, and wattage of connected devices. this meter is built super tiny by utilizing the small size of the Seeed Studio XIAO SAMD21.let’s get started

some features of the Xiao power meter

Up to +26V target voltage
Up to ±3.2A current measurement, with ±0.8mA resolution
Senses Bus Voltages from 0 to 26 V

Parts

- 0.96 Inch I2C/IIC 4pin OLED Display Module
- Seeed Studio XIAO SAMD21
- INA219 current sensor (INA219AIDCNR )SOT-23-8
- 4x 10k resistors (SMD 0805)
- 100R resistors (SMD 2512)
- 1x 100NF capacitor (SMD 0805)
- 2x KF301 2 Pin 5.08mm Pitch Plug-in Screw Terminal Block Connector
- PCB

Tools

- SMD rework station
- soldering iron

The INA219 Current Sensor operates based on the Hall effect principle and integrates a small onboard shunt resistor. When current passes through the shunt resistor, it generates a voltage drop, which the INA219 measures. Simultaneously, it measures the voltage across the shunt resistor. Utilizing these values and calibration, it calculates the current passing through the shunt resistor. The chip communicates these measurements via an I2C or SMBus interface to external devices, enabling accurate real-time monitoring and control of current and voltage in electronic circuits, making it a popular choice for applications requiring precise power consumption measurement.

The Seeed Studio XIAO SAMD21 is the smallest member of the Seeeduino family. It carries the powerful ATSAMD21G18A-MU which is a low-power microcontroller. On the other hand, this little board has good performance in processing but needs less power. As a matter of fact, it is designed in a tiny size and can be used for wearable devices and small projects.

Seeed Studio XIAO SAMD21 has 14 PINs, which can be used for 11 digital interfaces, 11 mock interfaces, 10 PWM interfaces (d1-d10), 1 DAC output pin D0, 1 SWD pad interface, 1 I2C interface, 1 SPI interface, 1 UART interface, Serial communication indicator (T/R), Blink light (L) through pin multiplexing. The colors of LEDs(Power, L, RX, TX) are green, yellow, blue, and blue. Moreover, Seeed Studio XIAO SAMD21 has a Type-C interface that can supply power and download code. There are two reset buttons, you can short-connect them to reset the board”

Link to article