MLX90614 sensor driver
Here is a driver for the MLX90614 non-contact temperature sensor. MLX90614_test.spin is the top level object. A 1 kOhm resistor must be used between the sensor RST pin and the Propeller, or the device won't work (though I've found using the device in non-sleep mode operation, as is done in this driver, can·leave the RST line·unconnected).·
The object will be posted in the normal places when I have gotten an internal review.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
The object will be posted in the normal places when I have gotten an internal review.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
zip
![](/plugins/FileUpload/images/file.png)
4K
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ D Rat
Dave Ratcliff· N6YEE
I recently purchased a MLX90614 module from Parallax, and it works pretty much as advertised. But it has whetted my interest in MORE. Now I'm trying to figure out how to have a Propeller drive it instead of the SX-helper. This driver from looks like just the item.
By the way, the PBasic software examples that Parallax makes available with the MLX90614 module do not work properly. The calculations of the Celsius values (integer and decimal) are incorrect. If anyone's interested I can provide a working solution.
Jim
You refer to such a driver: I wonder if by chance do you have a spin/pasm driver for the MLX90614 that you'd consider posting?
Jim
1. I have changed several of the other modules since I used this test code, so its possible that I broke this code, though I haven't changed the MLX driver. In particular I got the I2cscan working with the MLX and I have since changed it. I believe its working since it detects the mlx in another project I am using it in but YMMV.
2. The MLX I got didn't have a SMBUS address configured. If you look at the start of the mlx test code you can see some WriteEEProm calls commented out. These calls programs the normal SMBUS address, if you have the same problem, check this.
3. I had so many problems with this sensor, I ended up powering it from a prop pin so I could power it down and up easy. I haven't had any problems doing this but its something to watch.
4. The MLX90614Object is in another project and has been running without problems so many of the problems i had may have just been getting the driver correct.
Couple of other comments
1. The code is all in spin and I started from the Basic_I2C_Driver but inlined a lot of code to meet the timing requirements of the SMBus
2. The conversion code is from Pauls MLX code
Thanks. It looks like a good place to start. I'll let you know when I get it working (might be a couple of weeks, given everything).
Jim
Your MLX90614 drivers are a good place to start. I used the file you uploaded to turn on the device. There are a couple of things that don't quite make sense, but I'm making progress:
-the drivers work, and temperature can be measured
-the MLX90614 documentation suggests the factory-set SMBus address for the devices is preset at $5A. I couldn't contact them at that address, but it did work at $00, $01, $02, $03. As I read it, it should only have worked at $00, and maybe $5A, so I'm not sure what's going on here.
-Using the code in MLX90614Object to write to the EEPROM doesn't seem to work--I'm chipping away at it though, and am hopeful of success.
Got any ideas about the device addressing or writing to EEPROM?
Thanks,
Jim