This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LDC1000 and Arduino

Has anyone succeeded in interfacing the LDC1000 SPI with an Arduino? I'm using the Pro Micro 5V/16 MHz (which operates much like a Leonardo). I'm wondering about libraries to use and hazards to be expected along the way. Thanks for any help with this. Richard

  • Hello Richard,


    At the moment we do not have any experience of controlling LDC1000 with Arduino, but it should be no problem.

    I would get some examples from http://arduino.cc/en/Reference/SPI and start developing communication based on that framework.

  • Evgeny,

    Currently I am trying to use Arduino to interact with the LDC1000, I barely succeeded.

    Nevertheless I cannot make more than 1 LDC1000 give correct values. As soon as I connect a second LDC on the SPI bus, neither works correctly. The Chip-Selection circuit is working great (without any doubts), I even used a buffer 74LS244, but it actually make it worst. I insert (intercalate) temperatures sensors on the SPI bus as well, and I succesfully read their values, but not the LDC's.

    Any thoughts?

    Andres

  • Hi Andres,


    Do you have dedicades SC lines for each LDC1000?

  • Hi Evgeny,

    Thanks for the reply.

    Yes, indeed I have. 

    Since I only have two lines to control an N number of LDCs, each one in a box, separated by 20-30 cm, I enable each LDC with D-type flip-flops acting as a shift register. The uC "rotates a bit" in this register, selecting one LDC at a time. A slow rotating-bit-test showed that I indeed select one device at a time, and while interrogating one LDC or Temperature sensor, the other CSs are in a 5V TTL level. If I physically connect only one LDC and one temperature sensor (each one with a dedicated cs, and on the same SPI bus), it works perfectly. I cant manage to make more than one LDC work.

     

    Andres

  • Hi Andres,


    Thanks for more data!

    I have looped in a few colleagues, we will look into it.

    Stay tuned...

  • Hi Evgeny,

    I really appreciate your assistance. On some additional info and news...

    I am using the ADT7310 temperature sensors in addition of the LDC1000s, I found differences on the SPI protocol among this two devices, according to their datasheet.

    Also I have way better results using the normal SPI communication rather than the extended SPI transaction method, that gives me lots of errors.

    Some differences I try were concerning the rising/falling edge detection, delays after CS selection, SPI speed.
    So now i am not using the SPI library, but manually I code the protocol on the Arduino, to better control de SPI clock and data.

    I also tested multiple values for different delays (a variation of a single 1 microsecond after shift-register updates a CS pin make a huge difference in the readings of the sensors). 

    Anyways, I manage to read 4 of each now.
    But, all the values from the LDC (the values from the temperature sensors are perfect) are precise but not quite accurate. At least stable. With the same configuration I have values of the proximity data from 4400 to 8000 under the same conditions (nevertheless all four inductance throws the correct and same value, 6uH)

    So, precise values now but not accurate. Still minimal variations on the CS sync, and SPI clock shows multiple results.

     
    My suggestion is: What if I choose to share the same CS pin among all sensors (controlled directly by the Arduino, activating all at once), BUT add a buffer to each one, before going into the SPI bus. And then use the shift register to enable or disable each buffer (74LS244 or similar), do you think that would help? What do you think?

    Andres.

  •  I would check that the VIO pin matches your system. The VIO on the EVMs are 3.3V, while you mentioned a 5V digital system. With the long lines you are using, you may have some signal integrity issues. This can include excess ringing and ground bounce on your SPI pins. Make sure you have a good ground for the digital signal, that there are no transmission line effects, and the VIO is set appropriately.