1 Agricultural Meteorological Instrument Features
1.1 Agricultural meteorological instrument uses powerful C8051F020 one-chip computer C8051F020 one-chip computer is the fully integrated mixed signal system-on-chip (SOC) that Cygnal Company introduces, has CIP-51 kernel that is compatible with 8051 instruction set completely. It integrates almost all of the analog and digital peripherals and other functional components required for a microcontroller data acquisition or control system in a single chip. These peripherals or features include: 2 multi-channel ADC subsystems (each subsystem includes a programmable gain amplifier and an analog multiplexer), 2 voltage output DACs, 2 voltage comparators, voltage reference, SMBusPI2C Bus interface, 2 UARTs, SPI bus interface, 5 general-purpose 16-bit timers, one programmable counter P timer array (PCA) with 5 capture P compare modules, internal P external oscillator, 8 8-bits Universal digital IPO port and 64KB FLASH program memory. Compared with the standard 8051 architecture, the CIP-51 has greatly improved instruction execution speed. The execution time of the 70% instruction is 1 or 2 system clock cycles, and the execution time of only 4 instructions is greater than 4 system clock cycles. The CIP-51 operates at a maximum system clock frequency of 25 MHz and has a peak speed of 25 MIPS.
The C8051F020 implements a 3V power supply standard for on-chip analog and digital circuits (voltage range 2.7~3.6V), which greatly reduces system power consumption. A perfect clock system can ensure that the system meets the requirements of the response speed and the average clock frequency of the system is the lowest. Therefore, the C8051F020 has an excellent minimum power system design environment.
1.2 Agricultural meteorological instrument is full-featured and user-friendly The small-scale meteorological station has functions such as system self-checking, parameter binding, clearing and binding, sensor testing, and strong wind alarm. The meteorological instrument uses a 320@240 dot matrix liquid crystal display to display real-time meteorological information. At the same time, the data is sent to the computer through the serial port.
2 system hardware design Small agricultural meteorological instrument block diagram shown in Figure 1.
2.1 The power supply is designed to ensure the stable and reliable operation of the agricultural weather recorder. The front channel (wind speed, wind direction serial signal input) and back-end channel (422 signal output) of the single-chip microcomputer are optically isolated, so the device adopts dual +5V switching power supply. One of the +5V channels powers the sensors, filtering, shaping, and level shift circuitry. Since the C80512F020 requires a 3.3V supply voltage, a low-dropout regulator TPS7333 converts the other +5V to a 3.3V output. In addition, the voltage reference source AD584 is used to generate the 2.5V reference voltage required for APD conversion.
2.2 Sensor signal processing The wind speed signal is a pulse signal, which is sent to the MCU counter T0 after filtering, driving and optical separation. Wind signal is a group of current signals, plus 100K exclusion to convert it into parallel switching, and then Schmitt trigger shaping, after driving and optical separation into the microcontroller's P2 port. Temperature and relative humidity signals are 4~20mA current signals, which are respectively added with 1008 precision resistors and then become 0.4~2V voltage signals. After being amplified by analog amplifier AD623AN, they are sent to MCU.
The barometric pressure sensor output is 0~5V voltage signal, and C8051F020 requires the signal voltage is lower than the reference voltage 2.5V, so must divide into pressure before sending into MCU.
2.3 Serial Communication Interface The C8051F020 has two identical UARTs [1]. Connect the TX0, RX0, TX1, and RX1 to P0.0, P0.1, P1.0, and P1.1 by setting the cross-switch control register. UART0 and UART1 are optically isolated, driven, and level-shifted to form a bidirectional RS232 interface. UART0 and the display control unit implement full-duplex communication. UART1 sends the meteorological data measured to the upper computer for storage.
3 software design The main program's job is to sample the wind speed and direction every 2s, send the weather information to the display control unit, and calculate the 2min average wind speed and most of the wind direction; sampling air temperature, relative humidity and air pressure every 10s, and calculate the average value. If the display control unit issues an online request, online operation is performed.
The system has 2 levels of interrupts, UART0 interrupt and T3 interrupt. UART0 interrupt priority is higher than T3. When the display control unit issues an online command, a UART0 interrupt is generated and the system executes an on-line processing subroutine.
The system uses 11.0592MHz crystal to generate the system clock and uses the timer T3 to count. T3 generates an interrupt every 50ms. When 40 interrupts are generated, ie 2s, the 2s subroutine is executed. When T3 generates 200 interrupts, 10s, the system executes 10s. program. System software flow chart shown in Figure 2.
4 Conclusion After the successful development of the small meteorological instrument, a number of tests have been conducted successively, including reliability tests such as temperature cyclic stress, power source bias, etc.; electromagnetic compatibility tests and precision calibration tests of various measurement parameters, and passed the technical appraisal of the Institute. , It has been installed in the domestic 60m maritime surveillance ship. From the use of more than one year, the instrument has stable performance, reliable operation, accurate measurement, has gained the trust of users, and will be promoted and applied in many domestic small and medium-sized civilian vessels.
Customized Medical Blister,Hot-Pressed Paper Blister,Disposable Medical Products Sterile Blister,Disposable Medical Blister Packaging
Dong Guan Yi He Medical Packaging Technology Co.,Ltd , https://www.yhmedicalbilster.com