Introduction
Diodes (or p-n junctions) make extremely low-cost temperature sensors! They are convenient, especially since they can be included on the silicon as part of larger designs into integrated circuits (ICs) - it costs almost nothing to include one : )
There are many dedicated ICs of course too, that use a p-n junction as a temperature sensor, and wrap an analog-to-digital converter (ADC) and a simple interface such as I2C around it. Again they are low-cost, and it is not unusual in large designs to have several of these or maybe a dozen or more inside a chassis! They provide great information about the state of the surrounding hardware, so that fans can kick in, or devices can produce alerts if something goes wrong.
All p-n junctions have a forward voltage drop, known as VF. That voltage drop is approximately 0.6-0.7V, but it reduces as temperature rises, by a few millivolts per degree C! That's the secret to using such junctions as temperature sensors.
A discrete diode, or a couple of legs of a discrete transistor, can also be used as a temperature sensor too, but it is not very common these days, because it would cost more to add the additional circuitry (to amplify up the few millivolts signal), compared to buying a chip. However, they can also be used as a form of analog compensation for circuits that drift with temperature. If a circuit has a positive temperature coefficient, then a diode could be used to null it out! This was the motivation (and see Even More on Current Sources and a Kelvin (4-Wire) Milliohm Meter for more information) to try and better understand the VF behaviour. This blog post briefly discusses an experiment that was done to try to find out more precisely how much VF shifts by, as temperature changes.
Measuring VF
The forward voltage, as mentioned, varies with temperature, and that's the key to it being used as a temperature sensor. However, VF also changes depending on the amount of current passing through the p-n junction. And then just to make things worse, it could changes from one device to another. According to jc2048 a typical value recorded in many older books is to expect -2.5mV/degC change in the forward voltage, as temperature changes. The aim of this blog post is to find this value experimentally.
To measure VF, a constant current is passed through the junction, and the voltage is measured across it. For the test, current values of 1,2,3,4,5,6 mA were used.
I decided to test at room temperature, and at close to 100 degrees C, and then use these values to work out the VF gradient over the temperature range, which would be the temperature coefficient. The reason to select these temperatures is because I could achieve them with stability for long enough to take measurements. I'm not an expert in this, as I understand the experts would use scenarios involving glycol and refrigerators.
Selecting Components
I initially picked a 1N457 diode, because a Texas Instruments LM334 PDF document happened to mention its temperature coefficient was -2.5mV/degC. But I also chose some popular transistors, because a Diode Based Temperature Measurement PDF document, also from TI, suggested that using a BJT was better because it has a more consistent temperature coefficient.
These were the selected devices:
Ref | Part | Mnfr | Farnell Code |
A | 2N3904 | Nat Semi | |
B | 2N3904TA2N3904TA | On Semi | 9846743 |
C | BC547BTFBC547BTF | On Semi | 2453790 |
D | BC547CZL1GBC547CZL1G | On Semi | 9558578 |
E | BC547C | Fairchild | |
F | 1N4571N457 | On Semi | 1467558 |
It was a deliberate decision to try to pick components from different manufacturers, so see if this made a difference. All parts were from reputable sources (the ones without a Farnell code were either purchased from Farnell or from Future Electronics, but I cannot track those any more, I'd had those for many years). The photo shows the assembled parts from right-to-left, A-F. The base and collector were shorted as the TI document had them in their schematics.
Building the Testbed
Epoxy glue (Araldite Rapid) was put on the component legs, in an aim to waterproof the joints. After it had set it was repeated for a total of 4 layers, to have confidence that all was sealed. A PT100 probe was also attached to the assembly, just to confirm water temperature. Next, tests were done at room temperature (see further below).
After the room temperature tests, further tests at 100 degrees C were needed. The assembly was attached to a stick and suspended inside a pan/pot. A PT100 temperature probe was also attached.
For the current source, a process calibrator was used, since these are portable and easy to move into a kitchen. For the VF measurement and temperature measurement, handheld multimeters were used. The PT100 provides a resistance that varies with temperature, so a normal multimeter set to ohms range can be used, and there are tables (and online calculators) to convert to a temperature reading.
Running the Tests
The procedure was to clip the current source and multimeter set to Volts together in parallel, and then connect to each component in turn, and record the measurement. For the 100 degree C test, the water was boiled, and kept on a medium heat. The PT100 probe confirmed that the temperature was close to 100 degrees C (to within about 0.2 degrees C) throughout the test.
Results
The results that were captured are recorded here:
VF (V) | ||||||
Current (mA) | A | B | C | D | E | F |
temperature: | 24.5 | |||||
1 | 0.6734 | 0.676 | 0.6351 | 0.6356 | 0.6093 | 0.674 |
2 | 0.6916 | 0.6945 | 0.6538 | 0.6544 | 0.6278 | 0.708 |
3 | 0.7025 | 0.7055 | 0.665 | 0.6657 | 0.6388 | 0.728 |
4 | 0.7103 | 0.7136 | 0.6732 | 0.674 | 0.6468 | 0.7424 |
5 | 0.7164 | 0.7199 | 0.6797 | 0.6806 | 0.6531 | 0.7536 |
6 | 0.7215 | 0.725 | 0.6851 | 0.6862 | 0.6583 | 0.7626 |
temperature: | 99.82 | |||||
1 | 0.522 | 0.5248 | 0.4744 | 0.4752 | 0.4436 | 0.5355 |
2 | 0.5451 | 0.5486 | 0.4982 | 0.4994 | 0.4661 | 0.577 |
3 | 0.5592 | 0.5624 | 0.5125 | 0.5146 | 0.4807 | 0.6014 |
4 | 0.5686 | 0.5719 | 0.5222 | 0.527 | 0.4903 | 0.6185 |
5 | 0.5763 | 0.5808 | 0.5293 | 0.539 | 0.4988 | 0.6321 |
6 | 0.5839 | 0.587 | 0.537 | 0.5494 | 0.5053 | 0.6434 |
The temperature coefficient was the difference in VF, divided by the difference in temperature:
Current (mA) | A 2N3904 Nat Semi | B 2N3904TA2N3904TA On Semi | C BC547BTFBC547BTF On Semi | D BC547CZL1G On Semi | E BC547C Fairchild | F 1N457 On Semi |
1 | -2.01 | -2.01 | -2.13 | -2.13 | -2.2 | -1.84 |
2 | -1.95 | -1.94 | -2.07 | -2.06 | -2.15 | -1.74 |
3 | -1.9 | -1.9 | -2.02 | -2.01 | -2.1 | -1.68 |
4 | -1.88 | -1.88 | -2 | -1.95 | -2.08 | -1.64 |
5 | -1.86 | -1.85 | -2 | -1.88 | -2.05 | -1.61 |
6 | -1.83 | -1.83 | -1.97 | -1.82 | -2.03 | -1.58 |
The TI document referred to earlier had this chart for a typical transistor:
It can be seen that the experimental results were similar, they are very close.
The forward voltage versus current was also plotted, just for interest:
As expected, the VF value increased as the current through the p-n junction was increased.
Summary
The results show that for the two BC547 series diodes from On Semi (components C and D) had very similar behavior, especially at the lower currents, whereas the BC547 from Fairchild had a difference.
Surprisingly, the two 2N3904 devices from different manufacturers (Nat Semi and On Semi) had near identical behavior!
Also, it showed that perhaps -2.5mV/deg C is no longer as close an approximation as it could be; maybe -2mV/deg C is a more accurate general approximation.
Ideally more tests should be done, especially to see if there are any differences in many samples from one batch to another, and at different temperatures, but I hope the small bit of information here is nevertheless useful, or it might provide ideas for anyone who wishes to improve on the procedures. Thanks for reading! Also, thanks to fmilburn for working on a milliohm meter, which led to these measurements.
Top Comments