Poll

ADC with non-linear sensor

?
2 (33.3%)
?
4 (66.7%)

Total Members Voted: 6

Author Topic: ADC with non-linear sensor  (Read 3128 times)

0 Members and 1 Guest are viewing this topic.

Offline Hayat QurtTopic starter

  • Newbie
  • Posts: 1
ADC with non-linear sensor
« on: April 30, 2013, 09:18:03 am »
I have a question regarding ADC . What is the best way ( fastest) to match the reading from the ADC output with non-linear sensor output ?
 

Offline HackedFridgeMagnet

  • Super Contributor
  • ***
  • Posts: 2028
  • Country: au
Re: ADC with non-linear sensor
« Reply #1 on: April 30, 2013, 09:28:45 am »
Depends on the mcu and how much memory you have.
If you had lots of ram you use the ADC input which is an integer, as an index into a lookup table.
If you are shorter on ram then you could do the same but make the lookup table (array) smaller and interpolate the point.
 

Offline Neilm

  • Super Contributor
  • ***
  • Posts: 1546
  • Country: gb
Re: ADC with non-linear sensor
« Reply #2 on: April 30, 2013, 06:55:04 pm »
Look at the analogue signal and see if it could be linearised before it reached the ADC

Neil
Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. - Albert Einstein
Tesla referral code https://ts.la/neil53539
 

Online PA0PBZ

  • Super Contributor
  • ***
  • Posts: 5127
  • Country: nl
Re: ADC with non-linear sensor
« Reply #3 on: April 30, 2013, 07:22:40 pm »
Depends on the way it is non-linear of course, maybe you can just calculate the result, just to name another solution.
Keyboard error: Press F1 to continue.
 

Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 3717
  • Country: us
Re: ADC with non-linear sensor
« Reply #4 on: April 30, 2013, 09:40:43 pm »
Lookup table with interpolation if necessary.
 

Offline DavidDLC

  • Frequent Contributor
  • **
  • Posts: 755
  • Country: us
Re: ADC with non-linear sensor
« Reply #5 on: April 30, 2013, 09:45:42 pm »
Look at the analogue signal and see if it could be linearised before it reached the ADC

Neil

If you can do it by software, save on hardware.


David.
 

Offline jmole

  • Regular Contributor
  • *
  • Posts: 211
  • Country: us
    • My Portfolio
Re: ADC with non-linear sensor
« Reply #6 on: April 30, 2013, 09:49:07 pm »
The problem with linearization in software is that you're wasting a ton of bits on data that might not even matter, especially if your signal is logarithmic or exponential in nature.

Check out this app note for details on building a log amp: http://www.analog.com/static/imported-files/tutorials/MT-077.pdf
 

Offline nerdyHippy

  • Contributor
  • Posts: 37
  • Country: us
Re: ADC with non-linear sensor
« Reply #7 on: April 30, 2013, 10:23:39 pm »
Depends on the mcu and how much memory you have.
If you had lots of ram you use the ADC input which is an integer, as an index into a lookup table.
If you are shorter on ram then you could do the same but make the lookup table (array) smaller and interpolate the point.

If speed isn't an issue it's always possible to store the LUT in program memory to save RAM.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf