Hi, I'm trying to connect a "GY-906 MLX90614 infrared temperature sensor" to my Mega2560 (original board), and it's not working.
At first it worked, but then it stopped working all of the sudden.
Am I doing something wrong here? Do I need pull up resistors on the SDA/SCL lines or something like that?
#include <Adafruit_MLX90614.h>
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
void setup() {
Serial.begin(9600);
while (!Serial);
Serial.println("Adafruit MLX90614 test");
while (!mlx.begin()) {
Serial.println("Error connecting to MLX sensor. Check wiring.");
while(1);
};
Serial.print("Emissivity = "); Serial.println(mlx.readEmissivity());
Serial.println("================================================");
}
void loop() {
Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempC());
Serial.print("*C\tObject = "); Serial.print(mlx.readObjectTempC()); Serial.println("*C");
Serial.println();
delay(500);
}
It works if I connect the external metalic case to GND like this
Hi, @brunoaduarte
Check, I think that module will work on 5V, you have 3V3 .
To add code please click this link;
See also FAQ - Arduino Forum for general rules on forum behaviour and etiquette.
Hello,
Welcome to the Arduino Forum.
This guide explains how to get the best out of this forum. Please read and follow the instructions below.
Being new here you might think this is having rules for the sake of rules, but that is not the case. If you don’t follow the guidelines all that happens is there is a long exchange of posts while we try to get you to tell us what we need in order to help you, which is fru…
You could try 4K7 pullups on the I2C wires.
Check the quality of solder connections on the module.
Thanks... Tom..
1 Like
Thanks for the reply Tom
Unfortunately the pull up resistors had no effect.
Also I've just resoldered all the module connections and the error persists.
The only solution was to connect the external metalic case to GND as in my last post.
Wawa
July 4, 2023, 1:34am
5
Breadboards and jumper wires are not very reliable.
Try replacing the jumper wires first.
Leo..
1 Like
Hi,
Yes the case of the sensor looks like it should be connected to gnd, for shielding the low current device inside from EMC as well as supply.
Note the sensor is a 5V device if it is an A device.
MLX90614_rev001.pdf (1.2 MB)
It looks like faulty connection somewhere.
As
@Wawa suggests, check your jumper wires, specifically the one connecting gnd.
Tom..
1 Like
That indicates a bad solder job on the device Vss pin or the header pin.
1 Like
system
Closed
December 31, 2023, 3:17am
8
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.