This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: INA223
We are using the INA223 for voltage/current monitoring on one of our arm boards.
It is interfaced on I2C BUS and the board is up with linux kernel v4.1.15
I am wondering whether there is any linux driver and user space application available to spped up our development on using this device ?
your help is greatly appreciated. Looking forward for your response.
Please do let me know if you need more information.
In reply to siva prasad15:
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
Now I am able to see the ina223 device under
# cat /sys/class/hwmon/hwmon0/name
ina223# cat /sys/class/hwmon/hwmon0/curr1_input352# cat /sys/class/hwmon/hwmon0/in0_input0# cat /sys/class/hwmon/hwmon0/nameina223~# cat /sys/class/hwmon/hwmon0/power1_input0
in the dmesg, I can see the
~# dmesg | grep ina223[ 0.246615] i2c i2c-3: of_i2c: register /soc/aips-bus@30800000/i2c@30a50000/ina223@41[ 0.246772] i2c i2c-3: client [ina223] registered with bus id 3-0041[ 1.871869] ina223 3-0041: probe[ 1.872693] ina223 3-0041: power monitor ina223 (Rshunt = 10000 uOhm)[ 1.877880] i2c-core: driver [ina223] registered[ 4.551582] ina223 3-0041: uevent[ 4.635567] ina223 3-0041: uevent[ 4.635820] ina223 3-0041: uevent[ 4.636053] ina223 3-0041: uevent
Now at this stage, I am not sure how to read the current & voltage readings from the driver populated sys filesystem. Could you please assist.
How can i change the configuration register value from the sysfs using the ina223 driver.
Please provide me your inputs on this topic. Looking forward for your response
You cannot read the current or voltage from the INA223 over I2C, it is an analog output only device, not I2C. The I2C interface is only used to select which signal is sent out of the analog output pin, you have to then sample that signal yourself.
If you are wanting to read these values over I2C then please select one of the devices in this series that does have an internal ADC. If you would also like Linux support I would recommend one of the devices listed in the Linux driver, as these are already supported.
In reply to Andrew Davis:
Thanks for the inputs. I am using the linux driver and lmsensor application to read the values. Below is the output
ina223-i2c-0-41Adapter: 30a20000.i2cin0: +0.00 Vin1: +0.00 Vpower1: 0.00 Wcurr1: +1.21 A
The linux driver is for ina226. But the device on the board is ina223 . I am not sure whether i need to do any modifications in the driver to get the correct values.
The shunt resistor value is 50000 microohms
From the above output. It shows 0 values for in0, in1 & power1. Could you please provide your inputs where I am missing.
Thanking you in advance for your quick response.
The INA223 is not compatible with the INA226 driver. The INA223 cannot output the voltage or current over I2C as, unlike the INA226, it has no internal ADC. It does not matter what driver or tools you use the device will not give you the current or voltage over I2C. If you need to read the current or voltage over I2C use the INA226.
From the earlier posts of this thread its suggested that we can read this device through simple i2c tools and also with the linux driver.
But from the latest posts from you gives that we are not in right direction to access this device.
At this stage if i want to progress with INA223 device to measure the current & Voltage readings. Do I need to connect the analog output to any ADC ?
If so could you please point to some application note specific to INA223 device.
Thanking you in advance for your help.
Yes is does look like there was some confusion in the early thread in regards to the driver compatibility.
You are correct in that you will need to connect the analog output to an ADC. Which one you chose is depedent on your application, for instance if a lot of application processors and micro-controllers have one built in that you can attach to and read from there. If you do not have an ADC available then using an external dedicated one is probably more trouble that it is worth and you should just use the INA226 which has one built in, they are only a couple cents more.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.