Maker Pro
Maker Pro

MLX90614 with stm32f103 in arduino IDE Problem

mr.rohit30@

Sep 7, 2020
4
Joined
Sep 7, 2020
Messages
4
Hello all,


i am using MLX90614 IR temperature Sensor with stm32f103 controller.
for programming i am using arduino ide.
when i interfaced IR sensor with arduino boards using adafruit library that time sensor works properly.

but when i tried with stm32 controller with same library that time sensor gives some 1037.33 something readings. MLX90614 sensors not work properly with stm32f controller in arduino ide in my case.

please suggest me any solution for my problem statement.

Thanks a bunch.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,722
Joined
Nov 17, 2011
Messages
13,722
Check the assignment of the pins of the cpu board to the sensor. The STM likely uses different pins than the Arduino. You'll have to account for that in your code.
 

mr.rohit30@

Sep 7, 2020
4
Joined
Sep 7, 2020
Messages
4
I checked stm32 I2C pin and i tried ADXL345 I2C interface sensor with stm32 on same pin. ADXL345 works in my case with same pins.so according to me the pin issue is not there
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,722
Joined
Nov 17, 2011
Messages
13,722
I2C requires pull-up resistors on SDA and (I think) SCL. Arduino has built-in pull-ups. I don't know about the STM. Maybe the ADXL345 has built-in pull-ups so it works on the STM, but the MLX90614 doesn't have pull-ups so it doesn't work?

Another possible issue: Arduino is a 5 V device.
STM is a 3.3 V device.
MLX90614 is available in 3.3 V and in 5V. As it works on the Arduino, I guess you have the 5 V variant. It will not work on the 3.3 V interface of the STM without an additional level shifter.
 

mr.rohit30@

Sep 7, 2020
4
Joined
Sep 7, 2020
Messages
4
i checked datasheet of MLX90614 module, in that module they provide on board 4.7K Pull-up resistors on SDA and SCL line.
and according to its datasheet MLX90614 is compatible with 3.3V . my stm32F103 alsowork with 3.3V.
when i treid with arduino board i gave 3.3V to MLX90614 sensor from arduino board.

check link for a referance

https://www.14core.com/wiring-the-m...ture-measurement-sensor-with-microcontroller/
 
Last edited:

mr.rohit30@

Sep 7, 2020
4
Joined
Sep 7, 2020
Messages
4
no warning or error during compiling the code .
i am checking wire.h library as well.
 

Manali Berde

Oct 18, 2020
1
Joined
Oct 18, 2020
Messages
1
I am using stm32 and mlx sensor using Arduino ide.
I have got no errors but I am getting wrong temperature measurements on serial monitor. Please help
 
Top