The application of DS18B20 digital temperature sensor in the circuit
[ 1] , DS18B20 parasitic power supply circuit diagram
as shown in figure 1 below, the parasitic power supply mode, DS18B20 to absorb energy from the single line signal lines: in the DQ line at a high level during the energy stored in the internal capacitance in capacitance signal lines in a low level during the consumption of electrical energy work, until the high level come again to parasitic power supply ( Capacitance) Charging.
unique way of parasitic power has three advantages:
1, remote temperature measurement, no local power supply
2, can be read under the condition of no regular power ROM
3, circuit more concise, only with a IO mouth to realize temperature measuring
if you want to make the DS18B20 accurately temperature conversion, IO line must ensure that provide enough energy during the temperature conversion, because each DS18B20 temperature conversion during working current reaches 1 ma, when several temperature sensors on the same root IO for multi-point temperature measurement, pull up resistors on 47 k alone will not be able to provide enough energy to cause cannot convert temperature or temperature error is great.
as a result, the circuit of figure 4 is only suitable for temperature measurement using a single temperature sensor, inappropriate use battery power supply system. And VCC power supply must ensure in 5 v, when the power supply voltage drops, the parasitic power can derive energy is reduced, can make the temperature error is bigger.
note: engineering did the experiment on the circuit, in the experiments, lower power supply voltage VCC, when less than 45 v, the measured temperature of the higher than the actual temperature, error is bigger. 。 。 When the power supply voltage drop is 4 v, there are no less than 3 ℃ temperature error, it should be because parasitic power caused by absorbing energy is not enough, therefore, webmaster suggest that we don't in the development of temperature measuring system using this circuit.
[ 2] , DS18B20 parasitic power strong pull on the power supply circuit diagram
to improve the way of the parasitic power as shown in figure 5 below, in order to make the DS18B20 in dynamic gain enough current supply, the conversion period when to convert the temperature or copied to E2 memory operation, the IO with MOSFET line directly to the VCC can provide enough current, send any copy to the E2 memory involved or command, the start temperature conversion must be up to 10 mu S pull IO line transition to the strong state. On the strong pull mode can solve the problems of the current supply does not walk, so it is suitable for multi-point temperature measurement applications, weakness is to occupy the IO mouth thread on strong pull switch.
note: the figures 4 and 5 parasitic power supply mode, DS18B20 the VDD pin must be grounded
[ 3] , DS18B20 way of external power supply
in the external power supply mode, DS18B20 working power supply by the VDD pin access, at this point I/o line don't need to be strong, does not exist the problem of insufficient power supply current, can guarantee the conversion accuracy, at the same time on the bus theory can be articulated any number of DS18B20 sensors, multi-point temperature measurement system. Note: under the way of external power supply, DS18B20 GND pin can not be hung up, otherwise you cannot convert temperature, read the temperature is 85 ℃.
figure 6: the external power supply mode of single point temperature measurement circuit
figure 7: the external power supply way of multi-point temperature measurement circuit diagram
external power supply is DS18B20 the best way to work, work stable and reliable, strong anti-jamming capability, and the circuit is relatively simple, can develop the multipoint temperature monitoring system is stable and reliable. Adsense recommend use external power supply mode in the development, after all is more than the parasitic power way only pick a VCC fuses. In an external power supply mode, can give full play to the DS18B20 the advantages of wide voltage range, even if the power supply voltage VCC to 3 v, still can ensure temperature accuracy.
more high-quality sensors at https://www. rtdcn。 Com /
key words: thermal resistance, thermocouple, thermal resistance, platinum resistance, PT100, PT1000, pressure sensor and digital temperature sensor