Hello,
I recently purchased a [SEN-14844 breakout for the MLX90640 IR camera. Sensor is the only slave, connected to a TI Tiva LaunchPad as the only master (photos). I wrote the driver code using the Sparkfun and Melexis example code as a starting point. Posting this under QWIIC System since my issue pertains more to I2C communication than the product-specific functionality.
After unsuccessful attempts to communicate with the sensor, I started troubleshooting the hardware, and found that the camera is persistently pulling the SDA line low, preventing the I2C master from taking control of the bus. What I have tried so far:
- Double-check the I2C connections. Result: wiring is correct.
- Power-cycle the sensor. Result: immediately after powering on, the sensor pulls SDA low.
- Manually toggle the SCL line, in case the sensor's I2C state machine was "stuck" in the middle of something. Result: I sent ~20 additional clock pulses at very low frequency, but the sensor has not released the SDA line.
- Check solder joints of pull-up resistors on breakout board. Result: resistors are soldered correctly, it is definitely the sensor pulling SDA low.
Any other suggestions for dealing with an I2C slave not releasing the SDA line?
](
SparkFun IR Array Breakout - 55 Degree FOV, MLX90640 (Qwiic) - SEN-14844 - SparkFun Electronics)
Hi tjandreasjr,
Sorry for the late reply. While we cannot really help troubleshoot with the TI Tiva LaunchPad since we do not carry that development board, we would be happy to try and figure out what may be wrong with your MLX90640. I am not sure why the device would be holding SDA low here unless something is shorted. If you have a multimeter, try testing the SDA and GND pins for continuity when the ML90640 is disconnected from everything and let me know what you find.
Also, if you have an Arduino-compatible board that has enough RAM to run the [Arduino example code please try that and let us know if that resolves the issue.](https://learn.sparkfun.com/tutorials/qwiic-ir-array-mlx90640-hookup-guide#example-code)
Hi, thanks for your reply and suggestions. I do not have an Arduino to test with, but I am confident I can handle the Tiva once the I2C issue is sorted.
The resistance between the GND and SDA pins on my MLX90640 measures 7.6 ohms, so probably not a hard short. But this seems low for an unpowered driver output. Can you tell if this value is consistent with measurement of another MLX90640 board?
Hi again,
The measured resistance between SDA/SCL and GND on a known good MLX90640 breakout was roughly ~2.47k Ohms. We are a bit perplexed here as we do not have much information about the internal circuitry of the MLX90640 and it does not seem to be an internal resistance since when the pull-up resistors are disabled, that resistance drops to 0 Ohms. There seems to be some correlation between the I2C lines and the power circuit. As for your board, 7.6 Ohms is essentially a direct short to ground and the board is certainly defective. We believe this might be caused by ESD shock but it may be something else that we are going to look into further.
Regardless, what I think is best for this case is to have the board sent back for testing (assuming you purchased it directly from SparkFun) and then based on the results of those tests, we can most likely send you a replacement that I will test personally before we ship it to you. What I will need from you (again, assuming you purchased the breakout from SparkFun) is to fill out the form on [this page and in the “Why do you want an RMA?” box, fill in a brief description and link to this forum topic and we will follow up with further instructions. If you purchased the breakout from a distributor, please send me a private message and we will work on an alternative solution.](Return Policy - SparkFun Electronics)
Hello,
I have quite similar problem. I have one Thing ESP32 plus with multiple QWIIC boards connected (Zio current meter, pin expander, two buttons, accelerometer, led stick, Mp3 trigger) and after ESP stops comunicating with all boards and when I enabled verbose debug I see this message on terminal:
[W][esp32-hal-i2c.c:1419] i2cCheckLineState(): invalid state sda(23)=1, scl(22)=0
[D][esp32-hal-i2c.c:1427] i2cCheckLineState(): Recovered after 1 Cycles
[E][esp32-hal-i2c.c:1434] i2cCheckLineState(): Bus Invalid State, TwoWire() Can’t init sda=1, scl=0
I have tried adding two 100uF capacitors on power supply lines and I have tried to leave one or two boards with I2C pullups connected. Is there any thing that I should try next to make this work more reliably?
What is the resistance between ground and SDA on your board?
It is ~2,2K with one board and ~1,5K with two boards with pullups connected (measured by my multimeter and QWIIC jumper cable).
OK, you have a different problem then, the original poster had a low resistance short to ground.
OK, maybe different problem, but still a problem Could you please help me to diagnose it? I am really stuck right now. I have again checked all modules with multimeter and everything is between 1k9 to 2k2 on connected boards from Vcc to SDA or SCL and in mega ohms on those I have sliced. But I am still having those weird disconnections.
You really need to create a new post for this since it’s unrelated to the original post, but we suggest just trying the MLX90640 on it’s own with our example code. If that works, you either need to figure out what device on the bus is causing your trouble or figure out if something in your code is messing up the SDA line.