| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| MCUprogrammer 
 
 
 Joined: 08 Sep 2020
 Posts: 233
 
 
 
			    
 
 | 
			
				| 100 ohm ptc reading |  
				|  Posted: Thu Aug 26, 2021 4:48 am |   |  
				| 
 |  
				| Hello to everyone I want to make ptc reading with the model I specified. But I could not see the Beta Constant value in the datasheet. Would you help me with this topic?
 
 Model : 495-2615-ND (B59100M1070A70)
 CABLE COLOR : 70 WHITE/BROWN
 
 PIC:18F67J60
 
 thermistor_config(25, 100, , FALSE, 100, 8);
 
 I pulldown the thermistor voltage divider with a 100 ohm resistor.
 But what will I write as the beta value?
 
 
 https://www.tdk-electronics.tdk.com/inf/55/db/PTC/PTC_Motor_protection_M1100.pdf
 _________________
 Best Regards...
 MCUprogrammer
 _______________________________
 Work Hard
 |  | 
	
		|  | 
	
		| Ttelmah 
 
 
 Joined: 11 Mar 2010
 Posts: 19966
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Thu Aug 26, 2021 5:35 am |   |  
				| 
 |  
				| The data sheet gives resistance values. 
 You can calculate beta values from two temperatures and two resistances.
 However beta is a very inaccurate way of specifying thermistors.
 
 Are you sure the code you have is for a PTC thermistor?. Most temperature
 measurements with thermistors use NTC ones. PTC thermistors are normally
 used directly to limit current with temperature.
 Beta values are normally only used with NTC thermistors.
 I don't think the curve specified by a 'beta' value, would fit the responses
 of a PTC thermistor...
  |  | 
	
		|  | 
	
		| temtronic 
 
 
 Joined: 01 Jul 2010
 Posts: 9588
 Location: Greensville,Ontario
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Thu Aug 26, 2021 6:44 am |   |  
				| 
 |  
				| curious.... 
  	  | Quote: |  	  | thermistor_config(25, 100, , FALSE, 100, 8); | 
 is this a new CCS compiler supplied function ?
 |  | 
	
		|  | 
	
		| MCUprogrammer 
 
 
 Joined: 08 Sep 2020
 Posts: 233
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Thu Aug 26, 2021 6:44 am |   |  
				| 
 |  
				| so how do I do _________________
 Best Regards...
 MCUprogrammer
 _______________________________
 Work Hard
 |  | 
	
		|  | 
	
		| Ttelmah 
 
 
 Joined: 11 Mar 2010
 Posts: 19966
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Thu Aug 26, 2021 7:11 am |   |  
				| 
 |  
				| Thermistor_config, is in the thermistor.c include file Jay. However this is for NTC thermistors, not PTC thermistors.
 
 PTC thermistors, are not designed for temperature measurements, they
 are designed for direct circuit protection. As the temperature goes up,
 the resistance increases limiting the current.
 |  | 
	
		|  | 
	
		| MCUprogrammer 
 
 
 Joined: 08 Sep 2020
 Posts: 233
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Thu Aug 26, 2021 9:19 am |   |  
				| 
 |  
				| Well, I want to read that increasing temperature and limit it accordingly. How can I read that temperature value? _________________
 Best Regards...
 MCUprogrammer
 _______________________________
 Work Hard
 |  | 
	
		|  | 
	
		| Ttelmah 
 
 
 Joined: 11 Mar 2010
 Posts: 19966
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Thu Aug 26, 2021 10:21 am |   |  
				| 
 |  
				| You'd have to simply make your own curve based on the graph in the data sheet (lookup table...), and use this.
 
 However, understand that unlike the NTC thermistors that have a close
 to parabolic curve, the PTC units have a much sharper response, so they
 change value really sharply at the temperature they are designed to stop
 things at. Makes the reading relatively much less accurate.
 |  | 
	
		|  | 
	
		| MCUprogrammer 
 
 
 Joined: 08 Sep 2020
 Posts: 233
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Thu Aug 26, 2021 12:37 pm |   |  
				| 
 |  
				| Is there an example of this? _________________
 Best Regards...
 MCUprogrammer
 _______________________________
 Work Hard
 |  | 
	
		|  | 
	
		| temtronic 
 
 
 Joined: 01 Jul 2010
 Posts: 9588
 Location: Greensville,Ontario
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Thu Aug 26, 2021 1:27 pm |   |  
				| 
 |  
				| Best, or first place, to look for examples would be the manufacturer of the PTC, TDK in your case. They should have a series of 'application notes' detailing how to use their products. As Mr. T points out, gather test data for the range you need (high, low, in between, say every 5* if large range, every 1* for a narrow range. EVERY thermistor will have slightly different  'curve', so calibration/math will be unique.
 
 I can't give you code example as I don't use their PTCs. In the past I have used NTCs though and the math can get 'interesting' to get exact readings, and while there are 'general' equations, the code will be specific or 'tailored' for the device.
 How complex the code has to be usually depends on the range of interest and accuracy. If you only need a small range, consider a precision opamp to maximize the PIC's ADC input range. Remember you'll need real good analog filtering to achieve repeatable 10bit ADC results.
 As a start, you'll need a precision Vreference/power supply to power the device, you can't use VDD of the PIC ! In the good old days, I'd use a Wien bridge fed from a constant current source as it gave far better results. The bridge then fed an 'instrumentation' opamp. LOTS of bypass caps, filter caps, etc.
 
 Note: that device has a 3 second 'thermal constant', means you have to wait 3 seconds for it to respond to change in temperature.
 |  | 
	
		|  | 
	
		| MCUprogrammer 
 
 
 Joined: 08 Sep 2020
 Posts: 233
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Thu Aug 26, 2021 11:43 pm |   |  
				| 
 |  
				| Where does it say in the document that it's 3 seconds? I couldn't see. _________________
 Best Regards...
 MCUprogrammer
 _______________________________
 Work Hard
 |  | 
	
		|  | 
	
		| Ttelmah 
 
 
 Joined: 11 Mar 2010
 Posts: 19966
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Fri Aug 27, 2021 12:40 am |   |  
				| 
 |  
				| Ta in the data sheet. 
 It's worth reading what they are called in the data sheet.
 "limit temperature sensors". These are very much not designed to make
 temperature readings. The point is that their resistance stays at about 100R
 up to about 70C (this is the '70' in the part number), and then shoots up
 over the next 20 degrees to over 10000R. The idea is you look for this
 sharp rise, and turn things off when it happens. They are designed as
 limit switching devices not as temperature measurement devices.
 So all you do, is have perhaps a voltage divider with this and perhaps
 a fixed 200R resistor, and when the output of this goes over the reference/2
 switch the power stage off.
 Getting anything approaching an accurate 'reading' from this will be hard,
 and will probably differ significantly for every unit. Since the resistance shoots
 up so fast at the 'limit' temperature, you will run out of ADC range very
 quickly.
 |  | 
	
		|  | 
	
		| temtronic 
 
 
 Joined: 01 Jul 2010
 Posts: 9588
 Location: Greensville,Ontario
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Fri Aug 27, 2021 6:51 am |   |  
				| 
 |  
				| As Mr. T points out, it's probably the wrong device for your application. If this is for a real product, post what you're trying to do(temperature range is important !).
 Generally speaking to measure temperature you can use diode, transistors(as diodes),thermistors, 'linear thermistors',LM34s and DS1820 sensors. There are others of course....
 |  | 
	
		|  | 
	
		| MCUprogrammer 
 
 
 Joined: 08 Sep 2020
 Posts: 233
 
 
 
			    
 
 | 
			
				| 100 ohm ptc reading |  
				|  Posted: Fri Aug 27, 2021 8:52 am |   |  
				| 
 |  
				| I want to shut down the system when there is a rapid change in resistance value. That's all I want to do. And I want to print the temperature value corresponding to the resistance value I read on the screen. _________________
 Best Regards...
 MCUprogrammer
 _______________________________
 Work Hard
 |  | 
	
		|  | 
	
		| temtronic 
 
 
 Joined: 01 Jul 2010
 Posts: 9588
 Location: Greensville,Ontario
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Fri Aug 27, 2021 11:08 am |   |  
				| 
 |  
				| 'rapid change in temperature' won't happen with this device. It has a  3 second 'response' time. We don't know your application, but 3 seconds is a LONG time. There are other sensors that will be better suited.
 I would think you'ld have to read the sensor every 3 or 4  seconds, take an 'Olympic' average and THEN decide what to do. That read/decide process will take at least 40 seconds. If that's acceptable, great, you MIGHT be able to use the device, but again, you'll have to very, very carefully calibrate and 'tune' your program for one specific device.
 |  | 
	
		|  | 
	
		| MCUprogrammer 
 
 
 Joined: 08 Sep 2020
 Posts: 233
 
 
 
			    
 
 | 
			
				|  |  
				|  Posted: Sun Aug 29, 2021 7:44 am |   |  
				| 
 |  
				| I am trying to write a driver similar to thermistor.c driver. _________________
 Best Regards...
 MCUprogrammer
 _______________________________
 Work Hard
 |  | 
	
		|  | 
	
		|  |