Shop OBEX P1 Docs P2 Docs Learn Events
MLX90614 Infrared Thermometer Module (10° FOV) with PIC controller — Parallax Forums

MLX90614 Infrared Thermometer Module (10° FOV) with PIC controller

Ferdinand TangFerdinand Tang Posts: 2
edited 2012-02-07 12:21 in Accessories
Hi,

I recently purchase 2 MLX90614 modules and I am trying to communicate with it via a PIC controller.
Does anyone know how I should interface to it? Is it a 1-wire Dallas interface? Anyone any advise?

Thanks,
Ferd

Comments

  • hover1hover1 Posts: 1,929
    edited 2009-07-08 12:09
    Ferdinand Tang said...
    Hi,

    I recently purchase 2 MLX90614 modules and I am trying to communicate with it via a PIC controller.
    Does anyone know how I should interface to it? Is it a 1-wire Dallas interface? Anyone any advise?

    Thanks,
    Ferd


    Read the documentation on this page:

    http://www.parallax.com/Store/Sensors/TemperatureHumidity/tabid/174/List/0/ProductID/520/Default.aspx?SortField=ProductName%2CProductName

    It uses a serial interface with preprogramed commands to read and write to the device.
    ·
  • LeonLeon Posts: 7,620
    edited 2009-07-08 15:25
    SMbus is similar to I2C, so you should be able to use the PIC I2C module.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • TimmooreTimmoore Posts: 1,031
    edited 2009-07-08 16:24
    Do you mean the parallax modules or the raw mlx90614 device? If its the parallax modules then the link in the above post is the place to go, its basically a serial interface. Otherwise as Leon said, the raw module has a SMBus interface, I have interfaced with it using a I2C implementation, the main difference is SMBus has a min clock speed as well as a max clk speed. The pic i2c interface should handle that without problem.
  • Ferdinand TangFerdinand Tang Posts: 2
    edited 2009-07-10 08:45
    Hi All,

    Thanks for the quick reply, I bought the parallax modules. So I guess Serial is the way to go. I2C uses 2 pins, a clock and a signal pin. However the module only has 1 pin, is it safe to omit the clock pin in this case?

    Thanks,
    Ferd
  • ruperthartruperthart Posts: 17
    edited 2009-10-26 06:45
    Ferd, did you get it to work? I am having difficulty with a parallax version of MLX90614 and a pic.

    I am in Santa Cruz. Appreciate a response. rupert@ruperthart.com

    Regards
    Rupert
  • leolib2004leolib2004 Posts: 5
    edited 2012-02-07 11:07
    Did your MLX90614 module work?

    I can not communicate to it. I have read the datasheet and have seen the examples.
    I am using a microchip pic (16F628A). According to the datasheet, first i do a reset to the module (a 0 in reset pin for 5 ms and then a 1 forever)
    Then i send in hexa this sequence

    (0x00) - Delay_ms(10) - (0x21); - (0x54); - (0x45); - (0x4D); - (0x63); - (0x5A); - (0x07);
    This is for doing a continuous reading.

    And then,

    (0x00) - Delay_ms(10) - (0x21); - (0x54); - (0x45); - (0x4D); - (0x52); - (0x5A); - (0x07);
    for reading temperature...

    After that I wait for 3 bytes sent by the module.


    I use UART's library to do this.

    I can not see any response with my oscilloscope. What could be the problem?
    Maybe 0x5A is not the address or i am thinking something wrong...

    Thanks for your response! Regards!
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2012-02-07 11:25
    What are the serial parameters that you are using? Baud rate, data bits, stop bits, etc?

    Is the library that you're using meant to be used with something like a MAX232 and then to a serial device? If so then the serial data may be inverted. There may be an option to invert the signal for a logic level connection.

    How is everything wired up? Can you verify that you have the proper pins defined and connected. With the PIC do you have to setup the pins as inputs and outputs or does the library handle that?

    Robert
  • leolib2004leolib2004 Posts: 5
    edited 2012-02-07 12:21
    Hello robert,

    I am using an UART SOFTWARE library and i guess i can not look inside these libraries... I looked everywhere and i do not know how to access to the code...

    I use 2400 as the baud rate, and non inverted logic (this is taken as a parameter to the function init).

    I have checked up the connections.

    I connect PORTA.F6 as tx and PORTA.F7 as rx. This to SIG through sn74ls126AN (tristate buffers) and sn74ls04N (inversor) to assure that tx and rx are not used together (the enable with a pull up resistor).

    I connect PORTB.F4 to reset and GND (0V) and VDD (5V).

    I set the proper pins as outputs or inputs (all of them), i have checked it now.

    Maybe it is something in the protocol that i don't know...
    I can see the message sent by the PIC but there is no response...

    What do you suggest?

    Leonardo.
Sign In or Register to comment.