3-Channel Current Meter

Implementing a 3-Channel Current Meter With INA3221

This section illustrates various approaches to using the INA3221 to create a 3-channel current (and voltage) meter.

Overview

A current and voltage meter is a valuable tool for any lab. It clearly shows the current consumption of devices, and by summing up consumed currents, you can determine the total energy consumption in Ah or Wh.

This is particularly useful for testing battery capacities or examining charge and discharge curves.

Multi-Channel Measurements

The INA3221 provides three independent channels, allowing measurement of three separate loads. However, all loads must share a common ground.

Multi-channel measurements have many practical applications. For example, a typical solar panel setup can benefit from all three channels:

  • Channel #1: Solar Panel
    Measures the raw power input from the solar cell.

  • Channel #2: Solar Controller Output
    Measures the power output from the solar controller. By comparing this data with Channel #1, you can calculate the solar controller efficiency.

  • Channel #3: Charger
    Measures the power output used to charge the buffer battery.

Limitations

The INA3221 is an affordable chip for current and voltage measurement but comes with some limitations, especially when using commonly available breakout boards:

  • High-Side Measurement
    The INA3221 only supports high-side measurements. This means all channels must share the same ground. While this is a design constraint for your schematics, it typically doesn’t affect field usage.

  • Maximum Current
    Most breakout boards include a 0.01 Ohm shunt resistor. This limits the maximum measurable current to 1.638A. To measure higher currents, you would need to lower the shunt resistor value. For instance:

    • Adding another R100 (0.01 Ohm) resistor in parallel with the existing one reduces the effective resistance to 0.005 Ohms, doubling the maximum measurable current to 3.276A.

While reducing the shunt resistor value allows for measuring higher currents, the PCB traces on typical breakout boards are not designed to handle high currents. In such cases, desolder the built-in shunt resistor and replace it with a properly rated external shunt resistor designed for higher currents.

Implementations

Using the INA3221 requires a microcontroller because it communicates via a digital I2C interface. If you need to develop a device without a microcontroller, consider the analog INA169 as an alternative (one channel only, so you would need three of these).

For the examples in this section, I’ll use the ESP32-C3 SuperMini due to its compact size, good availability, and affordability. However, you can use any microcontroller that meets your project’s requirements.

The actual firmware for the device can be developed in a few different ways:

C++ Libraries

For maximum flexibility and control, you can use one of the many INA3221 libraries available for C++. This approach gives you fine-grained control over the functionality, but it also requires more effort:

  • You’ll need to handle all the programming work yourself.
  • Additional libraries may be needed if you want to include features like a display interface or a web server.

This option is ideal for advanced users who want complete customization of their implementation.

ESPHome

A simpler and more accessible approach is to use ESPHome. The ESPHome ecosystem provides native support for the INA3221, so no programming skills are required. ESPHome also manages features like:

  • WiFi support
  • OTA (over-the-air updates)

As an additional benefit, integrating your device with Home Assistant becomes seamless. This allows for automatic logging of measured values and enables triggering automations based on those readings.

Slow Website?

This website is very fast, and pages should appear instantly. If this site is slow for you, then your routing may be messed up, and this issue does not only affect done.land, but potentially a few other websites and downloads as well. Here are simple steps to speed up your Internet experience and fix issues with slow websites and downloads..

Comments

Please do leave comments below. I am using utteran.ce, an open-source and ad-free light-weight commenting system.

Here is how your comments are stored

Whenever you leave a comment, a new github issue is created on your behalf.

  • All comments become trackable issues in the Github Issues section, and I (and you) can follow up on them.

  • There is no third-party provider, no disrupting ads, and everything remains transparent inside github.

Github Users Yes, Spammers No

To keep spammers out and comments attributable, all you do is log in using your (free) github account and grant utteranc.es the permission to submit issues on your behalf.

If you don’t have a github account yet, go get yourself one - it’s free and simple.

If for any reason you do not feel comfortable with letting the commenting system submit issues for you, then visit Github Issues directly, i.e. by clicking the red button Submit Issue at the bottom of each page, and submit your issue manually. You control everything.

Discussions

For chit-chat and quick questions, feel free to visit and participate in Discussions. They work much like classic forums or bulletin boards. Just keep in mind: your valued input isn’t equally well trackable there.

  Show on Github    Submit Issue

(content created Jan 07, 2025)