ST AN2334 Application note

AN2334
Application Note
Complete car door module
Introduction
A car door module typically consists of a rubber-sealed carrier, onto which a variety of door components such as the window lift mechanism, the wing mirror electric motor, the wiring harness, the loud speaker, the door latch inner release cable, locks and various switches are fitted, forming a “cassette”.
The trend in both Europe and the U.S. is to increase the complexity of the door module by adding more electronic features needed to drive all door loads and functions, with the possibility to connect the module to other car subsystems via standard automotive communication protocols (LIN, CAN).
Among many of these automotive subsystems, the connectivity via a single wire, decentralizing electronic modules, reduces the number of wires required and in turn reduces wiring harness weight, contributes significantly to overall vehicle weight reduction. This is of concern to auto manufacturers, who are constantly striving to reduce vehicle weight and to improve fuel efficiency.
In this document, an electronic module is presented that controls all the car door functions, including the window lift, all latching/locking operations, wing mirror movement, mirror turn indicator light, defroster and some lamps. To reduce the risk of bodily injury, especially to children, this module also includes an advanced trapping detection feature for the window lift motor, which stops the window if a body member such as a finger, a hand or an arm is introduced into the window climbing area during the window climbing process. A low-cost, high performance, antipinch algorithm based on monitoring the window motor driver current, has been developed.
April 2006 Rev 1 1/22
www.st.com
Contents AN2334
Contents
1 Car door module description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 Local Interconnect Network (LIN) messages . . . . . . . . . . . . . . . . . . . . 10
4 PC Keypad software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5 Hardware implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Appendix A Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2/22
AN2334 List of tables
List of tables
Table 1. Door module actuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Table 2. Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Table 3. FR RL RR data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Table 4. Front Right Door . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Table 5. PC-VNH2 Diag. data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Table 6. Dashboard data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Table 7. PC - L9950 Diag. data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Table 8. Window and door lock coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Table 9. Mirror and door lock coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Table 10. L9950 Loads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Table 11. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3/22
List of figures AN2334
List of figures
Figure 1. Door module block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Figure 2. VNH2 PWM signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Figure 3. Simplified algorithm flowcharts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 4. Master/slave diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 5. LIN bus message frame format diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 6. PC keypad screenshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Figure 7. Adjust thresholds screenshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 8. Board connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Figure 9. Board Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Figure 10. Board Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4/22
AN2334 Car door module description

1 Car door module description

This note describes a complete electronic module used to drive all loads in a car door, connected via a LIN bus to the dashboard and to other doors, and via a parallel port to a PC (for demonstration purposes). The block diagram in Figure 1 shows the system configuration.

Figure 1. Door module block diagram

Table 1. Door module actuators

Actuators P
Window Lift 1 DC motor
Door lock 1 DC motor
Mirror axis control
Mirror fold 1 DC motor
Mirror defroster
Light bulbs
2 DC motors
1 grounded resistive load
4 grounded resistive loads
nom
100W
5W
5/22
Wor ki ng
voltage
12 V
Load
speed
(Typ)
>78 rpm <2.5A <20A
Load
current
(Typ)
<2A <10A
current
Stall
Car door module description AN2334
The microcontroller is the ST72F561, a member of the ST7 microcontroller family, designed for mid-range applications with CAN (Controller Area Network) and LIN (Local Interconnect Network) interfaces. It is based on an industry standard 8-bit core, featuring an enhanced instruction set. The enhanced instruction set and addressing modes of the ST7 offer both power and flexibility to software developers, enabling the design of highly efficient and compact application codes. In addition to standard 8-bit data management, all ST7 microcontrollers feature true bit manipulation, 8x8 unsigned multiplication and indirect addressing modes.
The voltage regulator is the L4979 which offers high precision output voltage and a programmable watchdog timer with an external capacitor. The programmable watchdog timer allows microcontroller auto-recovery from software runaway failures.
The L9638 performs LIN-bus interface functions between the protocol handler in the microcontroller and the physical bus in automotive applications. It has a Sleep mode that allows the lowest current consumption of the transceiver. It is possible to wake up the transceiver through LIN-bus, Enable input or Wake-up input.
The new VNH2SP30 window power bridge driver provides a smooth and fully-protected motor drive via 20 kHz PWM. A current sense (CS) output is used to monitor motor torque that provides an antitrap function via the ADC inputs of the microcontroller.
Finally, the L9950 actuator driver controls mirror adjustment and fold-in/-out, as well as an advanced locking system, driving the door latch and the dead bolt motor. Five intrinsic high­side drivers are available to control various lamps or LEDs, including the mirror defroster, and sophisticated diagnostic algorithms allow digital and analog load status to be monitored by reading fold, lock motors and defroster currents.
6/22
AN2334 Algorithms

2 Algorithms

After turn on or resetting, the microcontroller initializes all used peripherals (I/Os, Timers, ADC and LIN-SCI) and variables, drives the L9950 to open the left wing-mirror and sends a LIN message to do the same for the right wing-mirror. Afterward, it starts an infinite loop that can be stopped only by resetting or turning off the board.
The microcontroller starts polling on both key pins (for driving window lift) and the keypad.
As soon as a load is turned on, the L9950 Enable Bit is set to switch the device into active mode, turning on the Charge Pump Output. This output drives the gate of an external n­channel power MOS used for reverse polarity protection. This action, guaranteeing the reverse battery protection, needs about 300µs, which is the activation delay for every load.
When no load is driven, the Enable Bit is cleared and the device goes into standby mode for power saving.
It is possible to drive the window lift by using both the PC keypad and board keys (#4 / #5 -
Figure 9). The "Up key" and "Down key" pins are configured in the input pull-up mode, so
they are normally at a high value (5V); if the UP or DOWN buttons are pressed, two different behaviors are shown, depending on the duration of the pressing time. If the button is pressed for less than 100 ms, the glass moves up or down (depending on the key pressed) until the top or bottom part of the window is reached; if the pressed time exceeds 100 ms, the window moves up or down following the touch temporization. The same behavior occurs when a PC software keypad is used.
The "Window Up switch" pin (#9 - Figure 9), also configured in input pull-up mode, must be connected using a mechanical switch that senses the window end run, indicating that the door upper limit has been reached.
The PWM 8-bit Autoreload Timer is used to perform a task temporized at 1 ms.
This task is in charge of all temporized events:
It counts 250 ms before sending a LIN request message to the dashboard
In case of window lift activation, it manages current sampling
It also controls the mirror folding, locking and turn indicator light on and off
switching timings
When either the Down or Up key (both in the board or on the PC keypad) are pressed, the Window_Lift routine is called:
VNH2 InA and InB pins are, then, set or reset, depending on the key pressed, to
lift the window up or down and,
the 16-bit Timer is used to provide to the VNH2 a PWM signal with 20 kHz
frequency and 30% duty cycle
during a 1 ms task, the current sense voltage is acquired via ST7 ADC; the
acquisition is averaged over a 10 ms period to eliminate noise. Motor power is calculated by multiplying the current sense by the estimated angular velocity. This value is averaged over 100 ms, providing a delayed signal compared to the original. The difference between power and averaged power must be compared with a threshold to determine whether a pinch event occurs. This threshold depends on the motor status (soft start up or steady state conditions).
Unless a Down/Up key is pressed or a pinch occurs, the duty cycle increases linearly until 100% is reached and the PWM becomes a constant (steady state phase, see Figure 2.)
7/22
Loading...
+ 15 hidden pages