1 Introduction
At present, automotive electronics represented by microcontrollers are widely used in vehicle electronic systems, and automotive control is shifting from electromechanical control systems to intelligent systems based on distributed networks. CAN bus is a serial communication network that supports distributed and real-time control. It is widely used in the field of automatic control with its high performance and high reliability. As one of the field buses with the greatest application potential, CAN bus technology provides support for China's automotive industry to upgrade, reduce costs, and expand market share.
Nowadays, all mid-range and high-end cars are equipped with electric windows, and buttons control the lifting and lowering of the window glass. If the window is not intelligent, the driver presses the button without noticing the passenger's hand or object sticking out of the window, and the passenger is easily pinched by the window. For safety reasons, many cars use electric anti-pinch windows. Based on a thorough study of the application of CAN bus in automotive electronic systems and the anti-pinch solution for electric windows, a design scheme for a car window intelligent control system based on CAN bus is proposed to realize the anti-pinch control function of the window in normal working mode and the rapid lifting and lowering window control function in emergency situations (abnormal working mode).
2. System functional structure
2.1 CAN bus communication implementation principle
CAN bus is a type of multiplexed bus. It was first developed by Bosch in Germany as a bus specification mainly used for automotive electrical system control. It uses non-destructive bus arbitration technology and works in multi-master mode. The direct communication distance can reach up to 10 km, and the communication rate can reach up to 1 Mb/s. The frame message uses CRC check and other error detection measures, and has the function of automatically shutting down nodes with serious errors. CAN nodes realize data transmission through message identifier filtering. Different priorities meet different real-time requirements. The number of nodes depends on the bus drive circuit . The communication medium can be twisted pair, coaxial cable or optical fiber , which is flexible to choose. The message adopts a short frame structure, with short transmission time and low probability of interference, ensuring that the data error rate is extremely low. The bus in the automotive network system transmits data in units of messages, and the node accesses the bus using bit arbitration. The message start sending node identifier is divided into a function identifier and an address identifier. CAN bus system nodes are divided into non-intelligent nodes without microcontrollers and intelligent nodes with microcontrollers. The system adopts an intelligent node design, and the car windows are divided into four node units: left front, right front, left rear and right rear according to the CAN bus structure and the physical position of the electrical components in the car. The left front node is the main control unit, which is responsible for the lifting and lowering of the local (left front) window and can also remotely control other windows. Each node is designed with an independent microcontroller with CAN function, and its CAN network structure is shown in Figure 1.
2.2 Intelligent control of car windows
Each door of the electric window system has a window glass lifting mechanism, which is similar to the traditional hand-crank mechanism, but is driven by a DC permanent magnet motor. The motor size is very small and can be installed inside the door, and it has a reduction mechanism to increase the output torque and reduce the output speed. The direction of motor rotation (i.e. the up and down movement of the window) is achieved by changing the polarity of the input voltage, and the window lifting speed depends on the size of the input voltage.
The system uses a resistor with a small resistance value (about 1Ω) as a current sensor . The sensing resistor is connected in series with the motor, and its voltage drop is proportional to the working current of the motor . The current flowing through the motor is detected by detecting the voltage across the resistor. The motor keeps working before the voltage on the sensing resistor reaches the set threshold. Once the voltage drop of the sensor reaches the threshold. The motor stops rotating and detects the window position. If the window position does not reach the final position. It means that the window encounters an obstacle and the window will automatically return to the initial position. If the window reaches the end of the travel, the motor circuit is disconnected. In order to complete this operation control, the window position needs to be controlled in real time. For this purpose, piezoelectric sensors are installed at the top and bottom of the window guide rail to determine whether the window has reached the preset limit position based on the voltage generated by the pressure.
In addition to realizing the automatic anti-pinch function under normal circumstances, the system design also requires that the driver can control the forced closing or opening of the window in the event of an emergency (such as robbery by gangsters or passengers escaping in danger). The system has three buttons for window control (K1, K2 and K3) for each node unit. Among them, K1 is used to control the rise and fall of the window and is a 2-value signal switch ; K2 pause/resume button is used to pause the rise or fall of the window. Pressing K2 again will continue the movement; K3 mode selection button, which defaults to the normal working mode (with anti-pinch function) and executes the abnormal working mode (without anti-pinch function) after pressing K3, has the highest priority and is used to quickly set the window to rise or fall. The master control node unit is the left front node unit. In addition to being responsible for the lifting and lowering of the local window, it also controls the synchronous action of the windows of all node units. On the basis of the first three control buttons, a local/global control mode button K4 is added. The default is the local control mode, and the control mode is switched after the button is pressed. The intelligent control process of the window is explained by the button action of the master control node unit, and its structural logic is shown in Figure 2.
3. System hardware design
In addition to the global control of the left front node unit of the system, the other node units are only responsible for controlling the local windows. The hardware design only has one more button K4, and the main focus is on software design. The control circuit designed in this system not only supports CAN bus communication between node units, but also detects analog quantities such as piezoelectric sensors and load current, judges various logics, and realizes control functions through drivers.
The system uses the P8xC591 with an on-chip CAN controller as the node unit main controller. The P8xC591 uses the powerful 80C51 instruction set; it integrates the PeliCAN function of the SJAl000 CAN controller; the fully static core provides extended power saving methods: the oscillator stops and resumes without losing data; the improved 1:1 internal clock divider achieves a 500ns instruction cycle at a 12 MHz external clock frequency.
The controller P8xC2591 reads the key information, drives the window motor to run according to the pre-programmed software instructions, and monitors the output voltage and load current of the sensor as a logical judgment when the window is clamped by an obstacle during the rising (falling) process, and then drives the motor. In order to prevent the motor from being blocked by impact when the window glass rises to the top or falls to the bottom, thereby reducing the service life of the electric window mechanism , the system is designed with a soft stop function, and this function is available for manual or automatic rising and falling. When the glass rises (falls) almost to the top (bottom), the power supply of the motor is cut off at the rising soft stop point to stop it from working, and the glass rises (falls) to the top (bottom) through the inertia of the motor.
The commands and status of each node unit are transmitted and shared with other node units through the CAN bus in the form of messages via the CAN controller. The hardware design block diagram of the system node unit is shown in Figure 3.
The motor drive circuit uses the motor driver MC33486 dedicated to automotive electronics . The device has two dual high-end switches and two pre-driven low-end switches. Its low-end switch can be connected to two MOSFET tubes and can continuously output 10 A of current. At the same time, it can collect the motor current and use it to feed back to the A/D conversion sampling module of the microcontroller to obtain the motor current value, complete the motor control, and realize the window blocking and anti-pinch functions. The system reduces the coupling of noise through the filter capacitor , and the optical isolator 6N137 is added between the transceiver PCA82C250 and the CAN bus . The DC-DC converter is used to isolate the power supply, and the terminal resistors are connected at both ends of the bus to eliminate the reflected signal.
4. System software design
The system software design mainly includes three modules: CAN controller initialization, node sending and receiving messages, and main control program.
4.1 CAN controller initialization
The CAN controller must be initialized after power-on or hardware reset, including operation mode, acceptance filter , bus bit timing, interrupt and configuration of TXDC output pin.
4.2 Node sends/receives messages
The message transmission is automatically completed by the CAN controller following the CAN protocol specification. First, the CPU must combine into a frame message in a specific format, enter the CAN control transmission buffer, and set the transmission request flag in the command register . The transmission process can be controlled by an interrupt request or a query status flag. The transmission procedure is divided into two types: remote frame and data frame. The remote frame has no data field.
Previous article:The transparent A-pillar with a price of 12,000 yuan is here to solve the blind spot problem
Next article:NXP: More mobility, more responsibility
Recommended ReadingLatest update time:2024-11-23 15:14
- Popular Resources
- Popular amplifiers
- Analysis and Implementation of MAC Protocol for Wireless Sensor Networks (by Yang Zhijun, Xie Xianjie, and Ding Hongwei)
- Introduction to Internet of Things Engineering 2nd Edition (Gongyi Wu)
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Modern Motor Control Technology (Wang Chengyuan, Xia Jiakuan, Sun Yibiao)
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- Just for good circuits! New forum section [Circuit Observation Room]
- What are the applications of PWM and analog comparators in automotive ECUs?
- EEWORLD University Hall----Live Replay: Datang NXP- New Energy Lithium Battery Management Solution with Impedance Detection Function
- Mobile phone blacklist
- Why is the power consumption high when the operating voltage is low in the transistor constant current circuit?
- Starting with the Camera - Introduction to Advanced Driver Assistance System Solutions Series
- Simplify Isolated Current and Voltage Sensing Designs with Single-Supply Isolation Amplifiers and ADCs
- PCB design specifications - layout instructions (with pictures) must be read
- Motorcycle two-way alarm system
- The problem of confusion in the power-on reset of the microcontroller