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: Linearizing the proximity readings - is there a formula for that?



I had some fun with a deck of playing cards.  Each card is about .3mm thick and ... pre-numbered!  Using an aluminum-alloy base plate and those `gap-setting' playing cards, I entered proximity readings into a spreadsheet and set to trying various conversion formulas to get my 30-sample `distance vs. prox.' chart to make a straight line.

I was thinking it should be some sort of square-law relationship but it seemed that the log() of the prox. readings made a better straight line - up to the point where the gap became close to equal to the loop diameter  (where it `took-a-dive' ).   Also, the first mm ( three cards) wasn't so good either.  Perhaps because the aluminum plate changed the inductance? 

*** THE QUESTION(s) ***  What IS the theory on the relationship between prox. readings and distance - mathmatically speaking - and have you any suggestions on how to factor in the effect of changes in inductance so as to obtain an accurate up-close absolute distance value?

PS. Rhetorical side-note: There were times when I'd stop my regular pace of measurements to watch the football game for a play or two - and when I resumed, the readings would be offset - a lot. They were going 19000, 16400, 14600, 12700... (pause, watch game for 3 minutes, resume)... 9200, 7500, 6800.  Not sure what happened there but it's a little disconcerting to have the readings take a jump for no apparent reason.  No - I didn't lose my place - I used numbered cards for exactly that reason. :-)   If it happens again - repeatably - in my lab (I was playing on a wooden table in a living room before.) I'll try to provide `less rhetorical'  feedback. :-)

  • Hello,

    Thank you for having fun with LDC1000! :)

    The relation between the distance and Rp value is quite complex. It depends on the shape of the coil and the target, mainly, and do include already changing inductance of the system. Analytical solutions are often not practical for complex (and even regular square targets, for example!), and often are impossible to integrate at all.

    The best approach for linearization is look-up table approach, with interpolation of points in between. You would make a 1-time calibration of the system during the design stage, and then use this look-up table for mass production.

    Please keep us posted on your experiments!

  •   So, no elegant just-do-the-math solution then. Oh well, messy ol'  "the-more-points-the-better", RAM-sucking look-up table it is. :-(   It looks like I'll be having fun with stepper motors, nylon lead screws and delrin slides/guides next.  

    PS. On that rhetorical data-jump thing... I had a laptop on the table.  My gap-setting jig was just to the left of it - also on the table surface.  I just noticed that the laptop's cooling fan exit hole is on the left side. I now recall that I heard the fan running every once in awhile.   I suppose an air stream 60 deg.F. above ambient would cause some drifting, wouldn't it? :-)  I probably didn't notice it at the time 'cause my finger-tips were inserting the cards from 'a card's length' above the sensor / hot air stream.   I'm considering this one 'case closed'. :-)

  • Hello,

    You are very well on the right track!

    Regarding the data jumps-yes, that's exactly what I suspected, a temp. drift, but I did not suspect the cause to be a laptop fan :) Yes, temperature changes will change the data.

    We have an app note on how to deal with that: http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=snaa212&fileType=pdf

  • Log() is not a bad solution as long as you modify your coefficients to curve-fit your data.

    You'd be surprised with what you can do when using assembly-optimized libraries for RAM-limited platforms.

    For instance, for the MSP430, see:

    http://www.ti.com/tool/mspmathlib

    ;-)

  • Thanks for the vote of confidence for the formula way!  I just finished the EEPROM look-up table-R/W routines - and they seem to work  - so I think I'll relax, consider that the fallback `Plan B'. and play with math some more!  :-)

    BTW - I''m shooting for a resolution of .1mm - hoping for accuracy of .5mm over 1.5cm with a 2 cm. dia coil.  I can be prone to delusional wishful thinking, but from what I've read/heard so far from `you guys',  that falls into the `reasonable' category ... Right? :-)

  • Yes that is very reasonable if you can mechanically align the markings on the cards axially with the sensing coil consistently.

  • Hello Marilyn,

    I assume that the plotting of the "proximity sensor v/s distance" chart is being done in order to measure the linear distance between the target & the sensor . I too am doing the same . I am however striving for a micro-meter Resolution . I wanted to know if the mount on which the sensor & the target are kept, has to be non-metallic ?  (Although I take care that the sensor coil is not touching the mount ) . Also what arrangement did you make in order for the target & the sensor to be kept absolutely stable ?

    With Regards,

    Avinash