Hey, I’m having a problem displaying temperature over i2c.
I have Boron LTE connected to Adafruit ICM-20948 and Adafruit INA260 over i2c.
My problem starts when I connect my hardware to a car battery, I’m using Tobsun EA50-5v Power Converter to drop car voltage to 5v to feed the Boron. If I connect my Tobsun EA50-5v Power Converter to a 12v Wall Adapter everything seem to work fine. I’m feeding ICM-20948 and Adafruit INA260 from 5v/USB pin on Boron.
I’m not getting why being connected to a car battery my temperature readings are completely wrong.
Let’s say from 71F I’m getting reading of 401F but it’s not like that every time, sometimes it works properly.
Anyway, all other x,y,z gyro sensor readings are working properly, only temperature is getting mixed up.
If I leave everything connected to a car battery over a day or two, a lot of times my readings stabilize.
According to Adafruit website ICM-20948 and INA260 come with 10k pull-up resistor.
I was thinking, do I need some kind of a diode connected to i2c or another pull-up resistor?
I must be getting some interference, it has to be. Thank you.
Just a question based on your description, you are powering the sensors from the Vin pin at 5V? If so, the 10k pull-ups on those boards will pull the i2c lines up to 5V. Problem is that the Boron is not 5V tolerant. Could it be that you are powering these from the 3.3V pin?
If so, you should only have one set of pull up resistors on your i2c bus so you will need to disable the pull-ups on one or the other boards. Otherwise, the 10k pull ups are in parallel and it may be too much.
I realize neither of these points have anything to do with 12V from the battery or the bench top supply. My guess is that you are correct in suspecting noise. Do you have an oscilloscope that can look at the 5V coming out of the converter?
Thank you for a great hint, I was feeding my sensors from 5v and now I’m feeding them from a dedicated 3.3v source, I also removed 2 pull up resistors from INA260 so for now only ICM-20948 is pulling and sharing the same i2c with INA260. I didn’t know that feeding sensors from 5v will contribute to pulling i2c to 5v which like you said is not tolerant with Boron. So far I’m getting good results, hope it stays like that