Introduction
During the debugging and development of power electronic devices, it is necessary to frequently change the relevant control parameters, and at the same time, it is necessary to monitor the power waveform at each key point during the operation of the device in real time. In current power electronic devices, the main control chip of the control board usually uses DSP (digital signal processor). Due to the limitation of its hardware conditions, when modifying the control parameters (such as the various control coefficients of PID), it is often necessary to constantly change and burn the program. It is difficult to modify the parameters online in real time, and it is also difficult to send complex control instructions to the device. In addition, during the debugging of the device, when it is necessary to monitor the power waveform at the relevant points, a multi-channel isolation oscilloscope is often used. This greatly increases the R&D cost of the device. At the same time, due to the limited number of channels of the oscilloscope, the waveform points to be monitored cannot be added and changed at any time. In addition, the probe of the oscilloscope is restricted by electromagnetic compatibility and has a limited length, which also causes a lot of inconvenience when used during debugging.
The research group of the author is responsible for the development of 100% low-floor light rail vehicles. During the development of the device, due to the aforementioned reasons, it is necessary to develop a general controller for parameter setting, device control and analog waveform output. The controller uses the communication protocol supported by the device to send commands to the device and modify parameters online, while viewing the working conditions of the device in real time, receiving the operating data such as digital quantity and digitized analog quantity sent by the device. In addition, the controller has multiple DA outputs. When an oscilloscope is connected to the DA output terminal, the basic situation of the analog quantity on the remote device can be viewed by pressing buttons to realize the long-distance power monitoring of the oscilloscope. The controller can flexibly change the power corresponding to each DA channel, greatly increasing the utilization rate of the oscilloscope sampling channel. In terms of communication protocols, the controller supports RS232, RS485, CAN bus and Ethernet protocols to maximize the communication needs of different devices. At the same time, the controller can use LCD to display the digital quantity parameters sent by the relevant device in real time. For the digitized analog quantity parameters, the controller can calculate the average value, effective value and other characteristic quantities in real time and display them using the LCD unit. On the other hand, it can be converted through an 8-way DA converter and output to the sampling channel of the oscilloscope for display. When displaying data, the controller's LCD unit can automatically determine the number of digits of the decimal part according to the size of the data to always retain 4 effective digits. All relevant parameter settings and received data can be stored in the ferroelectric memory by the controller. The data will not be lost after power failure, which is convenient for continued use next time.
2 Hardware composition and function of the controller
The hardware composition of the general controller system is shown in Figure 1.
Among them, the CPU unit of the controller adopts DSP2812 in the TMS320C28X series, which has a serial peripheral interface (SPI), two serial communication interfaces (SCIs), an improved local area network (eCAN), and a multi-channel buffered serial interface (McBSP). The DSP2812 has a high main frequency and can meet the communication rate of general controllers. At the same time, it can well support peripheral devices such as RS232, RS485, CAN bus, Ethernet, DA conversion, etc. required by general controllers, reducing the difficulty of system development.
The LCD display unit in the system adopts the LCM128645ZK Chinese LCD display module. The module has a wide power supply operating range (2.7V to 5.5V), and its low power consumption design can meet the power saving requirements of the product; at the same time, the interface between the module and the microcontroller is flexible (three modes: parallel 8-bit/4-bit, serial 3-wire/2-wire), which can realize the same-screen display of Chinese characters, ASCII codes, and dot matrix graphics, support all mainstream LCD operation instructions, and reserve a variety of control lines (reset/serial-parallel selection/brightness adjustment) for users to use flexibly. DSP2812 uses the general I/O port to communicate with LCM128645ZK, sending relevant control instructions and data to control it to perform corresponding operations.
The function keys included in the controller include moving up/down pages and menu items, increasing/decreasing parameter data, modifying/confirming current parameters, and selecting various system functions. The keys are arranged in row and column scanning. When scanning the keys, row scanning is performed first, and then column scanning. The row and column scanning structure is used to jointly determine which key is currently pressed. At the same time, key debounce is achieved through software, which improves the accuracy and reliability of the operation. The keys are connected to the I/O interface of DSP2812, and can be expanded to a maximum of 16 (4*4) key arrays to meet the requirements of various operations.
The D/A conversion selects the 12-bit 8-way DA chip AD5328, whose DAC update rate is 167ksps, DAC setting time is 6μs, and DAC form is voltage type. The DA converter exchanges data through the SPI bus of DSP2812 and is connected to it with 2 I/O interfaces of DSP as control signals.
The RS232 communication module uses MAX232 as the bus interface chip and is connected to the SCI interface of the DSP. RS232 is mainly used for communication between the controller and the PC and for remote burning of DSP programs.
The RS485 communication module uses MAX485 as the bus interface chip and is connected to the SCI interface of the DSP. The module uses HCPL2610 high-speed isolation optocoupler for level conversion and signal isolation. The output side of the module is equipped with overvoltage surge protection and anti-interference circuits to improve communication reliability.
The CAN communication module uses the enhanced local area network controller (eCAN) of DSP2812, which is compatible with the current CAN2.0 standard. It can communicate reliably with other controllers in an environment with strong electronic noise. With 32 fully configurable mailboxes and time stamp features, the eCAN module provides a universal and robust serial communication interface.
The Ethernet communication module uses LAN91C111 as the control chip and uses data lines, address lines and I/O ports to connect to DSP2812. The main functions of LAN91C111 are as follows: adaptive transmission rate, supporting 100M/10Mbps; supporting burst data transmission; 8kb internal storage device for receiving and sending cache; supporting 8-bit, 16-bit, 32-bit data transmission mode; advance sending and receiving function.
In addition, we also selected ferroelectric memory FRAM to expand the RAM of DSP 2812 through the I/O interface.
TMS320F2812
has integrated 18KB RAM internally. For general applications, there is no need to expand external RAM. The on-chip RAM can be accessed at a speed of 150MIPS. In processing programs that require high computing speed, frequently accessed program segments are usually put into the internal RAM for operation, which can greatly improve the operation speed. This system is a network communication system, which will be used for network transmission of large amounts of data in the future, so the external RAM should be expanded as a data buffer. RAM uses Ramtron's FRAM, which has the advantages of RAM and ROM, fast reading and writing speed, and can be used like non-volatile memory.
The physical picture of the general controller is shown in Figure 2.
3 Software Design of Controller
In actual use, the communication protocol of the lower-level power electronic device can be selected from any one of RS232/RS485/CAN/Ethernet. Figure 3 is a network structure diagram of a power electronic device system when using a controller.
As shown in Figure 3, the system consists of a main control unit MCU and an auxiliary control unit ACU, where the MCU uses two DSPs as the main control chip. Each DSP in the figure is configured with a corresponding communication module. When the user needs to perform real-time monitoring of the corresponding parameters of the MCU or ACU at a high sampling frequency, the Ethernet module in the target unit is enabled through the Ethernet interface of the controller, and the module can start to transmit the specified parameters and data to the controller through Ethernet. The CAN communication interface of the controller is used in the figure to connect the internal CAN control network of the MCU and ACU to send control instructions, view and set relevant operating parameters, synchronize time and instructions during system control, and send periodic heartbeat frames to judge the system communication status. At the same time, the CAN network can also transmit some low-sampling frequency operating data. The RS485 bus in the figure is used as a backup communication bus and is put into operation when the CAN bus fails.
3.1 System overall software flow
According to the above communication network structure, the system overall software flow can be designed, and the system software flow is shown in Figure 4.
The system is first powered on and initialized. After initialization, the system first initializes the CPU and LCD, sets the necessary registers, clears the LCD display data, and puts it into the corresponding working mode.
In the program, the keys are scanned every 10ms to check whether any key is pressed. If a key is pressed, the LCD display is controlled according to the predetermined working sequence to achieve page flipping, menu item movement, and related parameter modification and display functions. The communication data is received through the standard bit query or receive interrupt of the corresponding communication interface.
Figure 4 System software flow chart Figure 5 CAN communication subroutine flow chart
3.2 CAN communication implementation
The software design of the controller involves the design of DSP data communication interfaces based on RS232 bus, RS485 bus, CAN bus and Ethernet. Due to space limitations, only the implementation of CAN communication is briefly introduced. The implementation of other communication protocols is roughly the same.
After entering the corresponding communication module in the main program, call the subroutine to transmit data. The subroutine flow chart is shown in Figure 5.
Initialize the CAN module, enable the CAN module clock, set the baud rate and the send and receive mailbox identifier, configure the send and receive mailbox pointer and byte number, and enable all mailboxes.
Determine whether data needs to be sent. If the current mode is to send commands to the target DSP or send changed parameters, enter the data sending program, clear the send response bits of all send mailboxes, write the command or parameter data into the mailbox data area, and set the response flag in the send request register to start message sending until the send response flag of the corresponding mailbox is set.
If there is no send instruction or the sending is completed, enter the receiving program. When the transceiver receives bus data, the corresponding flag bit in the receive mailbox pending register is set. By querying this bit status, you can determine whether the data is received. After reading the data in the receiving mailbox, reset the receiving flag RMP and wait for the next reception.
After receiving the data, the digital quantity can be displayed on the LCD, and the analog quantity can be observed with an oscilloscope through the DA converter.
4 Summary
The innovation of the author of this article is that the universal controller can modify and set the parameters of power electronic equipment through CAN, Ethernet, RS485, RS232 and other communication methods, and can be displayed through the LCD. After actual debugging and use, the universal controller designed in this article has been applied to the power electronic device of a traction power supply system, and it runs well, and the anti-interference and reliability meet the design requirements. According to the debugging requirements of other power electronic devices, this universal controller can be flexibly changed and is easy to operate.
Previous article:Design of 256PPM Modulation Based on DSP
Next article:Design of communication interface for DSP core signal acquisition system
- 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!
- 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
- How the Circuit Works
- Did you know? TI's 77Ghz single-chip mmWave sensor enables automated parking
- Analog Dialogue Collection
- How to concatenate 8 sbits of data into one? Bitwise operation? How to implement it?
- Ask a question about bit fields
- Circuit - What does HVCCR mean?
- Application of Field Effect Transistor
- What is overshoot? How to solve the problem of overshoot in high-speed circuit signals
- Where can I find the development environment for the domestically produced aerospace-grade CPU of the BM3803MGRH model?
- What is the difference between using * and ? in the day of the week in cron expressions? I checked some information but it's not clear.