MLX90640 not found when running MLX90640_simpletest

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
alixdujardin
 
Posts: 12
Joined: Tue Jan 24, 2023 1:06 pm

MLX90640 not found when running MLX90640_simpletest

Post by alixdujardin »

Hello, I just bought an Adafruit pybadge and an IR camera. I am following these instructions https://learn.adafruit.com/mlx90640-the ... -libraries
I bought the board on amazon because it wasn't available on Adafruit, so we soldered the 12C connector ourselves because it wasn't there originally (see the file attached).

I have an error on the screen that says, "MLX90640 not found!" even though I can verify and upload my code on the computer.

What can I do to fix it?
Thank you for your help!
Attachments
327298391_902882227508671_1331951607747898915_n.jpg
327298391_902882227508671_1331951607747898915_n.jpg (159.47 KiB) Viewed 25290 times

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: MLX90640 not found when running MLX90640_simpletest

Post by adafruit_support_carter »

Looks like the connector is reversed. Here are the pins:
pins.png
pins.png (196.98 KiB) Viewed 25287 times
FYI - The PyBadge variant you bought is the LC version:
https://www.adafruit.com/product/3939
which is why the connectors were not installed.

The base version of the PyBadge is this one:
https://www.adafruit.com/product/4200

User avatar
alixdujardin
 
Posts: 12
Joined: Tue Jan 24, 2023 1:06 pm

Re: MLX90640 not found when running MLX90640_simpletest

Post by alixdujardin »

Thank you, now the on from the camera turns green, but my screen stays black when I try to run it. What should I do?

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: MLX90640 not found when running MLX90640_simpletest

Post by adafruit_support_carter »

Try running an I2C scan to see if the MLX shows up:
https://learn.adafruit.com/scanning-i2c ... s/overview

Hopefully it, or the PyBadge, wasn't damaged by the reversed connection.

User avatar
alixdujardin
 
Posts: 12
Joined: Tue Jan 24, 2023 1:06 pm

Re: MLX90640 not found when running MLX90640_simpletest

Post by alixdujardin »

I ran it, the screen turned back on the "home page" and black again, but when I ran the example code arcada_bypage_test, I have something on my screen
Attachments
327355208_731188891668506_6918149281050235663_n.jpg
327355208_731188891668506_6918149281050235663_n.jpg (265.25 KiB) Viewed 25282 times

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: MLX90640 not found when running MLX90640_simpletest

Post by adafruit_support_carter »

Which I2C scanner program did you run? What output did it generate?

User avatar
alixdujardin
 
Posts: 12
Joined: Tue Jan 24, 2023 1:06 pm

Re: MLX90640 not found when running MLX90640_simpletest

Post by alixdujardin »

I ran this one

Code: Select all

// --------------------------------------
// i2c_scanner
//
// Modified from https://playground.arduino.cc/Main/I2cScanner/
// --------------------------------------

#include <Wire.h>

// Set I2C bus to use: Wire, Wire1, etc.
#define WIRE Wire

void setup() {
  WIRE.begin();

  Serial.begin(9600);
  while (!Serial)
     delay(10);
  Serial.println("\nI2C Scanner");
}


void loop() {
  byte error, address;
  int nDevices;

  Serial.println("Scanning...");

  nDevices = 0;
  for(address = 1; address < 127; address++ ) 
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    WIRE.beginTransmission(address);
    error = WIRE.endTransmission();

    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address<16) 
        Serial.print("0");
      Serial.print(address,HEX);
      Serial.println("  !");

      nDevices++;
    }
    else if (error==4) 
    {
      Serial.print("Unknown error at address 0x");
      if (address<16) 
        Serial.print("0");
      Serial.println(address,HEX);
    }    
  }
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");

  delay(5000);           // wait 5 seconds for next scan
}
And I had this output

Code: Select all

Sketch uses 12836 bytes (2%) of program storage space. Maximum is 507904 bytes.
Device       : ATSAMD51x19
Version      : v1.1 [Arduino:XYZ] Jun 23 2019 17:44:37
Address      : 0x0
Pages        : 1024
Page Size    : 512 bytes
Total Size   : 512KB
Planes       : 1
Lock Regions : 32
Locked       : none
Security     : false
BOD          : false
BOR          : true
Write 13092 bytes to flash (26 pages)

[                              ] 0% (0/26 pages)
[=========                     ] 30% (8/26 pages)
[==================            ] 61% (16/26 pages)
[===========================   ] 92% (24/26 pages)
[==============================] 100% (26/26 pages)
Done in 0.209 seconds
Verify 13092 bytes of flash

[=                             ] 3% (1/26 pages)
[==                            ] 7% (2/26 pages)
[===                           ] 11% (3/26 pages)
[====                          ] 15% (4/26 pages)
[=====                         ] 19% (5/26 pages)
[======                        ] 23% (6/26 pages)
[========                      ] 26% (7/26 pages)
[=========                     ] 30% (8/26 pages)
[==========                    ] 34% (9/26 pages)
[===========                   ] 38% (10/26 pages)
[============                  ] 42% (11/26 pages)
[=============                 ] 46% (12/26 pages)
[===============               ] 50% (13/26 pages)
[================              ] 53% (14/26 pages)
[=================             ] 57% (15/26 pages)
[==================            ] 61% (16/26 pages)
[===================           ] 65% (17/26 pages)
[====================          ] 69% (18/26 pages)
[=====================         ] 73% (19/26 pages)
[=======================       ] 76% (20/26 pages)
[========================      ] 80% (21/26 pages)
[=========================     ] 84% (22/26 pages)
[==========================    ] 88% (23/26 pages)
[===========================   ] 92% (24/26 pages)
[============================  ] 96% (25/26 pages)
[==============================] 100% (26/26 pages)
Verify successful
Done in 0.114 seconds

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: MLX90640 not found when running MLX90640_simpletest

Post by adafruit_support_carter »

You'll need to open the Arduino Serial Monitor to see the actual scanner output. What you've pasted above is just the compile and upload messages.

The Serial Monitor should show something similar to what is shown in the guide:
https://learn.adafruit.com/scanning-i2c ... or-3102783

User avatar
alixdujardin
 
Posts: 12
Joined: Tue Jan 24, 2023 1:06 pm

Re: MLX90640 not found when running MLX90640_simpletest

Post by alixdujardin »

Thanks, I have that, but I don't get it because there is a green light on the camera to say that it's connected to the board... What should I do?
Attachments
Screenshot 2023-01-25 113330.jpg
Screenshot 2023-01-25 113330.jpg (6.15 KiB) Viewed 25267 times

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: MLX90640 not found when running MLX90640_simpletest

Post by adafruit_support_carter »

The green LED is only an indication of power.

Is the PyBadge your only board? At this point it may be that the MLX90640 was damaged by the initial reversed connections which put power on the I2C pins.

User avatar
alixdujardin
 
Posts: 12
Joined: Tue Jan 24, 2023 1:06 pm

Re: MLX90640 not found when running MLX90640_simpletest

Post by alixdujardin »

Thank you for your help, so, to be 100% sure: SCL is yellow, SDA=blue, VCC=red and GND=black?
Thanks!

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: MLX90640 not found when running MLX90640_simpletest

Post by adafruit_support_carter »

That is the intended function for those color wires. However, the connector is keyed, so must be put on correctly. Otherwise the wrong pins will be connected to those wires.

The photo I added with the labels is for the pinout of the PyBadge itself. The connector must be placed so that when the cable is plugged in, the wire colors match to those pins.

User avatar
alixdujardin
 
Posts: 12
Joined: Tue Jan 24, 2023 1:06 pm

Re: MLX90640 not found when running MLX90640_simpletest

Post by alixdujardin »

Hey, I am still struggling. I bought a new camera and connected it as you said on the new camera (see pictures), but I still have the camera not found.
Attachments
328445769_3574348779460629_7213959141165607831_n.jpg
328445769_3574348779460629_7213959141165607831_n.jpg (276.43 KiB) Viewed 25259 times
328031447_708334734358774_2769372502295036734_n.jpg
328031447_708334734358774_2769372502295036734_n.jpg (163.46 KiB) Viewed 25259 times

User avatar
alixdujardin
 
Posts: 12
Joined: Tue Jan 24, 2023 1:06 pm

Re: MLX90640 not found when running MLX90640_simpletest

Post by alixdujardin »

I forget to add, I had this output
Attachments
Screenshot 2023-01-30 132126.jpg
Screenshot 2023-01-30 132126.jpg (9.89 KiB) Viewed 25259 times

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: MLX90640 not found when running MLX90640_simpletest

Post by adafruit_support_carter »

The library is for use with the Adafruit MLX90640 breakout:
https://www.adafruit.com/product/4407

You'll need to contact Waveshare to see if their board will work with the library.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”