Ordinary electric valve is a general-purpose actuator. As an important actuator, it is widely used in the field of industrial process control and plays an irreplaceable role. The valve electric device is the final component that uses the motor as the power to drive the mechanical reduction device to transmit power to the valve to realize the opening and closing of the valve. It is the core part of the electric valve. In recent years, domestic manufacturers of electric valves have gradually mastered some core technologies such as mechanical transmission and manufacturing through the introduction and absorption of international advanced technologies and cooperation with internationally renowned companies such as Limitorque and Rotork. In addition, with the price advantage, they have achieved a dominant position in the domestic market. With the improvement of the level of industrial automation, especially the emergence of fieldbus technology, electric valves with only field operation and simple point-to-point control functions are increasingly difficult to meet market needs. Major foreign companies have launched fieldbus electric valve products, but the price is high. Therefore, it is of great significance to improve the automation level of electric valves in my country, transform domestic electric valve products, launch their own fieldbus products, improve the competitiveness of products, consolidate the domestic market and gradually participate in international competition for joining the WTO.
Fieldbus is a digital, serial, multi-point communication data bus used between field devices in manufacturing or process areas and automatic control devices in control rooms. It is also known as an open, digital, multi-point communication underlying control network. The emergence of fieldbus provides a fully distributed solution for industrial automation, improves the intelligence and autonomy of field equipment, and facilitates system installation and maintenance. There are many types of fieldbuses, and there are as many as 13 international standard fieldbuses. Among them, CAN bus has become a hot spot for domestic fieldbus development due to its support for multi-master mode, excellent short frame transmission performance, extremely high reliability, non-destructive bus priority arbitration mode, chip support from many semiconductor manufacturers such as Intel, Philips, Motorola, and relatively simple development methods and low development costs. The valve control system based on CAN bus studied in this paper is a valve remote control system that applies microcontroller technology and CAN technology to domestic general-purpose electric valves and industrial control computers.
1 Overall design of valve remote control system
Universal valves do not require high control accuracy and are relatively simple to operate, with only three states: open, close, and stop. Usually, operators control the opening and closing of the valve by operating the controller on the valve on site, and the valve opening is indicated by the pointer instrument on the valve. For protection purposes, the controller implements the shutdown function in the electrical control of the valve under fault conditions, but the diagnosis of the fault can only rely on the operator's experience, and even requires opening the cover for inspection, which brings inconvenience to maintenance.
The remote valve control system proposed in this paper includes upper and lower levels of control. In addition to retaining the original on-site operation function, the operator can also remotely operate the valve through the upper computer. The upper computer provides a convenient human-computer interaction interface, supports simple configuration of different valves in the system, and uses database technology to manage the status information and fault information of each valve during system operation, which is convenient for system maintenance. In addition to the fieldbus interface for communication with the lower computer, the upper computer should also have an Ethernet interface to realize information interaction between the system and the outside. Under the premise of retaining the original electrical structure of the electric device as much as possible, the lower computer introduces microcontroller technology to form an embedded control system, which supports both on-site operation and remote control of the upper computer. The two can be switched through the on-site switch. Detection circuits and fieldbus interfaces are added to the lower computer control system to realize the collection of a large amount of fault information during valve operation.
On the one hand, the microcontroller can control the opening and closing of the valve according to the valve opening value set on site or by the host computer, and on the other hand, it can respond to the data request of the host computer and upload the operation information of the valve to the host computer. The host computer and the slave computer are connected through the field bus, and the two have clear division of labor, forming a real fully distributed fieldbus control system (FCS).
According to the above analysis, this paper adopts the overall system structure of upper and lower computer two-level control with centralized management and decentralized control, as shown in Figure 1.
The upper computer uses an industrial control computer. In addition to the functions mentioned above, it also designs functions such as operation information statistics printing and system alarm; the lower computer is a control unit with a microcontroller as the core, and is embedded in the valve to realize the control function together with the electrical control part of the valve. The system communication uses the CAN bus. The CAN bus protocol is simple, including only the physical layer and the data link layer. Users can define the application layer by themselves. The transmission medium can use shielded twisted pair cables. The signal transmission uses a short frame structure. The number of valid bytes in each frame is 8, the transmission time is short, and the probability of interference is low. The bus communication rate can reach up to 1Mbps/40m, the direct transmission distance can reach up to 10km/5Kbps, and the number of devices that can be connected to the bus can reach up to 110. When a node has a serious error, it can automatically disconnect from the bus. There are many literatures on CAN bus technology, which will not be described in detail here. The CAN bus is used in the remote valve control system mentioned in this article because the valve control function logic is simple and the amount of information is small, and it is combined with the transmission speed of CAN bus data, the difficulty of development, technical support and cost.
2 Host computer design
The system host computer hardware uses Advantech's IPC-6718V industrial computer, equipped with Advantech's dual-port CAN interface card PCL-841, which has stable performance and greatly shortens the system development cycle. The host computer software is designed using VB610 to facilitate the realization of various monitoring functions required by users.
The host computer software includes several parts, such as system security module, system communication parameter setting module, database module and valve control module. Figure 2 shows the relationship between the various software modules of the host computer. It can be seen from the figure that the host computer software not only realizes the valve control function, but also fully considers the system security and database operation required as a control software. Among them, the valve control module is the core of the host computer software.
The main function of the host computer software is to monitor the status of each valve in the entire system and provide users with remote control operations on on-site valves. After the host computer software is started, the system is initialized first, and then the system monitoring operation mode is entered. If it is the first application, it must be configured according to the specific situation of the system after initialization. In the operation mode, the host computer and the lower valve control unit exchange information in a question-and-answer manner. The host computer analyzes the various status and fault information returned by each valve and refreshes the corresponding data in the database and the corresponding part on the main monitoring interface. Since there are many valves on the main monitoring interface, only the basic operating status (start, stop, fault) and opening of each valve can be simply displayed. If you want to view the detailed operating information of a valve, you can switch to the single monitoring interface of the valve by clicking the valve icon on the interface. At this time, in addition to providing basic information such as the current opening of the valve, the switch stop status, etc., it can also display alarm and fault information such as motor phase loss, over-limit, motor overheating, etc. Figure 3 shows the software flow of this process.
In order to improve the response speed during remote control, the host computer has designed a remote control function for a single valve in the system. In this working mode, the user transmits the required valve opening to the lower computer in the corresponding valve through the CAN bus, and the lower computer controls the start and stop of the valve, and transmits the operating status of the entire process to the host computer in real time. In actual applications, if different valves in the system have linkage requirements, it can also be achieved through host computer programming.
3 Lower computer design
The action of the valve is controlled by the lower computer embedded in the valve. After receiving the command of the specified opening, the lower computer will analyze the operation and various states of the valve at this time. If the valve is in a state that allows action, the lower computer will issue the analyzed command (open or close), and when the valve opening reaches the specified opening, the shutdown operation will be executed. The following will explain the design of the lower computer in detail from the hardware and software aspects.
3.1 Lower computer hardware design
The lower computer is a single-chip control system with "autonomous" function. On the basis of the original electrical control circuit, it adds the acquisition of fault signals and the CAN bus interface for external communication. The lower computer circuit can be divided into the main control unit module, power monitoring module, data acquisition and control interface module, human-machine interface module, and bus communication module in terms of structure and function. The relationship between them is shown in Figure 4.
The main control module is the core of the entire lower computer, which is composed of the minimum system of the single-chip microcomputer, coordinates the work of the other four modules, and completes the control function of the lower computer. Considering the number of valve operation information collection points and fault information collection points and the difficulty of system development, this system selected the PHILIP MCS51 series single-chip microcomputer 80C552, which has 256 bytes of readable and writable RAM data storage, 5 8-bit I/O ports, 1 8-bit input port, 2 16-bit timers/counters, 1 16-bit timer configured with capture/compare module, 15 interrupt sources, 2 interrupt priorities, 8-channel 10-bit A/D converter, 2-channel pulse width modulation output, 2 serial ports (asynchronous serial port and I2C bus port), and an integrated watchdog timer.
② Power monitoring module
During the operation of the valve, the main power circuit may lose power due to some reasons. The user requires that in this case, the monitoring part of the lower computer system can still work for a short period of time, and the fault should be uploaded to the upper computer monitoring system in time so that the operator can find and eliminate it as soon as possible. To this end, this paper designs a power monitoring module in the lower computer control machine to monitor the power supply of the valve and switch between the main power supply and the backup power supply. The circuit structure is shown in Figure 5. Since the backup power supply only supplies power to the single-chip microcomputer system when the main power circuit loses power, and the single-chip microcomputer system works in power-saving operation mode at this time, the power consumption is low, so the backup power supply uses ordinary dry batteries or rechargeable batteries. Experiments have shown that when the main power circuit loses power, the backup power supply can work for more than 12 hours, which can fully meet the needs of maintenance.
This part is the input and output part of the lower computer control system, which mainly completes the collection of various alarm signals and opening of the valve, and controls the opening, closing and stopping of the valve. Its structure is shown in Figure 6. In the data acquisition circuit, in addition to collecting the basic operating status, a large number of signal collection points such as motor phase loss, torque limit exceeding, motor overheating, fuse damage, travel switch in place, and emergency braking status are added to improve the monitoring ability of the lower computer. Most of the acquisition signals and control signals in the valve are strong electrical signals. In order to prevent the single-chip microcomputer system from being affected, an isolation design is used in the circuit to increase the reliability of the system.
④ Human-machine interface module
In addition to the remote control of the upper computer, the operation of the valve also retains the field control function, which is mainly completed through the field hand operator, which is the human-machine interface module in the lower computer. The hand operator consists of a keyboard and a digital tube display circuit. The I2C bus technology is used in the design of the hand operator. The keyboard circuit uses the input and output expansion chip PCF8574 with an I2C interface, and the display circuit uses the digital tube display driver chip SAA1064 with an I2C interface. The single-chip computer 80C552 itself integrates the I2C bus interface, which provides convenience for the software and hardware design of the system. The hardware structure of the hand operator is shown in Figure 7. In addition, the I2C bus supports live plugging and unplugging, which brings great convenience to the use of the hand operator. The user can disassemble and assemble the hand operator without interfering with the normal operation of the valve.
⑤ Communication function module
The communication circuit is the CAN bus interface part in the lower computer and is the core part that provides the valve remote control function. It consists of the CAN controller SJA1000, the CAN driver 82C250 and the photoelectric isolation circuit. The circuit structure is shown in Figure 8. Due to the need for photoelectric isolation, the module uses a DC-DC power supply module. In order to improve the versatility of the communication module and meet the needs of different uses, a micro switch is also designed in the lower computer to set different communication baud rates and address selections for different valves.
3.2 Lower computer software design
The lower computer software is written in C51 language, which greatly improves the readability and portability of the program. The lower computer software mainly completes the acquisition of valve status and faults, valve opening acquisition, execution of valve switching and stop actions and communication functions. Due to the length of the article, only the main control program and CAN bus communication interrupt service program are introduced below.
① Design of the main program
The main work of the lower computer software is to collect valve signals, control valve movement, and respond to requests or commands from the upper computer. After the lower computer system is initialized, it enters the main program loop. In order to accurately collect the valve opening and avoid false alarms, the input signals are simply digitally filtered. After the lower computer comprehensively analyzes these signals, it controls the opening, closing, and stopping of the valve according to the opening requirements. The lower computer has two control modes: on-site control and remote control, which can be distinguished by the on-site switch. In these two control modes, the lower computer can upload the operating data according to the requirements of the upper computer. The difference is that in on-site control, the operator controls the lower computer with a hand operator on site. At this time, the upper computer can only monitor the lower computer, but cannot control it; in remote control, the lower computer controls the valve by analyzing the upper computer command. The software flow of the lower computer main program is shown in Figure 9.
② Design of CAN interrupt service program
When the upper computer sends a data request or command to the lower computer, the lower computer will enter the CAN interrupt service program. After entering the CAN interrupt service program, the scene is first protected, and then the interrupt register of SJA1000 is read to analyze which interrupt it is and set the corresponding flag. If it is a receive interrupt, the receive data flag is set and the data is read, and then the cache is released, and finally the scene is restored and the interrupt returns. The CAN interrupt service program is shown in Figure 10.
Since the lower computer is to be embedded in the cavity of the valve electronic device, electromagnetic interference is serious. Therefore, a variety of software and hardware anti-interference designs are adopted in the design. Due to space constraints, they will not be described in detail one by one.
4 Conclusion
The technology mentioned in this article has been applied in the QT, OOM, SMC, ZA and other series of electric valves produced by Tianjin Valve Company, making them electric valves with remote control and fault diagnosis functions. The remote valve control system composed of these valves has been actually running for nearly a year, and the operation is good, meeting the design requirements, and has passed the expert appraisal organized by Tianjin Science and Technology Commission. At present, the pilot test of the product is being prepared, and the standardization of the application layer protocol is being stepped up, and efforts are being made to launch electric valve products that meet DEVICENET as soon as possible. It is believed that with the introduction of such products to the market, the development of fieldbus actuators in my country will be promoted.
Previous article:Design and implementation of computer temperature acquisition system based on VB
Next article:Research on Scheduling of Network Control Systems Based on CAN Bus
- 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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- Does the power layer of a four-layer board need to be made into a complete plane?
- [Register to enjoy gifts] element16 sincerely invites you to visit the 2019 Munich Shanghai Electronics Show
- I heard that every type of software has a chain of contempt...
- RSL-10 development environment construction
- [Help] TD4.6.6-64bit cannot use the ChipWatcher (logic analyzer) function
- EEWORLD University Hall----Live playback: AM57X platform features and typical applications
- 【ST NUCLEO-H743ZI Review】(1) First experience lighting up the LED
- Three currents in the inductor
- Evaluation summary: Free application for CB5654 intelligent voice development board (Xuantie 803)
- 8 Way Splitter Workspace_____Genesys2020__1/8