PIC example : using a diode as temperature sensor

Hi,

I would like to share this idea with you :

formatting link

I describe how to use a simple silicon diode as a temperature sensor with a PIC, to make a cheap, quick and nasty digital thermometer

Questions & comments are welcome !

Thanks,

Bruno

Reply to
BrunoG
Loading thread data ...

formatting link

a

Nice pictures. One thing though (I am so sorry, but I can't help myself): it is "analog" not "analogic".

--DF

Reply to
Deefoo

Yes, looks interesting. Here is an experiment I put together. It uses a second diode to ballance out the one sensing temperature. With the values shown, I get about a 1 volt change with my finger on one of the diodes. Also, this circuit works with just a +5 supply on the op-amp making it great for interface to microcontrollers.

formatting link

Luhan

Reply to
Luhan

Yepp. Nice interface. Simple and efficient. Once calibrated, a diode (or a transistor tied B&C together) works very fine for temp sensing. BTDT, many times. A BC558 placed at the end of a self-sealing heat shrinking tube is even a good sensor for non-aggressive liquids.

IMO one thing should be considered: Since Uf is a function of Id, a current source driving the sensing diode (be aware of self-heating of the sensor) will yield best results.

Heinz

Reply to
Heinz Liebhart

That effect should be small because the diode voltage changes very little compared to 5 volts. I wonder more what the effect of current coming from the feedback resistor has on the linearity of the circuit.

JT would know.

Luhan

Reply to
Luhan

"Deefoo" a écrit dans le message de news:

444784d4$0$6689$ snipped-for-privacy@news.wanadoo.fr...

Ouch ! You are right, sorry for the "frenchism"...

Thanks ;-)

Bruno

formatting link

Reply to
BrunoG

Hmmm, this change should keep the current virtually constant on both diodes...

formatting link

Luhan

Reply to
Luhan

Yep. So its use?

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
         Old Latin teachers never die...they just decline
Reply to
Jim Thompson

Ah, to measure temperature. If thats your question.

Luhan

Reply to
Luhan

But it doesn't. If the diodes are matched and at the same temperature the output is simply of value "Vbe", -2mV/°C... you don't need an OpAmp for that.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
         Old Latin teachers never die...they just decline
Reply to
Jim Thompson

I would use this design where one diode is the reference temperature and the other is physically located to measure the difference. What I like it that there is nothing to really adjust as in bridge circuits.

45 years doing this stuff and this a new one for me. Put it in my 'cheap and dirty' bag-o-pic-tricks.

Luhan

Reply to
Luhan

Write me an _exact_ equation for the output voltage as a function of temperature difference between the two diodes.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
         Old Latin teachers never die...they just decline
Reply to
Jim Thompson

Yep, that "trick" is a little too dirty for me. Luhan should keep looking and find the good tricks we do like.

--
 Thanks,
    - Win
Reply to
Winfield Hill

Sorry, I don't do equations unless I really have to.

You have your domain of expertise; I have mine. Thats the way it goes sometimes if you are entirely self-educated in your field, as I am. My analog background is weak on theory, for sure. I have mostly abandon digital logic except where the speed is necessary, but I do really well integrating software and hardware into a design. My employers and clients really like the kind of work I've done for them.

The reason this makes me a real engineer is simple - they pay me to be one! You would not be the first 'old guard' engineer that was somewhat distressed at this situation.

Luhan

Reply to
Luhan

Come on, Luhan. I'm losing respect for you. Knock off the BS and please explain, in general terms, how it works.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
         Old Latin teachers never die...they just decline
Reply to
Jim Thompson

Ok, since you ask that way....

Both diodes are get about the same current - so the voltages should be near equal. Since the voltage at the (-) input at the op-amp is also the same, no additional current flows thru the 2k resistor.

This should mean that the op-amp output has the same linearity with respect to temperature as the diodes themselves - only conveniently amplifed for whatever intended use.

Mental approximations for sure. Have I missed anything here?

Luhan

Reply to
Luhan

Only what happens as soon as the two diodes are at different temperatures ;-)

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
         Old Latin teachers never die...they just decline
Reply to
Jim Thompson

It's missing at least one resistor.

--
 Thanks,
    - Win
Reply to
Winfield Hill

(phone call came in)

Ok, the diode on the negative inputs voltage drops when heated. The gain into the negative intput looks like 50, so the output would reflect that.

Don't ask what happens when the other diode heats other than it will drive the output to ground so its not very usable.

Luhan

Reply to
Luhan

Ooops, on the schematic I posted, I showed a 470k (not 100k as on my bench here), so the gain would be 470 / 2 = 235.

Reply to
Luhan

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.