0 Introduction
With the advancement of modern automotive electronic technology, traditional parts and assemblies in automobiles are also developing towards mechatronics. The large number of electronic devices used in automobiles not only improves the comfort of automobiles, but also puts forward new requirements for automobile safety. In order to facilitate drivers and passengers, a large number of automobiles use electric windows. Many electric windows do not have anti-pinch functions, which can easily cause harm to passengers, especially children. The U.S. Department of Transportation has promulgated FMVSSll8, a regulation for electric window switch systems, which clearly stipulates the relevant parameters of window anti-pinch, and stipulates that all cars and minivans sold in North America after October 1, 2008 must enforce this regulation. Although my country has not yet made legal provisions on this issue, it is absolutely necessary to develop a window control module with anti-pinch function for safety reasons.
After referring to the literature, the anti-pinch design scheme of this paper adopts the combination of detecting the motor speed and detecting the change of the motor current by the Hall sensor to realize the anti-pinch function. This scheme avoids the defect that the window anti-pinch system is easily affected by the external environment, ensures the reliable anti-pinch effect, and has low cost. It is not necessary to change the production process of traditional car doors. When modifying old models without anti-pinch function of electric windows, it is not necessary to change the mechanical structure and circuit structure of the existing car doors. It is only necessary to replace the electric window lifting controller, which is very convenient.
1 Electric window anti-pinch design
The so-called anti-pinch function means that when the electric window is raised and an object is clamped and a certain force is reached, the electric window will automatically stop or fall back to prevent objects (especially human bodies) from being pinched. During the lifting and lowering of the window, anti-pinch control is only required during the window rising stage. The defined anti-pinch area is an area of 4 to 200 mm from the maximum position (top) of the electric window glass without obstacles. This definition complies with the relevant requirements of European 74/60/EEC and American FMVSSll8. The anti-pinch function is only activated in the anti-pinch area. Therefore, the anti-pinch design should first determine the current position of the window.
1.1 Determination of window position
The rotation of the window control motor will drive the movement of the steel wire rope, thereby controlling the up and down movement of the window. During the movement of the window, the number of turns of the motor is proportional to the movement distance of the window. One rotation of the motor rotor will cause the Hall sensor to generate a square wave pulse signal. When the window rises from the lowest position to the top, the pulse signal output by the Hall sensor can be counted by the MCU, from the bottom to the top of the window, up and down 3 times, and the average value nth is taken as the calibration reference and recorded in the E2PROM. After that, the software control starts running from the bottom position of the window (at this time it is manually controlled, the window runs to the bottom, and the motor is blocked), and the counting starts from zero. The rising process is counted according to the current count value, and the falling process is counted according to the current count value. Therefore, the pulse output and counting scheme of the Hall sensor can determine the current position of the window in real time, and determine whether the window is in the anti-pinch area according to the provisions of the European 74/60/EEC and the US FMVSSll8 standards. For this system, the error of pulse counting during the measurement process can be ignored, and the error that may be caused during long-term operation can be solved by regular calibration.
1.2 Determination of anti-pinch solution
This system uses the method of detecting the motor armature current to determine whether the window encounters an obstacle during the rising process. The following problems need to be solved during the specific implementation of the solution:
(1) Determine the anti-pinch area and window position. Determine the corresponding anti-pinch area and window position in accordance with European 74/60/EEC and American FMVSSll8 standards.
(2) Determination of the motor armature current threshold ith during anti-pinch operation, that is, when the current value in the anti-pinch area rises to the set threshold, it is considered that an obstacle is encountered and the window anti-pinch function is activated. The problem here is that when the window button is just pressed (whether it is rising or falling) and the window motor is just started, the motor's back electromotive force has not yet been established, so the current will have a short-term large amplitude. The current amplitude at this time is often larger than the set anti-pinch current threshold. It is necessary to distinguish this state of large current amplitude from the obstacle encountered during the window rising process. After the window motor is started, the current detection is performed after a delay of 50 ms, which can avoid the impact of the instantaneous overshoot of the motor current at the initial start-up on the anti-pinch current threshold setting. In the actual design, a central controller that can be used for diagnostic functions is used in conjunction with the USB-CAN200 tool produced by Wuhan Jiyang Optoelectronics Co., Ltd. to feed back the data during the operation to the PC, present it in the form of an Excel table, and draw a graph, so as to conveniently determine the threshold ith, and determine the appropriate threshold through multiple running tests.
(3) Selection of MCU and power driver. The anti-pinch solution involves a lot of real-time detection and real-time calculation, which requires the MCU to have high computing power. The software implementation in the solution is based on the transplantation of the μC/OS-Ⅱ real-time operating system solution. Therefore, the popular and high-performance Infineon XCl64CS MCU in European car series is selected, and the power driver chip is the BTS781 chip with fault diagnosis function. [page]
2 Anti-pinch system hardware design
The door control system consists of two parts: the electric window control system and the electric rearview mirror control system. The anti-pinch electric window is a submodule of the door control system. In the entire door control system, a "general distribution, local centralized" control scheme is adopted, as shown in Figure 1. That is, the control of the two front and rear doors on the left is used as one ECU module, and the control of the two front and rear doors on the right is used as another ECU module. The two modules and the modules and the central controller are connected in CAN bus mode.
The hardware design of the anti-pinch system is based on BTS781, which is connected to the microcontroller XCl64CS chip through ST1, ST2, IH1, IH2, IL1, IL2 ports, and receives instructions from the microcontroller to control the lifting of the window. A 5 mΩ resistor R37 is connected in series to the 2nd and 13th pins of the full-bridge driver chip BTS781 to detect the change of the motor armature current, which is sent to the A/D port of the MCU for sampling after low-pass filtering and amplification, as shown in Figure 2.
The window position is determined by counting the pulses output by the Hall sensor. The Infineon TLE4923 Hall sensor is used to directly output a square wave signal, which is low-pass filtered and input into the MCU to count the pulses, thereby determining the current position of the window, as shown in Figure 3.
[page]
3 Software DesignThe software design of the system should not only consider the convenience of control, but also the future functional expansion. Therefore, the software design of this system is based on the real-time operating system, that is, first transplant the μC/OS-Ⅱ real-time operating system kernel to the XCl64CS MCU, and then add the anti-pinch window control as one of the tasks.
3.1 μC/OS-Ⅱ Real-time Operating System Kernel Transplantation
The transplantation is to transplant the μC/OS-Ⅱ real-time kernel to the XCl64CS microcontroller. Since μC/OS-Ⅱ can only read and write processor registers through assembly language, some processor-related codes must be written in assembly language, but most of the μC/OS-Ⅱ codes are written in C language. The transplantation work mainly enables μC/OS-Ⅱ to correctly define and use XCl64C-S. For details, please refer to the article written by the author of this article, which will not be repeated here.
3.2 Anti-pinch electric window software design
After transplanting the μC/OS-Ⅱ real-time operating system on the designed hardware platform, the anti-pinch electric window control is added in the form of a task, and the anti-pinch function is implemented with reference to the previous content. The flow chart is shown in Figure 4.
[page]
When the controller XCl64CS is powered on, it reads the initial data such as nth and ith from E2PROM, detects the power supply voltage, and when the voltage value is stable, reads the window position stored in E2PROM, and then reads the key input. If there is a window lifting operation, the corresponding switch signal is set to drive the MOS tubes T1, T2, T3, and T4 in the chip BTS781. If the window moves upward, the timer starts counting, the Hall sensor pulse signal counts, and after a delay of 50 ms, it detects whether the current value is overcurrent. If an overcurrent signal is detected during the window rising process, that is, the current value of the window motor is greater than the current threshold ith, and the window position is in the anti-pinch start area, it is determined that the window is blocked, and the controller outputs a direction switch signal, and drives the motor to reverse through MOS tubes T1, T2, T3, and T4 for 1 s and then stops, and the anti-pinch operation is completed. Regardless of the motor lifting and lowering movement, the controller will record the number of pulse signals of the Hall sensor through the counting program, based on which the relative position of the window can be determined, and the position information can be written into the E2PROM when necessary.
4 Testing
After completing the hardware production and software programming, the experimental bench was made. After testing the bench, the test results shown in Figure 5 were obtained. The test results were plotted in Excel as the curve graph on the upper right side of Figure 5, and the current change curve actually tested by the oscilloscope is shown in the curve graph on the lower right side of Figure 5. The description of the actual test curve change of the oscilloscope is shown in Table 1.
As can be seen from FIG5 , the graph drawn by the test result is the same as the actual test graph of the oscilloscope, achieving the expected anti-pinch effect.
5 Conclusion
This paper describes an anti-pinch design for electric windows, which realizes the anti-pinch function of the windows without changing the original installation structure. The key is to design a suitable current detection threshold. This study gives the current threshold based on experiments and makes a test bench. The test results show that the design made in this paper can realize a reliable anti-pinch function for windows.
Previous article:Design and implementation of a traffic accident warning system based on acceleration
Next article:Design of a Multifunctional Vehicle Driving Status Recorder
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
- 18 kinds of motor step-down starting circuit diagrams [collection]
- Texas Instruments' solutions for sweeping robot systems
- Detailed explanation of the working principle of transformer-how transformer changes the size of AC voltage or current
- EEWORLD University Hall----2022 Digi-Key KOL Series: Open Source | Four-wing flapping wing aircraft (bionic bird) principle and design analysis
- Experts share experience in using filter capacitors
- MSP430 MCU GPIO Programming
- Is this advertising screen composed of 8 dot matrix screens?
- PYPL programming language popularity ranking in December 2019
- How to prevent dead waiting programs from causing other tasks to fail to run during development
- Detailed explanation of ZigBee networking principle