10K Ohm NTC Temperature Probe on Arduino with 10V/6V or 5V/3V? What Cap to use for regulator?

Thread Starter

huramentzefix2

Joined Apr 12, 2024
26
I just purchased 3x 10K Ohm NTC temperature probes with 5% accuracy 1/8-27NPT and a tap&die set.
I want to use the the probes in my Lada Niva to meassure the drive train temperatures.
1. rear differential
2. transfer case
3. gearbox
4. front differential
5. engine oil
6. engine temp.
(I know that is too many...)

I would have rather done it with a DS18B20 for accuracy, and to only use one pin since they support a bus, but they are not cheaply available with the thread, if at all.

So the once I have now are 11997 Ohm now 0-150°C. 5% accuracy.

Is it better to use a 10V voltage divider with a 10KOhm resistor to get 0-5V or would it be OK (accuracy) with 2.5V?
(Respectively 0-3V / 0-1.5V (Not sure if the Mini only accepts 3.3V max voltage or not?))

I like the 10V Voltage regulator Idea and here my next question.
Any standard Caps? Some say "10 uF electrolytic capacitors on both input and output" others " (non-electrolytic). 0.33 uF into the input pin and a 0.1 uF into the output pin"
The information that I've found is to just go with both or is that overkill?
 

Ian0

Joined Aug 7, 2020
10,035
Use a divider from the same power supply that runs the ADC. That cancels out any errors from the power supply voltage.
Then choose a pull up resistor that is the same value of the thermistor at the temperature you are most interested in.
That gives the best resolution around the temperature that is of most concern.
Then write a look-up table to get the temperature from the voltage on the divider. (I have a spreadsheet that does it, if you want a copy).
Lada Niva? was that the small 4x4? I think I remember a few being imported to Britain.
 

ericgibbs

Joined Jan 29, 2010
18,997
(Respectively 0-3V / 0-1.5V (Not sure if the Mini only accepts 3.3V max voltage or not?))
Hi h2,
What is the type of Mini you plan to use?
A d/s or link would help.

Any standard Caps? Some say "10 uF electrolytic capacitors on both input and output" others " (non-electrolytic). 0.33 uF into the input pin and a 0.1 uF into the output pin"
The information that I've found is to just go with both or is that overkill?
Post a simple sketch of the regulator circuit, we can then add the recommended capacitors
E
 

MrAl

Joined Jun 17, 2014
11,566
I just purchased 3x 10K Ohm NTC temperature probes with 5% accuracy 1/8-27NPT and a tap&die set.
I want to use the the probes in my Lada Niva to meassure the drive train temperatures.
1. rear differential
2. transfer case
3. gearbox
4. front differential
5. engine oil
6. engine temp.
(I know that is too many...)

I would have rather done it with a DS18B20 for accuracy, and to only use one pin since they support a bus, but they are not cheaply available with the thread, if at all.

So the once I have now are 11997 Ohm now 0-150°C. 5% accuracy.

Is it better to use a 10V voltage divider with a 10KOhm resistor to get 0-5V or would it be OK (accuracy) with 2.5V?
(Respectively 0-3V / 0-1.5V (Not sure if the Mini only accepts 3.3V max voltage or not?))

I like the 10V Voltage regulator Idea and here my next question.
Any standard Caps? Some say "10 uF electrolytic capacitors on both input and output" others " (non-electrolytic). 0.33 uF into the input pin and a 0.1 uF into the output pin"
The information that I've found is to just go with both or is that overkill?
Hi,

First, Ian's post should work for you that's why I have done many times in the past also.

As to your thermistor, you can get 1 percent devices for low cost these days too. That would help with the variations from part to part.

Do you know what the temperatures are that you intend to measure? Sometimes if the temperature has a limited range you can use some tricks to get better resolution/accuracy.
 

Thread Starter

huramentzefix2

Joined Apr 12, 2024
26
Do you know what the temperatures are that you intend to measure? Sometimes if the temperature has a limited range you can use some tricks to get better resolution/accuracy.
120°C 79,2Ohm / 50°C 789Ohm
So I can use a 80Ohm 1/4W resistor @10v = 0.15Watts.

off-topic:
Lada Niva? was that the small 4x4? I think I remember a few being imported to Britain.
"was", it still is. you can buy it new from factory.
The father of all "SUV's".

According to this facebookgroup or this forum or this website or just look here I might have missed some UK webpage?
are you guys driving nothing else but Niva over there since the bankruptcy of Rover?
45 year anniversary of Lada Niva
the longest built off-road vehicle in the world.
 

Ian0

Joined Aug 7, 2020
10,035
120°C 79,2Ohm / 50°C 789Ohm
So I can use a 80Ohm 1/4W resistor @10v = 0.15Watts.

off-topic:

"was", it still is. you can buy it new from factory.
The father of all "SUV's".

According to this facebookgroup or this forum or this website or just look here I might have missed some UK webpage?
are you guys driving nothing else but Niva over there since the bankruptcy of Rover?
45 year anniversary of Lada Niva
the longest built off-road vehicle in the world.
Do you have the "B" value for your thermistor? If you have a third value for R and T you can work it out, then obtain a complete R vs. T curve.
I assume that 120°C is going to be the maximum working temperature, not the usual working temperature, so I'd go a bit higher with the pullup resistor, perhaps 220Ω, which would give the best resolution somewhere around 100°C at a guess.

Then if you connect that across the supply to the processor, you don't need a regulator because all the errors cancel out if the voltage varies.

I've not seen a Lada (of any type) in years. I think they stopped importing them due to the EU emissions regulations.
 

ericgibbs

Joined Jan 29, 2010
18,997
hi hura,
As you are using an Arduino device,
This is a Sketch I use for profiling an NTC thermistor types, this is for a NTCLE100E3 Vishay Thermistor

Change the Constants to suit your NTC device.
float Rser = 10000; // Series resistor with Therm
float R0 = 10000; // Therm resistance at 25C
float Bval= 3977; // Therm Beta value
float Ak = 14.6337; // Therm constants, enter as positive values
float Bk = 4791.842;
float Ck = 115334;
float Dk = 3.730535E6;

E
 

Attachments

Thread Starter

huramentzefix2

Joined Apr 12, 2024
26
Lada Niva UK 2024

I get it with the NTC's and the fluctuating voltage.
But I will be using an LM7810 or something like that and there won't be any voltage fluctuation.
I rather go with an divider on 10V to have 5V at max range.

How to protect the arduino >5V? with a 5.1V zehner to ground at the center of the coltage divider?

these are the NTC's that I have here. I just see the maximum restistance but not the data that you mentioned.
I have some DS18B20 Temperature Sensors here and probably will just record the data in boiling water and have the arduino log it?
Any suggestions?
 

ericgibbs

Joined Jan 29, 2010
18,997
Hi hura,
The ADC in an Arduino is Ratio metric.
Ideally you should use the same voltage that powers the Arduino, to power the NTC & Series resistor, when using the Vsupply to the Arduino.

Example:
Assume the Vsupply to the Arduino and the NTC sensor are the same voltage source, then as the voltage source changes due to temperature or some other cause, the ADC and ADC Vref will track each other and the ADC will output the correct ADC count.
If the Arduino and NTC are powered from different voltage sources, if they drift at different rates, your ADC readings will be incorrect.
E
 

ericgibbs

Joined Jan 29, 2010
18,997
hi hura.
This is a LTSpice simulation of your thermistor, using the Table from the datasheet you posted.
Let me know the circuit details and I can create a simulation.
E
EG57_ 1639.png
 
Last edited:

Ian0

Joined Aug 7, 2020
10,035
Lada Niva UK 2024

I get it with the NTC's and the fluctuating voltage.
But I will be using an LM7810 or something like that and there won't be any voltage fluctuation.
I rather go with an divider on 10V to have 5V at max range.

How to protect the arduino >5V? with a 5.1V zehner to ground at the center of the coltage divider?

these are the NTC's that I have here. I just see the maximum restistance but not the data that you mentioned.
I have some DS18B20 Temperature Sensors here and probably will just record the data in boiling water and have the arduino log it?
Any suggestions?
This is one application where extra regulators will introduce errors. Unless your two regulators perfectly track each other, it will only be accurate if the ADC reference and the thermistor reference are the same reference. That's what @ericgibbs means by ratiometric.
If you want extra resolution then add an IIR filter after you have sampled the voltage. Using any induced noise as dither will actually increase the resolution of the result.
 

Thread Starter

huramentzefix2

Joined Apr 12, 2024
26
Hi hura,
The ADC in an Arduino is Ratio metric.
Ideally you should use the same voltage that powers the Arduino, to power the NTC & Series resistor, when using the Vsupply to the Arduino.

Example:
Assume the Vsupply to the Arduino and the NTC sensor are the same voltage source, then as the voltage source changes due to temperature or some other cause, the ADC and ADC Vref will track each other and the ADC will output the correct ADC count.
If the Arduino and NTC are powered from different voltage sources, if they drift at different rates, your ADC readings will be incorrect.
E
I appreciate your help guys and that you are not giving up on me.
I know that we are talking about microcontrollers.
Can you please define accuracy?
We are measuring oil from axles, transmissions, transfer cases and differentials.
+/- 5°C inaccuracy would mean that the resukt can be off of the real value by 2.5°C, that is fine.


Thanks for the work with the graphs.

I would like to understand the voltage drift at diferrent rates.
The arduino is being powered by the same type voltage regulator as the thermistors.
2% accuracy. 10V*0.02=0.2V/2(center of divider)=0.1V so the voltage range at the center of the divider is 4.95V to 5.05V
Arduino: 5V*0.02=0.1V same here 4.95Vto 5.05V
So the arduino can be at 4.95V and the NTC´s at 5.05V
Is that what you guys are talking about?
OK I am convinced and we do it your way, not mine.
 

Thread Starter

huramentzefix2

Joined Apr 12, 2024
26
OK then let's make it as accurate as you guys suggested.
Thank you.
I would like to build the circuit now and power my NTC's as you guys suggested.
Then connect the 3 NTC's together with my DS18B20 and record the temperature in water which I will heat up and then let coold down.
Each 0.1°C change of the DS18B20 I would like to record the voltage of each NTC and log it.
I am expecting a lag when heating up and cooling down. The NTC's bodies have a much larger mass
I don't have an SD-card interface.
What I have here are:
D1
ESP Wroom-32 (seems to be 3.3V)
Mega
Uno
Nano
each log is 20 bit every 0.1°C, 50Bits roughly?
Heating then cooling = 1.3MB?

Do I have anything that could store such highe ammounts of data?
 

Ian0

Joined Aug 7, 2020
10,035
I appreciate your help guys and that you are not giving up on me.
I know that we are talking about microcontrollers.
Can you please define accuracy?
We are measuring oil from axles, transmissions, transfer cases and differentials.
+/- 5°C inaccuracy would mean that the resukt can be off of the real value by 2.5°C, that is fine.


Thanks for the work with the graphs.

I would like to understand the voltage drift at diferrent rates.
The arduino is being powered by the same type voltage regulator as the thermistors.
2% accuracy. 10V*0.02=0.2V/2(center of divider)=0.1V so the voltage range at the center of the divider is 4.95V to 5.05V
Arduino: 5V*0.02=0.1V same here 4.95Vto 5.05V
So the arduino can be at 4.95V and the NTC´s at 5.05V
Is that what you guys are talking about?
OK I am convinced and we do it your way, not mine.
Let's say that the thermistor just happens to be at a temperature where its resistance is exactly the same as the pullup resistor.
The power supply is at exactly 5V. The ADC input will be at 2.5V (because the two resistance are the same).
Assuming a 12-bit ADC which reads 0-4095, then it will read 2047.

Reduce the power supply by 5% to 4.75V. The ADCinput will then be at 2.375V. The ADC will compare to a reference of 4.75V and decide it is half scale and output 2047.

The error due to power supply variation is eliminated.
 

MrAl

Joined Jun 17, 2014
11,566
120°C 79,2Ohm / 50°C 789Ohm
So I can use a 80Ohm 1/4W resistor @10v = 0.15Watts.

off-topic:

"was", it still is. you can buy it new from factory.
The father of all "SUV's".

According to this facebookgroup or this forum or this website or just look here I might have missed some UK webpage?
are you guys driving nothing else but Niva over there since the bankruptcy of Rover?
45 year anniversary of Lada Niva
the longest built off-road vehicle in the world.
Are you saying your temperature range is 120C down to 50C, and the resistance range is 789 Ohms (50C) down to 79.2 Ohms (120C) ?
Do you know if any of that range is more typical than other parts of that range? Like say 70C to 90C is more typical.
If you do not have any more typical range in mind then the right resistor is probably 434.1 Ohms, but I'll check that later.
 

MrAl

Joined Jun 17, 2014
11,566
120°C 79,2Ohm / 50°C 789Ohm
So I can use a 80Ohm 1/4W resistor @10v = 0.15Watts.

off-topic:

"was", it still is. you can buy it new from factory.
The father of all "SUV's".

According to this facebookgroup or this forum or this website or just look here I might have missed some UK webpage?
are you guys driving nothing else but Niva over there since the bankruptcy of Rover?
45 year anniversary of Lada Niva
the longest built off-road vehicle in the world.
Hello again,

I did a quick study with the thermistor voltage divider circuit using a typical thermistor that matches your data to a high degree of accuracy, except because you only give two data points this will still be just an approximation. It will however show the trend of how this circuit works.
It also shows how the linearity is not that great, so some digital correction method would be used which means in code.

Here is the table using the data from your post extrapolated to a full range thermistor.
Note the table consists of lines of data, where each line has a structure as follows:
The first element is the upper resistor value of the voltage divider with the thermistor as the bottom resistor.
The second element is the low end temperature deviation which would be the resolution.
The third element is the mid range temperature deviation.
The last element is the high end temperature deviation.
Thus, in the first line where we have:
{50,-0.01103505941,-0.02411870623,-0.03199672345}
That means the test value of the upper resistor was 50 Ohms, and the lower end temperature (50C) deviation was about -0.011 volts, and the mid range deviation (85C) was about -0.024 volts, and the upper temperature (120C) deviation was about -0.032 volts.
Since the table shows values from T=50C to T=120C, that should cover the entire range.
Note there could be differences but this will always be the general trend of the deviations.
You might note that as one end goes up the other end goes down, and the mid value goes up until we reach R=240 Ohms and then it starts to go down.
You can see that there will always be a trade off between linearity and resolution.
Also, a lower value for the upper resistor results in better resolution toward the high temperature end, while a higher value results in better resolution for the lower temperature end.

It may be possible to improve this, but doing it with passive components probably means the resolution will go down as the linearity gets better.

The right way to do it is to program the function for a thermistor into your program, assuming you have one. It's not a very long calculation except you may have to deal with logs or exponents, so speed of operation will become a consideration also.

Here is the table:

{50,-0.01103505941,-0.02411870623,-0.03199672345},
{60,-0.01293760671,-0.02696111714,-0.03311688852},
{70,-0.01475077836,-0.02937258429,-0.03366546784},
{80,-0.01647914308,-0.03141785733,-0.03382359711},
{90,-0.01812699731,-0.03315074965,-0.03371346516},
{100,-0.01969838399,-0.03461622061,-0.03341895845},
{110,-0.02119710985,-0.03585201611,-0.03299851228},
{120,-0.02262676136,-0.0368899707,-0.03249331884},
{130,-0.02399071947,-0.03775704786,-0.03193268933},
{140,-0.02529217319,-0.03847617644,-0.03133762729},
{150,-0.02653413219,-0.03906692725,-0.03072325246},
{160,-0.02771943843,-0.0395460633,-0.03010047098},
{170,-0.02885077695,-0.03992798986,-0.02947714253},
{180,-0.02993068588,-0.04022512416,-0.02885890637},
{190,-0.03096156567,-0.04044820078,-0.02824977248},
{200,-0.03194568773,-0.04060652485,-0.02765254891},
{210,-0.0328852024,-0.040708183,-0.02706915353},
{220,-0.03378214641,-0.04076021976,-0.02650084326},
{230,-0.03463844976,-0.04076878562,-0.02594838382},
{240,-0.03545594218,-0.04073926186,-0.0254121762},
{250,-0.03623635909,-0.040676366,-0.02489235135},
{260,-0.03698134723,-0.04058424136,-0.02438884147},
{270,-0.03769246985,-0.0404665332,-0.02390143382},
{280,-0.03837121154,-0.04032645376,-0.02342981138},
{290,-0.03901898284,-0.04016683791,-0.02297358381},
{300,-0.03963712442,-0.03999019097,-0.02253231079},
{310,-0.04022691108,-0.03979872983,-0.02210551984},
{320,-0.04078955547,-0.03959441843,-0.02169271971},
{330,-0.04132621153,-0.03937899851,-0.02129341056},
{340,-0.04183797777,-0.0391540162,-0.02090709149},
{350,-0.04232590032,-0.03892084519,-0.02053326622},
{360,-0.04279097576,-0.03868070685,-0.0201714472},
{370,-0.04323415384,-0.03843468787,-0.01982115859},
{380,-0.04365633998,-0.03818375557,-0.01948193838},
{390,-0.04405839765,-0.03792877143,-0.01915333972},
{400,-0.04444115054,-0.03767050289,-0.01883493186},
{410,-0.04480538473,-0.03740963376,-0.01852630059},
{420,-0.04515185056,-0.03714677339,-0.01822704841},
{430,-0.04548126456,-0.0368824647,-0.01793679446},
{440,-0.04579431116,-0.03661719139,-0.01765517434},
{450,-0.0460916443,-0.03635138421,-0.01738183966},
{460,-0.04637388901,-0.03608542658,-0.01711645768},
{470,-0.04664164285,-0.03581965953,-0.01685871075},
{480,-0.04689547729,-0.03555438618,-0.01660829577},
{490,-0.047135939,-0.03528987558,-0.01636492361},
{500,-0.04736355106,-0.0350263663,-0.01612831854}

Again, the structure for each line is as:
{upper R value, low temp dv, mid temp dv, high temp dv}
 

Thread Starter

huramentzefix2

Joined Apr 12, 2024
26
Thanks MrAI for all your work.
I have posted a link of the NTC's that I have purchased further up and @ericgibbs was so nice to put the values of the sensors into a spreadsheet and plot a graph.
please have a look further up at the graphs, that is all the data that exists.
I have just put an order in of a SD-card reader for the arduino so that I can verify the temperature in hot water against my DS18B20.
this project is getting far more accurate that I ever need it but I am learning new stuff from you guys so it's fun.
 
Top