l System design goals
The overall design concept of the system is to use the SST89E564RC single-chip microcomputer as the control core. The entire system hardware includes the temperature detection part, the control execution part, the display and keyboard system, and the minimum system basic circuit. The system uses the single-chip microcomputer to obtain the temperature sensor data and compare it with the system design value, and controls the execution system according to the comparison results. The control block diagram of the temperature control system is shown in Figure 1.
2 System Hardware Design
According to the functions that the system needs to complete, the system hardware structure is designed as shown in Figure 2.
2.1 Control Core
The system uses SST89E564RC microcontroller as the control core to perform temperature acquisition, information display and actuator control. SST89E564RC is a highly reliable, small-sector FLASH microcontroller launched by SST Corporation of the United States. It has 72 KB of Super-Flash and 1 KB of RAM embedded inside. By further expanding its RAM, it can meet the operating conditions of the embedded system operating system.
2.2 Temperature Sensor
The temperature sensor uses the digital temperature sensor DS18820 from Dallas Semiconductor. The sensor supports the "one-line bus" interface, which can easily measure multi-point temperature. It can also be programmed with a resolution of 9 to 12 bits, with a maximum accuracy of ±0.062 5℃. The resolution setting and the alarm temperature set by the user are stored in the E2PROM and are still saved after power failure. The product supports a voltage range of 3 to 5.5 V, and its small size makes the system design more flexible and convenient. The pin arrangement of DS18820 is shown in Figure 3, where DQ is the digital signal input/output terminal; GND is the power ground; and VDD is the external power supply input terminal.
The internal structure of DS18820 mainly consists of 4 parts: 64-bit photolithography ROM, temperature sensor, non-volatile temperature alarm triggers TH and TL, and configuration register.
The 64-bit serial number in the photolithography ROM is photolithography before leaving the factory, and it can be regarded as the address sequence code of the DS18820. The role of the photolithography ROM is to make each DS18820 different, so that multiple DS18820s can be connected to one bus. [page]
The internal memory of the DS18820 temperature sensor includes 9 B high-speed temporary RAM and 1 B non-volatile electrically erasable E2PROM, which stores high temperature and low temperature triggers TH, TL and structure registers. The 7th bit (TM) of this byte is 0, the lower 5 bits are always 1, and the 6th and 5th bits (R1, R0) are used to set the resolution, as shown in Table 1.
According to the communication protocol of DS18820, the host must go through three steps to control DS18820 to complete temperature conversion: reset it before each reading and writing, send a ROM instruction after the reset is successful, and finally send a RAM instruction, so that the DS18820 can perform the predetermined operation. Reset requires the main CPU to pull down the data line for 500μs and then release it. After receiving the signal, DS18820 waits for about 16 to 60μs, and then sends a 60 to 240μs low pulse. The main CPU receives this signal to indicate that the reset is successful. Since DS18820 uses a single line for control and data reading, the timing requirements for the operation are very strict. Otherwise, due to timing mismatch, the correct operation of the device cannot be completed.
2.3 Control execution
(1) Wall-mounted boiler combustion system control. The control circuit uses a pulse relay device as the overall control part of the entire system. When the temperature of all rooms reaches the set value, the wall-mounted boiler stops working. The characteristics of this relay are: when the coil receives a pulse signal, the coil is energized, the electromagnet is attracted, and the contact is closed to connect the circuit to be controlled. When the next signal arrives, the electromagnet is attracted, the contact is disconnected, and the controlled power supply is cut off. Therefore, it has self-locking and signal remote control functions. Due to the effect of the magnet, the position of the slider does not change after the control pulse disappears and remains in a stable state. Therefore, the device has low power consumption and memory function.
(2) Room temperature control. Under the premise of the working of the combustion control system, the room temperature control of each room is based on the return value of the room temperature measurement, and the OK6515 self-holding pulse solenoid valve produced by Shanghai Okai Solenoid Valve Manufacturing Co., Ltd. is used to control the on and off of each circuit. The pulse solenoid valve adopts pulse and permanent magnet technology. It only needs to switch the electrode contact of the pulse by the controller to change the switch state of the solenoid valve. When the controller sends an electric pulse, the valve core is driven to overcome the permanent magnetic force and move up and down, so that the valve disc is in a self-holding state under the action of the permanent magnet after it is in place.
2.4 Graphic LCD display module
In order to provide an intuitive user display interface, the system uses a graphic LCD display module LCDl2864, which has an 8-bit standard data bus, 6 control lines and a power line, and can be directly interfaced with the CPU to display various characters and graphics. Considering the small amount of Chinese characters used in the system, an LCD without a Chinese character library is selected. The fonts of the Chinese characters used are extracted and saved in the internal FLASHROM in binary form.
3 System software design
The system software design is mainly based on the system program flow and the timing requirements of DS18820 for code writing. In order to reduce the difficulty of development and improve the development efficiency, the μC/OS-Ⅱ embedded operating system was introduced in the system development and the LCD display driver was transplanted. On the other hand, in order to ensure the accuracy of the operation timing of DS18820, the assembly language is still used for initialization and reading and writing codes of DS18820.
3.1 System data structure
The data structure required by the system includes the serial number table of each temperature measuring element, Chinese character font storage, system operation time table storage, set values and measured values of each temperature control point, storage of system time and some temporary data storage.
In order to distinguish multiple temperature sensors, the 64-bit serial number in the sensor is read during system initialization and stored in the program storage space for comparison during program operation, requiring a total of 64 B. The Chinese character font is extracted from a 16×16 font library, where each Chinese character requires 32 B, about 15 words. In order to facilitate the upgrade and improvement of program functions, the program storage space is allocated according to 20 words, requiring 640 B of storage space. The system operation schedule is designed in hours, and 24 values need to be saved; in order to reduce the amount of data calculation in the time comparison process and facilitate programming, each value is stored in one byte, requiring a total of 24 B of storage space. The program storage space is still used for storage here so that the set value will not be lost when the system is powered off.
3.2 System Program Design
The system program design is mainly written using KeilC5l, but due to the strict requirements on the read and write timing of the DSl8820 device, assembly code is used. The main code of the temperature reading subroutine is as follows:
4 Conclusion
Microcomputers play a vital role in the development of intelligent electrical appliances, and single-chip microcomputers are economical, practical, and easy to develop, so they occupy a wide market in the fields of industrial control and smart home appliances. Here, a new solution is designed for the current status of temperature controllers. A multi-point temperature control heating control system is designed using single-chip microcomputers and new temperature measuring devices. The system can measure multiple temperature points at the same time, and control the on and off of each circuit and the combustion and stop of the wall-mounted boiler in real time according to the temperature setting, thereby further improving the comfort of the room and the economy of the heating system.
Previous article:Resistance-temperature measurement system of carbon black composite conductive material based on single chip microcomputer
Next article:Design of Data Acquisition System Based on AT89C52 and USB Interface
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- New uses for old phones (2) - Install F-Droid
- Special price for mobile phone PD fast charging head 27W
- Could you please tell me the meaning and function of near and far in rl78 microcontroller?
- Recommended: Domestically designed chips AD and DA, currently the highest 6-bit 32G chip
- Introduction of 5v-30v conversion circuit
- Review summary: DIY creative show based on USB PD power receiving protocol chip CH224
- pads95 bus wiring
- What type of device is the silk screen printed on the picture?
- It’s almost the end of the year, do you have any new plans for the New Year?
- Huawei Ethernet Clock Synchronization Technology_Clock Transmission Technology White Paper