MLX90614 3V IR Sensor and ESP-32 compatability

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
jims123
 
Posts: 30
Joined: Wed Aug 03, 2016 4:05 pm

MLX90614 3V IR Sensor and ESP-32 compatability

Post by jims123 »

I bought a couple of these sensors from Adafruit recently and wired it following the Adafruit tutorial so I'm confident the clock data and 3.2 vDC power and ground wiring are correct to my TTGO T-Display ESP-32 device. The same device works well using the same SCL and SDA pins 22 and 21 respectively with a BME-280 but I am getting a "Check for wiring error" notice when I try to run the test sketch listed in the Adafruit MLX90614.h library example code.
Q: 1.) is this contactless sensor compatible with the I2C implementation in Espressif's ESP-32 devices?
2.) shouldn't I see a short burst of clock and data pulses on the SDA/ SCL lines during the failed test>
3.) how does the test actually work on this MLX 90614 3v device?

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: MLX90614 3V IR Sensor and ESP-32 compatability

Post by mikeysklar »

Can you post a photo of your wiring on the sensor and TTGO?

Are you using the included 10k pullup resistors?

I recall when writing the CircuitPython driver for this I did have to force the the i2c bus speed to 100k.

Code: Select all

Wire.setClock(100000L);
Wire.begin();

User avatar
jims123
 
Posts: 30
Joined: Wed Aug 03, 2016 4:05 pm

Re: MLX90614 3V IR Sensor and ESP-32 compatability

Post by jims123 »

Mike,
this issue is now resolved. On the outside chance that I had damaged my TTGO T Display module I swapped it and that fixed the problem, but to answer, Yes I did include the 10K pullup resistors on SDA and SCL. I did not have to include your bus speed setting code tho.

I am curious, and am wondering why we don't need to set an I2C address for the MLX?, and what address these 3V devices are using by default? I'm asking because I plan to put other sensors (like the BME280) on the same bus and assume that address is needed to avoid conflicts isn't it?

To give you an Idea what TTGO T Display code I am using successfully now see:
https://gist.githubusercontent.com/Idri ... Reader.ino
or "ESP32ContactlessTemperatureReader" or https://www.instructables.com/ESP32-and ... -MLX90614/
Thanks for the very quick reply and your help!

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: MLX90614 3V IR Sensor and ESP-32 compatability

Post by mikeysklar »

The i2c address is 0x5A for the MLX90614ESF-BAA. The library will take care of that for you.
I2C interface, 0x5A is the fixed 7-bit address
https://www.adafruit.com/product/1747

User avatar
jims123
 
Posts: 30
Joined: Wed Aug 03, 2016 4:05 pm

Re: MLX90614 3V IR Sensor and ESP-32 compatability

Post by jims123 »

Mike,
I appreciate your help. My MLX Sensor project is working fantastic but I'd like to know if this is mod is possible?

I'd like to add a second MLX90614 3V to the same I2C bus and connect it to the same TTGO T-Display. Why ? because I actually have two "hot spots" to monitor and tho this single device is quick and accurate at about 5 inches from the target, I don't believe it can see a large enough area of interest to cover the 2nd spot reliably. That spot is about 10 to 14 inches away. So, I want to place two sensors each about 5 inches away from the target and would like to address it on the bus with a 2nd I2C address alongside the 0x5A that I've been testing. Is that possible with this device?

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”