How to Use the INA780B Digital Power Monitor With Arduino
by Lopfi in Circuits > Arduino
53 Views, 0 Favorites, 0 Comments
How to Use the INA780B Digital Power Monitor With Arduino
The INA780B is a highly accurate digital power monitor from Texas Instruments, perfect for measuring bus voltage, shunt voltage, current, power, and temperature in high-current applications. In this guide, we'll walk you through how to use the INA780B with an Arduino to monitor these values, with the data being displayed on the Serial Monitor.
While working on a project that required measuring high currents at relatively high voltages, I wanted to avoid the hassle of building complicated circuits with ADCs, shunts, and voltage dividers. That’s when I discovered this nifty chip from Texas Instruments, the INA780B, which handles everything I needed and more—all in one package.
I'm also currently working on a development board for these chips, aiming to offer it at a price far below the $70 that TI charges. If you're interested, please let me know—I’m considering doing a small production run!
Supplies
- Arduino Board (e.g., Arduino Uno, Nano, or Mega)
- INA780B Module or breakout board
- Jumper wires
- Breadboard (optional)
- USB Cable for Arduino
- Computer with Arduino IDE installed
Wiring the INA780B to Your Arduino
First, let's connect the INA780B to your Arduino using the I2C interface.
- Connect VCC on the INA780B to 5V on the Arduino.
- Connect GND on the INA780B to GND on the Arduino.
- Connect SCL on the INA780B to A5 on the Arduino (for Uno).
- Connect SDA on the INA780B to A4 on the Arduino (for Uno).
If you're using a different Arduino board, make sure to check the corresponding SDA and SCL pins.
Install the INA780x Library
Before we can start coding, we need to install the INA780x library, which supports the entire INA780x family.
- Download the INA780x library from the GitHub repository.
- Open the Arduino IDE.
- Go to Sketch > Include Library > Add .ZIP Library....
- Select the downloaded .zip file to install the library.
Upload the Example Sketch
Let's get started with a basic example that reads and displays the bus voltage, current, power, and temperature.
Upload the Sketch
- Open the Arduino IDE and paste the code into a new sketch.
- Select the correct board and port from the Tools menu.
- Click the upload button to upload the sketch to your Arduino.
View the Data on the Serial Monitor
Once the sketch is uploaded, open the Serial Monitor (Tools > Serial Monitor) to see real-time data from the INA780B. You should see readings for the bus voltage, shunt voltage, current, power, and temperature, updating every second.
Conclusion
Congratulations! You’ve successfully set up the INA780B with an Arduino and are now able to monitor critical electrical parameters in your project. Whether you're working on a battery management system, power supply monitoring, or any high-current application, the INA780B offers precision and reliability.
If you have any questions or run into issues, feel free to comment below. Happy making!