What is INA219
INA219 is like a little helper for your Arduino. It helps you find out two important things about your electrical stuff: current (how much electricity is flowing) and voltage (the power level). This sensor is great because it’s not big, not expensive, and easy to understand.
When you connect it to your Arduino, it tells you how much electricity and power your circuit is using. It’s like a detective for your gadgets! You can use it for different tasks, such as checking how much juice is left in your portable device’s battery or figuring out how much power your circuit is eating up.
One cool thing about the INA219 is that it can also warn you if there’s too much electricity going through your circuit. This can be super useful to prevent problems. So, whether you’re curious about your gadgets or want to make sure everything is running smoothly, the INA219 is a handy tool to have!
INA219 Module
Adafruit manufactures the INA219 Current Sensor Module, which is constructed around the INA219 chip. The module incorporates additional components and features, making it easy to use in various projects.
At the core of the module is the INA219 chip, which integrates a precision amplifier, an Analog-to-Digital Converter (ADC), and a current shunt voltage reference. To measure current, the module utilizes a low-ohm shunt resistor in series with the load, generating a voltage drop proportional to the current flow.
For voltage measurement, the module employs a voltage divider network. This network allows the module to measure the voltage across the load. To facilitate communication with microcontrollers, the module features an I2C (Inter-Integrated Circuit) interface, making it compatible with platforms like Arduino and Raspberry Pi. Additional components, including pull-up resistors and capacitors, are integrated into the module to ensure stability and accuracy in measurements.
How INA219 Works
The working principle involves the INA219 chip amplifying the voltage drop across the shunt resistor for current measurement and converting it into a digital value using its ADC. Simultaneously, the voltage across the load is measured through the voltage divider network and converted into a digital value.
Digital values representing current and voltage are then made available to the microcontroller through the I2C interface. With these measurements, the microcontroller can calculate power (P = VI) and energy consumption over time. The INA219 chip also includes an alert pin, configurable to trigger an alert under specific conditions, such as exceeding a predetermined current or voltage threshold.
INA219 Module with Arduino
Proteus Simulation Model
Boost your Proteus simulations with the INA219 model! It’s super easy to add – just follow these simple steps to download and install the library. Grab the quick-start link right below. Adding the model to your circuit takes just a few clicks, and then you can see how it works with other parts of your design in real-time!
Arduino Code
To simplify the use of the module, Adafruit provides libraries and example code for popular platforms like Arduino. These libraries handle the communication and calculations, making it easier for developers to incorporate the INA219 module into their projects.
To run your Arduino with the INA219 module in Proteus Simulation, follow these steps:
- Open the Arduino library manager.
- Search for the ‘Adafruit INA219’ library and install it.
- Navigate to “File > Examples > Adafruit_INA219 > getcurrent” to open the example code in a new IDE window.
- Use this example code to run your simulation in Proteus.
Install library dependencies
If you haven't installed other Adafruit library dependencies, a notification window will pop up when you click on the install button in the library manager. This window will instruct you to choose dependencies, so be sure to install them.
Here is another simulation of the INA219 module in Proteus.
Download Library
Simply click on the button to download the library. You can refer to this post for instructions on how to install the library in Proteus 8. How to Download and install Library in Proteus (electronicstree.com)
Please wait 120 seconds: after that, your download will begin ⏳
ZIP Password : electronicstree.com
If you have any requests for Arduino Module Libraries in Proteus, please leave a comment or message us using the contact form.