Design of Distributed Flexible Cable Test System Based on CAN Bus


Time:

2023-09-13

The aviation cable is the nervous system of the aircraft, which connects the electrical, avionics, fire control, control and other systems of the aircraft to provide power supply, control signals and data information for the components of the aircraft.

Due to the limitation of aircraft fuselage space, the cable system wiring is generally concentrated in the narrow aircraft wall, and the aircraft wall is almost full of wires, so the aviation cable system requires high reliability, high integration, high portability;

Due to the wide variety of wires, all kinds of power lines, high and low frequency signal lines, data lines are mixed together, the length can reach hundreds of kilometers, the electrical environment is very complex, so that its potential failure increases, many air crash accidents and aircraft failures are directly or indirectly related to cable system failure, therefore, the "health" of aviation cable is an important guarantee for the safe operation of aircraft, cable safety is particularly important. However, the domestic research and development of the whole aircraft cable testing technology is relatively lacking, which is far behind the current situation of regular application in foreign countries.

According to the test requirements of long distance (nearly 100 meters) and many points (more than 30000 points) of the whole aircraft cable, a distributed flexible cable test system based on CAN bus is proposed. The system has the advantages of scalability of test points, test flexibility based on cable intelligent identification, and multi-point incentive of distributed test terminals, which can meet the testing needs of aircraft assembly and maintenance departments such as large passenger and large transportation.

1 Test system structure based on CAN bus.

CAN bus is a serial communication bus that effectively supports distributed control, with simple structure, high reliability and data transmission rate, the number of nodes in the network is not limited in theory, and free communication between nodes can be realized.

Figure 1 shows a distributed cable test system based on CAN bus, which consists of a host, a CAN bus adapter card, a CAN bus and a distribution machine.

2 hardware structure of the distribution machine

The system is based on modular design, each distribution machine has the same transfer connector and test function, because the system designed the cable feature automatic identification circuit, and established the corresponding data information, can realize the transfer cable blind plug function, so it can meet the large distance distribution measuring point of the distribution machine interchangeability. The hardware structure of the distribution machine is shown in Figure 3.

It consists of arm microcontroller module, CPLD module, relay matrix switch module and test module. The test point capacity of each distribution machine is 3 000 points. The test point selection circuit consists of a large-scale relay matrix switch controlled by a complex programmable device (CPLD), which can realize cable detection between multiple channels at the same time.

2.1 arm microcontrollers

The distribution machine chooses LPC2290ARM chip as the main controller, LPC2290 the on-chip resources are rich, which can meet the control requirements of the system for the test circuit, and can reduce the complexity of the system hardware design, support JTAG real-time simulation, development and debugging is convenient. At the same time, LPC2290 the internal integrated 2-way CAN controller can be used as the node of the CAN bus, the design of the peripheral circuit of the CAN controller is omitted, and the interference is reduced. Its built-in CAN controller conforms to CAN 2.0B,ISO11898-1 bus specification, bus data baud rate can reach 1 Mb/s, 32-bit registers and RAM can be accessed, the global acceptance filter can identify 11 and 29-bit R identifiers of almost all buses, and the acceptance filter provides FullCAN-style automatic reception for selectable standard identifiers.

The driver circuit of the CAN controller still selects the transceiver TJA1050, and an isolation circuit composed of a DC-DC power isolation module and a 2-way high-speed optocoupler 6N137 is added between the arm and the transceiver to ensure that the controller can work normally when the CAN bus is severely disturbed.

2.2 test circuit module

The test circuit module is completed by the high-precision multimeter board card to complete the on-off test, insulation test, capacitance test and fault location and other related cable test functions, the main controller of the distribution machine LPC2290 according to the test command through the control switch switching system to load the test circuit to the required excitation cable test port, and collect the information of the response port.

Design of 2.3 Address Gating Control CPLD Module

Programmable logic devices have been widely used for the design of digital systems to bring great flexibility, software programming can be used to reconstruct its hardware structure and working methods, so that hardware design as software design as convenient and fast. There are a large number of gate circuits inside the CPLD, which is suitable for implementing complex combinational logic.

2.3.1 Implementation of CPLD function

The distribution machine uses CPLD to realize the LPC2290 I/O port expansion of the main controller. The main controller only needs to send the cable address to be tested to the CPID through the serial interface SPI, and the CPLD controls the relay matrix switch for gating. CPLD uses Altera's MAX II series EPM570ZM256C6 and has 160 general-purpose I/O ports. The development tool uses the integrated PLD development software Quartus II introduced by Altera.

According to the capacity requirements of the distribution machine measuring point, CPLD is designed as a 150-bit string-in and out shift register and a 150-bit output latch, the control of the register and the output latch is independent of each other, the integrated function module is shown in Figure 4. Among them, CLK is the clock input of the shift register, and the data is read in at the rising edge; SI is the serial input port; SO is the serial output for cascading;

LAT is the output latch control signal, and the data is output at its rising edge; EN is the enable terminal, the high level enables the output, and the low level makes the output a high impedance state. The 20-chip CPLD cascade enables the distribution machine to achieve a test capacity of 3 000 points.

2.3.2 LPC2290 control of CPLD

The LPC2290 controls the CPLD through the SPI interface, and the connection schematic is shown in Figure 5.

The flow chart of the SPI bus operation in this system is shown in Figure 6. The setting of the LPC2290 SPI interface data transmission format should be consistent with the CPLD data transmission format, I .e. SPCR = 0x 30,SPI interface sends one byte of data at a time, and 375 cycles are required in this system, which can realize the string-in and string-out of 3,000 bits of data.

The key program code is as follows:

Design of 2.4 Relay Matrix Switch

The main function of the matrix switch is to realize the conduction selection of the test point and switch the test circuit to the corresponding channel. Corresponding to the CPLD, the matrix switch is in units of 150 points.

The reliability and response speed of the relay, as the actuator of the on-off of the measuring point, directly affect the performance of the whole system. The 12 V relay EC2-12 with high reliability, high signal isolation and stable performance is selected as the switching control relay. The EC2-12 is a single coil self-locking relay. When a 12 V excitation is input, the relay is closed and the state will remain until the -12V excitation arrives.

L298N is selected to form a relay drive circuit, which can convert TTL logic level signal into ± 12 V voltage required by the system to realize the set and reset of the relay. The two normally open points of each EC2-12 (K1 and K2 are the normally open points of relay 1 and relay 2) are used to control two (e. g. 0 and 1) measuring points, and each pair of relays controls the positions of two measuring points (relay 1 controls the output end and relay 2 controls the input end). the schematic diagram is shown in fig. 7. The test circuit is connected to the input and output terminals through the switch to realize the test of the cable to be tested.

3 Summary

On the basis of determining the working mode of CAN bus, the distribution machine hardware adopts modular design, and for the control mode of large-scale matrix switch module, the design scheme based on CPLD is proposed, and the hardware implementation method and part of the communication program flow are given.

The system can realize the expansion of test capacity according to the object to be tested, is easy to use, can realize multi-point excitation under the unified deployment of the host, improve the test speed and test flexibility, and can be applied to large equipment occasions with complex cable networks such as aviation cables.

The host generates the test program according to the cable connection information and connector information of the database, publishes the information and monitors the working condition of each distribution machine, and provides the human-computer interaction interface through the test software. Host composition schematic diagram shown in Figure 2.

The host communicates with the CAN bus through the CAN bus adapter card, which uses RS 232-CAN interface and consists of MAX232 level conversion chip, AT 89S52 microcontroller, CAN bus control chip SJA1000 and transceiver TJA1050. SJA1000 is a stand-alone controller for Controller Area Networks in automotive and general industrial environments.

The TJA1050 is the interface between the CAN protocol controller and the physical bus. It is a standard high-speed CAN transceiver that can provide differential transmission function for the bus. The basic working principle of the bus adapter card is: the host sends data to the microcontroller through the RS 232, and the microcontroller forwards the data to the CAN bus through the CAN bus controller SJA1000 and the CAN transmitter TJA1050 according to the specific CAN application protocol.

The distribution machine realizes the communication between the distribution machine and the host machine and the distribution machine through the CAN bus, and completes the functions of cable on-off, resistance, insulation withstand voltage, capacitance test and fault location. Under the unified allocation of the host machine, automatic cable identification and non-redundant multi-point excitation test can be carried out, thus improving the test speed.

Key words:

Technology

Yuaneng Hechuang