Semiconductor Temperature Sensors

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

Post Reply
User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Semiconductor Temperature Sensors

Post by JohnCrow »

I have, over the last couple of years experimented with several different types of solid stare temperature sensor devices.

These mostly have a direct mV/°C output.

The biggest problem with most of them is they don't measure negative temperatures, exceptions to this are normally more complex to use.

The DS18S20 can read negative but uses the 1 wire bus. While supported in FC it is not as easy to use as the above type.

The LM335Z can read negative but its output is mV/K (Kelvin).
This needs an extra line of calculation to convert back to °C, and the hardware needs a trimmer and pull up resistor to set the optimum accuracy.

The TMP102 has a good accuracy but uses the I2C bus. This can make programming tricky for the inexperienced

I've recently tried the TMP36 device.
This again has a 10mV/°C but reads from -40° to +125°C (Data sheet figures).
It can run with a supply of 2.7 V to 5.5 V and has a worst case accuracy of 2°C (1°C around 25°C), which make using it with ARM devices as simple as PICs and AVRs.

No extra hardware is needed, just a simple 3 wire connection.

Pin1 = Vcc
Pin2 = Out
Pin3 = Gnd

The device is ideal as the basis of a wide range thermometer.
Ive attached a simple example flowchart below.
TMP36_Sensor_Test.fcf
Test Flowchart
(10.5 KiB) Downloaded 580 times
1 in 10 people understand binary, the other one doesn't !

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: Semiconductor Temperature Sensors

Post by Steve001 »

[quote="JohnCrow"]I have, over the last couple of years experimented with several different types of solid stare temperature sensor devices.


Hi john i know that you like playing with temperature sensors have you seen the devices on analouge devices site ? if you create a id they can send you FOC samples :D i have obtained a few devices this way .

http://www.analog.com/en/analog-to-digi ... re_Sensors

above is the selector

spark fun do a SOT23 to DIP convertor pcb

http://proto-pic.co.uk/sot23-to-dip-ada ... tAodgwsAmA


registration page

https://registration.analog.com/Registr ... ?locale=en


Steve
Last edited by Steve001 on Sun Jun 16, 2013 5:44 pm, edited 2 times in total.
Success always occurs in private and failure in full view.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Semiconductor Temperature Sensors

Post by JohnCrow »

Hi Steve

Thanks for the links, I keep intending to try and get a few samples from various places.

Ive used the sparkfun breakout boards for SMD to dip, they are useful devices.(Not tried that one though)
1 in 10 people understand binary, the other one doesn't !

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: Semiconductor Temperature Sensors

Post by Steve001 »

there is this little beauty just had to go and dig it out of my components box a tad expensive i know
not had chance to play with it yet tho :(

http://uk.farnell.com/jsp/displayProduc ... tch|p|plid|

it interfaces various thermocouples to a 10mv/c signal this one is type K (−200 °C to +1350 °C)

steve
Success always occurs in private and failure in full view.

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Semiconductor Temperature Sensors

Post by JohnCrow »

Hmm
I used them (or maybe a similar device) for a project when I was at college (paid for by work so cost didnt matter).
They worked very well.
Just used a DVM module to show the temperatures.
1 in 10 people understand binary, the other one doesn't !

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: Semiconductor Temperature Sensors

Post by jgu1 »

Hi John/all! :D

I also made a program with a TPM36. I would use it for a thermostat.
You can adjust its nominal temperature by pressing Set then the up / down. If you press Set again, you can adjust the hysteresis of temperature upwards. press again Seen and you can adjust the hysteresis down. Press Set again and the thermostat will turn on and off the set formulas. The accuracy is only in whole degrees. The program stores the adjustments in EEPROM, so a power failure retrieves the data again. There is certainly something that can be improved, but it works fine by me. Maybe useful :idea:

Best regard

Jorgen
Attachments
TermostatMakroInterrupt.fcf
(59.7 KiB) Downloaded 477 times

Kenrix2
Flowcode v5 User
Posts: 211
Joined: Tue Feb 19, 2013 9:51 pm
Has thanked: 72 times
Been thanked: 177 times
Contact:

Re: Semiconductor Temperature Sensors

Post by Kenrix2 »

Some Pic micros have a temperature unit. I have used them in the past for various monitoring uses but not for getting the the exact degree centigrade.
Here is a sample. It is made with V4.5 ,however, it should work with V5.
Attachments
Internal_Temperature.fcf
(8 KiB) Downloaded 480 times

User avatar
JohnCrow
Valued Contributor
Valued Contributor
Posts: 1367
Joined: Wed Sep 19, 2007 1:21 pm
Location: Lincolnshire
Has thanked: 364 times
Been thanked: 716 times
Contact:

Re: Semiconductor Temperature Sensors

Post by JohnCrow »

Hi Kenrix
Thats a very interesting idea, just tried it with the 16F1827 and FC5
It seems to work as you say. Gave the PIC a spray with an inverted air duster, and cooled it down and the display shows about 160.
Room temp is about 24°C and its showing 210.

As you say not highly accurate, but it could certainly be useful.

Thanks for the info.
1 in 10 people understand binary, the other one doesn't !

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Semiconductor Temperature Sensors

Post by medelec35 »

Here is my two pence worth.
How about this:
http://uk.farnell.com/jsp/search/produc ... ku=1439483

Code: Select all

 THERMISTOR, LINEAR 19.53MV/C, TO-92
 IC Output Type: Voltage
 Sensing Accuracy Range: ± 2°C
 Sensing Temperature Min: -40°C
 Sensing Temperature Max: +125°C
 Supply Voltage Min: 3.1V
 Supply Voltage Max: 5.5V
 Sensor Case Style: TO-92
 No. of Pins: 3
 Resolution (Bits): 8bit
 Supply Current: 6µA
 SVHC: No SVHC (19-Dec-2012)
 Base Number: 9701
 Operating Temperature Max: 125°C
 Operating Temperature Min: -40°C
 Operating Temperature Range: -40°C to +125°C
 Output Current: 100µA
 Output Voltage: 400mV
 Output Voltage per °C: 19.5mV/°C
 Package / Case: TO-92
 Resolution: 8bit
 Sensor / Transducer Type: Temperature
 Supply Voltage Range: 3.1V to 5.5V
 Temperature Sensing Range: -40°C to +125°C
 Termination Type: Through Hole
Price from Farnell:

Code: Select all

Qty	   List Price
1 - 9	  £0.24
10 - 99	£0.159
100+ 	  £0.133
Since Output Voltage per °C: 19.5mV/°C ( 5/256=19.53mV)
That makes flowcharts very easy to create.
So bytes increase/decrease by 1 every deg C

Also no additional components are required.

Martin
Martin

Post Reply