Author Topic: transistor as a temperature sensor  (Read 10444 times)

0 Members and 1 Guest are viewing this topic.

Offline RenesasTTopic starter

  • Newbie
  • Posts: 5
  • Country: jp
transistor as a temperature sensor
« on: December 26, 2016, 10:40:08 am »
Hello All,

I am new to this forum. Please consider my question even if it is a silly one.

In my project I want to detect temperature of particular vessel by using MMBT3904 transistor.  I am using SMD transistor. I have connected base of transistor to the ADC pin of my micro controller and emitter of transistor to ground. Collector of transistor is open.

For getting temperature value at ADC pin, the emitter should require bias current. Once emitter will be biased, i will get ADC values of temperature.

Now thing is that, suppose I am biasing it with Digital multi meter then I am getting adc value as 145 at room i.e temperature of room (as my ADC is of 10 bits ) and the value in digital multi meter is 0.665 V. Generally digital multi meter has bias current as approx 100 micro Amp.

I don't want to connect digital multi meter. I have to connect constant current source of 500 micro ampere current with the same adc value i.e 145.

Please help me with this. If other information is required, please let me know.

Awaiting for your reply.
 

Offline johnwa

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: au
    • loopgain.net - a few of my projects
Re: transistor as a temperature sensor
« Reply #1 on: December 26, 2016, 11:42:23 am »
Hi RenesasT,

There is a simple solution to your problem. All you need is a resistor from your positive supply to the base of the transistor. Eg, for a 5V supply, to give 500uA, us R=V/I = (5-0.665)/0.0005=8670 ohms. A 10k will be fine if you adjust the calibration a bit in your software. This is not a perfect 500uA current source, but will be adequate for your needs.

Using a transistor (or a diode, which will also work) is good for a cheap temperature sensor, but if you want less hassles with calibration, you might want to look at something like an LM60.

 

Offline RenesasTTopic starter

  • Newbie
  • Posts: 5
  • Country: jp
Re: transistor as a temperature sensor
« Reply #2 on: December 26, 2016, 11:55:26 am »
Hello johnwa,

Thanks for the reply.

I will do this and will check once. But I need a constant current source for any supply voltage with the same value at my ADC at room temperature.

Please suggest the same.

I will be happy if my problem resolves by resistor method or need to find another solution.
 

Offline johnwa

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: au
    • loopgain.net - a few of my projects
Re: transistor as a temperature sensor
« Reply #3 on: December 26, 2016, 12:31:28 pm »
What type of system is this microcontroller in? Surely you will have a regulated supply (e.g. 5V or 3.3V) powering the microcontroller? If you have a microcontroller board that you are feeding with an external unregulated supply, there will probably be a voltage regulator on the board that you can tap into.

However, I think you will have to abandon your idea of getting exactly 145 as your ADC count every time. Due to component tolerances, you will always end up with some error, which you will have to either accept or calibrate out. Calibration could be done by replacing the resistor with a trimpot, but it would probably be better to do it in software.

Note also that you appear to be using a 5V reference voltage for your ADC, which gives a voltage resolution of 5/(2^10)=~5mV. Given that 1 degree C change in temperature corresponds to a voltage change of 2mV, your reading will only ever be accurate to around 2 degrees anyway.

These are all fairly basic calculations - you may want to read up on ADCs a bit.
 

Offline orolo

  • Frequent Contributor
  • **
  • Posts: 352
  • Country: es
Re: transistor as a temperature sensor
« Reply #4 on: December 26, 2016, 12:38:10 pm »
For the use of a PN junction to sense temperature, see Linear Technology AN137. A PNP diode connected transitor is superior to leaving the collector floating. A filtering cap is important to suppress noise.

For the constant current source, insensitive to voltage and temperature, you could use a voltage regulator, like TL431 or ATL431, and another transistor.
 

Offline snarkysparky

  • Frequent Contributor
  • **
  • Posts: 414
  • Country: us
Re: transistor as a temperature sensor
« Reply #5 on: December 26, 2016, 12:42:55 pm »
LM35 

Datasheet summary

The LM35 series are precision integrated-circuit
temperature devices with an output voltage linearlyproportional
to the Centigrade temperature. The
LM35 device has an advantage over linear
temperature sensors calibrated in Kelvin, as the user
is not required to subtract a large constant voltage
from the output to obtain convenient Centigrade
scaling. The LM35 device does not require any
external calibration or trimming to provide typical
accuracies of ±¼°C at room temperature and ±¾°C
over a full ?55°C to 150°C temperature range. Lower
cost is assured by trimming and calibration at the
wafer level. The low-output impedance, linear output,
and precise inherent calibration of the LM35 device
makes interfacing to readout or control circuitry
especially easy. The device is used with single power
supplies, or with plus and minus supplies. As the
LM35 device draws only 60 ?A from the supply, it has
very low self-heating of less than 0.1°C in still air. The
LM35 device is rated to operate over a ?55°C to
150°C temperature range, while the LM35C device is
rated for a ?40°C to 110°C range (?10° with
improved accuracy). The LM35-series devices are
available packaged in hermetic TO transistor
packages, while the LM35C, LM35CA, and LM35D
devices are available in the plastic TO-92 transistor
package. The LM35D device is available in an 8-lead
surface-mount small-outline package and a plastic
TO-220 package.
 

Offline johnwa

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: au
    • loopgain.net - a few of my projects
Re: transistor as a temperature sensor
« Reply #6 on: December 26, 2016, 01:05:58 pm »
For the use of a PN junction to sense temperature, see Linear Technology AN137. A PNP diode connected transitor is superior to leaving the collector floating. A filtering cap is important to suppress noise.


Nice find orolo, that looks quite comprehensive. Though I think I will stick with the LM60s, unless I am really in a penny-pinching mood...
 

Offline orolo

  • Frequent Contributor
  • **
  • Posts: 352
  • Country: es
Re: transistor as a temperature sensor
« Reply #7 on: December 26, 2016, 01:21:10 pm »
Nice find orolo, that looks quite comprehensive. Though I think I will stick with the LM60s, unless I am really in a penny-pinching mood...
I agree, there are many inexpensive, low power, low footprint temperature sensing ICs. LM60 is a good example.
 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: us
Re: transistor as a temperature sensor
« Reply #8 on: December 26, 2016, 05:28:41 pm »
I use a couple diodes in series to get you out of the muck and see a greater change. Those bits jump around quite a bit and need long averaging.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16617
  • Country: us
  • DavidH
Re: transistor as a temperature sensor
« Reply #9 on: December 26, 2016, 06:02:22 pm »
I prefer the AD590 and LM334 as temperature sensors because they can be used with two wires.  The LM334 is more flexible for temperature compensating other circuits.

RenesasT, look up "delta Vbe temperature measurement".  For a given fixed ratio of currents, the change in Vbe is proportional to absolute temperature so any suitable transistor or diode can be used to make accurate temperature measurements without calibration.

The Linear Technology application note that orolo linked sort of covers it but there are better references on how it can be done.  With a microcontroller, it becomes trivial with the addition of one output signal to switch the current.  Take a look at figure 11 on page 7 of Linear Technology application note 45.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5875
  • Country: de
Re: transistor as a temperature sensor
« Reply #10 on: December 26, 2016, 06:49:59 pm »
Motorola used to manufacture a transistor linearized for this use, MTS102/103/105.

Datasheet: http://pdf1.alldatasheet.com/datasheet-pdf/view/207566/MOTOROLA/MTS103.html

Whether they are still available is uncertain, but the datasheet gives application hints.


 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5875
  • Country: de
Re: transistor as a temperature sensor
« Reply #11 on: December 26, 2016, 09:32:51 pm »
Quote
But today I'd personally be inclined to use an purpose built IC with analog or digital output

I agree 100%, that would be my approach too. But the OP specifically asked for PN-junction sensing, which prompted my answer.

 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14199
  • Country: de
Re: transistor as a temperature sensor
« Reply #12 on: December 26, 2016, 10:15:36 pm »
usually a resistor to a reasonable stable 3.3 V or 5 V supply for the µC should be good enough for the current source. The diode is usually not that accurate anyway and it is not that sensitive to a minimal temperature dependence of the the current.

The typical slope is about -2 mV/K and can be quite well calculated from the voltage at room temperature. Ideal diodes (like many transistors) extrapolate to the same 124x mV at 0 K.  So a single point calibration could be good enough. To suppress 50 Hz / 60 Hz "noise" one might want to average over an interval of 16.6 or 20 ms or a multiple of that.

Getting only 145 counts at room temperature is a pretty poor resolution, so the DMM is not such good bias source.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16617
  • Country: us
  • DavidH
Re: transistor as a temperature sensor
« Reply #13 on: December 27, 2016, 06:57:00 am »
Motorola used to manufacture a transistor linearized for this use, MTS102/103/105.

Datasheet: http://pdf1.alldatasheet.com/datasheet-pdf/view/207566/MOTOROLA/MTS103.html

Whether they are still available is uncertain, but the datasheet gives application hints.

Those were intended for linear Vbe temperature measurement.  Essentially they are transistors graded for identical Vbe at a given current.  They would have been useful as matched transistors.

The bog standard 2N3904 or at least the ones from National and On Semiconductor work fine for delta Vbe temperature in my experience.  I actually got better results with the 2N3904 than with high gain transistors like the 2N5088 but that is probably to be expected.  I suspect the issue is that high hfe leads to poor Early voltage but I never tracked it down.

I expected that gold doped diodes like the 1N4148 and 1N914 would perform poorly but they work pretty well also.
« Last Edit: December 27, 2016, 07:03:14 am by David Hess »
 

Offline Gyro

  • Super Contributor
  • ***
  • Posts: 9505
  • Country: gb
Re: transistor as a temperature sensor
« Reply #14 on: December 27, 2016, 09:37:34 am »
I expected that gold doped diodes like the 1N4148 and 1N914 would perform poorly but they work pretty well also.

If you're intending to use an SMT part (like your MMBT3904) then a dual series diode SOT-23 package like the BAV99 with give you twice the temperature coefficient in a single device.
Best Regards, Chris
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: transistor as a temperature sensor
« Reply #15 on: December 27, 2016, 11:18:14 am »
Alternatively, use a Vbe multiplier circuit round the transistor.  With correctly chosen resistor values, one can get sensitivity as high as 10mV/degC, while still staying well within the rails over the temperature range -25 to +125 degC (given a 5V supply), with an output impedance of only a few K.

However either the pullup resistor should be driven by an output pin, or the ADC input switched to be an output and pulled low, to power down the Vbe multiplier between readings to minimise self-heating.
 

Offline prietess

  • Newbie
  • Posts: 2
  • Country: sg
Re: transistor as a temperature sensor
« Reply #16 on: June 11, 2017, 03:57:57 pm »
Hello!
I am now having similar problem to solve,
May I ask whether a transistor for this temperature sensor purpose (Vc will change as temperature change) needs to be working in active region for all the temperature range?

If my calculation says it is working in saturation for some temperature range, the question is wrong?

I am attaching the question that I am talking about.

I really appreciate anyone who would be able to help!
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: transistor as a temperature sensor
« Reply #17 on: June 11, 2017, 05:19:08 pm »
Saturation would certainly be suspicious, but without seeing the circuit no one can comment on where the mistake could be or even if it is a mistake. 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf