System overall structure design
Due to the good characteristics of the CAN serial communication bus, it is widely used in the fields of field data acquisition systems, automobile manufacturing and aviation industries. The CAN bus-based data recorder designed in this paper is used in the Chery Automobile A5 model to collect and store node data on the vehicle CAN network. A5 is the first domestically produced car with its own independent brand that uses the CAN bus system. Its CAN-bus is mainly used in the transmission department, and there are also a small number of applications in the body department, ITS department and information department. Real-time data collection for the A5, the first model to use CAN technology, can understand the changes in various data information during the operation of the car, which is of great significance to the research and development of the A5 and all subsequent models.
When the CAN bus driving recorder is working, it should be connected to the car CAN bus to become a CAN node in order to collect CAN data information. As shown in Figure 1, the system not only collects CAN bus messages in the car, but also can collect analog signal quantities in real time as needed. The LCD screen is used to display the collected signal values and has a power-off protection function. After power is restored, the original data can be restored. In addition to displaying the collected data to the user in real time on the LCD screen, it can also be stored in a USB flash drive through the USB interface chip CH375 for the experimenter to take back to the laboratory for analysis. If you want to realize the storage function, just press the storage switch.
Figure 1 System overall structure
According to the overall structure of the system, the hardware circuit mainly consists of the following modules: main controller module, LCD module, CAN driver module, power module, CH375 interface circuit module. The system CPU uses Freescale's MC9S12XD ($8.1770) series microcontroller. It is the core of the control and communication part, not only responsible for system initialization settings and message reception, but also for the relevant data judgment processing and display. The chip integrates almost all analog and digital peripherals and other functional components required for the microcontroller control system and data acquisition system. Its main features are as follows:
(1) The MC9S12XD series has a unique XGATE coprocessor. The reception of CAN signals in this system is completed by the interrupt program, and the interrupt processing program is handed over to XGATE for processing, which will reduce the CPU load and improve the system's response speed. (2) It has 16 analog-to-digital conversion channels, which provides hardware support for collecting analog signals and can be programmed to select 10-bit accuracy. (3) It has 5 MSCAN modules and an internally integrated CAN controller. The configuration of the CAN module is essentially converted into the configuration of the corresponding registers of the microcontroller, which is convenient and flexible to use. (4) The support of background debugging mode BDM makes chip debugging extremely convenient and speeds up the product development cycle. (5) The rich interrupt sources provide sufficient guarantee for the system to run without the support of the operating system.
Power Module
The power supply of the recorder is taken from the 12V vehicle-mounted battery power supply. In addition to supplying the system, this power supply is also responsible for the power supply of ignition, lighting, signal and other equipment. The power supply fluctuates greatly and the interference is serious. Since the car may encounter a relatively bad road condition during driving, the recorder power interface may become loose or have poor contact due to severe vibration. Therefore, the power module must be carefully designed to meet the needs. The schematic diagram of the power module circuit is shown in Figure 2, where U1 is a 6V backup power supply provided by the battery, and U2 (main power supply) is a vehicle-mounted 12V power supply. The power module is divided into 2 paths. The +5v voltage after 7805 voltage stabilization is used to power the LCD separately, and the VCC converted by 4275 is used to power the entire microcontroller and auxiliary circuits. When the system is working normally, D1 is in the cut-off state and the backup battery does not work. Once the main power supply is lost, D1 is quickly turned on and the backup power supply automatically starts to power the system.
Figure 2 Power module
There are two reasons for this design of the power module, as follows:
(1) Use of backup battery. The recorder stores the collected data, that is, the collected data is written sequentially into the clusters allocated for the record file. When the collection is completed, the experimenter disconnects the storage switch or the collection is forced to terminate due to power failure. The microcontroller needs to close the record file, which is an important process. Closing the file means writing the actual length of the file and the total number of collected data records into the file header. If the file is not closed correctly, or if there is no time to close the file due to power failure, Windows will not be able to find the end of the file, and the PC software will not be able to open the file because it cannot find the end of the collected data. At this time, the collection work will fail. In order to prevent the inability to close the file due to power failure, this system uses a backup battery.
(2) The MCU and LCD are powered separately. When the main power supply is working normally, the power of the entire system is supplied by the main power supply. Once the main power supply is powered off, the backup battery only powers the MCU to complete the file closing process, and the LCD does not work due to power failure. Since the power consumption of the LCD is large and the backup battery has limited power, this two-way power supply method can not only provide the power supply required for closing files, but also save battery power. Of course, the backup battery cannot be used for a long time and can only be used for emergency file closing processing of the system. For this purpose, a power detection signal is designed. Once the main power failure is detected, the buzzer and light-emitting diode are enabled to remind the user that the power supply is abnormal and the staff needs to check the power connector of the recorder.
CI-I375 interface circuit module
The USB interface chip used in this system is CH375 from Nanjing Qinheng Electronics Co., Ltd. This chip supports host mode and device mode. It has an 8-bit data bus and read, write, chip select control lines and interrupt output, which can be easily connected to the system bus of the microcontroller. It also has built-in firmware for processing the dedicated communication protocol of Mass-Storage mass storage devices. The external microcontroller can directly read and write the USB disk in sectors as the basic unit. The read select signal RD#, write select signal WR#, and chip select signal CS# are all input signals and are valid at low levels. CS# is the interrupt request output signal, which is also valid at low levels. The A0 signal is used to distinguish between commands and data. When A0=1, commands can be written, and when A0=0, data can be read and written. The 8-bit bidirectional data bus is connected to the PA port (PA0-PA7) of the microcontroller for parallel transmission. Its hardware supports the automatic detection of USB device connection function. When it is normally connected in host mode, its ACT# pin outputs a low level. Therefore, an external pull-up resistor is connected to the ACT# pin and a light-emitting diode is connected in series to indicate whether the USB device is normally connected.
When laying out the PCB, try to place the 7805 chip at the edge of the board where the heat dissipation is better, and away from the LCD screen. Because in the actual process, after testing, the 7805 chip generates a lot of heat. If it is used for a long time and close to the LCD screen, it will affect the display effect of the LCD. In addition, try to make the LED of the power module close to the power interface, and the LED of the USB module close to the USB module, and distinguish them by color for easy observation by users. The driving recorder developed by this system has been successfully used in various road tests such as 30,000 kilometers and 50,000 kilometers of A5 cars, accurately recording important data during driving, and providing important data basis for researchers to conduct performance analysis, fault analysis, and calibration work. Using a CAN-based driving recorder on a vehicle that already has a CAN bus can greatly reduce the complexity of the system and reduce costs. For different models, only a few software modifications are required without changing the hardware, making the recorder extremely flexible and portable, and thus widely used in various models.
Previous article:Design of electric vehicle power management communication system based on single chip microcomputer
Next article:Design of Brushless DC Motor in Automobile 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 application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- I accidentally saw such a board. Let's see what the chip is packaged in.
- [Gizwits Gokit3 Review] Part 3: One-click Internet access, can you get started?
- Design Principle of Analog Biquad Four-Channel Notch Filter
- 【NUCLEO-F746ZG Motor】Introduction to NUCLEO-F746ZG Development Board
- 【GD32307E-START】+Return of the GD32F307E development board
- Can the 2.4GHz and 5GHz frequency bands supported by CC3135MOD work online at the same time?
- [Problem Feedback] Anlu TangDynasty download program speed selection problem
- Encoder Problems
- CC2640R2F BLE5.0 Bluetooth protocol stack GAP GATT service (GGS)
- 28335scififo interrupt receiving and sending