CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

100 ohm ptc reading
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
temtronic



Joined: 01 Jul 2010
Posts: 9097
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Aug 29, 2021 2:45 pm     Reply with quote

You need to post what RANGE of temperature you expect to use it for.
It's NOT designed for say, home thermostat controller.

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19215

View user's profile Send private message

PostPosted: Sun Aug 29, 2021 11:55 pm     Reply with quote

You need to understand these are not at all like normal NTC thermistors.
These are designed to just do the job of switching things off when they
overheat. So the response curve, is very flat below this, then rises sharply
at the switching temperature. As such making a measurement is going to
be awkward, and inaccurate. Even a 'normal' thermistor has quite an
awkward curve to deal with, but at least is is a reasonably gentle curve.
The maths in the standard thermistor code is designed to handle the NTC
curve, not the PTC curve.

The quoted response is around:
Code:

60R 10C
65R 20C
90R 30C
150R 40C
210R 50C
560R 60C
2000R 70C
6000R 80C
20000R 90C
50000R 100C


It will also vary between examples of the sensor quite a bit, but only
perhaps 20% in resistance. However as you can see a 20% change in
resistance corresponds to a lot of temperature at places....

So you are not going to be able to make anything approaching an
accurate temperature reading with this. I'd suggest code to read the
resistance, then a look up table, perhaps based on the above readings,
and just linear interpolate between these. So if you read (say) 4000R, you
get a reading of. 75C (half way between the 2000R reading and the 6000R
reading.
You will be lucky to get even +/-10C.
MCUprogrammer



Joined: 08 Sep 2020
Posts: 220

View user's profile Send private message

PostPosted: Tue Aug 31, 2021 7:34 am     Reply with quote

How to read a log chart. How is the value 3000000 obtained in the 70 C and 130 C graph in the data network of the PTC sensor. Does anyone knows?
_________________
Best Regards...
MCUprogrammer
_______________________________
Work Hard
MCUprogrammer



Joined: 08 Sep 2020
Posts: 220

View user's profile Send private message

PostPosted: Tue Aug 31, 2021 7:41 am     Reply with quote

I will limit the current according to the resistor value I read. I want to print the temperature equivalent in the resistor I read. Yes I know. PTCs are used for protection circuits, not temperature measurement. But I will do so. I will only print the temperature corresponding to the resistance value I read.
_________________
Best Regards...
MCUprogrammer
_______________________________
Work Hard
temtronic



Joined: 01 Jul 2010
Posts: 9097
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Aug 31, 2021 10:43 am     Reply with quote

I think you're confused how he charts/graphs are laid out.
there are 3 sensors per graph
The first graph(TPT1006-N) has your 'Tsense = 70*C' sensor,dotted line.
@70*C it's about 400r, @130*C it's 3Mohms

you can make a table of *C vs resistance using the graph. It is 'rough', NOT accurate and NOT linear.


Jay
MCUprogrammer



Joined: 08 Sep 2020
Posts: 220

View user's profile Send private message

PostPosted: Wed Sep 01, 2021 3:28 am     Reply with quote

thank you mr jay.
what about ex_sk_temp_thermistor used in example
tempf = (float)(thermistor_convert(adc))/10.0;
Why are we doing the "/10.0" at the end of this code. Also, if we are going to do the conversion to celsius, will we do "/10.0"?
_________________
Best Regards...
MCUprogrammer
_______________________________
Work Hard
temtronic



Joined: 01 Jul 2010
Posts: 9097
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Sep 01, 2021 4:59 am     Reply with quote

I don't have that example program ( I have older compiler version...) but did read that the thermistor_convert function returns a value to 2 decimal points ( ie: 98.62 )

the /10 would make that value 98.6 perhaps that's what the programmer sends to his display device ? There is a hardware cost to show more digits,both physical and software costs.

How many 'decimal points' depends on application. For me , I don't need to know it's 86.123456 *F outside, 86 *F is fine... well too hot for me,really .

Jay
MCUprogrammer



Joined: 08 Sep 2020
Posts: 220

View user's profile Send private message

PostPosted: Wed Sep 01, 2021 5:07 am     Reply with quote

I am using version 5.105. I thought it was specific to converting that value to Fahrenheit.
_________________
Best Regards...
MCUprogrammer
_______________________________
Work Hard
temtronic



Joined: 01 Jul 2010
Posts: 9097
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Sep 01, 2021 7:06 am     Reply with quote

yes, that function converts the ADC reading into *F based upon the data you supply for the RTD sensor.
If you wanted *C, simply take the function result (*F value) and convert to *C.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group