Multiple MLX90614 sharing same lines

b. Deletreb. Deletre Posts: 6
edited April 2009 in Accessories Vote Up0Vote Down
Hi folks,

As I'm quite new in electronics, my question may be somewhat silly, please forgive me.
I am using multiple MLX60614 Temperature IR sensors (actually 4 or 6).
Each sensor has been given a unique ID ($05,$15,$25...).
In case 3 sensors or fewer are mounted sharing the same Signal and Reset lines, they correctly answer.
In case 4 or more sensors are connected, no one responds anymore.
Is there a known explanation and a way to simply mitigate this issue ?

Thanks a lot,

Eddy
Tagged:

Comments

  • 12 Comments sorted by Date Added Votes
  • Craig EidCraig Eid Posts: 106
    edited March 2009 Vote Up0Vote Down

    Eddy,

    Since you are using a shared bus, you need to be careful when you are addressing several sensors to get readable data. In addition to assigning a unique slave address to each sensor, you must setup a read sequence for each sensor that ensures that only a single sensor is transmitting data.·The Melexis datasheet has detailed information on the·required timing intervals to avoid data collision.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ························ Craig Eid


    ··········· Triad Research and Development
    Electical Engineering Design and Consulting Services

    ··················· www.TriadRD.com
  • b. Deletreb. Deletre Posts: 6
    edited March 2009 Vote Up0Vote Down
    Craig,

    Thank you for this interresting comment.But, I do not really understand how this could happen in my App:
    - All the MLX's are configured in continuous measurement Without output.
    - I tried to interrogate them with 2s delay (between each sensor) and this does not change anything.
    - If I try to call only 1 sensor on the bus, it works fine with up to 3 sensors and bugs with 4 or more independently of the in-between calls delay (up to 2 sec @ 9800 bauds). Correct me if I'm wrong, but I think no collision can happen in this last config.

    I feel I miss a very simple thing, as pull-up resistors or so, but as a new-by , I'm quite lost.

    Night is comming in France, hope night it will be of good advice!!

    Have a good day,

    Bruno
  • Craig EidCraig Eid Posts: 106
    edited March 2009 Vote Up0Vote Down
    Eddy,

    Attach·a copy of your program and your schematic and we can do some additional troubleshooting.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ························ Craig Eid


    ··········· Triad Research and Development
    Electical Engineering Design and Consulting Services

    ··················· www.TriadRD.com
  • b. Deletreb. Deletre Posts: 6
    edited March 2009 Vote Up0Vote Down
    Thank you Craig,

    You will find attached the code (I use a BS2Pe) and a simple schematic in a "7zipped" file.
    The code runs fine for up to 3 sensors (physically connected) whatever their adress is (I mean all combination of sensors have been tested, and no one is burnt!!).
    As I connect the 4th sensor, no one respond anymore.


    Thank you for your help,

    Have a good day,

    Eddy
  • Desy2820Desy2820 Posts: 138
    edited March 2009 Vote Up0Vote Down
    What is the current draw of each sensor?·· I'm wondering if you're exceeding the current capacity of the output pin.

    If you have a spare pin, have you considered moving the fourth sensor to that pin?
  • Craig EidCraig Eid Posts: 106
    edited March 2009 Vote Up0Vote Down
    Eddy,

    I have been unable to unzip the folder that you uploaded to the forum.·Please convert the schematic to a .pdF and upload it separately from the code.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ························ Craig Eid


    ··········· Triad Research and Development
    Electical Engineering Design and Consulting Services

    ··················· www.TriadRD.com
  • b. Deletreb. Deletre Posts: 6
    edited March 2009 Vote Up0Vote Down
    Craig,

    Here are the Non Zipped file.

    Have a good day.

    Eddy
  • Craig EidCraig Eid Posts: 106
    edited March 2009 Vote Up0Vote Down
    Eddy,

    The·application that fails - 4 sensors with a·typical current specification of 20mA/sensor - exceeds the Stamp current specification of 20mA(source) for a single output pin and 40mA(source)·for a bank of 8 I/O pins. Connecting one sensor per I/O pin and splitting the 4 sensors between the lower I/O (0-7) and the upper I/O (8-15) should resolve this problem.

    Your application could also benefit by increasing the delay time when addressing individual sensors.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ························ Craig Eid


    ··········· Triad Research and Development
    Electical Engineering Design and Consulting Services

    ··················· www.TriadRD.com
  • b. Deletreb. Deletre Posts: 6
    edited April 2009 Vote Up0Vote Down
    Thank you Craig and Desy,

    This is obviously the reason. Your option to split the sensors between upper and lower IO works fine. However I'm wondering if there is a way to use a kind of self-directing bi-directionnal amplifier if this kind of stuff exists !!! This would greatly simplify wiring issues in my App and potentially save precious pins !!

    Thank you,

    Eddy
  • Craig EidCraig Eid Posts: 106
    edited April 2009 Vote Up0Vote Down
    Eddy,

    You can use an I/O expander to minimize the number of Stamps pins that are required for your application. Two commonly used parts manufactured by Microchip·Technology are the MCP23017 - http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=MCP23017-E/SP-ND, using the I2C interface, and the MCP23S17 - http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=MCP23S17-E/SP-ND, which uses the SPI interface. I have attached a copy of the datasheet for both parts.

    Nuts and Volts magazine has several columns that discuss the I2C and SPI interface. You can access the columns through the Resources tab on the Parallax homepage.

    ·

    .

    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ························ Craig Eid


    ··········· Triad Research and Development
    Electical Engineering Design and Consulting Services

    ··················· www.TriadRD.com
  • b. Deletreb. Deletre Posts: 6
    edited April 2009 Vote Up0Vote Down
    Thank you Craig,

    I'll have a look to that.
    Have a good day,

    Bruno
Sign In or Register to comment.