Chapter 1 Introduction 1. 1 Background of the topic Moisture-proof, mildew-proof, anti-corrosion and explosion-proof are important contents of daily work in the warehouse and are important indicators to measure the quality of warehouse management. It directly affects the service life and working reliability of reserve materials. In order to ensure the smooth progress of daily work, the primary issue is to strengthen the monitoring of temperature and humidity in the warehouse. However, the traditional method is to use testing equipment such as hygrometers, hair hygrometers, bimetal measuring meters and humidity test strips, and conduct manual inspections to ventilate, dehumidify and cool warehouses that do not meet the temperature and humidity requirements. This manual testing method is time-consuming, labor-intensive, inefficient, and the temperature and humidity of the test have large errors and randomness. Therefore, we need a low-cost, easy-to-use and accurate temperature and humidity measuring instrument. 1.2 Design process and process requirements 1. Basic functions ~ Detect temperature and humidity ~ Display temperature and humidity ~ Over-limit alarm 2. Main technical parameters ~ Temperature detection range: -30℃- 50℃~ Measurement accuracy: 0.5℃~ Humidity Detection range: 10-100RH~ Detection accuracy: 1RH~ Display mode: Temperature: four-digit display Humidity: four-digit display~ Alarm mode: triode-driven buzzer alarm Chapter 2 Comparison and demonstration of solutions When using microcontroller as measurement and control When the system is running, the system must always have an input channel for the signal to be measured, and the computer will pick up the necessary input information. For the measurement system, how to accurately obtain the measured signal is its core task; for the measurement and control system, testing the state of the controlled object and monitoring the control conditions are also indispensable links. Sensors are the primary link to achieve measurement and control and are key components of the measurement and control system. Without sensors that accurately and reliably capture and convert the original measured signals, all accurate measurement and control will be impossible. The automated measurement and control of industrial production processes almost mainly relies on various sensors to detect and control various parameters in the production process, so that equipment and systems can operate normally at their best, thereby ensuring high efficiency and high quality of production. 2. 1 Selection of temperature sensor Option 1: Use a thermal resistance temperature sensor. Thermal resistance is a temperature measuring element made by utilizing the characteristics of the conductor's resistance that changes with temperature. Currently, platinum, copper, nickel and other thermal resistors are widely used. Its main features are high precision, large measurement range, and convenient long-distance measurement. Platinum has extremely stable physical and chemical properties, strong oxidation resistance, easy purification, good replicability, good industrial properties, and high resistivity. Therefore, platinum resistors are used for high-precision temperature measurement and temperature standards in industrial testing. The disadvantages are that it is expensive, has a small temperature coefficient, is greatly affected by magnetic fields, and is easily contaminated and brittle in the reducing medium. According to the IEC standard temperature measurement range -200~650℃, when the Baidu resistance ratio W (100) = 1.3850, R0 is 100Ω and 10Ω, the allowable measurement error is ±(0.15℃ 0.002 |t|) for level A and level B is ±(0.3℃ 0.005 |t|). Copper resistors have a larger temperature coefficient than platinum resistors, are cheaper, and are easier to purify and process; however, their resistivity is small and their stability in corrosive media is poor. Used in industry for temperature measurement from -50 to 180°C. Option 2: Use AD590, which has a temperature measurement range of -55°C to 150°C and high accuracy. The non-linear error of M gear within the temperature measurement range is ±0.3°C. AD590 can withstand 44V forward voltage and 20V reverse voltage, so the device will not be damaged if it is connected reversely. Reliable to use. It only needs DC power to work, and no linear correction is required, so it is very convenient to use and the excuse is very simple. As a characteristic of the current output type sensor, compared with the voltage output type, it has a strong ability to resist external interference. The measurement signal of AD590 can be transmitted to a distance of more than 100 meters. Comprehensive comparison of Scheme 1 and Scheme 2, Scheme 2 is more suitable for the selection of temperature sensors in this design system.
2. 2 Selection of Humidity Sensors There are many ways to measure air humidity. The principle is to indirectly obtain the amount of water absorbed by a substance and the moisture content of the surrounding air based on the changes in physical or chemical properties caused by a substance absorbing moisture from the surrounding air. humidity. Capacitive, resistive and expansion humidity sensors measure humidity based on the changes in dielectric constant, resistivity and volume of their polymer materials after absorbing moisture. Option 1: Use HOS-201 humidity sensor. HOS-201 humidity sensor is a high humidity switch sensor. Its working voltage is below AC 1V, the frequency is 50HZ~1KHZ, the measuring humidity range is 0~100RH, the working temperature range is 0~50℃, and the impedance is 75RH (25℃ ) is 1MΩ. This type of sensor was originally used for switches and cannot detect humidity in a wide frequency range. Therefore, it is mainly used to determine the humidity level above or below a specified value. However, this sensor only has good linearity when used within a certain range, and its linear characteristics can be effectively utilized. Option 2: Use HS1100/HS1101 humidity sensor. The HS1100/HS1101 capacitive sensor is equivalent to a capacitive device in the circuit structure, and its capacitance increases as the measured air humidity increases. Complete interchangeability without calibration, high reliability and long-term stability, fast response time, patented solid polymer structure, two package products: top contact (HS1100) and side contact (HS1101), suitable for linear voltage There are two circuits, output and frequency output, suitable for automatic plug-in and automatic assembly processes on manufacturing lines. The relative humidity is in the range of 1---100RH; the capacitance changes from 16pF to 200pF, and the error is not greater than ±2RH; the response time is less than 5S; the temperature coefficient is 0.04 pF/℃. It can be seen that the accuracy is higher. Comprehensive comparison of Scheme 1 and Scheme 2, although Scheme 1 meets the requirements of accuracy and measurement humidity range, it has good linearity when used only within a certain range, and its linear characteristics can be effectively utilized. Moreover, there is no requirement for temperature -30~50℃ in this design system. Therefore, we choose option 2 as the humidity sensor of this design. 2. 3 Selection of signal acquisition channels In this design system, the temperature input signal is an 8-channel analog signal, which requires a multi-channel structure. Solution 1: Use multiple parallel analog input channels. The characteristics of the analog channel of this structure are: (1) Devices of different performance levels can be selected according to the requirements of each input measurement. The overall cost can be made lower. (2) The hardware is complex and has a high failure rate. (3) The software is simple and each channel can be programmed independently. Option 2: Use multiple time-sharing analog input channels. The characteristics of the analog channel of this structure are: (1) High requirements for ADC and S/H. (2) The processing speed is slow. (3) The hardware is simple and the cost is low. (4) The software is relatively complex. Comprehensive comparison of Scheme 1 and Scheme 2, Scheme 2 is more suitable for the analog input requirements of this design system. Comparing its block diagram, Scheme 2 has the outstanding advantage of simple hardware, so Scheme 2 is selected as the signal input channel. This article comes from: /dianzi/