+ Post New Thread
Results 1 to 16 of 16
  1. #1
    Junior Member level 1
    Points: 891, Level: 6

    Join Date
    Jun 2009
    Location
    Pune, India
    Posts
    17
    Helped
    2 / 2
    Points
    891
    Level
    6

    Measure temperature @0.1deg resolution using thermistor

    Hello all,

    I would like to get expert suggestions on whether it is possible to design a circuit for:

    1. Temperature measurement using a NTC thermistor
    2. 10-bit ADC (Max. input 3.3V)
    3. Resolution of 0.1 degree celsius
    4. Temperature range of -40 to +100 degree celsius


    I studied a thermistor (10K, Beta value 2490) datasheet vishay.com/docs/29003/23816154.pdf.
    If I use this thermistor in a voltage divider circuit biased from a 3.3V supply, I get a minimum step size of only 536uV for a 0.1 degree change in temperature.This step size varies through the range as the characteristics are nonlinear.

    For a 10-bit ADC, minimum step size is 3.2mV.

    Is there some way out or some other trick like amplifying voltage obtained across thermistor and / or changing gain of this amplifier dynamically etc. or some software manipulation / linearization etc.

    Please guide..

    Regards,
    Gopal

  2. #2
    Super Moderator
    Points: 245,621, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    42,668
    Helped
    13006 / 13006
    Points
    245,621
    Level
    100

    Re: Measure temperature @0.1deg resolution using thermistor

    You are requesting a 140 degree range with 0.1 resolution, which makes 1400 steps. How do you want to represent it with only 10 bits?

    Furthermore, a thermistor ist strongly non-linear. Without linearization, you would need about 20 Bits ADC resolution to achieve 0.1 degree output resolution. Another option would be a circuit with range switching, as mentioned. Analog linearization is rather a principle option than a real solution, because it's involving complex circuits and large error terms.

    Personally, I think it's less effort to use a single range voltage divider with a high resolution ADC than either switchable divider resistors or a PGA. A RTD sensor with basical linear characteristic would also ease the temperature acquisition, but still require a higher ADC resolution, e.g. 16 Bit.


    1 members found this post helpful.

  3. #3
    Advanced Member level 1
    Points: 5,998, Level: 18

    Join Date
    Mar 2002
    Location
    UK
    Posts
    487
    Helped
    110 / 110
    Points
    5,998
    Level
    18

    Re: Measure temperature @0.1deg resolution using thermistor

    Yes, you can get resolution of 0.1 or even 0.01 degrees if you use oversampling technique (google "oversampling"). There are a lot of applications and examples, practically you can get any resolution you want if you apply correctly the oversampling conditions:
    1. Limit the spectar of the input signal (some low pass filter, reject all HF)
    2. Apply correctly noise to the signals (some triangular noise is the best)
    3. Collect enough samples. The formula is Number_samples = 4 ^ n, where n is the number of the additional bits you want to get. For example you want to squeeze from your 10 bit ADC 14 bits, then make 256 samples (and follow steps 1 and 2) and you'll finish with 14 bits.

    I made some projects with oversampling and I can ensure you that the theory really works, you get pure and clear additional bits (I went up to 16 bits from 10 bit ADC). So instead of going to buy an expensive 16 bit ADC just spent a little more time searching the net and apply the oversampling.


    1 members found this post helpful.

    •   AltAdvertisment

        
       

  4. #4
    Junior Member level 1
    Points: 891, Level: 6

    Join Date
    Jun 2009
    Location
    Pune, India
    Posts
    17
    Helped
    2 / 2
    Points
    891
    Level
    6

    Re: Measure temperature @0.1deg resolution using thermistor

    Thanks all for replies.

    FvM, Will it help to increase resolution by using amplifier and range switching? Will linearization (hardware or software) help in increasing the resolution?

    luben111, oversampling seems really attractive option as you say. Are there any "cons" using this technique? Why do people go for 16-bit / 24-bit then? Thanks for good suggestion. I will study it...



    •   AltAdvertisment

        
       

  5. #5
    Super Moderator
    Points: 245,621, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    42,668
    Helped
    13006 / 13006
    Points
    245,621
    Level
    100

    Re: Measure temperature @0.1deg resolution using thermistor

    FvM, Will it help to increase resolution by using amplifier and range switching?
    Yes, I suggested it as an option.
    Will linearization (hardware or software) help in increasing the resolution?
    The thermistor characteristic is approximately following this equation

    R = R0 exp(B (1/T - 1/T0))

    The exponential function has to be linearized at least in software to get a correct temperature measurement. As I said, hardware linearization is more a theoretical option.

    A software linearization implies, that the resistance has to be measured over the full dynamical range before. A rough estimation says, that rather 20 than 16 Bit resolution are required for the intended range.

    A short remark about oversampling. It's generally an option, but has a principle limitation in the DNL (differential non-linearity) of the ADC. I won't expect too much from a PIC ADC in this regard.



  6. #6
    Junior Member level 1
    Points: 891, Level: 6

    Join Date
    Jun 2009
    Location
    Pune, India
    Posts
    17
    Helped
    2 / 2
    Points
    891
    Level
    6

    Re: Measure temperature @0.1deg resolution using thermistor

    Quote Originally Posted by FvM View Post
    Yes, I suggested it as an option.
    FvM, But how will it help actually? If I bias the thermistor with a 3.3V supply through a resistor, I can connect the thermistor voltage directly to ADC input. What difference it will make by adding an amplifier?
    Quote Originally Posted by FvM View Post
    A short remark about oversampling. It's generally an option, but has a principle limitation in the DNL (differential non-linearity) of the ADC. I won't expect too much from a PIC ADC in this regard.
    Ok, so oversampling has this "con". By the way, I am using ARM LPC1111.



  7. #7
    Super Moderator
    Points: 245,621, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    42,668
    Helped
    13006 / 13006
    Points
    245,621
    Level
    100

    Re: Measure temperature @0.1deg resolution using thermistor

    Assume a simple voltage divider with a fixed resistor (to 3.3V) and the thermistor (to GND). You can chose e.g. a high resistor value, that gives a sufficient resolution at low temperatures. Then the voltage across the thermistor will be a few 10 mV maximum at high temperatures. By adding a programmable gain amplifier (PGA), you get sufficient resolution for low voltages, too.


    1 members found this post helpful.

    •   AltAdvertisment

        
       

  8. #8
    Junior Member level 1
    Points: 891, Level: 6

    Join Date
    Jun 2009
    Location
    Pune, India
    Posts
    17
    Helped
    2 / 2
    Points
    891
    Level
    6

    Re: Measure temperature @0.1deg resolution using thermistor

    Quote Originally Posted by FvM View Post
    Assume a simple voltage divider with a fixed resistor (to 3.3V) and the thermistor (to GND). You can chose e.g. a high resistor value, that gives a sufficient resolution at low temperatures. Then the voltage across the thermistor will be a few 10 mV maximum at high temperatures. By adding a programmable gain amplifier (PGA), you get sufficient resolution for low voltages, too.
    Yes, that really makes sense! I had overlooked that dynamic range without an amplifier.
    But you mean that I should have some circuitry to switch gain of the amplifier automatically? How will I (my processor) know when to switch the gain? I think once the voltage goes below some threshold, right? If I use a normal Op-amp (not PGA for cost reasons), is it possible to add switching (BJT accorss feedback resistors) and control gain?



  9. #9
    Super Moderator
    Points: 245,621, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    42,668
    Helped
    13006 / 13006
    Points
    245,621
    Level
    100

    Re: Measure temperature @0.1deg resolution using thermistor

    I agree with your answer about automatic switching. The processor knows.

    BJT are introducing too much errors as analog switches (at least offset voltages). FET or
    CMOS analog switches, eg. CD405x are best for the application.


    1 members found this post helpful.

  10. #10
    Advanced Member level 1
    Points: 5,998, Level: 18

    Join Date
    Mar 2002
    Location
    UK
    Posts
    487
    Helped
    110 / 110
    Points
    5,998
    Level
    18

    Re: Measure temperature @0.1deg resolution using thermistor

    Quote Originally Posted by gopal_amlekar View Post
    oversampling seems really attractive option as you say. Are there any "cons" using this technique? Why do people go for 16-bit / 24-bit then? Thanks for good suggestion. I will study it...
    Cons:
    1. Lower speed (you need multiple samples)
    2. Aditional care to inject proper noise (usually needs some additional hardware)
    3. Additional filtering of input signals (you need low pass filter on the input, preferably hardware filter)

    BTW, this is the way how most electronic human body thermometers work - they achive 0.01 degree despite that there is stupid cheap silicon inside.



  11. #11
    Advanced Member level 5
    Points: 36,228, Level: 46

    Join Date
    Mar 2008
    Location
    USA
    Posts
    5,823
    Helped
    1690 / 1690
    Points
    36,228
    Level
    46

    Re: Measure temperature @0.1deg resolution using thermistor

    I do not know why you would want such precision, when the
    thermistors I see have no such initial or tempco accuracy.
    I suppose you could cal-map it given a suitable test setup.

    There is a tendency toward "mobetta" but what are you really
    buying other than eventual disappointment relative to your
    bit-count-based expectations?



    •   AltAdvertisment

        
       

  12. #12
    Junior Member level 1
    Points: 891, Level: 6

    Join Date
    Jun 2009
    Location
    Pune, India
    Posts
    17
    Helped
    2 / 2
    Points
    891
    Level
    6

    Re: Measure temperature @0.1deg resolution using thermistor

    Cons:
    1. Lower speed (you need multiple samples)
    2. Aditional care to inject proper noise (usually needs some additional hardware)
    3. Additional filtering of input signals (you need low pass filter on the input, preferably hardware filter)
    BTW, this is the way how most electronic human body thermometers work - they achive 0.01 degree despite that there is stupid cheap silicon inside.
    luben111,
    Lower speed is okay for this particular case.
    What kind of hardware / circuit required to inject noise? Is noise generated from port switching and other circuitry or environment etc not sufficient?
    An op-amp will be required to increase gain so I can add filtering there.
    Even I was wondering how many cheap thermometers achieve high precision. Your post made it clear. Thanks...

    dick_freebird, What is "mobetta"?
    Do you mean to say something like "look-up table" by "cal-map"?



  13. #13
    Full Member level 6
    Points: 5,571, Level: 17
    Sinia's Avatar
    Join Date
    Jul 2002
    Location
    Windsor ON Canada
    Posts
    388
    Helped
    84 / 84
    Points
    5,571
    Level
    17

    Re: Measure temperature @0.1deg resolution using thermistor

    0.1 resolution is not the problem, but accuracy 0.1 over -40 to 140 is. I don't think you'll be able to get anything close to that without using Pt sensors. Even with Pt sensors it is challenging to design accurate system. Using some specialized IC's for this purpose might help.



  14. #14
    Advanced Member level 1
    Points: 5,998, Level: 18

    Join Date
    Mar 2002
    Location
    UK
    Posts
    487
    Helped
    110 / 110
    Points
    5,998
    Level
    18

    Re: Measure temperature @0.1deg resolution using thermistor

    Quote Originally Posted by Siniša View Post
    0.1 resolution is not the problem, but accuracy 0.1 over -40 to 140 is. I don't think you'll be able to get anything close to that without using Pt sensors. Even with Pt sensors it is challenging to design accurate system. Using some specialized IC's for this purpose might help.
    Actually you can make 0.01 deg precision and even better over the whole temperature range. Everything is a question of the design - there are many compensation methods if using proper calibartion techniques so the error could be completely eliminated. The problem is that it requires really deep knowledge in compensations, algorithms, calibrations - heavy programming... So Sinisa is right that you can't achieve this resolution by simple methods, quickly. It requires careful designing and programming and a lot of reading I'm afraid.

    The noise could be injected from some I/O pin - you put capacitor to GND and connect it through high value resistor to some I/O pin. Initially you discharge the capacitor and during the whole burst of measurements you charge it. This capacitor should be connected to the analog input through high value resistor and will create an offset of the voltage. The offset should be in total around 3-4 counts from the whole signal to conform the oversampling requirements.

    Theoretically with oversampling you can achieve any resolution you want with simple 10 bit ADC and for sure couple of additional bits is not a problem at all. Always keep in mind the formula Number_Samples = 4^N (where N is the number of additional bit to achieve) and by using triangular shape noise you need even less samples. If you make proper compensations based on calibration values you should get 0.1 deg resolution over the whole temp range without much efforts.

    So your solution for 0.1 deg measurements is quite simple - Oversampling + Compensations (based on calibrated values).


    1 members found this post helpful.

  15. #15
    Super Moderator
    Points: 245,621, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    42,668
    Helped
    13006 / 13006
    Points
    245,621
    Level
    100

    Re: Measure temperature @0.1deg resolution using thermistor

    @luben111
    You made a lot of good suggestions about oversampling, but didn't mention the problem of ADC linearity at all. The 10-Bit ADC of LPC1111, that's used by the original poster e.g. has a specified DNL of +/- 1 LSB. That means, it's still monotic, but nothing more. I fear, the following statement is simply wrong with a real ADC (considering non-linearity).
    Theoretically with oversampling you can achieve any resolution you want with simple 10 bit ADC.
    Theoretically, ADC non-linearity involved with multi-bit oversampling ADC can be corrected, as it is usually done with multi-bit Sigma-Delta-ADC. You can find a respective chapter in Schreyers SD anthology. But it requires a table the holds the exact linearity deviation of each ADC step, measured with intended final oversampling resolution.

    Regarding achievable precision with thermistor sensors, most have been already said. In my opinion, two linearization methods should be considered:
    - using a "physical" thermistor characteristic (the exponential function, you can find in the datasheet) and a correction polynomial for fine tuning
    - using a lookup table
    In both cases, the exact calibration involves a much higher effort than using a sensor with high intrinsic linearity, e.g. Pt100. You also won't hardly find manufacturer specifications of thermistor long term stability.


    1 members found this post helpful.

  16. #16
    Advanced Member level 1
    Points: 5,998, Level: 18

    Join Date
    Mar 2002
    Location
    UK
    Posts
    487
    Helped
    110 / 110
    Points
    5,998
    Level
    18

    Re: Measure temperature @0.1deg resolution using thermistor

    @FvM
    I agree - non linear 10 bit ADC will require more complex linearization algorithms. For sure it's better to use intrinsic linear sensors like Pt100 but sometimes the price is critical so we have to look for other cheaper solutions. If it's for a single hobby project I would not recommend oversampling at all, but if it's a question of mass production where every penny counts you'll come naturally to the oversampling idea in orderto reduce the price.


    1 members found this post helpful.

--[[ ]]--