最近弄到了一颗迈来芯热成像传感器新品MLX90642传感器。MLX90642是一款卓越的热成像阵列,配备32x24像素矩阵,具有高信噪比(SNR)性能。标准的4引脚TO39封装,带数字I2C接口。


等待芯片的日子,就预先做好了板子,并打样了。我选择的是 45度角的芯片MLX90642ESFBCB,有45和110 两个视角可以选择,45度视角的更长一些。传感器很小,很漂亮。4根镀金的引脚闪闪发光(可惜被我焊好后剪掉了)。电路图制作倒是很简单,使用一个2.0mm的HY插座,这样可以兼容手头的GROVE接口。使用一颗低压差稳压芯片提供3.3v电源。模块的接口使用了Grove接口,这是一个4芯,2.0mm的插座,还是挺常见的。电源使用一颗低压差线性稳压器,可以接入5V电源,转换为3.3V电压给芯片使用。因为是低压差LDO,接入3.3V电源也能使用。使用了两颗10K电阻做上拉(阻值可以选5K~10K之间的阻值)。


传感器电路板,有模拟M5 Unit Thermal的设计,模仿着打印一个外壳,但是3D打印,总是尺寸有误差,现在导致外壳装不上,还需要用小刀继续修一下。
电路做简单的验证,使用arduino做I2C扫描,可以发现设备,接下来就可以开心地玩耍啦!
#include <Arduino.h>
#include <M5StickCPlus.h>
#include <Wire.h>
void setup()
{
M5.begin(); // Initialize M5StickC Plus. 初始化 M5StickC PLus
M5.Lcd.setTextSize(3); // Set font size. 设置字体大小
M5.Lcd.setRotation(3); // Rotate the screen. 将屏幕旋转
M5.Lcd.print("Hello World");
Wire.begin(32, 33); // sda= GPIO_21 /scl= GPIO_22
}
void loop()
{
Serial.println();
Serial.println("I2C scanner. Scanning ...");
byte count = 0;
Wire.begin();
for (byte i = 8; i < 120; i++)
{
Wire.beginTransmission(i); // Begin I2C transmission Address (i)
if (Wire.endTransmission() == 0) // Receive 0 = success (ACK response)
{
Serial.print("Found address: ");
Serial.print(i, DEC);
Serial.print(" (0x");
Serial.print(i, HEX); // PCF8574 7 bit address
Serial.println(")");
count++;
}
}
Serial.print("Found ");
Serial.print(count, DEC); // numbers of devices
Serial.println(" device(s).");
delay(3000);
}I2C scanner. Scanning ... Found address: 102 (0x66) Found 1 device(s).
MLX90642-Datasheet-Melexis.pdf
22


