当前位置:网站首页>DS18B20 digital thermometer (I) electrical characteristics, power supply and wiring mode
DS18B20 digital thermometer (I) electrical characteristics, power supply and wiring mode
2022-06-12 03:49:00 【IOsetting】
Catalog
- DS18B20 Digital thermometer ( One ) Electrical characteristics , Power supply and wiring mode
- DS18B20 Digital thermometer ( Two ) Thermometry , ROM and CRC check
- DS18B20 Digital thermometer ( 3、 ... and ) 1-WIRE Bus ROM search algorithm
DS18B20
DS18B20 Is a common digital thermometer chip , Because the temperature measurement is accurate , Cheap and easy to connect , Widely used in practice , In all kinds of teaching experiment suits, the appearance rate is also very high .
Writing STC8H GPIO I wrote about the example DS18B20, This model is simple and old , But the content is interesting , I can't write in one space , So take out the content and introduce it separately .
Parameters
- 1-Wire Bus Single line bus structure , It is allowed to connect multiple on one bus DS18B20 And communicate separately
- At ordinary temperature , You can take power directly from the data port , At this time, only two wires are needed .
- Supply voltage [3.0V, 5.5V]
- Temperature detection range [-55°C, +125°C] Centigrade , [-67°F, +257°F] Fahrenheit
- Accuracy : stay [-10°C, +85°C] by ±0.5°C
Parameter description
- The error under normal temperature shall not exceed ±0.5°C
Cheap for domestic products DS18B20 Actually measured , Basically in this range to , At room temperature of twenty or thirty degrees Celsius , The individual error of the actual test is ±0.35°C within . - Low power consumption
Single DS18B20 Use one 0.1uF The capacitor can drive - Temperature monitoring can be carried out through three wire or two-wire connection
Get rid of Vcc and GND, In fact, only one is needed IO Line , Very economical MCU Of IO resources - Support the connection of multiple chips on a single line bus
This is the best , Only one line of communication , This line can also be connected to multiple at the same time DS18B20 signal communication , And the distance can be very long
Explanation of the last point : Single line DS18B20 The quantity and distance of are related to the wiring form , Fifty or sixty are connected at a short distance of more than ten centimeters DS18B20 No problem , If it is a long distance connection of hundreds of meters , Suggest 10 Within a , Don't exceed at most 20 individual . The above premise is that the power supply is sufficient . DS18B20 These characteristics are particularly advantageous in industrial environments , For example, one IDC Computer room , Only one of dozens of temperature measuring points is needed 8 position MCU You can complete the collection , Low power consumption and reliability .
Pin foot
What you usually see is 3pin Of To-92 encapsulation , Like an ordinary triode , Make the plane face towards yourself , Pin Feet down , From left to right is : GND, DQ, VDD

Single DS18B20 The wiring of the cable
Single DS18B20 Is the most basic way to connect
Normal power supply mode
The normal power supply mode uses a three wire connection , The voltage can be selected 3.3V or 5V
- MCU IO -> DQ
- GND -> GND
- 5V/3.3V -> VDD
Parasitic power supply mode
The parasitic power supply mode uses a two-wire connection . Now DS18B20 Of GND and Vdd Be grounded . DQ The pin is both a data communication pin , It is also a power supply pin , The upper computer needs to use a pull-up resistor on this pin to connect to VCC On , about STC8, It can be done through registers PxPU Set it up .
It should be noted that , Is not All online purchases DS18B20 Can work in parasitic power supply mode , Some circuits in parasitic power supply mode only output 0, At this time, you need some additional circuits to make it work in two-wire mode .
- MCU IO -> DQ
- GND -> GND & VDD
Simulate parasitic power supply mode
If DS18B20 Cannot operate in parasitic power supply mode , You can use one 0.1uF A capacitor and a 1N4148 Diodes realize two-wire connection . Now DS18B20 In fact, it works in normal power supply mode .
+-----1N4148-|>|-----+
| |
| |DS18B20|-VCC--+
| | | |
MCU IO--+-DQ--|DS18B20| 0.1uF
| | |
GND ----GND-|DS18B20|-GND--+
Multiple DS18B20 connection
In the actual scene , DS18B20 Often use in groups , Used to collect temperature information of an area , The area spans from tens of centimeters ( The case , Cabinet , Lathe ), To hundreds of meters ( residential , Computer room , workshop ) It's possible . There are different choices for different distances and environments , To sum up, there are several situations
You can refer to this one 1-wire Bus wiring https://www.loxone.com/enen/kb/wiring-1-wire-devices/
Bus connection mode
In the following structure S representative Sensor, DS18B20. MCU It's MCU .
Bus mode is the recommended wiring mode , be-all DS18B20 All connected to the same line . The longest distance communication can be achieved by using bus connection
MCU-------8m---S---3m----S----3m----S-----10m-----S
Or there are individual forks , The fork is very close to the bus
MCU-------8m----------+--S---3m----S--+--10m-----S
| |
1m 1m
| |
S S
Star connection mode
If more and longer forks occur on the bus , It becomes a star connection , Similar to the following wiring method , Star connection is only recommended for small area scenarios , Compared with the bus connection mode , The length is much shorter .
S---------8m----MCU
|
4m
|
S------6m-----+----3m------S
|
8m
|
S--+------4m-----+----6m------------S
|
2m
|
S
Power supply mode
Centralized power supply
Most scenarios use centralized power supply . In this scenario , By the control end (MCU End ) Power supply .
If three wires are used, there is no need to pay attention to , If two-wire connection is used , We need to pay attention to
- Because communication IO At the same time, it is responsible for power supply , So you need to configure the pull-up resistor , Pull up resistor in short distance scene 5KR enough , But in the long-distance scene, it needs to be reduced , You can try to use 2KR The resistance of .
- In case of parasitic power supply mode simulated using normal power supply mode , Voltage usage 5V, Capacitors need to be close DS18B20 Deploy , Every DS18B20 Match one 0.1uF The capacitance of .
Terminal power supply
In a conditional scenario , Every DS18B20 It can be supplied separately , At this time, the control end is connected with DS18B20 Common land , Connection communication IO that will do . For the sake of stability DS18B20 The end can be equipped with 0.1uF capacitance .
Reference resources
- DS18B20 Maximum distance https://forums.raspberrypi.com/viewtopic.php?t=36163#p1337521
- 40 rice CAT5 Network cable connection 7 individual DS18B20 https://raspberrypi.stackexchange.com/questions/41234/max-length-of-wire-w-3-3v-or-other-issue
- Parasitic power supply mode https://learn.openenergymonitor.org/electricity-monitoring/temperature/DS18B20-temperature-sensing
- Parasitic power supply mode https://e-radionica.com/en/blog/hum-how-to-use-the-ds18b20-with-parasitic-power-supply/
边栏推荐
- vim命令大全
- Kotlin starts the process, the difference between launch and async, and starts the process in sequence
- [mysql][mysql 8.0 compressed package installation method]
- How to modify the result name of MySQL query result 1 and result 2
- 2020-12-07
- Kotlin 启动协程、launch 与async的区别、按照顺序启动协程
- Paper recommendation: relicv2, can the new self supervised learning surpass supervised learning on RESNET?
- [Hongmeng] use the timer to play a simple game of robbing red envelopes
- 【mysql】mysql安装
- Unity脚本出現missing時的解决方法
猜你喜欢

根據變換矩陣進行圖像拼接
![What is a request response pair called? [repeat] - what is a request response pair called? [duplicate]](/img/65/a214d137e230b1a1190feb03660f2c.jpg)
What is a request response pair called? [repeat] - what is a request response pair called? [duplicate]

顺序表与链表-----进阶

Review of technical economy and Enterprise Management Chapter 4

Community Conference | the mosn community will release version 1.0 and promote the evolution of the next generation architecture
![[C language] dynamic memory allocation](/img/ac/ba3882c76f93dde0ab0d5294c5b6d9.jpg)
[C language] dynamic memory allocation

DS18B20数字温度计 (一) 电气特性, 供电和接线方式
![[MySQL] MySQL installation](/img/f0/2b65b71e79ea0cc0790e4848092374.png)
[MySQL] MySQL installation

基于SSH实现健身俱乐部管理系统

ics-07
随机推荐
Absolute positioning three ways to center the box
R语言使用survival包的coxph函数构建cox回归模型、使用ggrisk包的ggrisk函数可视化Cox回归的风险评分图(风险得分图)、并解读风险评分图、基于LIRI数据集(基因数据集)
1187_ C language implementation of hysteresis processing
JSP实现银柜台业务绩效考核系统
[Business Research Report] forward looking report on urban renewal and development in China in 2021 - download link attached
Special materials | household appliances, white electricity, kitchen electricity
MongoDB精华总结
LINQ group by and select series - LINQ group by and select collection
[MySQL] MySQL installation
Paper recommendation: relicv2, can the new self supervised learning surpass supervised learning on RESNET?
云原生概述
如何修改mysql 查询出来的结果名称 结果1,结果2
R语言plotly可视化:plotly可视化分组(grouped)小提琴图(grouped violin plot in R with plotly)
[untitled]
Sed command
Go 语法 变量
Redis gets the set of keys prefixed with XXX
R language plot visualization: use plot to visualize simple regression model linear regression plots
(idea)the file size(2.85M) exceeds configured limit(2.56M).Code insight features are not available问题
E-commerce middle office system architecture