Configure an INA219 power sensor
Configure an INA219
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 ina219
model.
Name your sensor, and click Create.

Edit and fill in the attributes as applicable.
{
"components": [
{
"name": "ina1",
"type": "power_sensor",
"model": "ina19",
"attributes": {
"i2c_bus": "integer",
"i2c-addr": "integer"
},
"depends_on": []
}
]
}
The following attributes are available for INA219
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 | The sensor’s unique I2C address. Default: 0x40 |
max_current_amps | number | Optional | Default: 3.2A. 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!