Hello barry,Not sure what your problem is. If you use a table it’s pretty straightforward, you just have to do the math. For your voltage divider the output voltage MCU_ADC is Vref *Rth/(Rth+ 10K). From this you can calculate Rth for a given MCU_ADC. The manufacturer provides you a table of Rth vs temp; you just have to create a table for MCU_ADC vs temp. You also need to take into account the ADC conversion factor.
I question the use of that 10K resistor on the output; unless your ADC has a very high input impedacne, it’s going to contribute error.
Due to exponentional NTC characteristic, sensitivity varies strongly with temperature. You rather need 14 - 16 bit ADC for 0.1 K resolution. The other problem is that tolerance of most NTC is relative large compared to e.g. Pt100 sensors. Over wide range of 70 K you get hardly better accuracy than +/- 1K without individual sensor calibration.Your range is 70C and with a resolution of 0.1°C this just gives a ratio of 1:700 or less than 10 bits (output)
If you focus on the -20°C to +10°C it´s even better.
Hi klaus,Hi,
don´t stress yourself.
A thermistor is nothing but a resistor. A variable resistor. So nothing special.
Your range is 70C and with a resolution of 0.1°C this just gives a ratio of 1:700 or less than 10 bits (output)
If you focus on the -20°C to +10°C it´s even better.
What I´d do:
* take the datasheet
* use Fig1 and draw in the vertical lines for your temperature range (limits)
* where these lines cross the thermistor line draw horizontal lines for the resistance (limits)
* draw a third horizontal line at the center of the horizontal lines. Use this value for your pull-up resistor connected to ADC_VREF. (to minimize errors)
* I also recommend to use excel to draw the "simulaton" of your circuit. To see the voltage range of the output and also to see about nonlinearities and errors. (0.3 x VRef ... 0.75 x VRef)
***
I agree with Barry regarding the output resistor. I´d omit it completely.
And I also question the 10nF capacitor. Depending on what you want to do .. but in most cases a 1uF won´t hurt, while it helps to suppress noise.
Klaus
Hi Klaus,Hi,
FvM is right about ADC resolution. Your ADC needs more than the 10bit (output) resolution.
You also need to take care about the used input range, which is just 0.45 x FS.
16 bit should be sufficient.
0.1°C resolution is no problem.
0.1°C accuracy is not likely to achieve with theses thermistors.
Power consumption:
You need to give a value for the expected consumption for us to give good advice.
And you need to give how often you need a temperature value (per second, minute...)
If VRef is not constant then you need "ratiometric" measurement method. Means it's very important that pull up resistor is connected to VRef...
... and that both (measurement value as well as VRef) need identical time constant (cutoff frequency).
Klaus
if you just use a resistor and thermistor in series you output voltage is: about 0.3 x V_in ... 0.75 x Vin.I didn't quite understand what I said (0.45 x FS). Can you explain better?
this is the answer I wanted to avoid.Energy consumption should be as low as possible, I don't have a target value.
Hi Klaus,Hi,
if you just use a resistor and thermistor in series you output voltage is: about 0.3 x V_in ... 0.75 x Vin.
Now if V_in = VRef, then also the digital output code is just 0.3 ... 0.75 x FullScale. This is the measurement range.
It"s just 0.45 (or 45%) of FullScale.
Accuracy: I won't do the error calculations for you. But I see the thermistor is rated with 1% error in initial value and 1% error in B.
Then I don't know the tolerance and drift of your resistor,
Nor do I know the errors of the ADC.
Also - if you use a capacitor - you need to wait: from applying supply to starting conversion. The longer you wait the less the error.
I do these calculations usually before thinking about the circuit. Often with use of Excel.
this is the answer I wanted to avoid.
If you take it not seriously .. it is meaningless, because every developer has his own definition of "low as possible"
If you take it seriously, then developing becomes a never ending story: one says 100uA, the next says 80uA, the next says 70uA,
Then 69uA, then 68.5uA, then 68.4uA, then 68.39uA ...
Improvements microamperese, nanoamperes, picoameres ... when do you stop "as low as possible" since each one is "lower than the one before".
Also you can't type in "as low as posssible in your calculator".
Especially when you work in a team (forum) you have to give a value. Maybe two: one "absolute maximum" and one "nice to have"
Once a minute: then you may switch OFF the measurement current (I'd use a P-CH Mosfet), this helps to reduce current consumption.
Let's say it os ON for 1 second in one minute ... means the average current is about 1/60 (ignoring the capacitor charging current)
Let's say from 2.5V/ 60k = 42uA down to below 1uA average.
You need to: Switch ON measurement supply --> wait about 10 tau for the capacitor to charge to less than 1LSB error --> do the conversion(s) --> switch OFF measurement supply --> sleep for 1 minute
Do an internet search for "ratiometric measurement" and look for circuits and benefits.
Then ask if you need to know details.
Klaus
--- Updated ---
Added:
Did you consider a digital temperature sensor? I2C one?
It may be easier in hardware and software ... and you can choose according accuracy and resolution.
I didn't understand how my maximum voltage will be 0.1vUsing a GPIO will not give you the accuracy you need; the output voltage is pretty much undefined. e.g. it could be anywhere between 2.4 and 3.3 V for a TTL output.
If you’re expecting to consume only 10uA, then you’re going to need some amplification, as your maximum voltage will be 0.1V.
Don't agree. GPIO are effectively CMOS switches to VDD/VSS with 30 - 100 ohm resistance. Internal supply rail voltage drops are probably causing the largest error.Using a GPIO will not give you the accuracy you need; the output voltage is pretty much undefined. e.g. it could be anywhere between 2.4 and 3.3 V for a TTL output.
Hi Klaus,Hi,
How do yo do a search for temperature sensors?
I went to a distributor site and used the search function.
Farnell gives AS6212 for example.
Klaus
Thanks!This SOC is not your SOC but ap note presents some interesting calculations and methods
to achieve high res -
This SOC looks like -
View attachment 180276
Multiple copies of above resources in many cases onboard.
Regards, Dana.
I was wrong, it’s 0.01V. But that’s assuming continuous operation, not low duty cycle.I didn't understand how my maximum voltage will be 0.1v
--- Updated ---
Others CI's:
TMP112AIDRLR
TMP126NDCKR
SHTC3
AHT-15
BME-280
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?