This paper proposes a design method for a distributed underwater vehicle controller based on CAN bus, and mainly describes its overall hardware design scheme and implementation method. As a node of the distributed control system, the controller is connected to other nodes by CAN bus to form a network, and transmits data and control commands to each other. Each node has a main control computer to realize the decentralization of computing tasks. The controller uses MCU based on ARM architecture as the control computer, and is equipped with isolation module, CAN controller and transceiver, data storage module, I/O interface module, RS232 module and other circuits . The characteristics of this controller are small size and power consumption, strong communication function, and can realize intelligent control, data acquisition and processing, fault detection and other control functions.
Underwater autonomous vehicle is a general term for mobile underwater detection and underwater operation engineering equipment, and is an important tool for marine survey and development. It can complete tasks such as underwater terrain exploration, detection, and underwater hazardous environment operations. Its controller is an important part of its hardware. Its main function is to control part or all of the motion parameters according to its mission, so that it can sail according to the specified trajectory, and ensure the stability of AUV motion and meet the dynamic accuracy requirements of AUV. Its performance directly affects the overall performance of AUV. With the development of AUV technology, the controller has been required to have high reliability, high real-time performance, precise positioning, precise control, and simple maintenance. This paper proposes a design scheme for a bus-based distributed underwater vehicle controller. The main purpose is to realize the design of control nodes based on the overall structure of a distributed control system. Then a true distributed control system can be realized, the computing load of the central processing unit can be reduced, and a large amount of data processing and analysis can be completed on site. The controller designed in this scheme has perfect intelligent control and communication functions. Compared with other bus protocols, the selected CAN bus has mature software and hardware technology, safe and reliable, fast transmission speed, low cost, easy expansion and maintenance.
1 Composition structure of the controller
The underwater vehicle controller consists of an MCU minimum system ( JTAG circuit, reset circuit), an external Flash storage module, an I/O interface, an isolation circuit module, a communication circuit, etc. The system structure diagram is shown in Figure 1. The entire controller consists of four parts. The first is the MCU minimum control system, including a reset circuit and a JTAG debugging circuit. The second is the data acquisition part. The I/O interface and the RS2 32 serial interface are used to connect to various underwater sensors , collect real-time data sent by the sensors, and transmit them to the MCU for analysis and fusion. Some sensors send out analog signals, which need to be converted by AD/DA conversion modules before entering the processing center. The data acquisition part also includes a temperature data collection circuit, which is used to monitor the system operation status. The third is the data storage module, which is mainly used to store and output experimental data. The navigation data is recorded during the operation of the underwater vehicle, which can also be used for debugging purposes. The fourth is the communication part, which mainly includes the CAN bus interface circuit, which is used to transmit the data of the controlled process and other control commands to other nodes.
2 MCU Minimum Control System
In this paper, the NXP2478 embedded microcontroller based on the ARM7-TDMI architecture is used as the main control computer. The NXP2478 uses the ARM7 as the core. It includes a 10/100 Ethernet media access controller (MAC), a USB full-speed device/host/OTG controller with 4 kB terminal RAM, 4 UARTs, two CAN channels, an SPI interface, two synchronous serial ports, 3 I2C interfaces and an I2S interface. It also has a 4 MHz on-chip oscillator, 98 kB RAM, and an external memory controller to support the various serial communication interfaces mentioned above. The minimum system with NXP2478 as the core mainly includes a power module, a reset circuit and a JTAG module. The power module implements two functions: 1) Voltage conversion function, which reduces the input voltage of 5 V level to the 3.3 V working voltage of NXP2478. 2) Voltage and current stabilization function. The microcontroller needs a stable voltage with relatively small ripple. If the voltage drops suddenly, it will often cause the program to run away. Therefore, a special circuit must be used to stabilize the working voltage. Generally, a large resistor is connected in parallel to stabilize the working voltage. The reset circuit can be completed with a reset chip with a built-in watchdog function. It mainly realizes power-on reset, power-off reset, manual reset and other functions. The watchdog circuit can provide automatic reset protection measures when the program runs away. The JTAG circuit mainly realizes the online simulation and burning functions of the program. Its circuit is shown in Figure 2.
3 Data acquisition circuit
Data acquisition refers to the process of obtaining field information from sensors. The underwater vehicle controller mainly uses GPS, MTI attitude sensor, depth and other sensors. The standard of sensor output signal is mostly RS232/485 standard. The signals of some sensors need to be converted from digital to analog. Therefore, the data acquisition circuit mainly includes RS232/485, I/O interface circuit, AD/DA conversion circuit and isolation circuit. NXP2478 itself has 4 serial ports, one of which is a 9-wire port with complete handshake signals. However, the working level of these ports is 0~3.3 V. The voltage of RS232 is about ±12 V, so a level conversion chip is needed. The commonly used MAX232 chip is used here. The I/O interface circuit also needs to convert compatible levels. The external switch signal may have a large voltage amplitude. The use of isolation chip can not only protect the influence of external signal crosstalk on the controller, but also play a role in level compatibility. The I/O isolation module is shown in Figure 3.
As part of data acquisition, temperature monitoring is used to detect the temperature status of the controller during operation and provide an alarm function. This article uses DS18B20 as a temperature data sensor. DS18B 20 is a temperature sensor that directly outputs digital signals and is widely used in distributed temperature control systems. The output data complies with the one-wire bus protocol. The range of the collected temperature is from -55 degrees Celsius to 125 degrees Celsius, and the output digital signal can directly enter the I/O port of the MCU. DS18B20 has only three signal lines: ground, power and data. Therefore, its interface circuit is very simple, and the data line can be directly connected to the GPIO port of the MCU.
4 Data storage module
The data storage module is implemented by using Nand Flash and microcontroller interface. Nand Flash memory is a kind of flash memory, and its status in embedded system is similar to that of hard disk on PC. It has the advantages of large capacity, fast rewrite speed, and no data loss after system power failure, and is suitable for storing large amounts of data. The interface of Nand Flash is essentially an I/O interface, with a data bus width of 8 bits and no address bus. The two signal lines CLE and ALE are used to distinguish the data categories on the bus. When the system accesses the data of Nand Flash device, it needs to send relevant commands and parameters to the Nand Flash device first, and then read out the required data. In the connection, pay attention to connecting the ALE and CLE pins with the address lines A19 and A20 of NXP2478. This connection method must match the NXP2478 bus speed with the Nand Flash timing when configuring the bus speed. In the circuit , the R/- (-phase) pin and the write protection pin are directly connected to the pull-up resistor . Another solution is to connect the R/- (-return) pin to the GPIO port. The main purpose is to determine the moment when the Nand Flash read or write operation is completed through an interrupt. The Nand Flash interface circuit is shown in Figure 4.
5 Communication module
5.1 CAN communication module
CAN bus is a field bus widely used in the automotive and aircraft industries. It has the following features: 1) Multi-master control. When the bus is idle, all units can start sending messages. Through conflict detection, the unit that first accesses the bus obtains the right to send. If multiple hosts send at the same time, the host with a higher priority obtains the right to send. This is the arbitration mechanism of CAN. 2) Remote frames can be sent to actively request data from remote hosts. 3) The CAN protocol has a complete error function. The frame format contains error correction coding to further enhance fault tolerance. 4) Error detection function. All units on the bus can detect errors, and the unit that detects errors will immediately notify other units (error notification function). Once the unit that is sending a message detects an error, it will force the end and resend. Until the transmission is successful. 5) Fault closing function. The CAN bus can determine whether the type of error is a temporary data error on the bus or a continuous data error (such as a hardware failure of a node). When a continuous data error occurs on the bus, the unit that causes the fault can be isolated from the bus. These features make CAN particularly suitable for distributed field control. For a controller to access the CAN bus, a CAN controller and a CAN transceiver are required. A typical CAN controller is Philips' SJA1000, which supports the CAN2.0 protocol, including standard and extended data and remote frames; programmable bit rate control, programmable clock output; an extended 64-byte FIFO receive buffer; in addition to the BasiCCAN operation mode, a new operation mode - PelICAN has been added. In terms of electrical characteristics, the pin characteristics of SJA1000 are compatible with PCA200, and the communication rate can reach 1 Mbps. The CAN interface circuit is shown in Figure 5. AD0-AD7 is connected to the data port of the microcontroller, the chip select signal is connected to the GPIO port, the crystal oscillator uses a 12M passive crystal oscillator, and an additional filter capacitor is also required. The output of SJA1000 is also connected to the CAN transceiver PCA82C250, and finally connected to the CAN bus.
5.2 Wireless Communication Interface
The wireless interface is used for remote control of underwater vehicles and can be used when the vehicle floats to the surface. The wireless communication subsystem based on the 2.4 GHz RF transceiver chip nRF2401 is adopted. It has low power consumption when working and requires few peripheral components. It can be configured with a whip antenna or a loop antenna, and the communication distance is about 100 m. It can well meet the work needs. The wireless communication chip interface is shown in Figure 6.
6 Conclusion
This paper discusses a distributed control system node based on CAN bus with NXP2478 as the control core and multiple I/O interfaces. It is equipped with a variety of navigation equipment and sensors, has strong data processing and communication capabilities, low system power consumption, high flexibility and convenient expansion. It can be used in the control system of underwater vehicles as a master control node or a field control node.
Previous article:Design of indoor air renewal system for sky garden based on STC12C65A60S2
Next article:Design and development of experimental box based on P89V51RB2 single chip microcomputer
- 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
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- Can anyone help analyze the parameters of this DC-DC transformer?
- In the 5G era, IoT technology empowers smart healthcare
- 【TouchGFX Design】(2) Simple interface design
- [DWIN Serial Port Screen] Nucleic Acid Sampling and Registration System - Three Links to DWIN Cloud
- Help! Why can the command sent by the microcontroller only display up to the fourth step?
- Future Outlook of IoT
- msp430g2553 hardware IIC
- The role, advantages and disadvantages of solid-state relays
- The Internet of Things helps smart agriculture, and farmers can also become technology workers
- MicroPython several issues