1 Introduction
With the rapid development of the national economy, AC motors have played an extremely important role in industrial production. As the main traction motor in various industries, they are more widely used. As we all know, when AC motors are started at full voltage, the starting current reaches 5 to 7 times the rated current, which will cause impact on the power grid; the starting torque is about 2 times the rated torque, which aggravates the wear of the mechanical structure. In order to solve the starting problem of AC motors, soft starters are usually required for soft starting.
Currently, the monitoring of soft starters is generally performed by independent monitoring units, which cannot achieve comprehensive control and monitoring of the entire system. Therefore, it is very necessary to establish a data communication system to connect the soft start monitoring nodes to form a complete monitoring network.
Compared with RS-485 and other communication standards, CAN (Controller Area Network) bus has been applied in many fields due to its many advantages. CAN bus is a multi-master local area network launched by Bosch in Germany in the early 1980s. CAN communication network is a fully decentralized, fully digital, intelligent, bidirectional, multi-variable, multi-point, multi-station distributed communication system with many advantages such as high reliability, good stability, strong anti-interference ability, fast communication speed and low cost. CAN bus is a communication method that is very suitable for harsh environments in industrial sites. This article introduces a CAN-based AC motor soft start communication system.
2 CAN communication system structure
The AC motor soft start communication system consists of an industrial computer as the monitoring host. The industrial computer is connected to the CAN bus through the CAN bus interface. Each node is an AC motor soft starter controlled by a single-chip microcomputer with CAN bus data receiving and sending functions. The system structure is shown in Figure 1.
Figure 1 Communication system structure diagram
Each part of the communication system provides different functions. Among them, the industrial computer controls the working status of the AC motor soft starter, such as soft start, soft stop, etc., and displays various parameters of the soft start, such as starting voltage, starting current, etc. The soft starter controls the AC motor soft start according to the command of the industrial computer, and collects parameters such as motor starting current and voltage, and sends them to the industrial computer through the CAN bus.
3 CAN communication protocol
In this communication system, the length of the transmitted data is not fixed. The control command issued by the industrial computer to the soft starter is only a few bytes, while the soft start real-time data uploaded by the soft starter to the industrial computer is generally dozens of bytes. Therefore, the CAN communication protocol needs to have the ability to transmit large amounts of data, and it must be fast and efficient. Since CAN communication uses a short frame structure, the effective data length of each frame is up to 8 bytes. When the amount of data to be transmitted is large, the data must be split into multiple frames for transmission. If all information and data are placed in the 8-byte data field, there will be less effective data in the transmission frame and more communication information, which will reduce the communication efficiency of the CAN bus. Therefore, this paper adopts the method of using the arbitration field in the message identifier to contain communication control information and the data field to contain actual data to improve communication efficiency.
In this system, CAN communication uses the extended frame with a 29-bit message identifier in the CAN2.0B standard. The message identifier contains an emergency flag, destination address, source address, frame type, and frame number. Its format is shown in Table 1.
The emergency flag has only 1 bit, which is used to mark the priority of the current frame. For general information, this bit is 1, and for emergency information (such as alarm signals such as three-phase voltage unbalance, overcurrent, and soft starter component failure), this bit is 0, so that it has a high priority and is transmitted to the destination as soon as possible.
The destination address is 7 bits in total, indicating the destination of the frame. It can be a specific address or a broadcast address (mainly used for industrial computers to transmit data to each soft starter in a broadcast manner, such as timing data, etc.).
The source address is 7 bits in total, indicating the source address of the frame.
The frame type has 4 bits, which describe the type of the frame, such as industrial computer control commands, soft start real-time data, etc.
The frame number is 8 bits long and is used to mark the sequence number of the frame in multi-frame transmission.
Each CAN communication node has a unique address number, which is represented by a 7-bit binary number. Among them, the address with the highest priority is assigned to the industrial computer, the address with the lowest priority is used as the destination address of the broadcast mode, and the other addresses are assigned to each soft starter in turn.
CAN nodes use dual filtering to obtain the information they need. Both filters use 7-bit valid data, corresponding to the node address and the address in broadcast mode. In this way, only frames sent to the node and broadcast frames can enter the application layer for processing, and other irrelevant communication content is filtered out, which improves the system operation efficiency.
The control command of the industrial computer to the soft starter is represented by the corresponding control command code. The main control commands are: soft start start/stop, soft stop start/stop, starting mode (step, pulse jump, constant current) setting, starting time setting, etc. Some control commands have related parameters, such as the time length in the starting time command. The control command code and command parameters are stored in the data field.
4 Soft starter CAN communication hardware design
The CAN communication of the soft starter is composed of the P89V51RD2 microcontroller, the CAN controller SJA1000, the CAN bus transceiver PCA82C250 and the optocoupler 6N137. The circuit principle is shown in Figure 2.
Figure 2 Schematic diagram of soft starter CAN communication circuit
SJA1000 is an independent CAN controller with two working modes: BasicCAN and PeliCAN. The PeliCAN working mode supports the CAN 2.0B protocol with many new features. PCA82C250 is a bus transceiver, whose main functions are to increase the communication distance, improve the instantaneous anti-interference ability of the system, protect the bus, and achieve thermal protection. In order to enhance the anti-interference ability of the CAN bus node, SJA1000 is connected to PCA82C250 through the high-speed optical coupler 6N137, which well realizes the electrical isolation between the CAN nodes on the bus. The power supply on both sides of the optical coupler is completely electrically isolated, and the isolated power supply is provided by the low-power power isolation module B0505. [page]
5 Soft starter CAN communication program design
After the soft starter is powered on, it first performs a self-test, and then sends the self-test result to the industrial computer. If the self-test is successful, the industrial computer sends the soft start initialization parameters and the "allow start" command to the soft starter, and the motor starts soft starting. During the soft start process, the soft starter sends soft start data every 100ms, including three-phase voltage, three-phase current, motor speed and other information. After the motor runs, the industrial computer sends a "soft stop start" command, and the soft starter starts to control the motor to soft stop. When the soft starter fails, the industrial computer receives a fault alarm signal and displays the cause of the fault.
The soft starter CAN communication program mainly includes three parts: CAN node initialization, message sending and message receiving. Among them, the CAN node initialization part is the key. Correct initialization ensures the normal operation of message sending and receiving. The CAN initialization program flow is shown in Figure 3.
Figure 3 CAN initialization program flow chart
When sending a message, it is only necessary to combine the data to be sent into a frame message according to the communication protocol, send it to the sending buffer, and then start sending. The program flow chart is shown in Figure 4.
Figure 4 CAN message sending program flow chart
In the process of receiving the message, firstly, the situations such as bus disconnection and error alarm should be judged and processed, then the data in the buffer should be read, and finally the buffer and related registers should be released to complete the reception and transfer to the data processing program. The program flow chart is shown in Figure 5.
Figure 5 CAN message receiving program flow chart
6 Conclusion
This paper designs a reliable and efficient AC motor soft start communication system, which uses CAN bus technology to realize the remote control and monitoring functions of motor soft start. The system has been successfully applied to the motor soft start system of a water pump station. Practice has proved that the system has strong anti-interference ability, good real-time performance, stable operation, and meets the design requirements.
Previous article:Explanation of data, bdata and code in keil C of microcontroller
Next article:Application of 51 single chip microcomputer in portable numerical control well logging system
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief Analysis of Automotive Ethernet Test Content and Test Methods
- How haptic technology can enhance driving safety
- Let’s talk about the “Three Musketeers” of radar in autonomous driving
- Why software-defined vehicles transform cars from tools into living spaces
- How Lucid is overtaking Tesla with smaller motors
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Many domestic chips now replace the STM series chips, which looks good in the short term. What do you think?
- High-speed circuit design practice
- [Evaluation of EC-01F-Kit, the EC-01F NB-IoT development board] Flash
- [Anxinke NB-IoT Development Board EC-01F-Kit] Part 1: Getting to know EC-01F-Kit
- [Jihai APM32E103VET6S development board] Evaluation 3, TFT LCD
- OV7670 simple driver for MSP430F5438A
- Looking back at 2018 and looking forward to 2019
- [Sipeed LicheeRV 86 Panel Review] 2. Firmware Burning, Linux System Test
- MATLAB simulation model for online parameter identification of permanent magnet synchronous motor based on RLS least squares method
- Research on constant false alarm rate control technology of laser radar based on FPGA (1)