Today we are going to add a new Sensor to our arsenal known as DS18B20 Temperature Sensor. It is a temperature sensor similar to DHT11 but has a different set of applications. We will be comparing it with different types of temperature sensors available and will have a look at the technical specifications of these sensors.
Towards the end of this tutorial, we will be interfacing DS18B20 with Arduino and ESP8266 to display temperature. In the case of Arduino, the temperature will be displayed on Serial Monitor and for ESP8266 we will be displaying the temperature on a web server.
Let us start with the fun now.
Get PCBs for Your Project Manufactured
You must check out WeLLPCB for ordering PCBs online for cheap! WellPCB covers the domain of Printed Circuit Board Fabrication and PCB Assembly Turnkey Services and ensure High Quality, Low Cost, Fast Delivery, Easy Ordering for customers all over the world. With brand new equipments and total production area over 10,000 m2, WeLLPCB is capable of producing 30000 m2 feet of 2-32 layer PCBs and delivering over 10000 varieties monthly.
They can produce quick turns to meet 24-hour delivery for double-sided PCBs, 48-hour for 4 to 8-layer and 120-hour for 10-layer or higher PCBs.They are holding a promotional offer in which they are manufacturing 5PCS of 1-2layers, 100*100mm for only $5. So, do check them out.
You can also check out their partner OurPCB for good deals.
Comparison Between Different Types of Temperature Sensors
The comparison shown above has three sensors DS18B20, DHT11, and NTC Thermistor but here we will limit our comparison to digital sensors only. It does not mean that the NTC thermistor is not as important as digital sensors In fact, the development of digital sensors is only possible because of NTC Thermistor. The digital sensors consist of NTC Thermistor connected with some microprocessors which ultimately gives the digital output.
Main points of the comparison are:-
1. DS18B20 is waterproof and robust while DHT11 is not that's why in real-life scenarios and applications where contact-based sensing is required, DS18B20 is generally used while DHT11 is used in the open-air environment applications.
2. DS18B20 spits out a data of 9-12 bits of data while DHT11 gives out a data of 8 bits.
3. DS18B20 gives temperature only while DHT11 can be used to obtain temperature as well as humidity.
4. DS18B20 covers a wider temperature range in comparison to the DHT11 and also has better accuracy in comparison to the DHT(+ 0.5 degrees in comparison to + 2 degrees for DHT11).
5. When it comes to pricing these sensors have a little difference in between them as the two different variants of DS18B20 which are packaged wire type and TO92 package have a cost around $1 and $0.4 while the DHT11 has a cost of around $0.6.
So we can say that DS18B20 is somewhat better than the DHT11 but a better selection can be made only on the basis of the application for which sensor is required.
You can get more knowledge about the DS18B20 by reading its datasheet from here.