Pages: [1]   Go Down
Author Topic: Temperature Sensor  (Read 1250 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 1
Posts: 131
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have built an ac induction motor drive and it works fantastically well I could go on about energy efficiencies (90W reduced to 16W at half speed) operating regardless of the load characteristics bla bla bla but I won't bore you!

For development I used a simple pot through an ADC to dictate the output frequency but now it works I want to incorporate temperature control ( expected temps of between 20C and 30C) and this is where I would appreciate some feedback

I initially thought of getting an RTD interfaced with a bridge and an instrument amp to give a voltage between 0-2.95V and I could do that but I have noticed a plethora of temp sensors

Like

http://uk.farnell.com/analog-devices/ad22103ktz/ic-sensor-temp-3-3v-to-92-3/dp/1438415

Or

http://uk.farnell.com/analog-devices/tmp37ft9z/sensor-temp-2deg-125deg-3to92/dp/2102510

Which looks a lot less work to develop, and I could silicone it in a PTFE tube then heat shrink it to make a sensor probe for harsh-ish environments

I have a supply of 3V or 5V and my uC has a 0-2.95V 12 bit ADC

So my thinking is use the AD22103KTZ

VOUT = (VS/3.3 V)  ´ [0.25 V + (28 mV/°C) ´ TA]

with a supply of 2.95V @25C the output is approx 0.85V

@ 30C

Output= 0.97V

@20C

Output = 0.72V

So my ADC reading will vary between 1005 (@20C) to 1346 (@30C)

My question is does this sound like a good method to eliminate using amplifiers and signal conditioners? it just seems too easy for me!

If anyone can recommend a better method I would be most grateful

Thanks in Advance

Logged

Dee Why NSW
Offline Offline
Full Member
***
Karma: 5
Posts: 206
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is an Arduino forum and you are probably well-advised to use what most others use, the Dallas 18B20. This is often used bare but can be bought already encapsulated, complete with cable in various lengths, and plug.

It also has advantages like running off the standard voltage of the rest of the device and that, when you ask it the question, it will give an answer in plain English.  This beats the hell out of all those voltages, bridges, and numbers, and is likely just what you need. So look there first.
Logged

Offline Offline
Full Member
***
Karma: 1
Posts: 131
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your reply, however isn't the 18B20 a digital device that outputs a datastream really neat but my understanding is that the program will need to measure times (to determine high/low)
using interrupts or whatever, my program is required to do lots of other tasks its geared up now to measure an analog voltage and I would love to keep it simple so as not to interfere with the program too much

Is there an issue with what I suggest in my first post?, a bridge and an amplifier wouldnt be that much work really, i just want it as simple as possible
« Last Edit: December 01, 2012, 09:07:55 am by Resinator » Logged

Dee Why NSW
Offline Offline
Full Member
***
Karma: 5
Posts: 206
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your reply, however isn't the 18B20 a digital device that outputs a datastream really neat but my understanding is that the program will need to measure times (to determine high/low)
using interrupts or whatever, my program is required to do lots of other tasks its geared up now to measure an analog voltage and I would love to keep it simple so as not to interfere with the program too much

You interrogate the device in the sketch loop. I imagine you will surely need to take a clock into account no matter how you measure the temperature, so I don't see the relevance there. The time  doesn't actually have to be handled by the Arduino. If you feed the temperature output to Excel, the date time, max and min can all be handled there.

Quote
Is there an issue with what I suggest in my first post?, a bridge and an amplifier wouldnt be that much work really, i just want it as simple as possible

Well, I'm not really an electronics expert but, in the light of what the DS18B20 does, and does so simply and elegantly, what you propose just looks absurd, it's like something out of the 1970s. In short, I submit you are utterly failing in your stated objective - to measure temperature, and as simply as possible.  I recognise that there may be other influences, the most likely being that you've already gone and bought the hardware, and I'm certainly not suggesting that what you propose won't work. But what you want is not much different from what I want, so I am suggesting there is a better, and simpler,  way to do it. 
Logged

Offline Offline
Full Member
***
Karma: 1
Posts: 131
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks again for your input, I dont see why time would ever come into a temperature measurement unless it was with a digital device like the 18B20

Temperature measurements I am familiar with uses analog and digital electronics at work we use all kinds of thermistors, PT100's thermo couples etc which interface directly with dataloggers and instrumentation whilst it might well be from before the 70's it is still very effective and reliable hence why its so common

Now I haven't bought any hardware at all yet and I do plan on messing around and trying different methods and chips the cost of these components is rather cheap

I want to do it as simple as possible but without interfering with my existing program which is pretty demanding, to give you an idea it does 5 A2D conversions 4 trig calcs a load of sums multiplies and divides and plenty of other stuff like switching and arrays which all comes to about 28us (yeah i just measured it!) with an interrupt every 25us to increase count and start again hence I am not switching every device in the 25us window (losing 3 us per cycle) which means the switching frequency is below 20kHz which is starting to creep into the audible frequency range which I need to avoid to stop the induction motor from becoming noisy hence more code is less switching times and decreased frequency which then gives me more LF harmonics!

I hope thats a bit more clear, I really appreciate your input the main reason to this thread is

 A to see what people think of directly connecting a device like the TMP37/AD2210 to a uC, is the 28mv/C enough to realistically work with?

B to see if theres any other devices out there I should know about

I do like the look of the RTD metal probes as well
Logged

Dee Why NSW
Offline Offline
Full Member
***
Karma: 5
Posts: 206
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I didn't raise the matter of time. If you just want to know something happened, and don't care when, then you clearly don't need a clock. Devices like the DS18B20 don't need a clock, they just tell you the temperature when you ask for it, in (something reasonably close to) plain English, and to two decimal places.  There are other devices that are similar, but I don't know anything about them.

I have some PT100s and I recognise that they are well-proven for the purpose, but everybody goes up blind alleys from time to time, and I have never used them. There is simply no point, as they simply are not simple enough.

Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6639
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have a supply of 3V or 5V and my uC has a 0-2.95V 12 bit ADC

So my thinking is use the AD22103KTZ

VOUT = (VS/3.3 V)  ´ [0.25 V + (28 mV/°C) ´ TA]

with a supply of 2.95V @25C the output is approx 0.85V

The DS18B20 sensor is just as easy to use with an Arduino and you can buy it ready-encapsulated, e.g. http://www.ebay.co.uk/sch/i.html?_trksid=p5197.m570.l1313&_nkw=waterproof+temperature+sensor&_sacat=0&_from=R40. A further advantage is that is does not rely on the exact value of the Arduino Vcc or some other voltage reference.
« Last Edit: December 01, 2012, 02:48:38 pm by dc42 » Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Full Member
***
Karma: 1
Posts: 131
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have ordered a few IC's some were as cheap as 30p!

But I will order one of these DS18B20's as well and see how I get on

Remember I am not using an Arduino, is the one wire library specific to Arduino? and how much wouldit take to program without it?

The Datasheet is rather confusing certainly doesn't seem simple!
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6639
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Remember I am not using an Arduino, is the one wire library specific to Arduino? and how much wouldit take to program without it?

You should have said so earlier - this is an Arduino forum, so we assume you are using an Arduino or at least an atmega mcu unless you say otherwise. What are you using?
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Full Member
***
Karma: 1
Posts: 131
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

STM32F4 an Arduino just isnt fast enough
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6639
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

In that case, this http://www.freag.net/en/t/2i9uy/maxim_ds18b20_t may be useful.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 227
Posts: 14048
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is the dallas temperature library - http://milesburton.com/Dallas_Temperature_Control_Library -
it has source code available, and is imho quite portable (some effort needed) to other MCU's
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Dee Why NSW
Offline Offline
Full Member
***
Karma: 5
Posts: 206
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Remember I am not using an Arduino, is the one wire library specific to Arduino? and how much would it take to program without it?

The DS18B20 has been around longer than the Arduino. I believe the Arduino makes their use simpler (there's that word again....), but I don't know how.  Due, I'm afraid, to a self-inflicted comedy of errors, the first setup using the Dallas that I actually got to work did not use the one-wire system. The programming is about the same, and the memory requirement is somewhat less..  While the one-wire system is the second of the DS18B20's great assets, you are right to consider working without it. 

Quote
The Datasheet is rather confusing certainly doesn't seem simple!

Well, if you must go reading datasheets, you deserve all the confusion you get. All you need to know is what it does and how simply, which is clear enuff, and how to programme it, which is largely done by somebody else. Once you have that, the device itself is plug'n'play in the truest sense of the word. You might find the link below useful.

http://sheepdogguides.com/arduino/ar3ne1tt.htm

This was the only code I could find that did not use the one-wire bus. I used it to run two probes, and it would do fine for the one-probe setup you propose.

`
Logged

Pages: [1]   Go Up
Jump to: