Design of 4-way CAN Bridge Based on LPC2194

CAN bus has been widely used in the automotive industry, machinery industry, textile industry, robotics, CNC machine tools, medical equipment and other fields due to its unique design, low cost, high reliability, real-time and anti-interference ability. The CAN bus can be used from high-speed networks to low-speed multi-wiring networks with a maximum transmission rate of 1 Mbps and a maximum transmission distance of 10 km (with transmission rates below 5 kbps). However, when the transmission rate is required to be high and the transmission distance is long, a single bus cannot be completed; and in a large network, multiple buses are often required to be accessed. This requires a CAN bridge with both relay and routing functions to achieve the above functions.

The 4-way CAN bridge designed in this paper can extend the CAN transmission distance and expand the CAN communication network. At the same time, it has the routing function, which can realize the conversion of different routes and different communication rates between different CAN networks, and can play a key role in large CAN networks. effect.

1 4 way CAN bridge design

1.1 Advantages of CAN Bridge

The use of 4-way CAN bridges is of great help to the improvement of network performance. It has the following advantages in the networking of large networks:

1 can extend the transmission distance of the network, especially after the relay of several CAN bridges, can greatly extend the transmission distance, can reach several kilometers or even tens of kilometers.

2 can increase the size of the CAN network, the 4-way CAN bridge has 4 CAN branches, and each branch can add a new CAN bridge, so it can form a large-scale CAN network.

3 can realize the choice of different routes between different networks, and enhance the reliability of the CAN network.

1.2 Design plan

The design scheme of CAN bridge is generally divided into two types: single MCU and multiple MCU. A single MCU is slower and is not suitable for high-speed networks; multiple MCUs have complex structures and poor stability. In view of the above situation, this design uses the ARM microcontroller LPC2194 with its own 4-way CAN controller, while avoiding the situation that the MCU is slow and the MCU network is complicated.

The features of the LPC2194 are as follows:

1 with a 32-bit ARM7 microcontroller with 256 KB of embedded high-speed flash memory. The 32-bit code is capable of running at the highest clock frequency with very low power consumption and extremely fast processing speed.

2 comes with 4-way interconnected CAN controller, fully supports CAN2.0B and ISO1198-1 standards, each CAN controller can achieve 1Mbps rate. Its global acceptance filter recognizes the 11-bit and 29-bit Rx identifiers of all buses and has significant advantages over the SJA1000's CAN controller.

Hardware design of 2 4-way CAN bridge

2.1 Overall design

Because the LPC2194 integrates four CAN controllers, it can easily realize four CAN bus interfaces, which reduces the scale of the system and improves the stability of the system. This design uses LPC2194 as the main control chip, with the isolated and protected CTM8251T as the CAN transceiver. The overall structure of the system is shown in Figure 1.

1.gif

2.2 Microcontroller interface design with CTM8251T

The CTM8251T is a universal CAN transceiver module with isolation. The module integrates all necessary CAN isolation and CAN transceiver components with 2 500 V isolation and CAN-bus overvoltage protection. The module complies with the ISO11898 standard and can therefore interoperate with other CAN transceivers that comply with the ISO11898 standard. Since the integrated 4-channel CAN controller of the microcontroller LPC2194 is identical, only the connection diagram of one CAN controller and CTM8251T is given in this design, as shown in Figure 2.

2.gif

Software design of 3 4-way CAN bridge

The 4-way CAN bridge is different from the general CAN repeater and can choose different routes and different communication rates. In this design, the four CAN interfaces can realize the selection of different routes and the conversion between different communication rates with other three channels, which greatly enhances the scalability of the network. There are two working modes of the 4-way CAN bridge: configuration mode, which can select the routing and CAN communication rate of different branches; the normal working mode, according to the configured state.

3.1 Configuration Mode

The main job of the configuration mode is to write the configuration information into the EEPROM, and the configured information can be read during normal operation. The program flow of the configuration mode is shown in Figure 3.

3.gif

This kind of Power Supply is also called industrial switching mode power supplies (SMPS) – It is a type of AC to DC, it obtains energy from the power grid, a DC high voltage is obtained through high voltage rectifier filtering, DC/DC converter obtains one or more stable DC voltage at the output end, and the power can be produced from several watts to several kilowatts for different occasions. The specifications of Switching Power Supply are various, the standard are 5V 12V 24V LED Power Supply, including single output, dual output and triple output power supply. They are widely used for LED strip, led module, led lamp and CCTV camera.

Power Supply

Power Supply,Switching Power Supply,Switch Mode Power Supply,12V DC Power Supply

Shenzhen Yidashun Technology Co., Ltd. , https://www.ydsadapter.com