Design of water temperature test and measurement circuit based on DS1820

Publisher:黑白之间Latest update time:2014-12-28 Source: 互联网Keywords:DS1820 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  In this system, RA0~RA3 are used for seven-segment code display, RB6 controls the water gate switch, RB7 controls the electric heating tube, RC3~RC5 are used for button design and reading water volume, RC0~RC2 are used to communicate with DS1820 for water temperature measurement, RB0~RB1 scans the seven-segment code, RB2~RB5 LED indicator display, RC6 leakage detection, and RC7 controls the speaker for alarm and indication.

  Keyboard and water volume measurement circuit Since only four levels of water volume are required to be displayed in this system, the water volume sensor uses a switch type sensor. When the water volume reaches a certain level, the level of that level will be lowered. The interface circuit is similar to pressing a key. Therefore, in the circuit design, the water volume level signal and the key are connected to the I/O port of the microcontroller through a 74HC148 priority encoder. The key has a higher priority than the water volume signal, and the high-level water volume signal has a higher priority than the low-level signal to ensure that the key can be responded to first.

  

  The temperature of the circuit is displayed in two-digit seven-segment code, with a display range of 0℃~99℃. The water volume is displayed in one-digit seven-segment code, showing 1, 2, 3, 4, four water levels. The temperature and water volume are scanned and displayed cyclically. Four LEDs are used for the current key function setting.

  

  The single chip microcomputer of the water temperature and water volume control circuit controls the relay through photoelectric coupling to cut off or connect the power supply of the heating tube and close or open the water valve, thereby achieving the control of water temperature and water volume.

  

  Leakage detection and alarm circuit Since the water heater works in a humid environment, it needs to have leakage detection and alarm functions. The leakage detection is performed by shaping the output of the leakage detection coil and inputting it to the RC6 port. The circuit schematic is shown in Figure 3 (a). When the leakage current exceeds a certain threshold, the comparator outputs a low level, otherwise it maintains a high level, and then a monostable trigger circuit generates a waveform as shown in Figure 3 (b). The low level holding time t can be adjusted and set by the monostable trigger. In this system, t is 10ms. Since PIC16C57 has no interrupt function, the program must query the RC6 port at a certain interval (less than 10ms) to detect whether there is leakage. Once RC6 is detected to be low, the heating tube current is cut off after confirmation, and an alarm is issued at the same time. The alarm circuit also alarms when the sensor fails or overheats. PIC16C57 itself has a watchdog timer, which can automatically perform power-off protection and system reset when the system is abnormal.

  The temperature measuring element of the water temperature measurement circuit adopts DALLAS's single-wire digital temperature sensor DS1820. DS1820 provides nine-bit temperature readings, with a measurement range of -55℃~125℃. It adopts a unique 1-WIRE bus protocol, and only needs one port line to achieve two-way communication with the MCU. It has the characteristics of simple connection, high precision, and high reliability. When working, it is powered by the bus, and the microcontroller sends a command code to read the temperature value.

Keywords:DS1820 Reference address:Design of water temperature test and measurement circuit based on DS1820

Previous article:Design of Intersil Power Front-End Microcontroller Circuit
Next article:Circuit design of ECG acquisition system using STM32

Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号