Introduction
With the development of the times, digital control is undoubtedly one of the goals pursued by people, and the convenience it brings to people is also undeniable. Among them, digital thermometer is a typical example. It is widely used in many fields such as information, electronics, logistics, etc. As people's requirements for it become higher and higher, in order to provide better and more convenient facilities for modern people's work, scientific research, and life, it is necessary to start from single-chip microcomputer technology and develop in the direction of digital and intelligent control.
Here we introduce a design and production plan for a digital thermometer. The design controller uses the single-chip microcomputer STC89C58, the temperature sensor uses LM94022, and the temperature display is realized by the FM1602C liquid crystal display. The wide-range high-precision multifunctional digital thermometer is designed and produced to accurately meet various requirements. Compared with traditional thermometers, the digital thermometer designed and developed in this paper has the characteristics of convenient reading, wide temperature measurement range, and accurate temperature measurement. Its output temperature and time are displayed digitally. The digital thermometer not only has high resolution, but also can set the upper and lower limits of the alarm temperature. When the temperature reaches the high and low limit temperature control points, an audible and visual alarm is issued. This equipment is mainly used in places or scientific research laboratories where temperature measurement is relatively accurate.
1 Demonstration and comparison of system design schemes
1.1 Using LED digital tubes to display and using LCD liquid crystal to display temperature and time The
use of LED display provides less information, the interface is not beautiful, it is extremely inconvenient to display time and temperature, and the volume is large. When more information is to be expressed (such as two-way temperature value and time), a large number of LEDs and more pins are required, and the software design is relatively complex.
LCD can provide a stronger page display function, low power consumption, and the page is more intuitive and clearer than LED display; when displaying more information, it occupies less space than LED and has a higher cost performance.
It is easy to see that it is better to use LCD as a display in this design.
2.2 Sensitivity selection terminals GS0 and GS1
LM94022 has 4 sensitivities for users to choose from according to the different levels applied to GS0 and GS1, as shown in Table 2. Users can choose reasonably according to the temperature measurement range and the working voltage conditions of the interface circuit. The sensitivity is determined by the levels of GS0 and GS1. The high level requires VDD>1.5 V; the low level requires VDD<0.5 V.
2.3 Output Characteristics of LM94022
The output characteristics of LM94022 are shown in Figure 2, which is the characteristic of measuring temperature and output voltage at different sensitivities. Since the output voltage decreases with increasing temperature, its sensitivity is negative. When VDD = 5 V, the output voltage at several specific temperature values at different sensitivities is shown in Table 2 (typical values).
The overall scheme of the digital thermometer circuit design is shown in Figure 3. The STC89C58 microcontroller is used as the main control device; the LCD uses FM1602, and P0 in the microcontroller is used as its interface, and is controlled by P2.5~P2.7 to drive the LCD display; the clock chip uses DS1302, and pins P2.2~P2.4 are used as clock chip control pins; LM94022 is used as the temperature sensor chip, and TLC2543 is used
to
convert it into a digital signal, and P3.2~P3.6 are used as ADC control pins; P1 port is used as the keyboard input port to receive the signal output by the keyboard; P2.1 and P2.0 are used as the alarm control pins for over-temperature and under-temperature, respectively, and P3.7 is used as the buzzer control pin.
3.1 Temperature sampling
LM94022 adopts "10" mode. In the range of 0-100℃, the conversion formula is used:
T=(1 568-V)×0.122 699 38
pairs of output voltage samples (using op amp LM2015 as voltage follower) and converted by ADC, extracted by the microcontroller, calculated and converted into temperature.
3.2 Clock
circuit The clock uses a backup battery. After the time is set for the first time, the stored information will not be lost. When the circuit is started next time, there is no need to set the time again, which is convenient to use.
3.3 Human-computer exchange circuit
The system uses a keyboard as a human-computer exchanger, and the 4×4 structure is shown in Figure 4. Among them, Time is used for time setting; L-tem and H-tem are used for low temperature and high temperature settings respectively; Return is used to return to the main interface.
3.4 Reset function
When the reset button is pressed, the system is initialized, the low temperature of the system is set to 0.0℃, and the high temperature is set to 90.0℃.
3.5 Display interface
The first line shows the time, and the second line shows the temperature of the first and second channels. When an emergency occurs, the second line shows the reason, and the first line shows which channel has an error, and there will be a buzzer and LED light prompt.
3.6 Data storage
The hardware storage function is not implemented. Due to some minor problems in the division of labor, the software and hardware are not properly combined, the design is out of touch, and the storage function is ultimately not implemented.
4 System software design
The system software consists of three modules: main program module, function realization module and operation control module.
4.1 Main program flow
After the system is powered on and reset, it is initialized: select T0 interrupt (working mode 1) and set the initial value of the timer, initialize the temperature test circuit, and initialize the display circuit. If a key is pressed, disable T0 interrupt and display the interface for processing the corresponding event. After processing the event, press the Return key, T0 interrupt is reopened, and the normal temperature display interface is returned; if no key is pressed, if T0 interrupts, the temperature value is updated, as shown in Figure 5.
4.2 Display update program flow
Figure 6 is a flow chart of the display update program. If T0 is interrupted, the temperature value is read and updated, and the temperature update time is 50 ms. The newly read temperature value is processed. If it is higher or lower than the set temperature value, an alarm is issued and the corresponding diode lights up. Finally, the temperature information and time are read and displayed.
5 Test and result analysis
5.1 System debugging parameter analysis
Test instruments: multimeter, heating instrument.
The program simulation was used, and it was simulated on the computer software in advance and then downloaded to the microcontroller. Due to time constraints, some hardware programs were not implemented. The following is a general description of the test results:
Table 3 shows the voltage output value of LM94022 in "10" mode and the temperature value on PDF measured by a multimeter.
It can be seen from Table 3 that the displayed temperature is 0.46℃ lower than the temperature represented by the LM94022 output, so the linear formula is corrected:
Tem=Tem+0.46
Cause analysis: It may be related to the voltage drop of the current limiting resistor. Since the role of the current limiting resistor is indispensable and the output voltage fluctuation of the LM94022 is not large, a correction value is used to compensate for this voltage drop to achieve higher accuracy.
5.2 Functions realized by the system
(1) It can digitally display the measured temperature, and the measuring temperature range is 0~100℃;
(2) The resolution is not less than 0.5℃;
(3) The temperature measurement accuracy is improved, and the resolution is not less than 0.1℃;
(4) It has the function of timing and time display;
(5) There are at least two high and low temperature limit control output interfaces to control the external circuit. In actual production, the light-emitting diode can be used to simulate the display of its control state output;
(6) The high and low temperature limit control points can be set independently within the range of 0~100℃;
(7) When the temperature reaches the high and low temperature limit control points, an audible and visual alarm is issued;
(8) The temperature value is automatically measured in sequence;
(9) Multi-channel temperature inspection (at least two channels).
In addition, the temperature sensor can be moved by connecting the wires, which is convenient for measuring the temperature at different locations, and the multi-channel measurement can be moved effectively, which is convenient for operation when changing the measurement location.
6 Conclusion
The thermometer reported in this paper uses the high-resolution temperature measurement and control chip LM94022, uses the FM1602C liquid crystal display to realize temperature display, and uses the STC89C58 single-chip computer as the control center. The design and production of a wide-range, high-precision, multi-functional digital thermometer can accurately meet various requirements. Compared with traditional thermometers, this digital thermometer has the characteristics of convenient reading, wide temperature measurement range, accurate temperature measurement, and its output temperature and time are displayed digitally. It not only has high resolution, but also can set the upper and lower limits of the alarm temperature. When the temperature reaches the high and low temperature control points, an audible and visual alarm is issued, which is widely used in actual temperature control systems.
Previous article:dsPIC33FJ256MC710 Troubleshooting and Solutions
Next article:Design and implementation of binocular vision monitoring system based on DM642
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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
- Invitation | Visit the Avnet Artificial Intelligence Cloud Exhibition, read useful information online, and win gifts!
- In this circuit, why does the PMOS turn on as soon as it is powered on?
- !!! Help "Does anyone know how to solder SIM900A on the perf board?"
- Watch Shuige's video for a reward | How to save oscilloscope data and pictures to a remote PC
- LOTO virtual oscilloscope software function demonstration - FIR digital filtering
- Application of Aigtek power amplifier in electrolysis device of sludge electric remediation technology
- How to compile the image for SINA33 development board
- CalcToolBox 2 based on micropython
- DIY handheld computer with ESP32 and Raspberry Pi
- How is the 64-bit MAC address of the CC2530 device selected?