Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

ESP32 and INA260
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

ESP32 and INA260

by Andy_ON on Fri Aug 14, 2020 6:21 am

Hello,
I bought a ESP32 and a INA260 sensor from the adafruit shop in hopes that I could measure the voltage and current of my 12V pump. The problem I'm having at the moment is that the ESP crashes every time I run the "ina260_tuning" example code provided with the library, please see code below.
Code: Select all | TOGGLE FULL SIZE
10:45:16.126 -> ets Jun  8 2016 00:22:57
10:45:16.126 ->
10:45:16.126 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
10:45:16.126 -> configsip: 0, SPIWP:0xee
10:45:16.126 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
10:45:16.126 -> mode:DIO, clock div:1
10:45:16.126 -> load:0x3fff0018,len:4
10:45:16.126 -> load:0x3fff001c,len:1044
10:45:16.126 -> load:0x40078000,len:8896
10:45:16.126 -> load:0x40080400,len:5816
10:45:16.126 -> entry 0x400806ac
10:45:16.313 -> Adafruit INA260 tuning test
10:45:16.313 -> Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
10:45:16.313 -> Core 1 register dump:
10:45:16.313 -> PC      : 0x400d1096  PS      : 0x00060130  A0      : 0x800d1101  A1      : 0x3ffb1f10 
10:45:16.313 -> A2      : 0x00000000  A3      : 0x00000011  A4      : 0x00000016  A5      : 0x00000000 
10:45:16.313 -> A6      : 0x00ff0000  A7      : 0xff000000  A8      : 0x00000001  A9      : 0x3ffb1f00 
10:45:16.313 -> A10     : 0x00000000  A11     : 0x00000040  A12     : 0x00000000  A13     : 0x00000017 
10:45:16.313 -> A14     : 0x00000000  A15     : 0x3ffbebe8  SAR     : 0x0000001c  EXCCAUSE: 0x0000001c 
10:45:16.313 -> EXCVADDR: 0x0000000e  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0x00000000 
10:45:16.313 ->
10:45:16.313 -> Backtrace: 0x400d1096:0x3ffb1f10 0x400d10fe:0x3ffb1f30 0x400d0f31:0x3ffb1f50 0x400d0c95:0x3ffb1f80 0x400d307f:0x3ffb1fb0 0x400889d9:0x3ffb1fd0
10:45:16.313 ->
10:45:16.313 -> Rebooting...



There is nothing else connected to the ESP because I was just trying to compile the code and after that attach the sensor. When I remove the lines of code in that example that set the time and number of samples for the INA sensor it just works.
Code: Select all | TOGGLE FULL SIZE
ina260.begin();

  // set the number of samples to average
  ina260.setAveragingCount(INA260_COUNT_1024);
  // set the time over which to measure the current and bus voltage
  ina260.setVoltageConversionTime(INA260_TIME_8_244_ms);
  ina260.setCurrentConversionTime(INA260_TIME_8_244_ms);


I want to just set it to the slowest speed because I don't need it to be that accurate. Thank you.

Andy_ON
 
Posts: 1
Joined: Mon Jul 27, 2020 10:41 am

Please be positive and constructive with your questions and comments.