1. Introduction
At present, with the continuous development and maturity of chip technology and single-chip microcomputer functions, single-chip microcomputer technology has been widely used in industrial measurement and control systems. There are many types of single-chip microcomputers and corresponding peripheral modular products on the market, especially the 8051 series and PIC single-chip microcomputers are the most popular. The powerful single-chip microcomputers have indeed reduced the workload of control system designers, but there are two problems: First, the comprehensive design of hardware and software is not considered in the process of selecting single-chip microcomputers, that is, only the convenience of hardware is considered, and the corresponding software is not considered. Therefore, in the system design cycle, the design process of hardware and software is separated and independent of each other, and there is no interaction before system integration; second, in the process of hardware selection, the system development cycle and cost are not considered, and it is often necessary to purchase a dedicated development system and programmer. Developers also have to spend a certain amount of time to familiarize themselves with instructions and simulators, which prolongs the development cycle. Obviously, this design method of selecting single-chip microcomputers based on project functions limits the ability to balance hardware and software, and cannot give full play to the potential of each hardware and software. When the software and hardware are finally combined, it is likely that the hardware or software will need to be modified, and sometimes even some special hardware will need to be added, which will extend the development cycle, reduce the overall system performance, and increase the potential development cost. Therefore, in order to design a complete control system under the constraints of the development cycle and cost, it is necessary to adopt a method of hardware and software integrated design. The hardware and software platform technology proposed in this paper is based on the idea of hardware and software integrated design, taking into account the uniqueness of the single-chip measurement and control system and its similarity in most application fields, and using a universal hardware platform and software platform to achieve a fast and effective integrated design of the computer measurement and control system. Users only need to compile the corresponding program according to the project requirements to complete the design of the entire system.
2. Introduction to platform technology
In the past, each engineering project was always treated in isolation in the single-chip microcomputer measurement and control system. Therefore, every time a project was done, it had to be done from scratch, which was very inefficient. In fact, although the single-chip microcomputer measurement and control system is not as standardized as an office or management system, it still has certain rules. Therefore, the common parts can be abstracted to form a basic framework, that is, a platform. The block diagram of the composition of a common single-chip microcomputer measurement and control system is shown in Figure 1.
In the control of the production process, from the perspective of signal detection and output control, the single-chip microcomputer measurement and control system usually has to process three types of signals:
① Switching signals indicating the operation of the production process, such as the start and stop status of various controlled equipment, the opening and closing status of contactors, the switch status on the operation panel, and the upper and lower limit alarm signals of various physical quantities.
② Analog signals reflecting the working conditions of the production process and driving the field control device, such as the weight, flow, speed, pressure, material level, composition, etc. of analog input, the continuously adjusted regulating valve of analog output, electric actuators, etc., which are all analog quantities that change continuously over
time. ③ Digital signals required by pure digital devices, such as RS232, RS485 serial ports, micro printers and other conventional peripherals for communicating with the host computer, some digital execution devices (stepping motors and digital display devices) and some digital detection devices (photoelectric encoders, digital flow meters, etc.). Most of these pure digital signals can be directly connected to the data line or communication interface of the single-chip microcomputer. They are highly standardized and versatile and very convenient to use. The first two types of signals are mostly used in industrial sites, and the situation is much more complicated. This is also the most difficult and time-consuming task to standardize in system design. Platform technology integrates software and hardware technologies, and strives to integrate the main parts of most measurement and control systems in industrial sites, integrating the digital signal input, analog signal input, A/D multiplexer, switch output, analog output, keyboard, digital tube display, communication with the host computer, watchdog circuit, FLASH storage and other hardware parts in Figure 1 into a hardware platform; based on the hardware platform, develop the corresponding keyboard input module, digital tube display module, A/D conversion module, digital quantity input/output module, data storage module, communication with the host computer module, etc., and integrate these modules into a general software platform. The two complement and support each other.
2. 1 Hardware platform
The main functions of the designed single-chip microcomputer measurement and control system are:
① Realize the information conversion between the single-chip microcomputer and the production process, including A/D conversion, D/A conversion, level conversion, digital quantity input and output, etc.
②Realize the information transmission between the single-chip microcomputer and the production process, including the time-sharing acquisition of multi-channel information, the time-sharing operation of multi-channel control, etc. All functions are done on a main circuit board containing a CPU (also called a CPU board). The keyboard and display parts are flexibly configured according to the specific panel requirements of the system to realize the keyboard input and digital tube display of the single-chip microcomputer measurement and control system.
③The storage and hardware watchdog of the data collected and the setting parameters of the single-chip microcomputer measurement and control system.
Since the production processes of many identical or similar industries are very similar, the single-chip microcomputer hardware platform can be completely universal for the production process of different manufacturers in the same industry, and its different parts and specific implementation processes can be left to each software platform to coordinate, which is very suitable for small and medium-sized enterprises. The hardware platform designed according to the function of the measurement and control system is shown in Figure 2.
[page]
In the designed single-chip microcomputer measurement and control system hardware platform, the central single-chip microcomputer adopts AT89C52 single-chip microcomputer. AT89C52 has 8k bytes of fast erasable memory Flash, which does not need external program memory EPROM, reducing the size of the circuit board and enhancing the anti-interference ability of the system; digital signals (such as alarm input, limit position, etc.) are directly connected to the INT0, INT1, T0, T1 terminals of the single-chip microcomputer, so that the single-chip microcomputer can respond to the signal input in time; 8 analog inputs are connected through AD0809 The A/D conversion is connected to the data line of 89C52; the analog output signal uses the DAC0832 chip to convert it into a voltage or current signal to drive continuous valves, electric actuators and other devices; the switch output signal is latched by 74LS373, driven by optoelectronic isolation, and controls the switch output; the digital tube display drive circuit uses the MAX7219 with a serial bus, which can carry 8-bit digital tubes or 64 light-emitting tubes to display field data and make sound and light alarms; the keyboard circuit uses the high 8-bit address line of the microcontroller to connect the pull-up resistor, and the software program scans to determine the key code; the watchdog circuit uses the X25045 to prevent data loss and CPU malfunction. The chip integrates the three functional parts of the watchdog timer power monitoring circuit and EEPROM into a single package, which is programmable, highly reliable, and low in power consumption. It contains 512 bytes of EEPROM to store communication addresses, system parameter settings, etc.; the chip that communicates with the host computer uses the MAX485, which can make the communication distance reach about 1200 meters.
2. 2 Software Platform
The software platform is divided into two parts. One part is directly placed on the hardware platform, called the system software platform, which mainly completes the underlying functions such as field data acquisition, running control algorithms, output control quantity, field parameter setting, field parameter digital tube display, etc. All work is organized by the microcontroller main program through the software module established on the hardware platform to form a system software platform, so it is the combination point of the comprehensive design of software and hardware; the other part is used to communicate with the upper management machine, called the communication software platform, which mainly completes the communication with the upper management machine, transmits field data, status and accepts upper computer instructions. On the one hand, the software platform should give full play to the potential of the hardware platform. Under the conditions of existing hardware resources, the system can complete more work according to the process requirements of the actual industrial measurement and control system, thereby saving hardware costs; on the other hand, the software platform is the main basis for users' secondary development. In order to shorten the development cycle, the main functions realized by the software can be made into standard modules for convenient secondary development. The block diagram of the microcontroller software main program and the corresponding functional modules designed according to the hardware development platform is shown in the figure.
3 Characteristics of platform technology
This platform technology with integrated software and hardware design can be summarized as follows:
① High development efficiency. The platform system has the basic framework of the application system. Users can generate the application system by modifying the software appropriately.
② Good real-time performance. Since the measurement and control system platform is based on the single-chip microcomputer MCU and also has many built-in functional modules, it can communicate with the microcomputer PC through the serial port, so it can be used as an independent intelligent instrument or controller, and can communicate with the host computer in real time to form a more powerful distributed control system.
③ Completely eradicate a large amount of low-level repetitive work in product development, accumulate the reliability of the platform, and ensure that the products developed based on the platform have good reliability. The standardized, serialized, and standardized design of the platform is greatly beneficial to the production, maintenance, and update of the product.
4 Application Examples
The design of two different systems, the fermentation process temperature control system and the diamond grinding control system, can be easily realized using platform technology. The system block diagrams are shown in Figures 4 and 5.
Fermentation process temperature control system: The input quantities are the fermentation raw material temperature and the steam pipeline pressure. The control quantity is the temperature inside the tank, which is achieved by adjusting the opening of the cold water valve and the steam valve. To achieve this goal, you only need to use the general hardware and software platform and modify the system software platform slightly to complete the design.
Diamond grinding control system: The input quantities are the diamond model and weight, and the control quantity is the motor speed. For this system, it is also easy to implement a new design by using the general hardware and software platform and modifying the system platform software according to the specific requirements of the system.
5 Conclusion
This platform technology based on integrated hardware and software design can fully utilize the hardware and software resources in the system, save hardware costs and software development expenses, and greatly shorten the system development cycle. It is an advanced single-chip microcomputer measurement and control system design method. It can be widely used in many single-chip microcomputer industrial measurement and control systems.
References
1 He Limin: Selected Single-Chip Microcomputer Application Technology. Beijing University of Aeronautics and Astronautics Press. 1994
2 Wang Xiucai, Liu Zuwang: Single-Chip Microcomputer Interface Technology. Fudan University Press. 1995
3 Pan Xinmin: Microcomputer Control Technology. People's Posts and Telecommunications Press. 1987
Previous article:An ISD4004 voice chip application circuit based on single-chip microcomputer control
Next article:Several issues that should be paid attention to when programming single chip microcomputer with C language
Recommended ReadingLatest update time:2024-11-16 16:45
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
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
- Comparison between NFC, RFID, infrared and Bluetooth
- MSP430 Clock Analysis
- Feedback and Op Amp in Circuits
- Why are the photos of Ukraine taken by US satellites in color but China in black and white?
- Prize-giving event | Stand on NI's shoulders and explore the mysteries of data together!
- A summary of the most downloaded electronic technical materials this week (2020.6.8~12)
- MPPT solar lithium battery charger based on single chip microcomputer
- Data sharing: A brief review of the 2018 National Undergraduate Electronic Design Competition TI Cup and sharing of preparation experience
- STM32 assignment question
- LIS331DLH three-axis acceleration sensor package and code