0

INA260, Program won't pass the begin() function
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

INA260, Program won't pass the begin() function

by Kutulu on Sun Mar 21, 2021 9:46 am

Hello everybody,

I try to sense current for a project, but i struggle with the INA260 sensor. Even the test program for the libary from github isn't passing towards the begin() funtion. I'm using an Arduino Mega 2560. The Serial Monitor states "Adafruit INA260 Test" twice, and then nothing more, not even that it can't find the Sensor. I also placed a Serial.println("test") before the call of the function to see if the Serial Monitor might be the problem. "test" occured an the Screen but nothing behing the .begin() seems to be called.

Thanks for your help!

Code: Select all | TOGGLE FULL SIZE

#include <Adafruit_INA260.h>
Adafruit_INA260 ina260 = Adafruit_INA260();
void setup() {
Serial.begin(115200);
// Wait until serial port is opened
while (!Serial) { delay(10); }
Serial.println("Adafruit INA260 Test");
Serial.println("test");
if (!ina260.begin()) {
Serial.println("Couldn't find INA260 chip");
while (1);
}
Serial.println("Found INA260 chip");
}
void loop() {
Serial.print("Current: ");
Serial.print(ina260.readCurrent());
Serial.println(" mA");
delay(1000);
}
Attachments
Unbenannt.PNG
Unbenannt.PNG (37.23 KiB) Viewed 296 times

Kutulu
 
Posts: 5
Joined: Sun Mar 21, 2021 9:32 am

Re: INA260, Program won't pass the begin() function

by adafruit_support_bill on Sun Mar 21, 2021 9:56 am

What is the output when you run the i2c scanner sketch?: https://playground.arduino.cc/Main/I2cScanner/

adafruit_support_bill
 
Posts: 81531
Joined: Sat Feb 07, 2009 10:11 am

Re: INA260, Program won't pass the begin() function

by Kutulu on Sun Mar 21, 2021 12:03 pm

adafruit_support_bill wrote:What is the output when you run the i2c scanner sketch?: https://playground.arduino.cc/Main/I2cScanner/


It has no output at all not even the "\nI2C Scanner" part. It seems like it stucks at the Wire.begin() step

Kutulu
 
Posts: 5
Joined: Sun Mar 21, 2021 9:32 am

Re: INA260, Program won't pass the begin() function

by adafruit_support_bill on Sun Mar 21, 2021 12:20 pm

Please post some photos showing your soldering and connections.

adafruit_support_bill
 
Posts: 81531
Joined: Sat Feb 07, 2009 10:11 am

Re: INA260, Program won't pass the begin() function

by Kutulu on Thu Mar 25, 2021 2:22 pm

adafruit_support_bill wrote:Please post some photos showing your soldering and connections.


I tried several boards with the ina chip, meanwhile I took it out of the electronics of my project (where it should messure the current of an DC-motor) and tried to let it messure a simple LED. The LED is lightning up as it shoud so the Vin+ and Vin- seems to be working. I noticed that while running the suggestet sricpt from above, once or twice when i moved the sensor while runnig the code the serial monitor printed "unknowen error on adress..." for 3 or 4 times with a different adress each time.

Kutulu
 
Posts: 5
Joined: Sun Mar 21, 2021 9:32 am

Re: INA260, Program won't pass the begin() function

by adafruit_support_bill on Thu Mar 25, 2021 2:40 pm

Please post some photos showing your soldering and connections.

adafruit_support_bill
 
Posts: 81531
Joined: Sat Feb 07, 2009 10:11 am

Re: INA260, Program won't pass the begin() function

by Kutulu on Thu Mar 25, 2021 5:26 pm

adafruit_support_bill wrote:Please post some photos showing your soldering and connections.

I hope this fits your demands
Attachments
WhatsApp Image 2021-03-25 at 22.16.13.jpeg
WhatsApp Image 2021-03-25 at 22.16.13.jpeg (145.64 KiB) Viewed 264 times
WhatsApp Image 2021-03-25 at 22.16.13 (2).jpeg
WhatsApp Image 2021-03-25 at 22.16.13 (2).jpeg (122.35 KiB) Viewed 264 times

Kutulu
 
Posts: 5
Joined: Sun Mar 21, 2021 9:32 am

Re: INA260, Program won't pass the begin() function

by adafruit_support_bill on Thu Mar 25, 2021 6:21 pm

Please post an overall view so we can see where all the wires are going.

adafruit_support_bill
 
Posts: 81531
Joined: Sat Feb 07, 2009 10:11 am

Re: INA260, Program won't pass the begin() function

by Kutulu on Fri Mar 26, 2021 4:00 am

adafruit_support_bill wrote:Please post an overall view so we can see where all the wires are going.


one of the pictures shows the chip on the prepboard to test it. the other 2 are showing the chip where it should be used in the project
Attachments
WhatsApp Image 2021-03-26 at 08.55.58 (2).jpeg
WhatsApp Image 2021-03-26 at 08.55.58 (2).jpeg (189.01 KiB) Viewed 261 times
WhatsApp Image 2021-03-26 at 08.55.58.jpeg
WhatsApp Image 2021-03-26 at 08.55.58.jpeg (192.38 KiB) Viewed 261 times
WhatsApp Image 2021-03-26 at 08.55.58 (1).jpeg
WhatsApp Image 2021-03-26 at 08.55.58 (1).jpeg (203.74 KiB) Viewed 261 times

Kutulu
 
Posts: 5
Joined: Sun Mar 21, 2021 9:32 am

Re: INA260, Program won't pass the begin() function

by adafruit_support_bill on Fri Mar 26, 2021 7:30 am

The solder joints on the board look like they have not flowed well onto the solder pads. That could result in an intermittent connection and cause the symptoms you are seeing.

See this guide for some tips on identifying and fixing common soldering issues: https://learn.adafruit.com/adafruit-gui ... n-problems

adafruit_support_bill
 
Posts: 81531
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.