BME280 vs TMP36

There have been a few posts on here about differences in readings from BME280s and some general reliability issues. I tried a comparison between three BME280s and two TMP36s and thought the result might be of general interest.

I’ve been building three temperature sensors to dot around the house, with small ePaper displays. Still on breadboard, they have been sitting on my monitor stand for months and I have noticed a regular difference of about 1 degree C between two of them. Wondering if a TMP36 would be more reliable, I added a couple of them to two of the devices with a BME280 and graphed the results. What I have found has been surprisingly consistent. I also grouped them tighter together on my desk further away from the heat of monitors and PCs.

For the BME280, I’m using the Adafruit_BME280 library, and for the TMP36, it is connected to an analog port, then uses the following code to read:

    float temp  = bme.readTemperature();    

    // Read the TMP36
    float tmpr = analogRead(TEMP); // Raw reading
    float tmpv = (tmpr * 3.3) / 4095.0;    // Convert to voltage
    tmpTemp = (tmpv - 0.5)*100;
    float tmpDiff = temp-tmpTemp;

I calculate the difference in temperature between the two devices to see if it is consistent.

The graph after a day is:

One TMP36 read consistently higher than the other. Out of the 5 temperature sensing devices, one was always the highest (in green) and one was always the lowest (in yellow). The difference was about 2 degrees. The biggest difference in the BME280s was about 0.7 degrees, making up the blue, grey and purple lines in the middle.

On the same Particle device, one TMP36 was consistently 0.5-1 degree higher than the BME280, while on the other one the difference was anywhere between 1 and 2.5 degrees lower, with 1.5 degrees lower being the most common difference.

My conclusions are that each device is (as specified) within a certain percentage of the exact temperature. Read high or read low, whatever the difference it is, it sticks to it. With one TMP36 higher and one lower, the TMP36 does not seem to be any better or more accurate than the BME280. The BME280s are far more consistent between each other. Some people have said they can report a little high. If that is true they all seem to report high by the same amount. Calibrating with a TMP36 isn’t going to help and you probably need a much higher quality sensor.

If you are trying to decide between them, then it comes down to a cost & functionality decision as the BME280 also measures pressure and humidity. However I have had two BME280 units go quite erratic before failing. The TMP36 is more moisture resistant and I think you can get it in a waterproof package.

My initial issue that I noticed a regular 1-1.5 degree difference in the two BME280s, it turns out after this experiment that one part of my monitor stand really is that much hotter over quite a small space. I should have just swapped over their locations!


Nice analysis! I use both sensors. Also worth noting:

  • The BME280 is very tiny with a lot of pins and kind of a pain to reflow solder. Connecting by I2C is handy because it’s a shared bus.
  • The TMP36 in the SOT-23-5 package is way easier to solder, and does not require a software library to read the temperature. It’s also inexpensive.

Great job and thanks for sharing !

I’ll add that I liked the TMP37 over the TMP36 for applications where freezing wasn’t expected.
I cant find my validation trial results, but the 37’s grouped tighter for me (verses 36’s).
But since there’s no offset, the 37’s are no good if you approach freezing temp.

@DaveH Awesome analysis, thank you!

I use the TMP36 on my carrier boards to monitor the temperature inside my enclosures. This is important in outdoor applications where you need to ensure you are in the safe range for LiPO charging. In my use case, exact accuracy is not as important.

Still, you got me thinking that using the BME280 would enable me to also monitor humidity inside the enclosure and alert if water is getting in…

Thanks again!

1 Like

@chipmc good idea on water intrusion.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.