INA219 DC Current Sensor Using Visuino & Arduino

by RonFrtek in Circuits > Arduino

130 Views, 1 Favorites, 0 Comments

INA219 DC Current Sensor Using Visuino & Arduino

INA219 DC Current Sensor Using Visuino & Arduino

Learn how to use the INA219 DC Current Sensor with Visuino and Arduino to measure and display current in real time! This project shows you how to connect the sensor and display the measured current on an OLED display. Perfect for monitoring power consumption in your circuits!

Watch the Video!

What You Will Need

INA219_1.jpg
FZEK4WBK3XGYAP0.LARGE.jpg
F5OFEUQJJ4ZYFKY.LARGE.jpg
bulb.jpg
VisuinoAdvrtisemen_Keyestudio.jpg
power-supply.png
breadboard.png
oled123-091.png
  1. Arduino UNO or any other Arduino board
  2. Breadboard
  3. OLED Display
  4. INA219 DC Current Sensor
  5. Jumper wires
  6. Power Supply
  7. Some load like a light bulb or DC motor
  8. Visuino software: Download here


The Circuit

2025-03-04_13-27-59.png
  1. Connect INA219 pin [SCL] to Arduino pin [SCL]
  2. Connect INA219 pin [SDA] to Arduino pin [SDA]
  3. Connect INA219 pin [VCC] to Arduino pin [5v]
  4. Connect INA219 pin [GND] to Arduino pin [GND]


  1. Connect OLED Display pin [SCL] to Arduino pin [SCL]
  2. Connect OLED Display pin [SDA] to Arduino pin [SDA]
  3. Connect OLED Display pin [VCC] to Arduino pin [5v]
  4. Connect OLED Display pin [GND] to Arduino pin [GND]


  1. Connect Power Supply (+) to INA219 pin [Vin -]
  2. Connect Light Bulb (+) to INA219 pin [Vin +]
  3. Connect Light Bulb (-) to Connect Power Supply (-)

Start Visuino, and Select the Arduino UNO Board Type

select-board-uno.jpg
Visuino-Select-Board-UNO.jpg

The Visuino: https://www.visuino.com also needs to be installed. Download Free version or register for a Free Trial.

Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2

In Visuino Add, Set & Connect Components

2025-03-04_14-25-19.png
2025-03-04_14-25-58.png
2025-03-04_14-26-48.png
2025-03-04_14-28-16.png
2025-03-04_14-29-52.png
2025-03-04_14-11-06.png
ina219-oled.png
  1. Add "INA219" component
  2. Add "OLED I2C" component


  1. Double click on the "DisplayOLED1" component and in the Elements window drag "Text Field" to the left side and in the properties window set "Size" to 2, "Width" to 10 and "Y" to 15
  2. in the Elements window drag "Draw Text" to the left side and in the properties window set "Size" to 2, "Text" to mA, "X" to 100 and "Y" to 15
  3. Close the Elements window


  1. Connect "VoltageCurrentPower1" pin [Current mA] to "DisplayOLED1" > "Text Field1" pin [In]
  2. Connect "VoltageCurrentPower1" Control pin [I2C] to Arduino pin [I2C]
  3. Connect "DisplayOLED1" pin [I2C] to Arduino pin [I2C]

Generate, Compile, and Upload the Arduino Code

Visuino-Compile-UNO.jpg

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Play

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable, you can download it and open it in Visuino: https://www.visuino.com