SparkFun Forums 

Where electronics enthusiasts find answers.

Questions &/or issues related to products in the Imaging category should be posted in this forum.
User avatar
By Tjay
#203592
I recently purchased a MLX90640 (55 FOV) and a teensy 3.2. I connected the mlx as suggested in this hook-up guide, but it's not working with example code 1.
It keeps saying "MLX90640 not detected at default I2C addres. Please check wiring. Freezing." I have tried running a I2c_scanner, but that tells me there is an "Unknown error at address...".
I am running Arduino IDE version 1.8.8 on Windows 10 with the most recent version of teensyduino.
Any help would be appreciated.
User avatar
By TS-Mark
#203596
Hi Tjay,

Is the "Unknown error at address..." all that the serial terminal is printing when you are running the I2C Scan? It should be printing something after that so I am not sure what is going on here. How are you connecting the MLX90640 to your Teensy? Can you take a couple of photos of your circuit and attach them to your response?
User avatar
By Tjay
#203598
Hi Mark,
Thank you for your quick reply.
It actually has a list of 128 different unknown errors for addresses starting at 0x01 all the way through 0x7E, and it includes 0x33, which is the address for the MLX90640 I believe.
I currently have it connected through a breadboard, but also have had the qwiic pins directly plugged in the teensy and the teensy plugged into the breadboard with breakaway headers (as on the picture in the guide). That all had the same result. (Added LEDS are to test that my code is even running in the first few steps of set up -- which it does -- also don't affect the I2C results.)

Thanks
MLX90640Teensy3.2.png
You do not have the required permissions to view the files attached to this post.
User avatar
By TS-Mark
#203599
Interesting. I have not seen the I2C scanner sketch return something like that before but if I were to guess, I think it is related to an intermittent connection issue that is causing the sketch to return so many errors.

Your photos seem to confirm this since simply wrapping wire around the vias on your Teensy is not going to create a solid connection for testing this or other peripherals. If you take a closer look at the photo in the Hookup Guide, you will see the Teensy has headers soldered into place. If you simply placed the Teensy on top of breakaway headers in your first testing, that would certainly result in some erratic behavior from the MLX90640 since there is not a good connection between the vias and the pins on the headers.

I would recommend soldering the headers into place or soldering the wires going from the breadboard to your Teensy into place so you have a good connection. Another option would be to use something like these IC Hooks with pigtail to create a temporary connection that will be better than wrapping wire around the vias.

After that, retest the code and it should work. If you continue to have issues with the MLX90640, let me know and we can troubleshoot further.
User avatar
By TS-Chris
#203623
Are you seeing "Unknown error at address 0xXX" where XX is a number between 01 and 7E?

If so, that would indicate the Teensy is seeing an open I2C bus with no pullups. Even a broken MLX90640 should return "No I2C devices found" You may have damaged the Teensy.

Can you try attaching another known working I2C device to the Teensy to see if that's detected?
User avatar
By Tjay
#203625
It is giving BOTH all the numbers between 01 and 7E AND "No I2C devices found"

The full output from the scanner is:
"I2CScanner
Scanning...
Unknown error at address 0x01
.... (repeat Unknown error with all numbers between 01 and 7E)
Unknown error at address 0x7E
No I2C devices found"

Isn't the MLX90640 supposed to have build in pullups? I am not sure I understand what you are referring to.
Both the MLX0640 and the Teensy were recently bought with Sparkfun and have not been used for anything else.

I currently do not have access to another I2C device. Are there other ways to test which of the 2 devices might be faulty?
Thanks!
User avatar
By TS-Chris
#203639
OK, that sounds like a damaged Teensy. What's happening is the I2C pins on the Teensy are not working and the processor is seeing a low on SDA and SCL even though the board you've attached has pullups. Wrapping stranded wires through the holes in the Teensy is likely what caused the issue as it's easy to short something out that way. Unfortunately you're going to need to try a new Teensy.
User avatar
By TS-Chris
#203753
OK,

Head on over to this page and fill out the form on the right hand side. Don't forget your order number and in the "Why do you want an RMA section put a brief description of the issue as well as the URL for this page and we can help.