{"id":87441,"date":"2019-07-26T11:28:12","date_gmt":"2019-07-26T11:28:12","guid":{"rendered":"https:\/\/randomnerdtutorials.com\/?p=87441"},"modified":"2019-07-26T11:28:17","modified_gmt":"2019-07-26T11:28:17","slug":"dht11-vs-dht22-vs-lm35-vs-ds18b20-vs-bme280-vs-bmp180","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/dht11-vs-dht22-vs-lm35-vs-ds18b20-vs-bme280-vs-bmp180\/","title":{"rendered":"DHT11 vs DHT22 vs LM35 vs DS18B20 vs BME280 vs BMP180"},"content":{"rendered":"\n<p>There are a wide variety of temperature sensors compatible with Arduino, ESP32, ESP8266 and other development boards. So, it can be difficult to to pick up the most suitable sensor for your project. In this article, we&#8217;ll compare 6 widely used temperature sensors: DHT11, DHT22, LM35, DS18B20, BME280 and BMP180.  <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/DHT11-DHT22-LM35-DS18B20-BME280-BMP180.jpg?resize=1200%2C675&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"DHT11 vs DHT22 vs LM35 vs DS18B20 vs BME280 vs BMP180 Temperature Sensors\" class=\"wp-image-87868\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/DHT11-DHT22-LM35-DS18B20-BME280-BMP180.jpg?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/DHT11-DHT22-LM35-DS18B20-BME280-BMP180.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/DHT11-DHT22-LM35-DS18B20-BME280-BMP180.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/DHT11-DHT22-LM35-DS18B20-BME280-BMP180.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure><\/div>\n\n\n\n<p>We&#8217;ll compare the sensors when it comes to communication protocol, temperature range, accuracy, ease of use and much more. <\/p>\n\n\n\n<p>We also run a simple experiment in which we measured the temperature in the same environment using all temperature sensors over time. With this experiment we could see how the sensors react to temperature changes. We&#8217;ve ran this experiment for approximately 36 hours and we&#8217;ll show you the results later in this article.<\/p>\n\n\n\n<p><strong>Recommended reading:<\/strong> <a href=\"https:\/\/randomnerdtutorials.com\/9-arduino-compatible-temperature-sensors-for-your-electronics-projects\/\">9 Arduino Compatible Temperature Sensors for Your Electronics Projects<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Comparing Temperature Sensors: DHT11 vs DHT22 vs LM35 vs DS18B20 vs BME280 vs BMP180<\/h2>\n\n\n\n<p>For a quick comparison of the sensors, we&#8217;ve put together the following table that shows the most important information when it comes to select a temperature sensor namely: communication protocol, supply voltage, temperature range and accuracy.<\/p>\n\n\n\n<p><strong>Note:<\/strong> the table scrolls horizontally both on desktop computer, tablet and mobile.<\/p>\n\n\n\n<table class=\"wp-block-table rnt-responsive-table rnt-table-small\"><tbody><tr><td><\/td><td><center><img data-recalc-dims=\"1\" decoding=\"async\" width=\"40\" height=\"57\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/04\/dht11_bb.png?resize=40%2C57&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" class=\"wp-image-84265\"><\/center><\/td><td><center><img data-recalc-dims=\"1\" decoding=\"async\" width=\"40\" height=\"57\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/04\/dht22_bb.png?resize=40%2C57&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" class=\"wp-image-84270\"><\/center><\/td><td><center><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/LM35DZ.png?w=1200&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" class=\"wp-image-84270\"><\/center><\/td><td><center><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/DS18B20-waterproof.jpg?w=1200&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" class=\"wp-image-84270\"><\/center><\/td><td><center><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/BME280.jpg?w=1200&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" class=\"wp-image-84270\"><\/center><\/td><td><center><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/BMP180.png?w=1200&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" class=\"wp-image-84270\"><\/center><\/td><\/tr><tr><td><strong>Sensor<\/strong><\/td><td><strong>DHT11<\/strong><\/td><td><strong>DHT22 (AM2302)<\/strong><\/td><td><strong>LM35<\/strong><\/td><td><strong>DS18B20<\/strong><\/td><td><strong>BME280<\/strong><\/td><td><strong>BMP180<\/strong><\/td><\/tr><tr><td><strong>Measures<\/strong><\/td><td>Temperature<br>Humidity<\/td><td>Temperature<br>Humidity <\/td><td>Temperature<\/td><td>Temperature<\/td><td>Temperature<br>Humidity<br>Pressure<\/td><td>Temperature<br>Pressure<\/td><\/tr><tr><td><strong>Communication<br>protocol<\/strong><\/td><td>One-wire <\/td><td>One-wire <\/td><td>Analog<\/td><td>One-wire<\/td><td>I2C<br>SPI<\/td><td>I2C<\/td><\/tr><tr><td><strong>Supply<br>voltage<\/strong><\/td><td>3 to 5.5V DC<\/td><td>3 to 6V DC<\/td><td>4 to 30 V DC<\/td><td>3 to 5.5V DC<\/td><td>1.7 to 3.6V (for the chip) 3.3 to 5V for the board<\/td><td>1.8 to 3.6V (for the chip) 3.3 to 5V for the board<\/td><\/tr><tr><td><strong>Temperature<br>range<\/strong><\/td><td>0 to 50\u00baC<\/td><td>-40 to 80\u00baC<\/td><td>-55 to 150\u00baC<\/td><td>-55 to 125\u00baC<\/td><td>-40 to 85\u00baC<\/td><td>0 to 65\u00baC<\/td><\/tr><tr><td><strong>Accuracy<\/strong><\/td><td>+\/- 2\u00baC (at 0 to 50\u00baC)<\/td><td>+\/- 0.5\u00baC (at -40 to 80\u00baC)<\/td><td>+\/-0.5\u00baC (at 25\u00baC)<\/td><td>+\/-0.5\u00baC (at -10 to 85\u00baC)<\/td><td>+\/-0.5\u00baC (at 25\u00baC)<\/td><td>+\/-0.5\u00baC (at 25\u00baC)<\/td><\/tr><tr><td><strong>Support<br>(Arduino IDE)<\/strong><\/td><td><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/adafruit\/DHT-sensor-library\" target=\"_blank\">Adafruit DHT Library<br><\/a><br><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/adafruit\/Adafruit_Sensor\" target=\"_blank\">Adafruit Unified Sensor Library<\/a> <\/td><td><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/adafruit\/DHT-sensor-library\" target=\"_blank\">Adafruit DHT Library<br><\/a><br><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/adafruit\/Adafruit_Sensor\" target=\"_blank\">Adafruit Unified Sensor Library<\/a> <\/td><td>analogRead()<\/td><td><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/milesburton\/Arduino-Temperature-Control-Library\" target=\"_blank\">DallasTemperature<\/a><br><br><a href=\"https:\/\/github.com\/PaulStoffregen\/OneWire\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">OneWire<\/a> <\/td><td><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/adafruit\/Adafruit_BME280_Library\" target=\"_blank\">Adafruit BME280 library<br><\/a><br><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/adafruit\/Adafruit_Sensor\" target=\"_blank\">Adafruit Unified Sensor Library<\/a> <\/td><td><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/adafruit\/Adafruit-BMP085-Library\" target=\"_blank\">Adafruit BME085<br><\/a><br><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/adafruit\/Adafruit_Sensor\" target=\"_blank\">Adafruit Unified Sensor Library<\/a> <\/td><\/tr><tr><td><strong>Support<br>(MicroPython)<\/strong> <\/td><td><strong>dht <\/strong>module (included in MicroPython firmware)<\/td><td><strong>dht <\/strong>module (included in MicroPython firmware) <\/td><td>from machine import ADC<br>ADC().read<\/td><td><strong>ds18b20 <\/strong>module (included in MicroPython firmware)<\/td><td><a href=\"https:\/\/github.com\/RuiSantosdotme\/ESP-MicroPython\/blob\/master\/code\/WiFi\/HTTP_Client_IFTTT_BME280\/BME280.py\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"BME280 Adafruit Library (opens in a new tab)\">BME280 Adafruit Library<\/a><\/td><td><a href=\"https:\/\/github.com\/robert-hh\/BMP085_BMP180\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"BMP180 module (opens in a new tab)\">BMP180 module<\/a><\/td><\/tr><tr><td><strong>Where to buy?<\/strong><\/td><td><a href=\"https:\/\/makeradvisor.com\/tools\/dht11-temperature-humidity-sensor\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Check prices (opens in a new tab)\">Check prices<\/a><\/td><td><a href=\"https:\/\/makeradvisor.com\/tools\/dht22-temperature-humidity-sensor\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Check prices  (opens in a new tab)\">Check prices <\/a><\/td><td><a href=\"https:\/\/makeradvisor.com\/tools\/lm35-lm35dz-temperature-sensor\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Check prices  (opens in a new tab)\">Check prices <\/a><\/td><td><a href=\"https:\/\/makeradvisor.com\/tools\/ds18b20-temperature-sensor-2\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Check prices<\/a> <br><a rel=\"noreferrer noopener\" aria-label=\"Check prices (waterproof) (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/ds18b20-digital-temperature-sensor\/\" target=\"_blank\">Check prices (waterproof)<\/a><\/td><td><a href=\"https:\/\/makeradvisor.com\/tools\/bme280-sensor-module\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Check prices <\/a><\/td><td><a href=\"https:\/\/makeradvisor.com\/tools\/bmp180-barometric-sensor\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Check prices<\/a> <\/td><\/tr><\/tbody><\/table>\n\n\n\n<h2 class=\"wp-block-heading\">DHT11 vs DHT22 (AM2302)<\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"442\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/04\/DHT11-DHT22-Temperature-Humidity-Sensor.jpg?resize=750%2C442&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"DHT11 vs DHT22 Temperature and Humidity Sensor\" class=\"wp-image-84441\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/04\/DHT11-DHT22-Temperature-Humidity-Sensor.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/04\/DHT11-DHT22-Temperature-Humidity-Sensor.jpg?resize=300%2C177&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n\n<p>The <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/dht11-temperature-humidity-sensor\/\" target=\"_blank\">DHT11<\/a> and <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/dht22-temperature-humidity-sensor\/\" target=\"_blank\">DHT22 (AM2302)<\/a> are digital temperature sensors that measure temperature and humidity. They look very similar and work the same way, but have different specs. <\/p>\n\n\n\n<p>Both sensors can be powered either with 3.3V or 5V. So, you can easily use them in your Arduino or ESP projects.<\/p>\n\n\n\n<p>The DHT22 sensor has a better resolution and a wider temperature and humidity measurement range. However, it&#8217;s a bit more expensive and you can only request readings with 2 seconds interval.<\/p>\n\n\n\n<p>The DHT11 is slightly cheaper, it has a smaller range, and it\u2019s less accurate. But you can get sensor readings every second.<\/p>\n\n\n\n<p>Despite their differences, they work in a similar way, and you can use the same code to read temperature and humidity. You just need to select in the code the sensor type you\u2019re using.<\/p>\n\n\n\n<p>So, if you&#8217;re willing to spend an extra dollar, we recommend the <a rel=\"noreferrer noopener\" aria-label=\"DHT22 (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/dht22-temperature-humidity-sensor\/\" target=\"_blank\">DHT22<\/a> over the DHT11.<\/p>\n\n\n\n<p>We have several guides on how to use the DHT11 and DHT22 sensors:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-dht11-dht22-temperature-humidity-sensor-arduino-ide\/\"><strong>ESP32 (Arduino IDE)<\/strong> with DHT11\/DHT22 Temperature and Humidity Sensor<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/esp8266-dht11dht22-temperature-and-humidity-web-server-with-arduino-ide\/\"><strong>ESP8266 (Arduino IDE)<\/strong> DHT11\/DHT22 Temperature and Humidity Web Server<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/complete-guide-for-dht11dht22-humidity-and-temperature-sensor-with-arduino\/\"><strong>Arduino<\/strong> with DHT11\/DHT22 Humidity and Temperature Sensor<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/micropython-esp32-esp8266-dht11-dht22-web-server\/\"><strong>ESP32\/ESP8266 (MicroPython)<\/strong> with DHT11\/DHT22 Web Server<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">LM35, LM335 and LM34<\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"421\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/LM35-breadboard.jpg?resize=750%2C421&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"LM35 LM335 and LM34 Analog Temperature Sensor\" class=\"wp-image-87518\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/LM35-breadboard.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/LM35-breadboard.jpg?resize=300%2C168&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n\n<p>The <a rel=\"noreferrer noopener\" aria-label=\"LM35 (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/lm35-lm35dz-temperature-sensor\/\" target=\"_blank\">LM35<\/a>, <a rel=\"noreferrer noopener\" aria-label=\"LM335  (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/lm335-temperature-sensor\/\" target=\"_blank\">LM335 <\/a>and <a rel=\"noreferrer noopener\" aria-label=\"LM34 (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/lm34-temperature-sensor\/\" target=\"_blank\">LM34<\/a> are linear temperature sensors that output a voltage proportional to the temperature value. The LM35 comes calibrated in Celsius degrees, the LM335 in Kelvin and the LM34 in Fahrenheit. So, depending on the temperature units you&#8217;ll use in your project, one of these sensors might be more practical than the other.<\/p>\n\n\n\n<p>We recommend using the <a rel=\"noreferrer noopener\" aria-label=\"LM35 (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/lm35-lm35dz-temperature-sensor\/\" target=\"_blank\">LM35<\/a> or <a rel=\"noreferrer noopener\" aria-label=\"LM34 (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/lm34-temperature-sensor\/\" target=\"_blank\">LM34<\/a> instead of the LM335, because subtracting a large number to the LM335 measurements to convert the temperature from Kelvin can compromise the results accuracy.<\/p>\n\n\n\n<p>According to the datasheet, the LM35 and LM34 sensors require very little current to operate, about 60uA. This results in very low self-heating (around 0.08\u00baC in still air), which means that the temperature measurements won&#8217;t be affected by the sensor itself.<\/p>\n\n\n\n<p>To read the temperature from these sensors you just need to read the sensor&#8217;s output voltage using an analog pin. If using an Arduino, you just need to use the <span class=\"rnthl rntliteral\">analogRead()<\/span> function and you&#8217;ll get temperature readings with two decimal points.<\/p>\n\n\n\n<p>So, if you need a cheap and easy to use sensor to monitor temperature, the LM35 can be a good option. Also, because it consumes very little energy, it&#8217;s great for portable projects, where low power consumption is required.<\/p>\n\n\n\n<p>Learn how to use the LM35, LM335 and LM34 temperature sensors with Arduino:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/randomnerdtutorials.com\/arduino-lm35-lm335-lm34-temperature-sensor\/\">Guide for LM35, LM335 and LM34 Temperature Sensors with Arduino<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">DS18B20 Temperature Sensor<\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"421\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/DS18B20-breadboard.jpg?resize=750%2C421&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"DS18B20 Temperature Sensor\" class=\"wp-image-87519\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/DS18B20-breadboard.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/DS18B20-breadboard.jpg?resize=300%2C168&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n\n<p>The\u00a0<a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/ds18b20-temperature-sensor-2\/\" target=\"_blank\">DS18B20 temperature sensor<\/a>\u00a0is a one-wire digital temperature sensor. This means that it just requires one data line (and GND) to communicate with your microcontrollers.<\/p>\n\n\n\n<p>It can be powered by an external power supply or it can derive power from the data line (called \u201cparasite mode\u201d), which eliminates the need for an external power supply.<\/p>\n\n\n\n<p>Each DS18B20 temperature sensor has a unique 64-bit serial code. This allows you to wire multiple sensors to the same data wire. So, you can get temperature from multiple sensors using a single GPIO. <\/p>\n\n\n\n<p>Additionally, the resolution of the temperature sensor can be set to 9, 10, 11, or 12 bits which corresponds to increments of 0.5\u00b0C, 0.25\u00b0C, 0.125\u00b0C, and 0.0625\u00b0C, respectively. The default resolution at power-up is 12-bit. <\/p>\n\n\n\n<p>The DS18B20 temperature sensor is also available in waterproof version, ideal for outdoor projects or to measure liquid temperature.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"421\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/ds18b20-waterproof.jpg?resize=750%2C421&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"DS18B20 Waterproof Temperature Sensor\" class=\"wp-image-86674\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/ds18b20-waterproof.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/ds18b20-waterproof.jpg?resize=300%2C168&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n\n<p>You can follow our guides to learn how to use the DS18B20 temperature sensor with the ESP32, ESP8266 and Arduino using Arduino IDE or MicroPython:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-ds18b20-temperature-arduino-ide\/\"><strong>ESP32 (Arduino IDE)<\/strong> DS18B20 Temperature Sensor (Single, Multiple, Web Server)<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/esp8266-ds18b20-temperature-sensor-web-server-with-arduino-ide\/\"><strong>ESP8266 (Arduino IDE)<\/strong> DS18B20 Temperature Sensor (Single, Multiple, Web Server)<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/micropython-ds18b20-esp32-esp8266\/\"><strong>ESP32 and ESP8266 (MicroPython)<\/strong> with DS18B20 Temperature Sensor<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/guide-for-ds18b20-temperature-sensor-with-arduino\/\"><strong>Arduino<\/strong> with DS18B20 Temperature Sensor<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">BME280 vs BMP180<\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"420\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/BME280-vs-BMP180-Sensor.jpg?resize=750%2C420&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"BME280 vs BMP180 Barometric sensor: temperature, humidity and pressure\" class=\"wp-image-87874\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/BME280-vs-BMP180-Sensor.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/BME280-vs-BMP180-Sensor.jpg?resize=300%2C168&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n\n<p>The <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/bme280-sensor-module\/\" target=\"_blank\">BME280<\/a> and <a rel=\"noreferrer noopener\" aria-label=\"BMP180 (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/bmp180-barometric-sensor\/\" target=\"_blank\">BMP180<\/a> are barometric sensors which means they read atmospheric pressure. The BME280 is also equipped with a temperature and a humidity sensor, and the BMP180 with a temperature sensor. Because pressure changes with altitude, these sensors can also be used to estimate altitude.<\/p>\n\n\n\n<p>When it comes to temperature range, the BME280 has a wider measurement range: -40 to 85\u00baC, while the BMP180 just measures from 0 to 65\u00baC. You should keep in mind that the BME280 module self-heats a little bit, so the temperature measurements may be 1 ou 2 degrees above the real temperature value.<\/p>\n\n\n\n<p>The BME280 can use either I2C or SPI communication protocol while the BMP180 can only use I2C communication.<\/p>\n\n\n\n<p>The BME280 sensor is more expensive but it has more functionalities. For example, you can build a weather station project with only this sensor. But if you&#8217;re not interested in measuring the pressure or humidity, you can get a cheaper temperature sensor.<\/p>\n\n\n\n<p>Interfacing these sensors with Arduino, ESP8266 and ESP32 is very easy thanks to the Adafruit libraries.<\/p>\n\n\n\n<p>You can use our guides to learn how to use these sensors:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>BMP180:<\/strong><ul><li><strong><a href=\"https:\/\/randomnerdtutorials.com\/guide-for-bmp180-barometric-sensor-with-arduino\/\">Arduino <\/a><\/strong><a href=\"https:\/\/randomnerdtutorials.com\/guide-for-bmp180-barometric-sensor-with-arduino\/\">with BMP180 Barometric Sensor<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-with-bmp180-barometric-sensor\/\"><strong>ESP32 (Arduino IDE)<\/strong> with BMP180 Barometric Sensor<\/a><\/li><\/ul><\/li><li><strong>BME280:<\/strong><ul><li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-bme280-arduino-ide-pressure-temperature-humidity\/\"><strong>ESP32 (Arduino IDE)<\/strong> with BME280 Sensor (Pressure, Temperature, Humidity)<\/a><\/li><li><strong><a href=\"https:\/\/randomnerdtutorials.com\/esp8266-bme280-arduino-ide\/\">ESP8266 (Arduino IDE)<\/a><\/strong><a href=\"https:\/\/randomnerdtutorials.com\/esp8266-bme280-arduino-ide\/\"> with BME280 (Pressure, Temperature, Humidity)<\/a><\/li><li><strong><a href=\"https:\/\/randomnerdtutorials.com\/bme280-sensor-arduino-pressure-temperature-humidity\/\">Arduino <\/a><\/strong><a href=\"https:\/\/randomnerdtutorials.com\/bme280-sensor-arduino-pressure-temperature-humidity\/\">with BME280 Sensor(Pressure, Temperature, Humidity)<\/a><\/li><\/ul><\/li><\/ul>\n\n\n\n<p>We also have other projects with the BME280 that you may like:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/randomnerdtutorials.com\/low-power-weather-station-datalogger-using-esp8266-bme280-micropython\/\">Low Power Weather Station Datalogger using ESP8266 and BME280 with MicroPython<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-web-server-with-bme280-mini-weather-station\/\">ESP32 Web Server with BME280 \u2013 Mini Weather Station<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-esp8266-mysql-database-php\/\">ESP32\/ESP8266 Insert Data into MySQL Database using PHP and Arduino IDE<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Testing All Temperature Sensors<\/h2>\n\n\n\n<p>This experiment logged temperature readings from different temperature sensors over time in the same conditions.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"422\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/Arduino-Temperature-Sensor-BME280-BMP180-DHT11-DHT22-LM35-DS18B20.jpg?resize=750%2C422&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Testing all Temperature Sensors DHT11 DHT22 LM35 DS18B20 BME280 BMP180 with Arduino\" class=\"wp-image-87869\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/Arduino-Temperature-Sensor-BME280-BMP180-DHT11-DHT22-LM35-DS18B20.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/Arduino-Temperature-Sensor-BME280-BMP180-DHT11-DHT22-LM35-DS18B20.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<p>We wired all the following temperature sensors to an <a href=\"https:\/\/makeradvisor.com\/tools\/arduino-mega-board-compatible\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Arduino Mega<\/a>:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/dht11-temperature-humidity-sensor\/\" target=\"_blank\">DHT11<\/a><\/li><li><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/dht22-temperature-humidity-sensor\/\" target=\"_blank\">DHT22<\/a><\/li><li><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/lm35-lm35dz-temperature-sensor\/\" target=\"_blank\">LM35<\/a><\/li><li>2x <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/ds18b20-temperature-sensor-2\/\" target=\"_blank\">DS18B20 <\/a>in the same data bus<\/li><li><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/bme280-sensor-module\/\" target=\"_blank\">BME280<\/a><\/li><li><a href=\"https:\/\/makeradvisor.com\/tools\/bmp180-barometric-sensor\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">BMP180<\/a><\/li><\/ul>\n\n\n\n<p>The data was recorded on a microSD card using a <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/sd-card-module\/\" target=\"_blank\">microSD card module<\/a>. The experiment run for approximately 36 hours and temperature readings were logged every 5 minutes.<\/p>\n\n\n\n<p>We wired the data pins of the temperature sensors to the following pins on Arduino Mega:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>DHT11<\/strong>: Pin 11<\/li><li><strong>DHT22<\/strong>: Pin 12<\/li><li><strong>DS18B20<\/strong>: Pin 14<\/li><li><strong>LM35<\/strong>: Pin A0<\/li><li><strong>BME280<\/strong>: software SPI on these pins: Pin 4 (MISO), Pin 5 (CS), Pin 6 (SCK), Pin 7 (MOSI)<\/li><li><strong>BMP180<\/strong>: Pin 20 (SDA) and Pin 21 (CSL) <\/li><\/ul>\n\n\n\n<p>The microSD card module was connected via hardware SPI: Pin 51 (MOSI), Pin 50 (MISO), Pin 52 (SCK), Pin 53 (CS).<\/p>\n\n\n\n<p>This is the code running in the Arduino Mega.<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">\/*\n * Rui Santos\n * Complete Project Details https:\/\/RandomNerdTutorials.com\n *\/\n\n#include &quot;DHT.h&quot;\n\n#include &lt;OneWire.h&gt;\n#include &lt;DallasTemperature.h&gt;\n\n#include &lt;Wire.h&gt;\n#include &lt;SPI.h&gt;\n#include &lt;Adafruit_Sensor.h&gt;\n#include &lt;Adafruit_BME280.h&gt;\n\n#include &lt;Wire.h&gt;\n#include &lt;Adafruit_BMP085.h&gt;\n\n#include &lt;SD.h&gt; \/\/ for the SD card\n\nconst int DHT11sensorPin = 11;  \nconst int DHT22sensorPin = 12;  \n\nDHT dht11(DHT11sensorPin, DHT11);\nDHT dht22(DHT22sensorPin, DHT22);\n\nfloat DHT11temperature;\nfloat DHT22temperature;\n\nconst int DS18B20sensorPin = 14;\n\nOneWire oneWire(DS18B20sensorPin);\nDallasTemperature ds18b20(&amp;oneWire);\n\nfloat DS18B20temperature1;\nfloat DS18B20temperature2;\n\nconst int BME_SCK = 6;\nconst int BME_MISO = 4;\nconst int BME_MOSI = 7;\nconst int BME_CS = 5;\n\nAdafruit_BME280 bme280(BME_CS, BME_MOSI, BME_MISO, BME_SCK);\n\nAdafruit_BMP085 bmp180;\n \nconst int LM35sensorPin = A0; \nfloat LM35sensorValue;\nfloat LM35voltageOut;\nfloat LM35temperature;\n\nconst int chipSelectSDCard = 53; \nFile myFile;\n\nvoid setup() {\n  Serial.begin(9600);\n\n  dht11.begin();\n  delay(2000);\n  dht22.begin();\n\n  ds18b20.begin();\n\n  bme280.begin();\n\n  bmp180.begin();\n \n  pinMode(LM35sensorPin, INPUT);\n\n  if(!SD.begin(chipSelectSDCard)) {\n    Serial.println(&quot;SD card initialization failed!&quot;);\n    return;\n  }\n  Serial.println(&quot;SD card initialization done.&quot;);\n  \n  myFile=SD.open(&quot;DATA.txt&quot;, FILE_WRITE);\n  if (myFile) {\n    Serial.println(&quot;File opened ok&quot;);\n    \/\/ print the headings for our data\n    myFile.println(&quot;DHT11,DHT22,DS18B20-1,DS18B20-2,BME280,BMP180,LM35&quot;);\n  }\n  myFile.close();  \n}\n\nvoid loop() {\n\n  \/*-------------------------------------------------------*\/\n  \/\/DHT11\n  DHT11temperature = dht11.readTemperature();\n  if (isnan(DHT11temperature)) {\n    Serial.println(&quot;Failed to read from DHT11 sensor!&quot;);\n    return;\n  }\n  Serial.print(&quot;Temperature DHT11(\u00baC): &quot;);\n  Serial.println(DHT11temperature);\n  \n  \/*-------------------------------------------------------*\/\n  \/\/DHT22  \n  DHT22temperature = dht22.readTemperature();\n  if (isnan(DHT22temperature)) {\n    Serial.println(&quot;Failed to read from DHT22 sensor!&quot;);\n    return;\n  }\n  Serial.print(&quot;Temperature DHT22(\u00baC): &quot;);\n  Serial.println(DHT22temperature);\n\n\/*-------------------------------------------------*\/  \n  \/\/DS18B20\n  ds18b20.requestTemperatures();  \n  DS18B20temperature1 = ds18b20.getTempCByIndex(0);\n  DS18B20temperature2 = ds18b20.getTempCByIndex(1);\n\n  Serial.print(&quot;Temperature DS18B20-1(\u00baC): &quot;);\n  Serial.println(DS18B20temperature1);\n  \n  Serial.print(&quot;Temperature DS18B20-2(\u00baC): &quot;);\n  Serial.println(DS18B20temperature2);\n\n\/*-------------------------------------------------*\/\n\/\/BME280\n\n  Serial.print(&quot;Temperature BME280(\u00baC): &quot;);\n  Serial.println(bme280.readTemperature());\n\n\/*-------------------------------------------------*\/\n\/\/BMP180\n  Serial.print(&quot;Temperature BMP180(\u00baC): &quot;);\n  Serial.println(bmp180.readTemperature());\n\n\/*-------------------------------------------------*\/ \n  \/\/LM35 SENSOR\n  LM35sensorValue = analogRead(LM35sensorPin);\n  LM35voltageOut = (LM35sensorValue * 5000) \/ 1024;\n  \n  \/\/ calculate temperature for LM35 (LM35DZ)\n  LM35temperature = LM35voltageOut \/ 10;\n\n  Serial.print(&quot;Temperature LM35(\u00baC): &quot;);\n  Serial.println(LM35temperature);\n\n  Serial.println(&quot;&quot;);\n\n  myFile = SD.open(&quot;DATA.txt&quot;, FILE_WRITE);\n  if (myFile) {\n    Serial.println(&quot;File open with success&quot;);\n    myFile.print(DHT11temperature);\n    myFile.print(&quot;,&quot;);\n    myFile.print(DHT22temperature);\n    myFile.print(&quot;,&quot;);\n    myFile.print(DS18B20temperature1);\n    myFile.print(&quot;,&quot;);\n    myFile.print(DS18B20temperature2);\n    myFile.print(&quot;,&quot;);\n    myFile.print(bme280.readTemperature());\n    myFile.print(&quot;,&quot;);\n    myFile.print(bmp180.readTemperature());\n    myFile.print(&quot;,&quot;);\n    myFile.print(LM35temperature);\n    myFile.println(&quot;,&quot;);\n  }\n  myFile.close();\n  \n  delay(6000);\n}\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/raw\/master\/Projects\/Arduino\/DHT11_DHT22_LM35_DS18B20_BME280_BMP180.ino\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<p><strong>Note:<\/strong> in order to compile and run this code, you must install in your Arduino IDE all sensor libraries mentioned in the comparison table at the beginning of this article.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Results: Comparing Temperature Readings<\/h2>\n\n\n\n<p>After approximately 36 hours, we removed the microSD card and copied the results to a spreadsheet. We&#8217;ve plotted all readings to better compare the measurements from the different temperature sensors.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/Testing-temperature-sensors-charts.png?quality=100&#038;strip=all&#038;ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"660\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/Testing-temperature-sensors-charts.png?resize=1200%2C660&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Results in Celsius degrees Temperature Sensors DHT11 DHT22 LM35 DS18B20 BME280 BMP180 with Arduino\" class=\"wp-image-87592\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/Testing-temperature-sensors-charts.png?w=1245&amp;quality=100&amp;strip=all&amp;ssl=1 1245w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/Testing-temperature-sensors-charts.png?resize=300%2C165&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/Testing-temperature-sensors-charts.png?resize=768%2C423&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/Testing-temperature-sensors-charts.png?resize=1024%2C563&amp;quality=100&amp;strip=all&amp;ssl=1 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/a><figcaption>Temperature in Celsius degrees (\u00baC)<\/figcaption><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/Testing-temperature-sensors-charts-Fahrenheit.png?quality=100&#038;strip=all&#038;ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"668\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/Testing-temperature-sensors-charts-Fahrenheit.png?resize=1200%2C668&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Results in Fahrenheit degrees Temperature Sensors DHT11 DHT22 LM35 DS18B20 BME280 BMP180 with Arduino\" class=\"wp-image-87881\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/Testing-temperature-sensors-charts-Fahrenheit.png?w=1238&amp;quality=100&amp;strip=all&amp;ssl=1 1238w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/Testing-temperature-sensors-charts-Fahrenheit.png?resize=300%2C167&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/Testing-temperature-sensors-charts-Fahrenheit.png?resize=768%2C427&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/Testing-temperature-sensors-charts-Fahrenheit.png?resize=1024%2C570&amp;quality=100&amp;strip=all&amp;ssl=1 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/a><figcaption> Temperature in Fahrenheit degrees (\u00baF) <\/figcaption><\/figure><\/div>\n\n\n\n<p>This chart doesn&#8217;t have a control group (we didn&#8217;t use a calibrated temperature sensor), but we have an idea on how these sensors behave.<\/p>\n\n\n\n<p>If you take a closer look at the charts, the BME280 measured slightly higher values than the other temperature sensors. This behavior is normal, and this is described in the datasheet. The module self-heats a little bit and the temperature measurements can be 1 ou 2 degrees above the real temperature value. <\/p>\n\n\n\n<p>However, the BME280 is also the temperature sensor that gave more stable temperature readings without many oscillations between readings. This has to do with the resolution of the sensor. It can detect changes up to 0.01\u00baC.<\/p>\n\n\n\n<p>In case of the DS18B20 temperature sensors, we can see some oscillations between readings and it&#8217;s also noticeable that the resolution is not as good as the BME280. Additionally, the DS18B20 temperature sensor was the only one to give some &#8220;null&#8221; readings throughout the experiment. We&#8217;ve measured two DS18B20 temperature sensors in the same data line and one of the sensors failed to read the temperature 6 times throughout the experiment (during 36 hours).<\/p>\n\n\n\n<p>The DHT22 and the BMP180 behave very similarly with little oscillations. The DHT11 couldn&#8217;t detect small temperature changes, because its resolution is of 1\u00baC.<\/p>\n\n\n\n<p>Finally, the LM35 temperature sensor detected changes in temperature between 24\u00baC and 26\u00baC but with lots of oscillations between measurements.<\/p>\n\n\n\n<p>This chart comparing the different temperature sensors clearly shows how each sensor differs from the others. It is easier to understand how they work and if they will be suitable for the projects you want to build.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up<\/h2>\n\n\n\n<p>In this article we&#8217;ve compared several temperature sensors that you can use with the ESP32, ESP8266, Arduino and other development boards. These sensors all measure temperature but they behave differently when put to the test in the same environment at the same time.<\/p>\n\n\n\n<p>We hope you&#8217;ve found this article useful and that it helps you pick the best temperature sensor for your project requirements.<\/p>\n\n\n\n<p>You might also like reading:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/randomnerdtutorials.com\/9-arduino-compatible-temperature-sensors-for-your-electronics-projects\/\">9 Arduino Compatible Temperature Sensors for Your Electronics Projects<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-esp8266-plot-chart-web-server\/\">ESP32\/ESP8266 Plot Sensor Readings in Real Time Charts<\/a><\/li><li><a style=\"font-size: inherit; background-color: initial;\" href=\"https:\/\/randomnerdtutorials.com\/courses\/\">Enroll in our electronics Courses and eBook<\/a><\/li><\/ul>\n\n\n\n<p>If there&#8217;s any other sensor that you&#8217;d like to see in this comparison, post a comment below.<\/p>\n\n\n\n<p>Thanks for reading.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are a wide variety of temperature sensors compatible with Arduino, ESP32, ESP8266 and other development boards. So, it can be difficult to to pick up the most suitable sensor &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"DHT11 vs DHT22 vs LM35 vs DS18B20 vs BME280 vs BMP180\" class=\"read-more button\" href=\"https:\/\/randomnerdtutorials.com\/dht11-vs-dht22-vs-lm35-vs-ds18b20-vs-bme280-vs-bmp180\/#more-87441\" aria-label=\"Read more about DHT11 vs DHT22 vs LM35 vs DS18B20 vs BME280 vs BMP180\">CONTINUE READING \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":87868,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[302,269,264],"tags":[],"class_list":["post-87441","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-0-guide","category-guide-project","category-project"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/07\/DHT11-DHT22-LM35-DS18B20-BME280-BMP180.jpg?fit=1280%2C720&quality=100&strip=all&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/87441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/comments?post=87441"}],"version-history":[{"count":0,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/87441\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/87868"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=87441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=87441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=87441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}