You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That is the same configuration I've been using the Adafruit INA219 library in Arduino. However, the esp-idf-lib library reports wrong measures on this simple circuit (also simulated in Falstad):
The multimeter shows almost the same value around 36mA, but the library says about 76mA.
I think the calibration factor is somehow, in the Arduino library says 0x2000 and here, as is computed dinamically, says 0x1000. I tried to hardcode this value with no positive results. Shunt resistor is set to 100miliohms.
Which SDK are you using?
esp-idf
Which version of SDK are you using?
master
Which build target have you used?
esp32
esp32s2
esp32s3
esp32c2
esp8266
other
Component causing the issue
ina219
Anything in the logs that might be useful for us?
I (102) main_task: Started on CPU0I (102) main_task: Calling app_main()I (102) INA219_example: Initializing INA219D (102) i2cdev: Reconfiguring I2C driver on port 0D (102) i2cdev: I2C driver successfully reconfigured on port 0D (112) i2cdev: Timeout: ticks = 0 (0 usec) on port 0D (112) ina219: Initialize, config: 0x03ffI (112) INA219_example: Configuring INA219D (112) ina219: Config: 0x019fD (112) i2cdev: Timeout: ticks = 0 (0 usec) on port 0I (112) INA219_example: Calibrating INA219D (112) i2cdev: Timeout: ticks = 0 (0 usec) on port 0D (112) ina219: Calibration: 0.1000 Ohm, 0x1000D (112) i2cdev: Timeout: ticks = 0 (0 usec) on port 0I (102) main_task: Returned from app_main()I (112) INA219_example: Starting the loopD (112) i2cdev: Timeout: ticks = 0 (0 usec) on port 0112,92.00D (1112) i2cdev: Timeout: ticks = 0 (0 usec) on port 01112,-100.00D (2112) i2cdev: Timeout: ticks = 0 (0 usec) on port 02112,76.00D (3112) i2cdev: Timeout: ticks = 0 (0 usec) on port 03112,76.00D (4112) i2cdev: Timeout: ticks = 0 (0 usec) on port 04112,76.00D (5112) i2cdev: Timeout: ticks = 0 (0 usec) on port 05112,76.00
Additional information or context
No response
Confirmation
This report is not a question nor a request for drivers.
The text was updated successfully, but these errors were encountered:
The issue
I'm running the example provided by de library with an ESP32 and INA219 sensor, configured for 400mA, 16V and 40mV gain as:
ESP_ERROR_CHECK(ina219_configure(&dev, INA219_BUS_RANGE_16V, INA219_GAIN_1, INA219_RES_12BIT_1S, INA219_RES_12BIT_1S, INA219_MODE_CONT_SHUNT_BUS));
That is the same configuration I've been using the Adafruit INA219 library in Arduino. However, the esp-idf-lib library reports wrong measures on this simple circuit (also simulated in Falstad):
The multimeter shows almost the same value around 36mA, but the library says about 76mA.
I think the calibration factor is somehow, in the Arduino library says
0x2000
and here, as is computed dinamically, says0x1000
. I tried to hardcode this value with no positive results. Shunt resistor is set to 100miliohms.Which SDK are you using?
esp-idf
Which version of SDK are you using?
master
Which build target have you used?
Component causing the issue
ina219
Anything in the logs that might be useful for us?
Additional information or context
No response
Confirmation
The text was updated successfully, but these errors were encountered: