When I make my hardware projects, during development I usually need to know different magnitudes into the circuit like voltage of a pin, how many current is drained from the voltage source or a PIN and so on.
Voltage, current and often power that are involved into a circuit are magnitudes that an electronics designer must know during all time that they are active.
To measure them the simplest measurement instrument that you can use is the multimeter:
a basic and cheap multimeter measure voltage and current of a circuit and their values are display with numbers (often 3 digit) 3 times per seconds.
Another instruments that measure these magnitudes and offers some others interesting features is the oscilloscope: it measure for default only voltage source of a circuit but with its scope it can measure this voltage a lot of times per seconds and can display a full waveform of a signal of a PIN
for example if a pin stay “HIGH” for 100ms and “LOW” for 100ms, you can measure this signal only with an oscilloscope..a multimeter can’t show you the correct voltage on this pin beacuse it cannot display the waveform but only display numbers and also because it is to slow for these signal it will display a mean value of the signal and not the value of the signal during a precise instant.
With an oscilloscope you can also measure current without interrupt the circuit with a specific probes that are often very expansive and aren’t normally sell within the oscilloscope..expecially for cheaper oscilloscope that offers only voltage probes and however they cost some hundred of euro/dollars
So an oscilloscope isn’t better than a multimeter or viceversa but they must be used depending on what you need to measure.
In this article I want to show you an IC that work similar to a multimeter but it is faster and allow you to have control of all magnitudes that comes into your circuit,reading also some signals that occur more than 3 times per second
I’m talking about the INA226, an IC from TI that can read voltage, current and power on a circuit and give you the result via I2C
These are the main characteristics of this IC:
- Sense bus voltage from 0 to 36V
- Can be used High Side or Low Side for current measurement
- 16 Programmable Addresses,very useful to measure more than one voltage or current with only one I2C port
- it operate from 2.7V to 5.5V so typical 3.3V and 5V are covered
A typical application is shown below:
The schematic of the INA226 breakout board is:
As you can see, current monitor is forced to a high side current read so consider that to LOAD+ you will find a voltage slightly lower than the voltage on VBUS+.
Now let’s start to discuss the pinout:
- J1 connector: connect here the load that drain the current that you want to measure.
connect the positive polarity of the load (if it has a polarity) to LOAD+ , connect the negative polarity to LOAD- that it is forced connected to GND
- J2 connector: connect here the voltage source that supply your load.
connect the positive terminal of this source to VBUS+, and connect VBUS- to GND
- S1: VCC pin to supply the IC , 3V3 voltage is recommended
- S2: SCL clock pin of I2C
- S3: SDA data pin of I2C
- S4: ALERT pin, usuful to monitoring different fault that can occur
- S5: GND
- JP1 , JP2 , JP3 , JP4 are pins that you must solder in the proper way if you want to change the default address ( 0x40 ) of the INA226
The table below explain you how to connect A0 and A1 to obtain the desired address
in the schematics: R1,R2,R3 are 10K resistor, useful to pull up SCL,SDA and ALERT pin to the VCC voltage,
R5 and R6 are 0 Ohm resistor and if you change its value you can filtering the sense voltage on R4 with the C1 capacitor of 100nF.
In most cases filtering isn’t necessary.
C2 is a 100nF usuful to garanteed a clean VCC voltage to the IC.
The only components that you may need to change is R4.
By default it is a 39 mOhm resistor and due to the maximum 81.92 mV of shunt voltage input range , with this resistor you can measure currents up to 2.1 A.
Lower value like for example 10mOhm can allow you to read current up to 8.1 A but obviously, higher is the current that you can read and lower is the resolution of the step of the INA226
INA226 however offer a 16 bit resolution ADC so also at high current you are able to measure steps of uA of current..
All depends from what you need to do in your application.
In the next article I’ll show you a typical application for this breakout board.