Hi Support Team,
just purchased a MLX90640 breakout board (ADA4407) and tested it. Used the original code from here https://github.com/adafruit/Adafruit_MLX90640 but was unable to get any data/connection.
After that I tested if i can see the camera at least as I2C device (tested with http://arduinolearning.com/code/i2c-scanner.php). Unfortunately without success.
Also tried all ports (left and right QWIIC connector as well as the onboard pin holes), and everything in combination with a XIAO NRF52840 and an original Arduino UNO. The only thing working is the onboard LED.
The soldering of the MLX itself don´t seem to be perfect, but this shoud not influence the visibility as I2C device, right? Also the 6-pin chip above the SDA pin hole is rotated (see attached image).
Any suggestions?
Best
Arne
P.S.: As I haven´t found the information somewhere else: can I adjust the focus of the camera by rotating the lens? Or is it fixed focus? This would explain why I can´t move the lens.
P.P.S: ADA4407 bought at berrybase.de, Germany
Faulty MLX90640 Board
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- arnegue
- Posts: 5
- Joined: Thu Mar 23, 2023 6:49 am
Faulty MLX90640 Board
- Attachments
-
- 20230323_095312.jpg (650.36 KiB) Viewed 240 times
- mikeysklar
- Posts: 14179
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Faulty MLX90640 Board
This board does look potentially faulty based on the partially rotated component and solder blobs not being completely melted in the center.
What controller had you been connecting it to when running the stock Arduino example and i2c code?
We can start the replacement process with you. Can you e-mail [email protected] and provide them with this forum thread. Since you purchased from another vendor you won’t have an Adafruit order#, but provide them with the berrybase order# and supplier info.
What controller had you been connecting it to when running the stock Arduino example and i2c code?
We can start the replacement process with you. Can you e-mail [email protected] and provide them with this forum thread. Since you purchased from another vendor you won’t have an Adafruit order#, but provide them with the berrybase order# and supplier info.
- arnegue
- Posts: 5
- Joined: Thu Mar 23, 2023 6:49 am
Re: Faulty MLX90640 Board
Thanks for the fast response. I checked both example codes with the XIAO nrf52840 and also with an UNO.
To replace the camera the berrybase website (https://support.berrybase.de/index.php? ... eintrag=27, german!) tells me to send them the link to this thread where you confirm the replacement. Do I still have to e-mail to your support and then you will contact berrybase? Just want to do it right without any confusion and too much "paperwork".
Best
Arne
To replace the camera the berrybase website (https://support.berrybase.de/index.php? ... eintrag=27, german!) tells me to send them the link to this thread where you confirm the replacement. Do I still have to e-mail to your support and then you will contact berrybase? Just want to do it right without any confusion and too much "paperwork".
Best
Arne
- adafruit2
- Posts: 22192
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Faulty MLX90640 Board
S3 boards have finicky I2C - did you try another board? the soldering and component placement on the board looks OK
- arnegue
- Posts: 5
- Joined: Thu Mar 23, 2023 6:49 am
Re: Faulty MLX90640 Board
Please see above the boards I tested it with. I assume that only the XIAO board is a "S3 board", not the Arduino UNO, right?
- adafruit2
- Posts: 22192
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Faulty MLX90640 Board
ok one more question because its worth checking - look at the QT cable or try soldering to the breakout pads, in case the cable or connector its plugging into is damaged? (look in the connector, is a pin bent)
we have no issue replacing but these cameras are tested and don't tend to fail
we have no issue replacing but these cameras are tested and don't tend to fail
- arnegue
- Posts: 5
- Joined: Thu Mar 23, 2023 6:49 am
Re: Faulty MLX90640 Board
Checked the QT cable once again (as already the first time) on both connectors. Both connectors are fine also, no pins bent.
Additionally I tried with success that my Arduino UNO and the XIAO were OK by letting them communicate via I2C witch each other (sending data to let a LED light up). Then tried again if the I2CScanner can find the camera with both UNO/XIAO. That failed.
Additionally I tried with success that my Arduino UNO and the XIAO were OK by letting them communicate via I2C witch each other (sending data to let a LED light up). Then tried again if the I2CScanner can find the camera with both UNO/XIAO. That failed.
- adafruit2
- Posts: 22192
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Faulty MLX90640 Board
ok thanks! worth a shot :)
- Opzet
- Posts: 2
- Joined: Sun Mar 26, 2023 4:50 pm
Re: Faulty MLX90640 Board
This sucks... Cannot use ESP32 One Camera (esp_camera.h) and Adafruit_MLX90640.h i2c contention. HAL onion isn't very good.
Adafruit_MLX90640 detects and configures camera over I2C interface, it leave ISR and stops MXL90640 from being detected after initial read.
* allocates framebuffer and DMA buffers,
* initializes parallel I2S input, and sets up DMA descriptors.
*
* Currently this function can only be called once and there is
* no way to de-initialize this module.
E (96743) gpio: gpio_install_isr_service(449): GPIO isr service already installed
E (96856) cam_hal: cam_config(397): cam intr alloc failed
Adafruit_MLX90640 detects and configures camera over I2C interface, it leave ISR and stops MXL90640 from being detected after initial read.
* allocates framebuffer and DMA buffers,
* initializes parallel I2S input, and sets up DMA descriptors.
*
* Currently this function can only be called once and there is
* no way to de-initialize this module.
E (96743) gpio: gpio_install_isr_service(449): GPIO isr service already installed
E (96856) cam_hal: cam_config(397): cam intr alloc failed
- Opzet
- Posts: 2
- Joined: Sun Mar 26, 2023 4:50 pm
Re: Faulty MLX90640 Board
This is a really nice working MXL90640 sketch with ASCII art
Code: Select all
#include <Adafruit_MLX90640.h>
Adafruit_MLX90640 mlx;
float frame[32*24]; // buffer for full frame of temperatures
// uncomment *one* of the below
#define PRINT_ASCIIART
/*
MLX90640 Temp Frame Render
Found MLX90640
Serial number: 161FCB2F189
Current mode: Interleave
Current resolution: 18 bit
Current frame rate: 16 Hz
*********-***--*-***-**--*******
-***--***-**--**--**--**-******+
*********+***-*********+********
*-***-**--*-*-----*-*--*+-**---*
*-*****************************+
****-*****++**-**-***-******--**
****-***++xx++**-*****++********
***-*-***+xxx+**--***++++***--**
**-****+*+xxxx******+xx+++******
******++*+xx+x+*-****+xx+***--**
****++x+*+xxxx+*****++xxx++*****
-**+++x+**x%xx++--***+xx++**-**+
****+++x+*xxxxx+*****+xxx+*+*++*
****++xx+*+xxxx+*****+xxx+++++++
*+*+++xx+++xxxxx*****+xx%x++++++
****++xxx++xxxx%*****+xx+x++**++
***+*xxxx++xxxxx++**+xxxxx*+*+**
*****+xxx++xxx%x++***+xxxx*+***+
***+++xxxx+x%%%%x+-++x%%xx*+**+*
*+****BANNED%x%%x+**+xxxxx+*****
+*+++*BANNED%xxxx+*+xx%xx*++*+*
+*+***+BANNED**+xxxxx+*-***
x+**+++xxxx%%xx%x%++xx%%xx+*+*++
++++**++xxx%xx%xxx+++xx%xx++***+
*/
//#define PRINT_TEMPERATURES
/*
27 28 26 26 27 26 26 26 26 26 25 27 26 25 25 25 25 26 25 26 26 26 26 24 27 25 25 25 27 26 25 26
26 25 26 25 25 25 25 26 25 24 26 25 26 25 25 25 25 25 26 26 25 25 27 26 26 25 27 26 25 25 26 27
24 26 25 26 26 26 26 27 25 26 26 25 26 26 25 25 26 26 26 27 26 25 25 25 26 26 26 27 26 27 23 26
25 25 27 24 26 25 26 26 26 26 26 26 25 25 25 26 25 25 25 25 25 25 26 26 25 25 27 27 24 26 26 27
27 25 27 25 27 25 25 25 25 26 25 25 26 26 25 26 25 26 26 26 25 26 25 25 25 27 26 25 27 26 25 27
25 26 27 28 27 27 27 27 25 25 25 25 25 25 25 25 26 24 26 26 26 25 25 26 26 25 26 26 25 27 26 25
27 28 30 29 29 29 29 29 27 26 25 26 25 26 26 26 25 26 26 26 26 26 26 26 26 26 26 26 27 28 25 27
27 28 30 29 28 29 31 29 26 26 25 26 25 24 25 26 24 25 26 25 25 25 26 25 26 26 26 26 25 27 26 26
29 29 29 30 30 29 29 30 29 28 25 25 26 25 25 25 26 26 25 25 26 26 26 26 26 26 26 26 26 25 26 26
30 28 28 30 29 28 29 30 29 27 26 25 25 24 26 25 25 26 26 26 25 25 26 27 26 26 26 26 26 26 27 26
30 30 29 30 30 30 29 29 28 29 27 26 26 26 26 25 25 26 26 26 25 26 26 26 25 26 25 26 26 27 26 26
28 28 29 30 28 29 29 29 29 29 27 26 24 25 26 25 26 25 26 25 25 26 26 26 27 26 26 27 25 26 26 25
30 29 29 29 29 30 30 30 30 30 28 27 26 26 26 26 26 26 25 26 25 26 26 26 26 26 26 26 27 28 26 27
28 30 28 29 29 29 29 29 29 30 29 28 25 26 27 26 25 26 26 26 25 25 26 27 26 26 27 28 26 28 27 28
31 30 29 29 30 29 30 31 30 30 29 29 26 27 26 26 26 26 26 27 25 26 26 25 27 27 27 28 27 29 27 27
29 30 30 29 30 29 29 30 30 30 29 27 26 26 27 26 26 26 26 26 25 25 26 27 26 27 27 27 27 26 27 27
31 30 29 31 31 30 30 30 31 30 30 29 26 27 26 26 26 26 26 25 25 26 26 27 27 27 26 26 27 26 27 26
30 29 29 30 29 29 30 30 29 29 31 30 26 26 26 26 26 26 26 26 25 25 26 26 25 27 26 27 26 26 26 28
31 31 30 31 31 31 30 30 31 30 30 30 28 27 26 26 26 25 26 27 26 25 25 26 26 27 26 26 25 27 26 26
29 29 31 30 31 31 30 30 30 29 31 30 27 27 26 27 26 26 25 26 26 25 26 26 25 27 25 27 25 26 25 27
30 29 31 31 30 30 31 31 30 30 30 29 27 27 26 26 26 26 26 26 26 27 26 25 27 27 26 27 27 26 27 27
28 29 30 32 30 30 31 31 29 30 30 30 27 28 25 25 26 25 25 25 25 26 26 26 26 26 27 27 26 25 27 27
27 30 31 32 31 31 30 31 31 32 30 30 29 28 26 25 26 26 26 26 27 26 26 26 27 26 27 27 26 26 27 27
27 29 31 31 30 30 30 30 30 29 30 30 29 28 26 26 26 25 26 25 25 26 25 25 25 27 25 27 26 26 26 27
*/
void setup() {
Serial.begin(921600);
Serial.println("MLX90640 Temp Frame Render");
delay(100);
pinMode(18, INPUT_PULLUP); // enable pull-up resistor for SDA pin
pinMode(23, INPUT_PULLUP); // enable pull-up resistor for SCL pin
Wire.begin(18, 23); // set SDA to pin 18 and SCL to pin 23
Wire.setClock(400000); // set I2C bus speed to 400kHz
if (! mlx.begin(MLX90640_I2CADDR_DEFAULT, &Wire)) {
Serial.println("MLX90640 not found!");
while (1) delay(10);
}
Serial.println("Found MLX90640");
Serial.print("Serial number: ");
Serial.print(mlx.serialNumber[0], HEX);
Serial.print(mlx.serialNumber[1], HEX);
Serial.println(mlx.serialNumber[2], HEX);
Wire.setClock(1000000); // set I2C bus speed to 800kHz
//mlx.setMode(MLX90640_INTERLEAVED);
mlx.setMode(MLX90640_CHESS);
Serial.print("Current mode: ");
if (mlx.getMode() == MLX90640_CHESS) {
Serial.println("Chess");
} else {
Serial.println("Interleave");
}
mlx.setResolution(MLX90640_ADC_18BIT);
Serial.print("Current resolution: ");
mlx90640_resolution_t res = mlx.getResolution();
switch (res) {
case MLX90640_ADC_16BIT: Serial.println("16 bit"); break;
case MLX90640_ADC_17BIT: Serial.println("17 bit"); break;
case MLX90640_ADC_18BIT: Serial.println("18 bit"); break;
case MLX90640_ADC_19BIT: Serial.println("19 bit"); break;
}
mlx.setRefreshRate(MLX90640_16_HZ);
Serial.print("Current frame rate: ");
mlx90640_refreshrate_t rate = mlx.getRefreshRate();
switch (rate) {
case MLX90640_0_5_HZ: Serial.println("0.5 Hz"); break;
case MLX90640_1_HZ: Serial.println("1 Hz"); break;
case MLX90640_2_HZ: Serial.println("2 Hz"); break;
case MLX90640_4_HZ: Serial.println("4 Hz"); break;
case MLX90640_8_HZ: Serial.println("8 Hz"); break;
case MLX90640_16_HZ: Serial.println("16 Hz"); break;
case MLX90640_32_HZ: Serial.println("32 Hz"); break;
case MLX90640_64_HZ: Serial.println("64 Hz"); break;
}
Serial.println("");
}
void loop() {
if (mlx.getFrame(frame) != 0) {
Serial.println("Failed");
delay(500);
return;
}
Serial.println();
Serial.println();
for (uint8_t h=0; h<24; h++) {
for (uint8_t w=0; w<32; w++) {
float t = frame[h*32 + w];
#ifdef PRINT_TEMPERATURES
Serial.print(t, 0);
Serial.print(" ");
#endif
#ifdef PRINT_ASCIIART
char c = '&';
if (t < 28) c = ' ';
else if (t < 29) c = '.';
else if (t < 30) c = '-';
else if (t < 31) c = '*';
else if (t < 32) c = '+';
else if (t < 33) c = 'x';
else if (t < 34) c = '%';
else if (t < 35) c = '#';
else if (t < 36) c = 'X';
Serial.print(c);
#endif
}
Serial.println();
}
}
- arnegue
- Posts: 5
- Joined: Thu Mar 23, 2023 6:49 am
Re: Faulty MLX90640 Board
Thanks opzet for the sample code. I will try this out if everything is working.
@adafruit2: Is there anything else I can try or check? If not I guess we can define the board as faulty and replace it. If so:
Option 1: Do I send purchase details to [url]mailto:[email protected][/url] and you contact berrybase?
Option 2: I write berrybase directly and they will do the rest. (BTW: their branch is 500 m away from my office, so no shipping costs).
Best
Arne
@adafruit2: Is there anything else I can try or check? If not I guess we can define the board as faulty and replace it. If so:
Option 1: Do I send purchase details to [url]mailto:[email protected][/url] and you contact berrybase?
Option 2: I write berrybase directly and they will do the rest. (BTW: their branch is 500 m away from my office, so no shipping costs).
Best
Arne
Please be positive and constructive with your questions and comments.