In this design, the handle ECU can transmit the driver's driving intention to the AMT_ECU via the CAN bus. The AMT ECU controls the transmission to shift gears according to the message information transmitted by the handle ECU. At the same time, the AMT ECU can also transmit the current state of the transmission (such as gear state and fault state) to the shift handle circuit via the CAN bus. The driver and passengers select the current desired gear through the shift handle. The handle ECU performs input signal processing based on the handle position information transmitted by the Hall sensor, and sends the processed gear information to the AMT ECU via the CAN bus to transmit the driver's driving intention. The AMT ECU controls the transmission to shift gears according to the message information transmitted by the handle ECU. Since it has a single-chip microcomputer as a processing unit, it can communicate with the TCU via the CAN/LIN bus, which basically does not occupy the interface resources of the TCU. When there is a problem with the signal acquisition circuit, the single-chip microcomputer can diagnose itself, and even replace the TCU to handle simple faults [1]. The control circuit of this design has a simple structure, low cost and strong functions.
1 Hardware Design
The hardware circuit of this design is based on the MC9S08DZ60 microcontroller, which mainly includes the microcontroller peripheral circuit, power conversion circuit, switch output processing circuit and CAN communication circuit.
1.1 MCU Minimum System
Since the handle ECU system is small but fully functional, Motorola's 8-bit microcontroller MC9S08DZ60 is used. This microcontroller is small in size, low in cost, powerful in function, and has complete resources. It has a high performance-price ratio and is suitable for the functional requirements of the car handle shifting and the operating environment of the car. Its main resources include: a CAN module, a serial peripheral interface SPI module, two serial communication interface SCI modules, up to 24 channels of 12-bit A/D conversion modules, a basic clock module, 60 KB on-chip Flash, 4 KB on-chip RAM, 2 KB E2PROM, watchdog timer (COP Watch-dog), and an I2C bus module and multiple timers, counters, etc. The controller uses PLL phase-locked loop technology and can generate a bus frequency of up to 40 MHz. Its unique on-chip simulation/debugging module (BDC) greatly simplifies the design, thereby ensuring the application of MC9S08DZ60 in this design [3]. Its peripheral circuit is shown in Figure 1.
1.2 Power Module
The module uses the 7805 (U1) chip to convert +12 V to +5 V, and the MIC29510-3.3 (U2) chip to convert +5 V to +3.3 V, thus meeting the power supply of the entire system, including the power supply of the microcontroller. The circuit diagram is shown in Figure 2.
1.3 Switching quantity processing module
In order to make the switch input signal more reliable, each switch input must be processed by pull-up, current limiting, etc. before being sent to the microcontroller. When the handle selects the desired gear and enters the magnetic grid range of the Hall sensor, the high-level signal output by the sensor is +3.3 V; the magnetic grid range of the other sensor input ends is not connected, and the output low-level signal is 0 V. The Hall sensor input voltage used in this design is +12 V.
1.4 CAN communication circuit
This design is a node of the vehicle distributed control system, and communicates with other vehicle controllers using CAN network communication. This design collects system status and uploads it to the vehicle controller through CAN command messages for operation. The CAN transceiver uses the PCA82C250 transceiver from PHILIPS. Its hardware circuit is shown in Figure 3.
At the same time, this design also reserves a switch output circuit, which has the same function as the CAN bus. Its circuit is shown in Figure 4, which includes the actuator drive circuit.
2 Software Design
The system software design mainly includes two modules: data acquisition and storage and CAN communication.
2.1 CAN communication module
The MC9S08DZ60 integrates a CAN controller that uses the CAN 2.0A/B protocol, including five first-in-first-out receive registers and three transmit registers that use local priority. In terms of ID identification, a 64-bit mask register is provided, which can be divided into two 32-bit full-value registers, or four 16-bit and eight 8-bit registers, making message addressing on the bus more flexible and convenient. To meet low power requirements, the module provides three modes: sleep, power-down, and MSCAN enable[5].
The data frame in the CAN bus consists of 7 different bit fields: frame start, arbitration field, control field, data field, CRC field, response field, and frame end. The length of the data field can be 0, but the frame encapsulated by the module does not exceed 8 bytes. According to the arbitration bit, it can be divided into standard frame (11 bit identifier) and extended frame (29 bit identifier). The extended frame format includes 4 ID registers IRD0~IRD3, 8 data registers DSR0 and 1 data length register DLR, where the first bit of IRD0 is ID28 and the last bit of IRD3 is ID0. There are also signal identification bits SRR, IDE and RTR between the two [4].
2.2 CAN Communication Protocol
The communication of CAN bus adopts the calling polling method. Due to the limitation of CAN, the number of sub-nodes in each network should not exceed 1,000. Here, 10 bits are used as the ID of the source and destination devices. Because ID28 can only be 1, ID27~ID18 are specified as the frame source ID, and ID17~ID8 are specified as the frame destination ID. Because the communication needs to transmit more than 8 bytes of data, DSR0 is used as the total frame number register for transmitting multi-frame data, DSR1 is used as the current frame number register for transmitting multi-frame data, DSR2 is used as the frame function register, DSR3~DSR6 are used for data transmission, and DSR7 is used as the check register [2]. [page]
2.3 Programming
Initialize() completes the MCU hardware initialization (handle ECU initialization, application initialization, etc.). After power-on initialization, the MCU starts to collect the voltage signal of the I/O port gear and stores it in the on-chip storage unit. The CAN communication with the host will be completed in the form of interruption. Figure 5 shows the overall system flow.
The logic levels corresponding to each gear position are shown in Table 1.
After testing, the gear change information transmitted by the CAN bus is shown in Figure 6.
The experiment proved that the handle ECU can realize data collection and network communication under laboratory conditions and achieve the gear shifting target. The handle ECU using CAN bus technology can not only reduce costs and realize data sharing, but also improve the performance of AMT. Its maximum transmission speed of 1 Mb/s (within 40 m) makes the handle ECU have good real-time performance, high reliability and good operation.
Previous article:Design of a Simple Digital Oscilloscope Based on AT89S52 Single Chip Microcomputer
Next article:Design of street lamp simulation system based on STC89C52
Recommended ReadingLatest update time:2024-11-17 00:40
- Popular Resources
- Popular amplifiers
- Dual-partition software over-the-air download upgrade technology for vehicle ECU based on real-time operating system_Zhou Heng
- Lightweight FPGA-based IDS-ECU architecture for automotive CAN networks
- Dual Radar: A Dual 4D Radar Multimodal Dataset for Autonomous Driving
- Real-time driver monitoring system via modal and viewpoint analysis
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- Can lemons generate electricity?
- Free review | Anxinke Bluetooth development board PB-02-Kit
- Qinheng third generation USB to dual serial port chip CH342
- FPGA_100 Days Journey_Matrix Keyboard Design
- Solution to the low success rate of Bluetooth connection of EFR32BG22 series
- SBUF, TI/RI, ES
- Issues related to the initial value of the RAM inside the MCU after power-on
- Prize-winning live broadcast: Building a sensor-based test system using NI CompactDAQ and LabVIEW Sign up now!
- There is a problem with the secondary amplifier circuit, please help!
- What's new in TI BOM and Cross Reference Tools?