amc2020:group_n:ds18b20
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
amc2020:group_n:ds18b20 [2020/07/18 19:49] – [2.4 Configuration Register] jonas001 | amc2020:group_n:ds18b20 [2023/01/05 14:38] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | < | ||
+ | < | ||
+ | <a href=" | ||
+ | <span style=" | ||
+ | ↩ Back to the main page | ||
+ | </ | ||
+ | </a> | ||
+ | </ | ||
+ | </ | ||
+ | |||
====== DS18B20 Waterproof Digital Temperature Sensor ====== | ====== DS18B20 Waterproof Digital Temperature Sensor ====== | ||
Line 89: | Line 99: | ||
===== 3. Technical Specifications and Setup of the Sensor ===== | ===== 3. Technical Specifications and Setup of the Sensor ===== | ||
- | When connecting the pins (figure 1), pin 1 (red) is VDD, pin 2 (black) is GND and pin 3 (yellow) is the data pin. In this project two sensors, one measuring the temperature at the bottom of the pond and one at the surface, are connected to the ESP32. As each sensor can be addressed individually by its serial code, the data pins can be connected to the same GPIO pin of the ESP32 (here pin 14 was used). As mentioned before, the sensors need a pullup resistor connecting the data pin with VDD. As both sensors are connected in the same data bus, only a single 5kΩ resistor between their data pins and VDD needs to be added. | + | When connecting the pins (figure 1), pin 1 (red) is VDD, pin 2 (black) is GND and pin 3 (yellow) is the data pin. In this project two sensors, one measuring the temperature at the bottom of the pond and one at the surface, are connected to the ESP32. As each sensor can be addressed individually by its serial code, the data pins can be connected to the same GPIO pin of the ESP32 (here pin 14 was used). As mentioned before, the sensors need a pullup resistor connecting the data pin with VDD. As both sensors are connected in the same data bus, only a single 5kΩ resistor between their data pins and VDD needs to be added (see figure 5). |
Like the DHT-22, VDD can be anywhere between 3.0 V to 5.5 V and can thus be powered by the ESP32 without a problem. Further information on the sensor’s specifications can be found in table 2 and in the datasheet. | Like the DHT-22, VDD can be anywhere between 3.0 V to 5.5 V and can thus be powered by the ESP32 without a problem. Further information on the sensor’s specifications can be found in table 2 and in the datasheet. | ||
- | **//Table 2//** Specifications of the DS18B20 digital temperature sensor (local power supply with ESP32). | + | ^**//Table 2//** Specifications of the DS18B20 digital temperature sensor (local power supply with ESP32).^^^^ |
- | ^ Sensor | + | ^ Sensor |
| Supply Voltage $V_{DD}$ | | Supply Voltage $V_{DD}$ | ||
| Pullup Supply Voltage $V_{PU}$ | | Pullup Supply Voltage $V_{PU}$ | ||
Line 109: | Line 119: | ||
| ::: | 11 bit | 0.125 °C | 187.5 ms | | | ::: | 11 bit | 0.125 °C | 187.5 ms | | ||
| ::: | 12 bit | 0.0625 °C | 93.75 ms | | | ::: | 12 bit | 0.0625 °C | 93.75 ms | | ||
+ | |||
+ | ^{{: | ||
+ | |**//Figure 5//** ESP32 connected to two DS18B20s, here the DS18B20s have 4 pins, white is the data bus, orange is not used.| | ||
===== 4. Programming the DS18B20 ===== | ===== 4. Programming the DS18B20 ===== | ||
Line 311: | Line 324: | ||
The first sensor (1) was measuring the room temperature on a rather warm day. The second sensor (2) measured the temperature of my hand. Both measurements seem reasonable and when both sensors measure the room temperature, | The first sensor (1) was measuring the room temperature on a rather warm day. The second sensor (2) measured the temperature of my hand. Both measurements seem reasonable and when both sensors measure the room temperature, | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <a href=" | ||
+ | <span style=" | ||
+ | Back to the top ⤴ | ||
+ | </ | ||
+ | </a> | ||
+ | </ | ||
+ | </ | ||
+ | </ |
amc2020/group_n/ds18b20.1595094586.txt.gz · Last modified: 2023/01/05 14:38 (external edit)