Main Site Documentation

Trying to figure out how to cross a MLX90615 IR Thermometer with Mbuino


#1

I’m wanting to run the MLX90615 in PWA mode. It looks like I connect to P04 and P05 for SCL, and SDA with a 4.7K pull-up resistor according to the data sheet.

I found a MLX90614 in the mbed library. What I would like to do is define a normal temp in a variable declaration and have it light the center LED, and then define a range +/- to light the other 2 LEDs on each side.

I’ve never used mbed before but do have the device loaded and trying to get the data value to write to the TXD port.to see if I can get it to stream some data out.

Any advice welcome…


#2

It looks if you take a brand new sensor and leave the clock input pin disconnected or pulled high then it will default to for 1kHz PWM output with a range from 0.03C to 50.01C on the data pin.

If you’ve written anything into the config register then this may no longer be true but that is the factory default.

Assuming those settings are OK for you then you don’t need to use any library to configure the device since it already is in the mode you want.

A simple library like http://developer.mbed.org/users/simon/code/PwmIn/ will convert the PWM input into a ratio for you if you don’t feel confident doing that yourself.

After that it’s just straight c / c++ to maybe do a little averaging and light up the LEDs based on the temperature difference between the initial measurement and the current one.

If you need to change the default settings/range then you’ll need to communicate over the bus, at that point you’d need to see if the driver you found is close enough. It’s not a complex part so it shouldn’t be too tricky to write a driver but that is a steep learning curve.


#3

Great, thanks, I will give it a shot. I’m assuming PWM is the easier way to interface, sounds as though it is…cheers