Design method of anti-scratch design for automobile windows using VNH2SP30

Design method of anti-scratch design for automobile windows using VNH2SP30

Based on the principles of space saving and weight reduction, the electrical system architecture of automobiles is shifting from a single electronic control module and centralized control system to decentralized control technology. In addition, the reduction of assembly costs and the improvement of the reliability of the vehicle system require the transfer of previously used electromechanical operating functions to electronic modules. As a result, a series of standards for decentralized electronic modules have been produced, including more and more Many standards-based automotive protocols (such as LIN and CAN) and their characteristics (such as autonomous safe operation, diagnosis, protection, and communication capabilities).

1. Principle of window lifter

At present, many automatic control devices have functions to trigger the closing system, such as windows and car doors. This also implies the danger of accidents, such as a part of the human body or animal being pinched and pinched by these automatic devices. A specific example is the automatic window lifter of a car. Because the window glass exerts enough force on the obstacle, it is enough to crush a certain part of the body.

According to the recommendations of the relevant safety regulations, the automatic window lifting device must be equipped with a so-called "anti-scratch" function. The anti-trap function means:
â–  Detect the presence of obstacles when closing windows.
â–  Limit the amount of force applied to obstacles.
â–  Move the window in the opposite direction to release the obstacle.

The existing Solutions are either mechanical or mechatronics. In the mechanical mechanism, the anti-pinch detection is carried out by the switch in the environment sensor piece fixed on the window pillar. The switch is normally closed, and is opened when pressure is applied to the environmental sensor. The solution is simple, but the sensor plate is expensive, and the potential installation and maintenance are relatively complicated. In some cases, this method cannot meet certain safety standards. For example, if the shape of the window is acute, the force is not applied to the surface of the sensor plate at a right angle (see Figure 1) to excite the necessary force Either the sensor sheet is not accessible, or it is much stronger than required by the specification.

There is an alternative solution based on motor speed monitoring, which performs related functions through sensors (Hall effect sensors, encoders, etc.). The anti-trapping environment detection is achieved by checking the change of motor speed. The motor is controlled by a relay, which starts the motor with the entire battery as power. When the motor is started with the maximum torque, the force applied to the obstacle can reach the maximum value when it is started. This article uses VNH2SP30 to monitor power changes due to motor load changes.


Figure 1. Schematic diagram of a car window


The specific requirement for the window lifting system is to detect the existing obstacle status during the startup phase. The fact once again shows that when the window regulator of a car is raised, there are several situations where a pinch accident may occur. The two most common possible situations are:
â–  The position of the window glass is very close to the window pillar, and the blocking object is located right between the glass and the window pillar.
â–  If the shape of the window mold blank is an acute angle, pinching will easily occur in most cases (see Figure 1).

The power of the window lifter comes from a DC motor. It directly provides rotary motion and provides variable-speed motion through coupling with the rotor and drum. The armature circuit and the shape of the rotor are shown in Figure 2.



Figure 2. DC motor

Under normal conditions (soft start), at the beginning of the start phase, the increase in motor power is proportional to its angular velocity, and later increases at a constant rate. The possibility of pinching during the start of soft start is greater than the probability of entering a stable state. Therefore, in specific implementation, it is necessary to define two motor power thresholds that operate in different periods. If the detected anti-pinch condition reaches the pinch threshold, the window glass will stop during the descent to prevent accidents; if it is during the ascent, it will drop a fixed length.

2. Hardware implementation

The design principle of this system is shown in Figure 3, and the specific implementation is shown in Figure 8. The components used are introduced as follows:
â–  ST72F324 microcontroller: internal frequency is 8MHz, 32k byte HDFlash, 1k byte RAM, 10bit ADC.
â–  L4979 voltage regulator: used for automatic recovery of data in the microcontroller when the software fails, a programmable watchdog timer is also embedded in the device.
â–  ST232 communication interface for PC serial port.
â–  VNH2SP30 full-bridge motor driver, suitable for various automotive electronic applications.



Figure 3 Schematic diagram of window lifter

Among them, install a jumper on the Voltage Regulator Enable connector (item 5 in Figure 4) to enable the voltage regulator and provide the 5V voltage required by the system.

Pins of the up button (Up key, item 8 in Figure 4) and the down button (Down key, item 7 in Figure 4) are configured for input pull-up mode, which is usually at a high level (5V); if Pressing the UP or DOWN button will display two different situations:
â–  Short Touch: If the button is pressed for less than 100ms, the window glass will continue to rise or fall (depending on the property of the button pressed) until the upper or lower edge of the window touches into place.
â–  Long Touch: If the button is pressed for more than 100ms, the window will rise or fall according to the specific contact status, depending on the properties of the button.

The Window Up switch pin (item 6 in Figure 4) is also configured for input pull-up mode and must be connected to a mechanical switch used to indicate the end of window operation in order to know whether the upper limit position of the door or window has been touched.

The microcontroller can be reprogrammed via the ICP connector (item 4 in Figure 4). The jumper on the PC7 connector (see item 9 in Figure 4) drives the VNH2SP30 through a PWM signal with a fixed duty cycle (50%) and frequency (20kHz). There is no anti-scratch function. When driving the window lifter with anti-clamp function, the PC7 jumper must be disconnected. The operation flow in the case of having the function of preventing pinching is shown in Fig. 5.

After turning on the power or restarting, the microcontroller initializes all used peripherals (input / output, timer, ADC, and SCI) and starts a command that can only execute commands such as stop resetting or turning off the line. Infinite loop.

Reset the anti-pinch flag, the microcontroller will poll each key pin. At this stage, the microprocessor works in SLOWMODE mode to reduce power consumption.



Figure 4. PCB layout


Figure 5. Flow chart of the anti-trap function

Once the button is pressed, the normal operation mode will be selected, and the INA and INB pins of VNH2SP30 will be set or reset, depending on whether the pressed button is the up key or down key. Provide a PWM signal with a frequency of 20kHz and a duty cycle of 30%, and the TImer A Output Compare pin is used to perform tasks in a random manner with an execution time of 1ms. During the task execution of 1ms, the current sensing is collected by ST7 ADC, and the average acquisition time is 10ms.

To know whether a pinch injury will occur, the power and average power must be compared with the corresponding threshold. The size of the threshold considered depends on whether the start-up phase has been completed or the soft start is still in progress. Unless a key is pressed or a pinch phenomenon occurs, the duty cycle increases linearly to 100%, and the PWM becomes a constant (Figure 6).

At this point the system waits for the next event: pressing a button or pinching occurs. If a button is pressed, the motor will stop running-reset the PWM pin of VNH2SP30, and set INA and INB to make the motor stop immediately, and stop the window glass. In the event of a pinch injury, the Window Up switch should be checked first.

If the glass reaches the upper limit of the window, the drive motor will run for 800ms to lock the window glass. Otherwise, if the glass is in the upward process, the motor will go down for 800ms to release the clamped object; if the glass is in the downward process, the motor will stop running.



Figure 6. PWM signal of VNH2SP30

3. PC interface

After the circuit board power is turned on, VNH2SP30 is programmed according to the default values ​​of related parameters (PWM, soft start duration, two thresholds, or fixed PWM frequency and duty cycle). With the help of the serial port, the PC interface and VNH2SP30 are used to exchange data, and the above parameters can be modified or data collected. When using the PC interface, the motor must be stopped.

The program mask can be seen from Figure 7, using the slider above the mask, the following changes can be made:
■ PWM frequency: Possible values ​​are 5, 10, 15 or 20kHz, and the default value is 20kHz. Reduce the frequency to hear some noise, depending on the motor used.

â–  Soft start duration: The approximate range is between 800ms and 2.5s, and the default value is 800ms.

â–  Threshold value 1: Used during soft start, which depends on the window characteristics. The default value is 55. Increasing the threshold increases the force applied to the obstacle before the anti-pinch measure is activated.

â–  Threshold 2: Used after soft start. The default value is 20. As above, if the threshold is increased, the force applied to the obstacle before the anti-pinch measure is activated is increased.

If the PC7 jumper is installed, the microcontroller generates a PWM signal with a fixed frequency and a fixed duty cycle. The frequency and duty cycle can be adjusted by adjusting the numbers in the data box in the middle of the mask shown in Figure 7 achieve.

After setting all the values, press the "Send" button so that the new data can be used the next time the car window is driven.

It is also possible to acquire some signals every millisecond:

â–  Instantaneous current: It is the current read from the CS pin of VNH2SP30, with an average duration of about 10ms, which is only used to ignore noise.

â–  Full current: It is also the current read from the CS pin of VNH2SP30, but the average duration is about 100ms. It is similar to the instantaneous current waveform, with a delay.

â–  Differential current: It is the difference between the above two currents and is the result of comparison based on the threshold.
After selecting any of the above options, press the "Send" button, which also changes the PWM frequency and soft start.

Signal acquisition can only be started after pressing the "UP" and "DOWN" keys on the circuit board, and only after pressing the "Acquis.Stop" button on the software. Once the signal acquisition is stopped, a ".csv" file will be generated in the directory where the software is installed. Each file generated consists of two columns: the first one has time (ms) information, and the second is the value of the signal.



Figure 7. PC software

Figure 8 VNH2SP30 based car window anti-scratch implementation plan

FTTx-The Last Miles

Fttx-The Last Miles,Fttx - Last Mile Networking Solution,Last-Mile Otdr For Fttx Networks Integrates Opm,Last Mile Fttx Test

Huizhou Fibercan Industrial Co.Ltd , https://www.fibercan-network.com

Posted on