Configure an INA226 power sensor
Configure an INA226
power sensor to integrate into your robot:
Navigate to the Config tab of your robot’s page in the Viam app.
Click on the Components subtab and click Create component in the lower-left corner.
Select the type power_sensor
, then select the ina226
model.
Name your sensor, and click Create.

Edit and fill in the attributes as applicable.
{
"components": [
{
"name": "ina2",
"type": "power_sensor",
"model": "ina226",
"attributes": {
"i2c_bus": "integer",
"i2c_address": "integer"
},
"depends_on": []
}
]
}
The following attributes are available for INA226
sensors:
Attribute | Type | Inclusion | Description |
---|---|---|---|
i2c_bus | integer | Required | The number of the I2C bus that the sensor is connected to. |
i2c_address | integer | Optional | Default: 0x40 . The sensor’s unique I2C address. |
max_current_amps | number | Optional | Default: 20A. The maximum current that the sensor can measure in amperes (A). |
shunt_resistance | number | Optional | Default: 0.1Ω. The shunt resistance value of the sensor in Ohms (Ω). |
Have questions, or want to meet other people working on robots? Join our Community Discord.
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!