DS18B20 Temperature sensor
Buy from US | Buy from UK | Buy from DE | Buy from IT | Buy from FR | Buy from ES | ここでご購入を! |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Single wire, also known as 1-Wire bus, is a peripheral serial expansion bus introduced by the American company Dallas.
I2C bus is a simple, bidirectional, two-wire synchronous serial bus developed by Philips. It only requires two wires to transmit information between devices connected to the bus.
In microcontrollers, SPI, I2C, and single wire (1-Wire) are types of buses.
A bus is a common connection line for a computer, through which all peripheral devices can be connected to the computer. It serves as a channel for information transmission and can accommodate multiple peripheral components.
There are many types of buses, such as chip-level buses like SPI, I2C, and single wire (1-Wire), which facilitate connections between CPUs and other peripheral chips over short distances. They often transmit data in serial mode, meaning data is transmitted bit by bit, which helps in saving the number of transmission lines.
SPI: Requires 3 lines – one clock line, one data receive line, and one data transmit line.
I2C: Requires 2 lines – one clock line and one data line.
Single wire: Uses a single data line for communication, as seen in DS18B20 digital temperature sensors.
Additionally, there are communication standards like RS-232 for computer-to-computer or microcontroller data communication, as well as industrial field buses like RS-485 and CAN for long-distance communication, with distances reaching up to 1000 meters.
The Difference Between DS18B20 and DHT11/DHT22 Sensors
Principle: The DS18B20 utilizes a digital temperature sensor, employing a single-wire interface to acquire temperature values by measuring the resistance associated with temperature inside the sensor. Conversely, the DHT11/DHT22 is a digital temperature and humidity sensor capable of simultaneously measuring temperature and humidity, and outputting data through a single-wire interface.
Output Format: The DS18B20 sensor outputs temperature values in digital format, facilitating direct retrieval of specific temperature values. Meanwhile, the DHT11/DHT22 sensor outputs temperature and humidity values in digital format, necessitating data packet parsing to derive specific temperature and humidity values.
In conclusion, the choice of sensor depends on the specific application scenario. If lower temperature measurement or higher measurement accuracy is required, then DS18B20 is more suitable. For simple single-wire communication and a measurement range between 0-50°C, DHT11 is preferable. If more precise measurement is needed, within a temperature range of -40°C to 80°C, DHT22 can be chosen.
Comparison Between DHT11 and DS18B20
Advantages of DHT11:
Disadvantages of DHT11:
Advantages of DS18B20:
Disadvantages of DS18B20:
You must be logged in to post a comment
About the Author