You are on page 1of 2

A current/Voltage measuring

If you wanted to measure voltage and current of a circuit with an Arduino,


the procedure is pretty straight forward. You use the analog input to
measure the voltage across the load and use a shunt to measure the
current via the voltage drop of the shunt resistor. Now, this method is rather
crude, and it works only for voltages within 0-5 V, and the ADC of the
Arduino which is used to read the voltage drop of the resistor is a bit
inaccurate for measuring hundreds of mV only which will drop across the
shunt. Luckily, there are modules out there, which make our lives easier.
For this project, I will be using an INA219 IC, which uses a 0.1R resistor as
a shunt and can measure voltages up to 32V, and has a current range of 0-
3.2A.

This IC offers an I2C interface, to communicate with the Arduino, and by


studying the datasheet, we can use specific commands over the I2C
interface, in order to read the voltage and current values. We are lucky
again because we don’t have to go through that trouble. There are libraries
from Adafruit which you can download, and use premade functions to read
the voltage and current | Click Here To Download Library

OLED Display
The next component which I will be using is a display. This way we can
actually display the values we’re measuring. I have been working with the
“96 inch OLED display for a while now, and it works beautifully. We can use
the already made Adafruit library once again in order to send data we want
to show on the display | Click Here To Download Adafruit library | you will
also need the Adafruit GFX library.
SD Card reader
Now, to make this project complete, we will add a final component. A
micro SD card reader, in order to store the measured data as text files,
from where you can copy them into a program like Excel to make nice
looking plots, and calculate the power and energy used, by multiplying the
current and voltage with the time respectively.

You might also like