This article, part of AAC’s Analog Circuit Collection, presents a straightforward circuit that allows you to measure temperature with little more than a diode and a BJT.

If you’ve ever spent a Saturday afternoon browsing through the plots and performance curves in a diode datasheet, you’ve perhaps noticed an interesting detail: a standard silicon diode has a pleasantly linear relationship between forward voltage and temperature. For example, the following plot is taken from the datasheet for a 1N4148 diode made by Vishay:


Taken from this datasheet.


If forward current is held constant, forward voltage decreases linearly as temperature increases. Even if the forward current changes slightly, you can still make a decent thermometer, but the relationship between voltage and temperature is less linear. Another notable detail is that the magnitude of the slope increases as forward current decreases; in other words, the forward voltage is more sensitive to temperature variations at lower forward currents.

Let’s say you have a diode connected in such a way that its forward current doesn’t change very much. Let’s also say that the circuit has an active component that can amplify the diode’s rather small temperature-induced variations in forward voltage. Let’s even go so far as to say that you then connect this circuit to something that can convert these amplified forward-voltage variations into some sort of visible change (a multimeter comes to mind). If all this were to come to pass, what would you have? A thermometer is what you would have. A diode thermometer.


The Circuit

I would never have settled on a decent version of this circuit without the trial-and-error procedure made possible by LTspice. Here is the schematic:



This thing turned out to be much more complicated than I expected. I started with a circuit that was taken directly from an old textbook of mine. The LTspice schematic was identical to the circuit in the book, even down to the part numbers used for the diode and BJT. And as far as I can tell, the textbook version is barely functional. It most certainly doesn’t perform in accordance with the amplifier output vs. temperature plot that accompanies the circuit explanation.

The first change I made was to add R4 (the textbook circuit, in contrast, has the diode’s cathode connected directly to ground). This resistor increases the voltage at the diode’s anode to a level that is more effective for forward-biasing the BJT’s base-to-emitter junction. I also changed the BJT and diode to different parts, and eventually I even changed the connection arrangement of R2. To make a long story short, the circuit shown above is quite different from (and hopefully better than) the textbook version.

I’ll tell you right now that this article will not provide a precise, rigorous explanation of how I chose the resistor values. I consistently failed to thoroughly analyze or understand this circuit, and the final version shown above was arrived at by means of iterative simulations and much bewilderment.

Toward the end of my experimentation I realized something that is probably responsible for a large portion of the confusion that I experienced: my simulation changes the temperature of the entire circuit, whereas I was thinking only about the diode’s response to temperature changes. There are pn junctions in the BJT as well! If the diode is affected by temperature, so is the BJT. However, my goal was to design a circuit that could be used as a self-contained temperature sensor, not something where the diode is separated from the rest of the circuit, which means that my simulations are consistent with the objective.


Simulation Techniques

I won’t dwell on the procedures used to perform and plot temperature simulations in LTspice, because that information is available elsewhere (this page, for example). Instead I’ll briefly mention the key points:

  • Use a “.step temp ...” SPICE directive for the temperature variations; in my schematic I use the “.step temp min max increment” syntax.
  • An operating point simulation seems like the logical choice here, but as far as I can tell you have to do a transient simulation, even if you’re interested only in steady-state data.
  • To plot the relevant measurement against temperature instead of time, use a “.meas” SPICE directive to store the data for the relevant measurement (in my case, the BJT’s collector voltage). Then plot the data directly from the error log (more information here).



We know that a diode will produce voltage variations in response to changes in ambient temperature. If that were enough, we wouldn’t bother with the BJT circuit. The goal here is a circuit that amplifies the diode’s voltage variations and thereby produces a thermometer signal that is more capable of directly driving an indicator of some kind. So first let’s look at a plot of diode voltage vs. temperature.



As you can see, we have a nice linear relationship between voltage and temperature. However, the amplitude of the voltage response is quite small. Over a range of 60°C, the voltage changes only by ~70 mV. Compare this to the plot of output voltage vs. temperature.



The output voltage varies by about 1.7 V over the same range, a major improvement. I’m willing to call this a success, but I highly doubt that this circuit is anywhere near optimized. Also, the large amplification comes at a rather heavy price, namely, high current consumption. The following plot shows Q1’s collector current vs. temperature:



Unfortunately 50 mA doesn’t exactly qualify as low-power these days, and it doesn’t compare favorably with IC temperature sensors that presumably offer much better performance and yet have current consumption down in the low microamps.



I’ll be the first one to admit that this circuit is more of an intellectual exercise than a practical solution to temperature sensing. It’s possible, though, that someone more proficient than myself could come up with an optimized implementation that provides adequate performance along with reasonable power consumption and straightforward customization techniques.

If you would like to use my efforts as a starting point for your experimentation and analysis, feel free to download my LTspice schematic by clicking on the orange button.


  LTspice schematic  



  • tonyr1084 2018-02-18

    Years ago - don’t remember where or when, but it’s been decades since I’ve seen this but I could swear I’ve seen someone using three diodes in series as part of a temperature sensing device.  Could have been Radio Electronics or maybe Popular Electronics (before Popelectronics).  Any thoughts?

  • BnE 2018-02-22

    Using a diode as a temperature sensor makes much sense if a diode is already in place for other reasons, or if it can be integrated easier than other sensor types. Two examples:
    1. Measure the temperature of an (power-) LED just by using the LED itself.
    2. Measuring the silicon temperature in an IC,

  • cowades 2018-02-23

    Linear Tech app notes 45 and 137 (especially 137, even though 45 is more entertaining) will make you smile and start all over again. You will be able to make very good temperature measurements with a diode connected transistor.