User Manual

123
Lesson 26 DS18B20 Temperature Sensor
Introduction
Temperature Sensor DS18B20 is a commonly used digital temperature sensor featured with
small size, low-cost hardware, strong anti-interference capability and high precision. The
digital temperature sensor is easy to wire and can be applied a various occasions after
packaging. Different from conventional AD collection temperature sensors, it uses a 1-wire
bus and can directly output temperature data.
Components
- 1 * Raspberry Pi
- 1 * Breadboard
- 4 * Jumper wires (Male to Male, 2 red and 2 black)
- 1 * Network cable (or USB wireless network adapter)
- 1 * DS18B20 Temperature Sensor module
- 1 * 3-Pin anti-reverse cable
Experimental Principle
With a unique single-wire interface, DS18B20 requires only one pin for a two-way
communication with a microprocessor. It supports multi-point networking to measure multi-
point temperatures. Eight sensors can be connected at most, because it will consume too
much power supply and cause low voltage thus harming the stability of transmission.
When using the DS18B20, you need to connect a 10KΩ resistor to the middle pin DQ to pull
up the level. The schematic diagram of the module is as shown below: