Author Topic: Clever temperature transducer for microcontroller  (Read 1850 times)

zahc

  • friend
  • Senior Member
  • ***
  • Posts: 5,799
Clever temperature transducer for microcontroller
« on: July 31, 2009, 08:14:01 PM »
I develop photographic film and I want to use a thermoelectric element to maintain a tub of water at either 20C or 38C, (+-.5C) depending on my process.

I plan on using an AVR microcontroller to do the thermostat but there's the issue of thermometry. Sure thermocouples exist but as far as I know you need a special high-impedence junction to use them--an ultra-cheap thermocouple setup with digital readout would be awesome, but there must be something more clever.

Since I don't really need linearity, only two points that I can calibrate with a 'real' thermometer, I could really use anything that varies resistance with temperature; such as a coil of wire or a reverse-biased diode or anything like that. Any ideas as to a cheap temperature transducer would be appreciated. I have the ability to output PWM up to 5v average and I have a 10-bit voltage ADC.
Maybe a rare occurence, but then you only have to get murdered once to ruin your whole day.
--Tallpine

RocketMan

  • Mad Rocket Scientist
  • friend
  • Senior Member
  • ***
  • Posts: 13,625
  • Semper Fidelis
Re: Clever temperature transducer for microcontroller
« Reply #1 on: July 31, 2009, 08:52:04 PM »
How about a thermistor?
If there really was intelligent life on other planets, we'd be sending them foreign aid.

Conservatives see George Orwell's "1984" as a cautionary tale.  Progressives view it as a "how to" manual.

My wife often says to me, "You are evil and must be destroyed." She may be right.

Liberals believe one should never let reason, logic and facts get in the way of a good emotional argument.

zahc

  • friend
  • Senior Member
  • ***
  • Posts: 5,799
Re: Clever temperature transducer for microcontroller
« Reply #2 on: July 31, 2009, 09:17:16 PM »
I just thought of that myself. Every time I come up with a novel problem, it turns out someone already sells the solution for $.002. If only the rest of life was like electronics.

Thermistors as a temperature sensor should be driven with a very low constant current and then the voltage amplified with a low-impedence op-amp up to the 0-5v range of my ADC, but since I don't need linearity, I suppose I can just use a voltage supply through the thermistor and calibrate.
Maybe a rare occurence, but then you only have to get murdered once to ruin your whole day.
--Tallpine

Nick1911

  • Administrator
  • Senior Member
  • *****
  • Posts: 8,492
Re: Clever temperature transducer for microcontroller
« Reply #3 on: July 31, 2009, 09:23:47 PM »
Eh, I'd still use the op-amp and feed that into the ADC section of the mirco.

Still, you'll have to do lots of calibration work to figure out how temps coordinate to voltage.

You know what?  Why not use a PID controller with a K-thermocouple?  They have fancy functions based on calculus to get the temp where it needs to go without overshooting.  They compensate for heat load internally.

Very cool gadgets.  Pretty cheap, too.

Physics

  • ∇xE=-1/c·∂B/∂t, ∇·E=4πρ, ∇·B=0, ∇xB=1/c·∂E/∂t, F=q(E+v/cxB)
  • friend
  • Senior Member
  • ***
  • Posts: 1,315
Re: Clever temperature transducer for microcontroller
« Reply #4 on: July 31, 2009, 10:14:36 PM »
Eh, I'd still use the op-amp and feed that into the ADC section of the mirco.

Still, you'll have to do lots of calibration work to figure out how temps coordinate to voltage.

You know what?  Why not use a PID controller with a K-thermocouple?  They have fancy functions based on calculus to get the temp where it needs to go without overshooting.  They compensate for heat load internally.

Very cool gadgets.  Pretty cheap, too.

A fellow grad student and myself built a labview based chemical vapor deposition system a couple months back in the lab (he setup the flow system and I did all the programming and calibration/setup).  I used a PID loop, and it was really quite simple.  Took me some trial and error, but I finally got it perfect.  Also, I was using J and K type thermocouples.
http://en.wikipedia.org/wiki/PID_controller is an okay explanation.     

In the world of science, there is physics.  Everything else is stamp collecting.  -Ernest Rutherford

RocketMan

  • Mad Rocket Scientist
  • friend
  • Senior Member
  • ***
  • Posts: 13,625
  • Semper Fidelis
Re: Clever temperature transducer for microcontroller
« Reply #5 on: July 31, 2009, 10:20:30 PM »
Compound gallium-arsenide, lose control of the furnace temperature due to hardware failure, temperature free falls, ampule bursts, gaseous arsenic combines instantly with O2 in the atmosphere forming arsenic trioxide in the air you are breathing.  BTDT, got the elevated lung cancer risk.
It's good when PID loops function correctly.   :laugh:
If there really was intelligent life on other planets, we'd be sending them foreign aid.

Conservatives see George Orwell's "1984" as a cautionary tale.  Progressives view it as a "how to" manual.

My wife often says to me, "You are evil and must be destroyed." She may be right.

Liberals believe one should never let reason, logic and facts get in the way of a good emotional argument.

Nick1911

  • Administrator
  • Senior Member
  • *****
  • Posts: 8,492
Re: Clever temperature transducer for microcontroller
« Reply #6 on: July 31, 2009, 10:45:39 PM »
Compound gallium-arsenide, lose control of the furnace temperature due to hardware failure, temperature free falls, ampule bursts, gaseous arsenic combines instantly with O2 in the atmosphere forming arsenic trioxide in the air you are breathing.  BTDT, got the elevated lung cancer risk.
It's good when PID loops function correctly.   :laugh:

 :O

For the love of... Containment systems, man!

What's next; distilling pure hydrogen cyanide on your kitchen table?  =D

zahc

  • friend
  • Senior Member
  • ***
  • Posts: 5,799
Re: Clever temperature transducer for microcontroller
« Reply #7 on: July 31, 2009, 11:19:03 PM »
Quote
Eh, I'd still use the op-amp and feed that into the ADC section of the mirco.

I'll just run enough current through the thermistor or the current-limiting resistor in series with it to generate a voltage somewhere in the 0-5v ADC range.

Quote
Still, you'll have to do lots of calibration work to figure out how temps coordinate to voltage.

Maybe if I cared about general temperature control, but for just one temperature, all I have to do is obtain 20C water and poll the uC to see what voltage that corresponds to.

Quote
Very cool gadgets.  Pretty cheap, too.
There are cheap ones? The Omega temperature/process controller I bought for my now-mothballed PECVD chamber was about $800 of OPM. If I was going to care about PID, there is a PID library for Arduino. As it is, a simple on-off thermostat should be fine, considering the heat capacitance of the water bath.
Maybe a rare occurence, but then you only have to get murdered once to ruin your whole day.
--Tallpine

RocketMan

  • Mad Rocket Scientist
  • friend
  • Senior Member
  • ***
  • Posts: 13,625
  • Semper Fidelis
Re: Clever temperature transducer for microcontroller
« Reply #8 on: July 31, 2009, 11:22:53 PM »
:O

For the love of... Containment systems, man!

What's next; distilling pure hydrogen cyanide on your kitchen table?  =D

I may have to try that sometime.  =D

Actually, this occurred at a commercial GaAs foundry.  When the ampule failed, the gaseous arsenic reacted violently (it is an exothermic reaction with O2), as in "Booom!", and blew the furnace and containment apart.
This was in a Bridgman horizontal gradient freeze furnace.

I've also seen it happen in a Liquid Encapsulated Czochralski furnace.  It was really entertaining when the inch thick quartz viewing window blew out and bounced off the 30+ foot ceiling...

Ah, the fun of working in the semiconductor industry. =D
If there really was intelligent life on other planets, we'd be sending them foreign aid.

Conservatives see George Orwell's "1984" as a cautionary tale.  Progressives view it as a "how to" manual.

My wife often says to me, "You are evil and must be destroyed." She may be right.

Liberals believe one should never let reason, logic and facts get in the way of a good emotional argument.

Physics

  • ∇xE=-1/c·∂B/∂t, ∇·E=4πρ, ∇·B=0, ∇xB=1/c·∂E/∂t, F=q(E+v/cxB)
  • friend
  • Senior Member
  • ***
  • Posts: 1,315
Re: Clever temperature transducer for microcontroller
« Reply #9 on: August 01, 2009, 12:03:33 AM »
I may have to try that sometime.  =D

Actually, this occurred at a commercial GaAs foundry.  When the ampule failed, the gaseous arsenic reacted violently (it is an exothermic reaction with O2), as in "Booom!", and blew the furnace and containment apart.
This was in a Bridgman horizontal gradient freeze furnace.

I've also seen it happen in a Liquid Encapsulated Czochralski furnace.  It was really entertaining when the inch thick quartz viewing window blew out and bounced off the 30+ foot ceiling...

Ah, the fun of working in the semiconductor industry. =D

Damn, I always wanted to be a cz engineer.  I found that and float zone refining to be so cool.  I've never managed to be present during a pull, but I do have a few aborted Si ingots that are pretty small.  They look like little tops.  =)

Luckily my time in semiconductors has been passed in relative quiet, except when I found cracks and holes in the HF gloves!!!   :O  They got replaced lickety split though, when I started complaining.  I might not mind working with nasty crap but I at least want some good equipment to back up my brain. 
« Last Edit: August 01, 2009, 12:06:48 AM by Physics »
In the world of science, there is physics.  Everything else is stamp collecting.  -Ernest Rutherford

zahc

  • friend
  • Senior Member
  • ***
  • Posts: 5,799
Re: Clever temperature transducer for microcontroller
« Reply #10 on: August 01, 2009, 09:59:22 AM »
Quote
Luckily my time in semiconductors has been passed in relative quiet, except when I found cracks and holes in the HF gloves!!!

Several weeks ago someone put HF into an isopropyl alcohol wash bottle and left it in our lab. This is not funny or amusing as anyone familiar with HF would know. This is what happens when you have a fleet of inexperienced graduate students doing slave labor over dangerous chemicals and tools for completely unaccountable and largely uninvolved professors. Academic research nowadays is very wild-west if you ask me.
Maybe a rare occurence, but then you only have to get murdered once to ruin your whole day.
--Tallpine

280plus

  • friend
  • Senior Member
  • ***
  • Posts: 19,131
  • Ever get that sinking feeling?
Re: Clever temperature transducer for microcontroller
« Reply #11 on: August 01, 2009, 12:50:24 PM »
Quote
What's next; distilling pure hydrogen cyanide on your kitchen table?
Is that a no-no?  :laugh:
Avoid cliches like the plague!

Physics

  • ∇xE=-1/c·∂B/∂t, ∇·E=4πρ, ∇·B=0, ∇xB=1/c·∂E/∂t, F=q(E+v/cxB)
  • friend
  • Senior Member
  • ***
  • Posts: 1,315
Re: Clever temperature transducer for microcontroller
« Reply #12 on: August 01, 2009, 12:50:56 PM »
Several weeks ago someone put HF into an isopropyl alcohol wash bottle and left it in our lab. This is not funny or amusing as anyone familiar with HF would know. This is what happens when you have a fleet of inexperienced graduate students doing slave labor over dangerous chemicals and tools for completely unaccountable and largely uninvolved professors. Academic research nowadays is very wild-west if you ask me.

HF shouldn't even be leaving it's hood.  I guess at least they didn't put it in glass, but damn I would have been having words with someone over that.  Of course, I would know who did it in my lab, everyone but me is too scared to even use HF.  Yet they will stick a bottle of perchloric acid in the hood and not think twice.  :O  I'm glad I missed that event.  

I don't think research is wild west at all.  Safety is a major concern in my lab, but the PI can only do so much.  He can't force his students to follow proper procedures but he can provide the training required for the students to be knowledgeable.  If grad students are not being trained in proper safety protocol, something is wrong.  PPE's will not protect you from dumb; gloves and face masks and the like are always your last line of defense, not your first.  Why should the PI be held responsible when your safety is your responsibility?  That said gross safety violations should end someones position in a lab, I don't want to work with someone who is causing accidents all the time.  Especially when things like HF are being toyed with.  If you can't trust your colleagues, there is a problem.

In the world of science, there is physics.  Everything else is stamp collecting.  -Ernest Rutherford