## Thermistors questions

69 posts / 0 new
Author
Message

Hello, I am currently working on a project that uses a thermistor to read temperature values. I've set up a voltage divider as shown on the attached circuit. I'm reading the output voltage at an ADC input pin on an AVR and doing math in software to print the temperature to an LCD.

The issue I am having is that the temperature starts off at around 70F(room temp. as expected) but then continues to increase to around 85F until it holds there. The thermistor is an SMD 0805 type package, and is located on an area of the circuit board that is not near any other components (so I think I can rule out heat output from adjacent devices).

I'm thinking the thermistor itself is dissipating electrical power in the form of heat causing the thermistor temperature to change. Is this possible?

Here is a link the the thermistor datasheet: http://www.murata.com/products/c... See part No. NCP21XV103J03RA

Any circuit alterations anyone can think of that would yield more accurate temperature reading?

Thanks,

## Attachment(s):

Total votes: 0

@ room temp the dissipation is appr. 0.6mW in the NTC
That rules out self-heating.

What reference do you use for the ADC ?

They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

Total votes: 0

I learned a lot about self heating thermistors in This Thread , where I actually learned that that wasn't the cause for my elevated readings.

Check out Lennart's link.

JC

Total votes: 0

I'm sort of curious if you are calculating the temp using the steinhart approximation that uses three coefficients and the ntc R and the ln(R), or you are using a lookup table, or an equation with beta, and floating point?

Imagecraft compiler user

Total votes: 0

JC wrote

Quote:
Check out Lennart's link.
I did :-)

Quote:
As far as I can see the expected self-heating is somewhere btw 0.5-1.0 mW / degree C.
27ÂµWatt should be unnoticeable in terms of self-heating.

The specsheet of NCP21XV103J03RA says 2mW/degrC @ room temperature. Then the 0.6mW will cause some error but in the range of 1/3 degrC

So what if you try a 33k series rersistor ? If that reduces the drift to 0.1 of what it is now, *then* it is self-heating ... hmmmm

But first we need to know the reference voltage and source.
First things first.

They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

Last Edited: Sun. Mar 13, 2011 - 10:26 PM
Total votes: 0

Quote:
What reference do you use for the ADC ?

I'm using VCC which is 5VDC.

Quote:
I learned a lot about self heating thermistors in This Thread , where I actually learned that that wasn't the cause for my elevated readings.

I read the thread, read the app. notes, but still don't see what could be causing this odd issue. Self-heating is the only thing I thought of, but didn't detect any heat when I touched the thermistor with my finger. I'm "seeing" 10F temperature rise over the span of about 5 minutes.

My problem seems to be very similar to yours, DocJC, that you described on the posted thread. What did you find was your problem? Or can you offer any suggestions that I might be able to test?

Thanks for all the help guys.

Total votes: 0

Quote:
I'm using VCC which is 5VDC.

That is good. But some sanity-checks:
1. Do you filter AVcc ?
2. Do you have proper decoupling (10nF ~ 100nF) on Vref ?
3. Do you select AVcc as reference in ADmux register? Or do you apply 5V to Vref ? Hope not ...

So far I never used 0805 smd NTC but I am quite sure that you cannot determine with a finger-touch an increase in temperature of that 0805 NTC

Since all it takes is 2mW for a 1 degrC temp raise, very little heat radiation is required to heat the 0805 NTC.

Picture ? Schematic ? And of course how you calculate the temperature in SW ...

They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

Total votes: 0

Quote:

I'm sort of curious if you are calculating the temp using the steinhart approximation that uses three coefficients and the ntc R and the ln(R), or you are using a lookup table, or an equation with beta, and floating point?

I'm using an equation with beta and floating point. See my code

```#define B 3900.0
#define T0 298.0
#define R2 10000.0
#define R0 10000.0
#define VCC 5.06

char tempStr[20];

void InitADC()
{
ADCSRA |= (1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0);		// Set prescaler to 128 (best for 16 MHz MPU)
ADCSRA |= (1 << ADEN); 										// Enables the ADC.
}

int main()
{

float adc2;
double Temp2;
DDRC = 0x00;
PORTC = 0xff;

lcd_init();
lcd_clrscr();

InitADC();

while(1)
{
ADMUX  = 6;						// Set ADC input
ADCSRA |= (1 << ADSC);			// Start ADC conversion
while((ADCSRA & 0x40) !=0){}; 	// Wait for conv complete
adc1 = (float)(ADC*5.0)/1023.0;
Temp2 = (((T0*B)/(log(R2*(VCC-adc1)/(R0*adc1))*T0+B))-273)*1.8+32;
_delay_ms(1500);
lcd_clrscr();
sprintf(tempStr, "#f", Temp2);
printf("#s", tempStr);
}

}```
Total votes: 0

Maybe the ADC is loading the circuit, I think atmel recommends a max of 10k impedance from the source.

I have had good results hooking a 47k NTC through a resistor divider directly to the ADC pin of my uC, I was not using an AVR uC though.

Total votes: 0

I guess that looks cool, except I betcha VCC is something like 4.987V, and if you are making more than 1 of this gizmo, that's a cal step to think about. I'd also have separate eqns for degC and degF and maybe degK depending on whether those quantities are needed in another part of the program?

Imagecraft compiler user

Total votes: 0

Place a small bagged ice cube on, or at the area of any heat generating components such as voltage regulators, etc - then wait 5 or 10 minutes before reading.

This may prove/disprove your statement:

Quote:
... and is located on an area of the circuit board that is not near any other components (so I think I can rule out heat output from adjacent devices).

Stan

Last Edited: Mon. Mar 14, 2011 - 04:44 AM
Total votes: 0

Test post

Can not use the percent sign when discussing the relative humidity sensor...

Took me a few minutes to figure that one out...

Old forum issue, old brain... What can I say.

JC

Last Edited: Mon. Mar 14, 2011 - 01:03 AM
Total votes: 0

Quote:
My problem seems to be very similar to yours, DocJC, that you described on the posted thread. What did you find was your problem? Or can you offer any suggestions that I might be able to test?

Time to dust off the schematic and notes...
I used a Murata NCP21WF104J03RA NTC Thermistor, (SMT 0805 sized). R = 100 K, Beta = 4250K. I tied it from ground to V+, (+3V), through a 100 K resistor. (+3V Supply to Fixed 100K resistor to NTC to Gnd). It feeds a Mega328 ADC without a buffer op amp. I thought I tied a small cap across the NTC, but I guess that did not make the final layout. Hence, this exceeds the recommended source impedance of <= 10K. I'm sampling very slowing, but a small cap across the NTC would allow the ADC to charge its sample and hold cap much faster. I am using Vref = Avcc, 3V.

My board has a free standing Sensirion Temp & Percent RH sensor, a DS18B20 Temp sensor, and the NTC. The NTC is on the PCB, the others float in air, attached via ~ 6" leads.

As I recall they all start up at about the same temperature when the board is cold, and first turned on. Over the next several minutes the NTC climbs to about 4.5 'F higher than the other two sensors and then stays there, steady state.

I originally assumed that the climb to a higher steady state on my board was due to self heating, as the sensor is "far" away from the power supply or other chips. When it was pointed out to me that this wasn't likely the case I did the power dissapation calculations and had to agree.

I had planned on mounting one of the NTC's on two small wires, elevated up off the board, so that it also was floating in free space, to see if it made a difference, but I never got around to it... This would easily confirm PCB heating as the cause for its higher reading.

I ended up attributing it to the heating of the PCB slightly above ambient temperature due to the power supply and the various chips on the board. I wanted to borrow an infrared non-contact thermometer to see if I could detect the PCB's temp and see if there was a temp gradient across the board, but the one I had access to wasn't that sensitive, and I never attempted the measurements.

The NTC does, by the way, respond nicely to my finger with a several degree temp rise. BUT, I guess I should re-try that with an insulated glove on, and make sure I wasn't just changing it's resistance...

JC

Edit: Typo, and the NTC does rise when touched by a finger in an insulated glove, but not by a lot... 2 'F on a quick test at room temperature.

Total votes: 0

run wires to pads and have the thermistor in the air and see if the temp readings behave the same.

Total votes: 0

What's the VCC in millivolts again?

Imagecraft compiler user

Total votes: 0

Conect your voltage divider between the Aref pin and Ground not Vcc and Ground

EDIT .. in line with Bob's millivolt reading question

Total votes: 0

Quote:
Conect your voltage divider between the Aref pin and Ground not Vcc and Ground

But then don't you need a voltage follower op amp between the two?

Data Sheet says:

Quote:
Note that VREF is a high impedance source, and only a capacitive load should be connected in a system.
Which would imply that one should not be using it as a voltage source, but just as a reference.

For my application it didn't matter. The on board NTC just measures the circuit's ambient temperature inside the case and turns on the on board heater when the temp gets too low outside. This keeps the uC and XBee transceiver thermally happy.

Imcgill2 (OP) may desire better accuracy from the NTC.

JC

Total votes: 0

Ignoramus wrote:

Quote:
Connect your voltage divider between the Aref pin and Ground not Vcc and Ground

I disagree.

From an AVR datasheet:

Quote:
ADC Voltage Reference
The reference voltage for the ADC (VREF) indicates the conversion range for the ADC.
Single ended channels that exceed VREF will result in codes close to 0x3FF. VREF can be
selected as either AVCC, internal 2.56V reference, or external AREF pin.
AVCC is connected to the ADC through a passive switch. The internal 2.56V reference is
generated from the internal bandgap reference (VBG) through an internal amplifier. In
either case, the external AREF pin is directly connected to the ADC, and the reference
voltage can be made more immune to noise by connecting a capacitor between the
AREF pin and ground. VREF can also be measured at the AREF pin with a high impedant
voltmeter. Note that VREF is a high impedant source, and only a capacitive load should
be connected in a system.
If the user has a fixed voltage source connected to the AREF pin, the user may not use
the other reference voltage options in the application, as they will be shorted to the
external voltage. If no external voltage is applied to the AREF pin, the user may switch
between AVCC and 2.56V as reference selection. The first ADC conversion result after
switching reference voltage source may be inaccurate, and the user is advised to dis-
card this result.

Vref is *only* low impedant when AVcc is selected as ADC reference in ADMUX-register.
If OP (or any other user) decides to use internal reference, Vref is loaded with the NTC-network. Note that the Bandgap reference is also used for the analog comparator, and that will be screwed up as well.

The advice therefor must be:
Connect your voltage divider between the AVcc pin and Ground not Vref and Ground.
Connect a 10nF ~ 100nF capacitor between Vref-pin and Ground for better noise immunity.

Nard

They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

Total votes: 0

Plons the variation observed by the OP is in the range ofa few degrees.

A precision measurement he wishes to implement is not likely to happen if the stability of his VCC comes into the equation ( pardon the pun).

While the inbuilt Aref may be a high impedance source there is no reason it can not be replaced by an external refference.

Using Vcc in the way the OP is doing will result in the same outcome no matter who uses it.

DO NOT USE TWO DIFFERENT SOURCES in this kind of measurement.

Total votes: 0

Quote:
DO NOT USE TWO DIFFERENT SOURCES in this kind of measurement.
I think we share the same opinion on that one.
Quote:
.... of his VCC comes into the equation
If Vcc changes, AVcc changes. When the divider sits between AVcc and Ground, variations in Vcc are cancelled out.

They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

Total votes: 0

AVcc, if set to internal refference, is a separate source. It therefore does not change at the same rate as Vcc.

LMcGill12,

please indulge us and do a bit of arithmetic. Given room temperature and given apparent drift in temperature reading, please go back through your hardware / software solution and recalculate the drift in Vcc which would cause such an apparent drift in temperature.

I know I hate maths.. being an artistic soul.. but every now and then one has to prostitute oneself in the interest of decent engineering.

Total votes: 0

Ok, so a lot has developed since I last responded, so I'll try to catch up (of course my job go into the way of my projects...)

Attached is an expanded view of my circuit. It shows how I am handling filtering and bypass caps and the like.

Quote:

That is good. But some sanity-checks:
1. Do you filter AVcc ?
2. Do you have proper decoupling (10nF ~ 100nF) on Vref ?
3. Do you select AVcc as reference in ADmux register? Or do you apply 5V to Vref ? Hope not ...

1. I don't think so.
2. Nope.
3. I do not select AVcc in ADmux I apply 5V to Aref with no caps.

Quote:

run wires to pads and have the thermistor in the air and see if the temp readings behave the same.

Did this and the circuit behaves as before.

Quote:

What's the VCC in millivolts again?

Hmmmm, not sure if this is sarcasm or not, but Vcc (measured at various points on the board) is 5.06V or 5060 mV.

Quote:

The advice therefor must be:
Connect your voltage divider between the AVcc pin and Ground not Vref and Ground.
Connect a 10nF ~ 100nF capacitor between Vref-pin and Ground for better noise immunity.

So, let me see if this is what you're recommending... I should use AVcc as my reference with a cap between Aref and ground. i.e. set the REFS0 bit in ADMUX (currently REFS0 & REFS1 are not set and I'm using AREF as my reference). Then connect my voltage divider between AVcc and GND.

Question, in my case doesn't AVcc = Vcc since i'm simply connecting AVcc pin to the board's Vcc?

Also, to get any reading at all, I had to add a high valued resistor in series with my ADC input (seen on my schematic). How did those of you who connect the voltage divider directly intto your mcu ADC avoid a series resistor?

Thanks for all the help!

## Attachment(s):

Total votes: 0

The Thermistor Full.pdf:
Has R2 been there all the time ? I mean from the start of this thread ?
I ask because that's a no go. And *could* explain the drift. So: bridge R2

Apart from R2 the setup should work. But: the reading from the ADC will vary a few bits due to noise. But that does not explain your original question on drift.

If you want the best possible result from the ADC you should do something on filtering. That means a "clean as possible" AVcc. A 100uH inductor between Vcc and AVcc, capacitor to ground. Capacitor from Vref to ground.
Connect R19 top to AVcc. Select AVcc as reference in ADMUX.
Another important thing to bear in mind is the routing of Vcc, AVcc end grounds.

Three more notes, now we're at it:
- C16 in the /Reset circuit is only required in very noisy environments
- The input of the 7805 needs to see a 100nF ceramic in parallel with C1. Especially if C1 is an electrolyte.
- C17 does no harm but can be left out

Let's re-focus on the drift phenomenon: R2. How about it ?

They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

Total votes: 0

Now change 5.0 in your temperature equation to 5.060 and see if the temperature is closer to actual.

Imagecraft compiler user

Total votes: 0

Bob, the OP says that the temperature starts out correct but then drifts gradually away. It might be that the Vcc is doing the same (as your line of reasoning is suggesting) and the OP should monitor that also as part of his investigation, but I am inclined to "suspect" an effect due to his 1.5Mohm R2.

Cheers,

Ross

Ross McKenzie ValuSoft Melbourne Australia

Total votes: 0

Yeah But... 5.06V is 1.2% off from 5.0V. If he wants a way to dial it in 1% closer, that's a Win.

Imagecraft compiler user

Total votes: 0

R2 is a show stopper, seems like R2 was put there for the sole purpose of mucking things up. If you want some protection on the ADC pin, then use a 1k resistor or even a 10k, but not a 1.5m

Total votes: 0

Quote:

please indulge us and do a bit of arithmetic. Given room temperature and given apparent drift in temperature reading, please go back through your hardware / software solution and recalculate the drift in Vcc which would cause such an apparent drift in temperature.

A drift from 70F to 85F (what i was seeing when I originally posted) corresponds to a drift in voltage at the ADC of 2.29 to 2.74 VDC.

Quote:

Has R2 been there all the time ?

Yes sorry. I put that resistor in because without it I cannot get any reasonable readings.

I've now added a 0.1uF cap from Aref pin to GND. AVcc is connected to my board's Vcc (5.06VDC) with a 0.1uF cap on it as well (to ground) as it has always been. I' reading the output of the voltage divider on ADC0. I set the REFS0 bit so ADMUX = 64.

I removed the 1.5M resistor.

Now, I'm back to the place I was at before I made this post. I cannot get reasonable readings (or what seem to be reasonable to me). I would expect at around room temperature (even with the inherent error in the thermistor and voltage divider resistor and noise etc) that the output voltage of the voltage divider would be around 2.5V. But without the large resistor in place, I'm only seeing 100-200 mV at the AVR ADC pin.

Any ideas?

Here is my code:

Total votes: 0

Quote:
Here is my code:

It's obvious that SW is the bad guy.

:)
( I couldn't resist )

They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

Total votes: 0

Haha, Here's my code

```#define B 3900.0
#define T0 298.0
#define R2 10000.0
#define R0 10000.0
#define VCC 5.06

char tempStr[20];

void InitADC()
{
ADCSRA |= (1 << ADPS2) | (1 << ADPS1) | (1 << ADPS0);		// Set prescaler to 128 (best for 16 MHz MPU)
ADCSRA |= (1 << ADEN); 										// Enables the ADC.
}

int main()
{

float adc1;
double Temp1;
DDRC = 0x00;
PORTC = 0xff;

lcd_init();
lcd_clrscr();

InitADC();

while(1)
{
ADMUX  = 64;						// Set ADC input
ADCSRA |= (1 << ADSC);			// Start ADC conversion
while((ADCSRA & 0x40) !=0){}; 	// Wait for conv complete
adc1 = (float)(ADC*VCC)/1023.0;
Temp1 = (((T0*B)/(log(R2*(VCC-adc1)/(R0*adc1))*T0+B))-273)*1.8+32;
_delay_ms(1500);
lcd_clrscr();
sprintf(tempStr, "#f", adc1);
printf("#s", tempStr);
}

}```
Total votes: 0

lmcgill2 wrote:
I' reading the output of the voltage divider on ADC0.

You are reading ADC0, but thermistor is connected to ADC6.

Total votes: 0

Quote:

You are reading ADC0, but thermistor is connected to ADC6.

Sorry, here's my new circuit as well...

## Attachment(s):

Total votes: 0

From the Atmega8 cut sheet:

Quote:
The ADC is optimized for analog signals with an output impedance of approximately 10k ohms or
less.

The impedance of my voltage divider is around 5k Ohms.

Also note that when I disconnect the voltage divider from the ADC pin, I can measure ~2.5VDC at the voltage divider output with my DMM, but when the voltage divider is hooked up the AVR ADC pin, the Vout drops to about 100mV. Odd.

Total votes: 0

Maybe that pin is accidentally set as output, and the output is low?

Imagecraft compiler user

Total votes: 0

ADC on Mega8 is on portC IIRC.

```   DDRC = 0x00;
PORTC = 0xff; ```

Why do you set portC to 0xff ? Activating pull-ups on the ADC inputs ... that makes no sense.

It looks like your Mega8 has died: that's my conclusion based on what you posted so far.

Your schematic doesn't show an LCD, yet you refer to it in your SW:

`lcd_clrscr();`

That *could* interfere with the ADC; check lcd.h

And looking at the pin numbers, you're using the smd version (TQFP?). Correct ?
Are you certain there are no shorts ?

They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

Total votes: 0

In addition to the above, incorrect setup, dead pin/chip, short, etc., I think one of the best ways to test the ADC is to connect a 10K pot from V+ to Gnd, and connect the wiper to the ADC input.

You should be able to read the ADC value, or the calculated voltage, as you adjust the pot. Having your LCD connected makes this easy, as long as that is not part of the problem. This helps to verify that the pin(s) are set up correctly, and that the code is working.

JC

Total votes: 0

Quote:

I think one of the best ways to test the ADC is to connect a 10K pot from V+ to Gnd, and connect the wiper to the ADC input.

I did this last night and everything worked as expected. I could adjust the voltage from ~0-5VDC. After I did that I hooked my thermistor set-up to various ADC pins on the mcu and got what seemed to be different results on several pins. I think this tells me that my avr is fried. I'll put a new one on the board tonight and see what happens. Thanks for all the help.

Total votes: 0

Before swapping the AVR have a look at what I asked here:
https://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=807380&sid=97d3334cb5f15c4fad873b29ad87f892#807380
I am willing to help but I am not gonna beg for answers to my questions.

They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

Total votes: 0

Sorry Plons,

Quote:
Why do you set portC to 0xff ? Activating pull-ups on the ADC inputs ... that makes no sense.

You're right here..I've since set portc = 0x00.

`Your schematic doesn't show an LCD, yet you refer to it in your SW:`

I guess I was trying to leave out some clutter in my schematic. I'm assuming the lcd isn't interfering with my thermistor readings because when I hooked the pot up to the ADC I could clearly see the ADC was working. i.e. I could adjust the voltage at the ADC pin, as shown on the LCD, from ~0-5VDC without any "drifting" issues that I see with the thermistor.

Quote:
And looking at the pin numbers, you're using the smd version (TQFP?). Correct ?
Are you certain there are no shorts ?

Yes i'm using the TQFP version of the avr, and yes, I am as certain as I can be that there are no shorts. I checked every adjacent pin for a short with the continuity function on my DMM.

Total votes: 0

That leads to the conclusion there is nothing wrong with the AVR. And that the drift is caused by temperature change of the NTC.
Three possible sources: conduction, convection and radiation.

They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

Total votes: 0

Did you notice if the temperature drift was correlated with the fan on the heating system turning on and off? Vent pointing at your bench?

Imagecraft compiler user

Total votes: 0

lmcgill2 said,

"The impedance of my voltage divider is around 5k Ohms.

Also note that when I disconnect the voltage divider from the ADC pin, I can measure ~2.5VDC at the voltage divider output with my DMM, but when the voltage divider is hooked up the AVR ADC pin, the Vout drops to about 100mV. Odd."

This issue is yet to be resolved. The adc input appears to have a very low input resistance. NO explanation has been given. From your last post, you said you measured 0 to 5 volts with the pot. With what? DVM or AVR?

Last Edited: Fri. Mar 18, 2011 - 12:13 AM
Total votes: 0

Blow the hair dryer on the NTC while reading the volts (disconnected from avr). NTC should get smaller, volts should go up.

Imagecraft compiler user

Total votes: 0

Thanks for the replies,

From AVR120: Characterization and Calibration of the ADC on an AVR (http://www.atmel.com/dyn/resourc...)

Quote:
The input impedance to VCC and GND is typically 100 MÎ©. Together with the output impedance of the signal source, this creates a voltage divider. The signal source should therefore have sufficiently low output impedance to get correct conversion results.
Also, from the AVR data sheet
Quote:
The ADC is optimized for analog signals with an output impedance of approximately 10 kÎ© or
less.

Based on this information and the fact that many people on this form and others online seem to have no problem using a 10k NTC thermistor and 10k series resistor, I'm left to believe that the impedance of my volate divider is not an issue. I still don't have a great grasp on impedance, input impedance, output impedance etc, but this process is teaching me some things that's for sure.

Quote:
From your last post, you said you measured 0 to 5 volts with the pot. With what? DVM or AVR?
That voltage was measured with the AVR and displayed on my LCD. Also note that with the pot connected there were no â€œdriftingâ€ effects. Based on that (and even though this contradicts what I said above) Iâ€™m still not convienced this isnâ€™t an impedance issue. Iâ€™m going to try a smaller thermistor or series resistor. Also, Iâ€™m going replace the 0805 SMD thermistor with a 0805 SMD 10k resistor.

Quote:
Blow the hair dryer on the NTC while reading the volts (disconnected from avr). NTC should get smaller, volts should go up.
I'll try this too Bob, but hereâ€™s a tid bit for you - When the thermistor circuit has "drifted" to this ~85F point and levels off and I can blow on the thermistor (that at this point is connected by wires to the pads and is suspended in air about 1/4" off the PCB) and notice the temperature drop as displayed on the LCD. Also, if I hover my soldering iron above the thermistor, the temperature on the LCD increases as expected.

Total votes: 0

lmcgill2 and everyone else:

Earlier, lmcgill2 said this:

Quote:

The impedance of my voltage divider is around 5k Ohms.

Also note that when I disconnect the voltage divider from the ADC pin, I can measure ~2.5VDC at the voltage divider output with my DMM, but when the voltage divider is hooked up the AVR ADC pin, the Vout drops to about 100mV. Odd.

Clearly, something is/was loading the thermistor ckt. That explains the self heating and apparent rise in temp. .1 volt at the adc input means the input Z at the adc in parallel with the lower 10 k resistor is/was about 200 ohms. So, you have a 200 ohm resistor in series with the thermistor. Have you fixed this yet? Nothing is going to work right until you do.

Total votes: 0

You have an NTC with a different beta than you think. Measure the R at 0 deg C (in ice), at 100 deg C (in rolling boil), and at 25 deg C, feed these 3 Rs and Ts thru the calculator at US Sensors to get your actual measured beta. I betcha.

Imagecraft compiler user

Total votes: 0

hello, can any one help me to calculate the 100k ntc temperature calculation..i have used 1k resistor with 100k ntc.....

i'm new with the avr and i just started the coding on it..plese sir help me to make it out

Rjchoudhary

Total votes: 0

EDIT: Duplicate - https://www.avrfreaks.net/forum/split-avr-discussion [now locked]

You've posted this onto a 9 year thread all about that topic - so what is still not clear from all the previous posts?

i'm new with the avr

The properties of the thermistor, and of potential dividers,  are not affected by what microcontroller you use - the calculations are entirely independent of that!

So the calculation has nothing to do with the AVR.

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. Mar 17, 2020 - 10:58 AM
Total votes: 0

Rajat choudhary wrote:

hello, can any one help me to calculate the 100k ntc temperature calculation..i have used 1k resistor with 100k ntc.....

i'm new with the avr and i just started the coding on it..plese sir help me to make it out

Tell us more about your application, why are you using an NTC rather then a temp sensor IC?  What temperature range are you measuring? What NTC have you chosen to use, part number?

Jim

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

Total votes: 0

Rajat choudhary wrote:
i have used 1k resistor with 100k ntc

Now at first sight the 1K would be the wrong choice for measuring room temperature; but of course I'm only guessing that room temperature is what you wish to measure, because you didn't tell us.

Total votes: 0

acually i  am unable to understand the three coefficient A,B,and c.what  are they and how to find the value of that.

Rjchoudhary

Total votes: 0

i am using a MF58 glass bead 100k ntc with pull down of 10k and a series resister of 1k with my micro controler atmega32.

Rjchoudhary

Total votes: 0

Rajat choudhary wrote:
acually i  am unable to understand the three coefficient A,B,and c.what  are they and how to find the value of that.

https://instrumentationtools.com...

I googled "how to find RTD coefficient" to find the above

Jim

Are they not listed in the datasheet for the RTD?

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

Last Edited: Tue. Mar 17, 2020 - 12:33 PM
Total votes: 2
Total votes: 1

Rajat choudhary wrote:

acually i  am unable to understand the three coefficient A,B,and c.what  are they and how to find the value of that.

THis is getting annoying....

As asked:

ki0bk wrote:
What temperature range are you measuring? What NTC have you chosen to use, part number?

Provide a link to the datasheet.

Rajat choudhary wrote:
acually i  am unable to understand the three coefficient A,B,and c.what  are they and how to find the value of that.

Provide the link to the datasheet for the part.

If you continue to offer up nothing you will get nothing...and another thread locked.

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

"The critical shortage here is not stuff, but time." - Johan Ekdahl

"Step N is required before you can do step N+1!" - ka7ehk

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

Total votes: 0

Rajat choudhary wrote:
i am using a MF58 glass bead 100k ntc with pull down of 10k and a series resister of 1k with my micro controler atmega32.

Here is a datasheet: https://media.digikey.com/pdf/Da...

for a type MF58, but you will need to know it's full part number as that tells you more about the particular RTD....

Now, in case you missed it in another thread, What is the temperature range you want to measure?

Why use an RTD and not a temperature chip, (analog or digital)?

What is your application?

Jim

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

Total votes: 0

ki0bk wrote:

Are they A,B,C Coefficients not listed in the datasheet for the RTD?

I've never seen these listed in a thermistor datasheet. I don't know why not,

Manufacturers instead give either a temperature-to-resistance lookup table or more generally the beta value and R25 which specifies the curve around two temperature points. If your measurement of interest is substantially outside that temperature range then accuracy will become worse.

Ignore the https://instrumentationtools.com... link; that is specifically about Platinum Resistance Thermometers, not thermistors.

The better link is  https://learn.adafruit.com/thermistor/using-a-thermistor

Total votes: 0

As i said I'm new with avr so i doing small projects but the circuit i have got is only with 100k ntc so i have to make program on it

Rjchoudhary

Total votes: 0

Rajat choudhary wrote:
As i said I'm new with avr so i doing small projects but the circuit i have got is only with 100k ntc so i have to make program on it

So, this is a school project then?

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

"The critical shortage here is not stuff, but time." - Johan Ekdahl

"Step N is required before you can do step N+1!" - ka7ehk

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

Total votes: 0

Rajat choudhary wrote:
As i said I'm new with avr

As I said, the basics of how thermistors work, how to use them in a potential divider, etc has nothing to do with microcontrollers - AVR or other.

You need to understand those things before you can start bringing microcontrollers into the picture.

And, as others have said, thermistors are very long-established, widely-used, well-known devices - so there is no shortage of information, examples, etc available on the interwebs and even in good, old-fashioned books!

In one of your many re-posts of this, Kartman wrote:

What research have you done? The thermistor is hardly new, so you're not on the bleeding edge. If you Google arduino thermistor, you'll get a few pertinent hits. Start your research there.

Hint - add Arduino to just about anything you have a question about (regarding microcontrollers). Odds are you'll get something useful as anything that is of any interest to a hobbyist has probably been done with an Arduino, a blog written about it and sample code and circuit. Don't tell me you don't want to use Arduino, as this makes little difference - the Arduino is just an AVR on a circuit board - no magic.

https://www.avrfreaks.net/commen...

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Total votes: 0

Rajat choudhary wrote:
... the 100k ntc temperature calculation ...
fyi, a new arrival

Texas Instruments PTC Thermistors | Mouser

...

The TMP63 takes advantage of benefits over NTC thermistors such as no extra linearization circuitry, minimized calibration, and less resistance tolerance variation. It also offers larger sensitivity at high temperatures and simplified conversion methods to save time and memory in the processor.

...

edit : target

"Dare to be naïve." - Buckminster Fuller

Total votes: 0

Yes sir it is my school project can you give me any example code with 100k ntc

Rjchoudhary

Total votes: 1

You still haven't provided the information that's been requested from you - what is the part number, exactly, of the thermistor you are using?

Have you really not been able to find any example code anywhere at all on the internet or in your set books?

If it is a school project, then it is expected that you should be doing the work - yourself

If you're really stuck, you should be going to your teacher for help.

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Total votes: 0

You still have not told us your expected temperature range you want to measure!

How will display the results? single LED's, 7segment LEDs, LCD, Serial terminal, other?

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

Last Edited: Tue. Mar 17, 2020 - 08:29 PM
Total votes: 0

Rajat choudhary wrote:
Yes sir it is my school project can you give me any example code with 100k ntc

I give up.

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

"The critical shortage here is not stuff, but time." - Johan Ekdahl

"Step N is required before you can do step N+1!" - ka7ehk

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

Total votes: 0

What do you want to do?  You must say so!!  Measuring temperature can be much different than using temperature.

For example, if you want to sound an alarm at a calibrated temperature setpoint, you may not need to do any type of calculation or math at all.

You can simply set a voltage trip point where some action takes place.  Dial in a pot or software until the action occurs, that is the setpoint.   In that case the software really has no idea at all what the temperature is or that temperature is even involved; it just knows at  xx volts to sound the alarm.

Sometimes people go through all kinds of hocus pokus, calculations, linearizations, etc and completely waste all that complexity just to trip at some setpoint.

b=a

calculate sin(a)-sin(b):

1) calc  sin(a) using 5th order polynomial expansion

2) calc  sin(b) using 5th order polynomial expansion

3) form difference.

shortcut: 0

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Total votes: 2

You can lead a horse to a useful internet page but you can't make him read it.

Total votes: 0

N.Winterbottom wrote:

You can lead a horse to a useful internet page but you can't make him read it.

+1

I would suggest we stop feeding this one until it spits up a little

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

"The critical shortage here is not stuff, but time." - Johan Ekdahl

"Step N is required before you can do step N+1!" - ka7ehk

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

Total votes: 0

What do you want your project to DO?   Is there an application in mind, or just experimentation?

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!