MLX90640 causes ESP8266 to hang and reset

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
guracar
 
Posts: 3
Joined: Sun Jan 10, 2021 2:40 am

MLX90640 causes ESP8266 to hang and reset

Post by guracar »

Hi There!
I just purchased an MLX90640 camera and am running the example MLX90640_simpletest sketch for this camera on an ESP8266 Feather Huzzah. I am able to get only one image out of the device before it causes the ESP8266 to reboot. I added some print statements at the top and bottom of the loop and notice that after the test creates an image and the loop reaches the end, the Feather apparently times out and resets and starts over from the initialization. I think something hangs between the loop end and the loop start and then the watchdog timer probably resets the thing.

Here is the serial monitor output:
20:42:08.972 -> Adafruit MLX90640 Simple Test
20:42:09.584 -> Found Adafruit MLX90640
20:42:09.584 -> Serial number: A07F6F4189
20:42:09.584 -> Current mode: Chess
20:42:09.584 -> Current resolution: 16 bit
20:42:09.584 -> Current frame rate: 1 Hz
20:42:09.584 -> loop top
20:42:10.163 ->
20:42:10.163 ->
20:42:10.163 -> .--.............................
20:42:10.163 -> ................................
20:42:10.163 -> ................................
20:42:10.163 -> ...............................-
20:42:10.163 -> ...............................-
20:42:10.163 -> ................................
20:42:10.163 -> ................................
20:42:10.163 -> ................................
20:42:10.163 -> ................................
20:42:10.163 -> ...............-................
20:42:10.163 -> ...-............................
20:42:10.163 -> ...........-....................
20:42:10.163 -> .-..-...........................
20:42:10.163 -> ...-.-.......-..................
20:42:10.163 -> -..........-.......-...........-
20:42:10.163 -> -......-...-...-.-.-.-...-.....-
20:42:10.163 -> -..--....-..-......-...........-
20:42:10.163 -> .......-...-..................--
20:42:10.163 -> -......-........-.....---..-.-..
20:42:10.163 -> .....-...-..---...--..--.--.-...
20:42:10.163 -> .---...--..---.--.---...------..
20:42:10.163 -> ..--.-.-..----.-...-..--------.-
20:42:10.163 -> ---.--.-..-.-..--..-------.---.-
20:42:10.163 -> .....-----------..------.---.---
20:42:10.163 -> loop bottom
20:42:17.287 ->
20:42:17.287 -> ets Jan 8 2013,rst cause:4, boot mode:(3,0)
20:42:17.287 ->
20:42:17.287 -> wdt reset
20:42:17.287 -> load 0x4010f000, len 3456, room 16
20:42:17.287 -> tail 0
20:42:17.287 -> chksum 0x84
20:42:17.287 -> csum 0x84
20:42:17.287 -> va5432625
20:42:17.287 -> ~ld
20:42:17.431 -> Adafruit MLX90640 Simple Test
20:42:18.054 -> Found Adafruit MLX90640
20:42:18.054 -> Serial number: A07F6F4189
20:42:18.054 -> Current mode: Chess
20:42:18.054 -> Current resolution: 16 bit
20:42:18.054 -> Current frame rate: 1 Hz
20:42:18.054 -> loop top
20:42:19.218 ->
20:42:19.218 ->
20:42:19.218 -> .-.-..-......................-..
20:42:19.218 -> ...............-................
20:42:19.218 -> -............-.............-....
20:42:19.218 -> .......-...................---.-
20:42:19.218 -> ...........-...................-
20:42:19.218 -> ...-.........-.............-..-.
20:42:19.218 -> ...........-...-.....-.........-
20:42:19.218 -> ...-.....--...................-.
20:42:19.218 -> ........-...-......-.......-...-
20:42:19.218 -> ..........--..--...............-
20:42:19.218 -> ...-.-.....-..-..-..............
20:42:19.218 -> ...-...-...-...-................
20:42:19.218 -> -..---.-...-....-..-.......-....
20:42:19.218 -> ....-.....--.---..--.--.........
20:42:19.218 -> -......--..---...-...........-.-
20:42:19.218 -> .---.----.---..-.-.-...-.....---
20:42:19.218 -> -..-.-..-....---.---.-.-....-..-
20:42:19.218 -> -...-.--...-...-.-...-.....-..--
20:42:19.218 -> -..------..--.--.---.-----.-.-.-
20:42:19.218 -> --------.-.-----..--.--------..-
20:42:19.218 -> -----.---..------.-..---------.-
20:42:19.218 -> ---------.------...--.--.-------
20:42:19.218 -> --------.-----------------------
20:42:19.218 -> .-.--------------.---.----------
20:42:19.218 -> loop bottom

The sensor seems to produce a plausible image--my hand placed in front of the camera shows something different.

I have tried this out with 2 different ESP8266 Feathers with the same result. I am including a picture of my setup. I also tried a different DC power supply along with my MacBook USB with the same result. I also tried reducing the clock speed I2C interface ( Wire.begin(); Wire.setClock(100000); ) with no change in result. I am running with the latest version of the Arduino IDE 1.8.19 and am using latest version 1.0.2 of the Adafruit library for MLX90640.

I really appreciate your organization's willingness to take the time to help me troubleshoot this issue. Please let me know what else I can try. Thanks for your help.

Ismayil
Attachments
IMG_2991.JPG
IMG_2991.JPG (126.68 KiB) Viewed 508 times

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

Re: MLX90640 causes ESP8266 to hang and reset

Post by adafruit_support_carter »

This looks a little different, but may be related to this open issue:
https://github.com/adafruit/Adafruit_MLX90640/issues/2

Can you try the sketch there and see if you hit the same error. Or maybe this is something new.

User avatar
guracar
 
Posts: 3
Joined: Sun Jan 10, 2021 2:40 am

Re: MLX90640 causes ESP8266 to hang and reset

Post by guracar »

It looks like I get the same result as the thread you sent me....
Is there a solution?
Thanks
Ismayil
16:01:34.593 -> Found Adafruit MLX90640
16:01:34.593 -> count = 0
16:01:42.369 ->
16:01:42.369 -> ets Jan 8 2013,rst cause:4, boot mode:(3,6)
16:01:42.369 ->
16:01:42.369 -> wdt reset
16:01:42.404 -> load 0x4010f000, len 3456, room 16
16:01:42.404 -> tail 0
16:01:42.404 -> chksum 0x84
16:01:42.404 -> csum 0x84
16:01:42.404 -> va5432625
16:01:42.404 -> ~ld
16:01:42.438 -> Adafruit MLX90640 Test
16:01:43.036 -> Found Adafruit MLX90640
16:01:43.036 -> count = 0
16:01:50.824 ->
16:01:50.824 -> ets Jan 8 2013,rst cause:4, boot mode:(3,6)
16:01:50.824 ->
16:01:50.824 -> wdt reset
16:01:50.861 -> load 0x4010f000, len 3456, room 16
16:01:50.861 -> tail 0
16:01:50.861 -> chksum 0x84
16:01:50.861 -> csum 0x84
16:01:50.861 -> va5432625
16:01:50.861 -> ~ld
16:01:50.894 -> Adafruit MLX90640 Test
16:01:51.488 -> Found Adafruit MLX90640
16:01:51.488 -> count = 0

User avatar
guracar
 
Posts: 3
Joined: Sun Jan 10, 2021 2:40 am

Re: MLX90640 causes ESP8266 to hang and reset

Post by guracar »

Update: I am able to prove the sensor is working ok. I tried out the Raspberry Pi4 example at: https://makersportal.com/blog/2020/6/8/ ... d-mlx90640 and was able to see the sensor work at 1 Hz. Exciting--my first python project, but too slow and heavy for my application.

I also tried out the example at https://github.com/sparkfun/SparkFun_ML ... no_Example on the ESP8266 and got some nice images with the ST7789 display.

I think there is a bug in the Adafruit_MLX90640driver which corrupts memory and causes the watchdog timeout on ESP8266.

Anyway, I am happy with the sensor and the breakout board from Adafruit and I will continue with my project using the sparkfun driver code.

Ismayil

User avatar
olif
 
Posts: 2
Joined: Mon May 23, 2022 1:21 am

Re: MLX90640 causes ESP8266 to hang and reset

Post by olif »

I am running into the same problem with MLX90640 and ESP8266. Is there a solution for the "simple Test" meanwhile?

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

Re: MLX90640 causes ESP8266 to hang and reset

Post by adafruit_support_carter »

Still no resolution. The simpletest example will hit the same issue as in the issue thread linked above.

User avatar
olif
 
Posts: 2
Joined: Mon May 23, 2022 1:21 am

Re: MLX90640 causes ESP8266 to hang and reset

Post by olif »

Thanks for your statement. Is it the Adafruit_MLX90640.h file wich is responsible for this behavior? Is someone working on this topic so it is worth waiting? What is your advice?

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

Return to “Arduino”