Author Topic: MLX90614 IR Thermometer  (Read 6876 times)

BJMarsh

  • Newbie
  • Posts: 5
  • I'm a llama!
    • View Profile
    • Webmosa
MLX90614 IR Thermometer
« on: June 28, 2010, 07:23:03 AM »
Has anyone tried using the MLX90614 IR Thermometer with any Tri-Plc PLCs? I have been reading up on what people have done using other PLCs, nothing I can find shows a Tri-Plc.

At the moment I am a bit stumped as to how to structure the code using the F2424, so if you have any experience with this component any help would be greatly appreciated as it will save me loads of reading!

http://www.sparkfun.com/datasheets/Sensors/Temperature/SEN-09570-datasheet-3901090614M005.pdf

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:MLX90614 IR Thermometer
« Reply #1 on: June 29, 2010, 12:20:37 AM »
Since this sensor has PWM outputs, you can connect it to one of the PLC's pulse measurement inputs. On the F2424 this can be any of the input #1 to #6.

You can then enable the pulse measurement using the PMON statement. Thereafter, you can simply read the pulsewidth of the incoming pulse using the PULSEWIDTH() function. The period of the incoming pulse is read using the PULSEPERIOD() function. The duty cycle is the ratio of the pulsewidth/pulseperiod. You can then convert the reading to temperature.
« Last Edit: June 29, 2010, 12:21:08 AM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

BJMarsh

  • Newbie
  • Posts: 5
  • I'm a llama!
    • View Profile
    • Webmosa
Re:MLX90614 IR Thermometer
« Reply #2 on: June 29, 2010, 05:55:09 AM »
That is similar to what I had begun attempting, where I am a little lost is the sensor has the SCL and SDA pins, do you think I then need to put the SCL to one of the PWM outputs?
« Last Edit: June 29, 2010, 05:55:40 AM by BJMarsh »

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:MLX90614 IR Thermometer
« Reply #3 on: June 29, 2010, 07:33:38 AM »
The SCL and SDA pins are used for serial communication between the MLX90614 and a microprocessor using just 2 wires.  This communication protocol is sometimes called I2C ("eye-squared-cee").  This protocol is used to to provide an simple interface between small micro-controller chips and peripheral devices such as serial EEPROMs.

You can't connect an I2C interface directly to the PLCs I/O pins because the voltages are not compatible and the PLC is not capable of generating the correct trimmings to support I2C.

If you search the internet for "RS-485 to I2C" there are mention of adapters that might allow you to control the MLX90614 using the RS-485 interface.

I suspect that you will, ultimately, have the read the manual.  

Gary D.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:MLX90614 IR Thermometer
« Reply #4 on: July 01, 2010, 12:42:58 AM »
Currently the PLC programming language does not directly support I2C although future design may support I2C.

However, using I2C communication is a bit more complicated that straightforward communication such as RS232. Usually only experienced embedded system programmer would attempt to write code for I2C bus.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS