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. September 2013 Rev 2 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. Table 2. Table 3. Table 4. Table 5. Table 6. Table 7. Table 8. Table 9. Table 10. Table 11. Door module actuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Application Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 FR RL RR data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Front Right Door . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 PC-VNH2 Diag. data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Dashboard data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 PC - L9950 Diag. data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Window and door lock coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Mirror and door lock coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 L9950 Loads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3/22 List of figures AN2334 List of figures Figure 1. Figure 2. Figure 3. Figure 4. Figure 5. Figure 6. Figure 7. Figure 8. Figure 9. Figure 10. 4/22 Door module block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 VNH2 PWM signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Simplified algorithm flowcharts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Master/slave diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 LIN bus message frame format diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 PC keypad screenshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Adjust thresholds screenshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Board connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Board Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Board Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 AN2334 1 Car door module description 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 Pnom Window Lift 1 DC motor Door lock 1 DC motor Mirror axis control 2 DC motors Mirror fold 1 DC motor Mirror defroster 1 grounded resistive load 100W Light bulbs 4 grounded resistive loads 5W Working voltage Load speed (Typ) Load current >78 rpm <2.5A <20A <2A <10A (Typ) Stall current 12 V 5/22 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 highside 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 2 Algorithms 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 nchannel 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 Algorithms AN2334 Figure 2. PWM 5V VNH2 PWM signal Duty Cycle 30% Duty Cycle 50% Duty Cycle 70% Duty Cycle 100% Soft Start t At this point the system waits for any event: A pressed key or a pinch. If a key is pressed, the motor is stops, resetting VNH2 PWM and setting InA and InB for braking to Vbatt the motor and stopping the glass. In case of a pinch event, the Window Up switch is first checked. If this switch is closed (upper limit reached), the glass is locked driving the motor up for 800 ms. Otherwise, if the glass moves up, it is driven down for 800 ms to release the pinched object; if it goes down the motor is stopped immediately. When an abnormal condition is detected (Open Load, Short circuit or thermal shutdown), a LIN message is sent to the PC VNH2 diagnostic node. Open Load is detected by current sense voltage monitoring (value) while a short circuit and thermal shutdown are detected using the VNH2 DIAGx pin. When DIAGx pin is reset, while INx is set, the status pin indicates a thermal shutdown; otherwise, if INx is reset the status pin detects a short circuit. For further information about antipinch algorithms, please refer to “AN2095 - VNH2 for window lift with antipinch routine”. When a command for L9950 loads is detected through keypad input pins, the microcontroller drives such loads through the L9950 SPI bus. Serial data for controlling outputs and for receiving status registers is sent via this bus. For example, if one of the over-current bits is set, the corresponding driver is disabled. If the over-current recovery bit of the output is not set, the microcontroller must clear the overcurrent bit to enable the driver again. If the thermal shutdown bit is set, all drivers go to high impedance state. Again, the microcontroller must clear the bit to enable the drivers. When the Fold Mirror motor is activated, the relevant motor is driven for 4 seconds with a fully charged battery and for 6 seconds in other cases. Since the OUT1 is common to all mirror motors, it is impossible to drive two or more mirror motors at the same time. The turn indicator and the defroster are driven using PWM2 and PWM1 respectively. For all lights, the over-current Recovery Enable bit is set by the microcontroller; this automatically reactivates the output after a delay time, resulting in a PWM modulated current with a programmable duty cycle. The over-current recovery feature is intended for loads which have an initial current higher than the over-current limit of the output (for example, cold light bulbs). The described algorithm, including LIN message managing, is stored in less than 10 kB on the microcontroller Flash memory. 8/22 AN2334 Algorithms Figure 3. Simplified algorithm flowcharts Reset Init Load Turn ON/OFF Ext. WDG reload Turn On Charge Pump Paral. Port and keys read VNH2 or L9950 Key or keypad Pushed VNH2 NO Load turn ON/OFF LOAD ? Window Lift Routine NO L9950 SPI send MSG Diagnostic Send LIN Msg to PC 250 ms Task LIN Msg Request to Dashboard Receive Data Defroster ON YES NO PWM1 On SPI send Msg Turn Light ON YES PWM2 On NO SPI send Msg 9/22 Local Interconnect Network (LIN) messages 3 AN2334 Local Interconnect Network (LIN) messages Created by the LIN Consortium (a collection of automotive, software and semiconductor manufacturers), LIN is a low speed bus with a maximum speed of 20kbaud. The most significant advantage offered by LIN bus is the low cost of implementation. Implementing a LIN node costs approximately half of an equivalent CAN bus node. The LIN bus protocol is based on the common UART byte interface. Any microcontroller with a UART interface can be used as a node on the LIN bus since the basic transmission uses the UART format. The LIN bus protocol specification 1.2 defines three standard baud rates: 2400 baud, 9600 baud and 19200 baud. Communication is based on a master/slave mechanism. The bus is composed of one master node (Driver door) and five slave nodes (All Doors, Front Right Door, Dashboard, PC VNH2 Diagnostic and PC UH22/L9950 Diagnostic). All arbitration and collision management takes place in the master node to further simplify and lower the cost of the slave nodes. Figure 4. Master/slave diagram CAN Bus MASTER Driver Door LIN Bus SLAVE All Doors SLAVE Front Right Door SLAVE Dashboard SLAVE PC-VNH2 Diag SLAVE PC-UH22/L9950 Diag – All Doors is used for locking/unlocking all doors – Front Right Door is the slave node in the front right door that receives all messages for mirror positioning (X-Y and fold) and for front right window lift – Dashboard is questioned from the master node each 250 ms in order to give information for turning on/off turn indicator and defroster – PC-VNH2 is used for demonstration purposes to send VNH2 diagnostic information to PC – PC-UH22/L9950 is also used for demonstration purposes to send L9950 diagnostic information to PC All communications on the bus take the form of messages, which have a defined format known as the message frame. A diagram showing the format of the message is shown in Figure 5. The message frame is composed of a header and a response. The header is further broken down into three fields: 10/22 – The synchronization break field, composed of 13 dominant bits (0) and at least one recessive bit (1), which indicates the beginning of a frame. – The synchronization field, which allows a slave to be synchronized on the current master baud rate. – The identifier field, which identifies the requested message and the length of the response field. AN2334 Local Interconnect Network (LIN) messages Figure 5. LIN bus message frame format diagram Only the master node can initiate a message by sending a header field that is received by all nodes. Each slave node analyses the header and must be ready to send or receive data during the response field of the frame. The identifier field within the header informs all slave nodes in the network of the appropriate action to take. Such actions include: – Receiving bytes transmitted in the response field – Transmitting bytes in the response field – Doing nothing ST72F561 has a flexible microcontroller architecture that makes the implementation of LIN bus communication much easier than on other devices. The LIN bus transmission of a master node, as this demoboard, has three distinct phases: – Synchronization break field transmission: The length of this field is 13 dominant bits and 1 recessive bit – Data byte transmission: The synchronization field, the identifier field, the data fields and the checksum field are each one byte fields. – Data byte reception: The data fields and the checksum field are also transmitted in a byte wise manner. The LIN bus protocol uses a standard baud rate: 19200 baud. In case of microcontroller debugging, when CPU frequency is divided by two, a 9600 baud protocol is also possible. The software PC allows users to change the baud rate. It is necessary to define a specific ID (6 bits long) for each message, which is used for reception or transmission. The message ID is written in a hexadecimal format with the parity bits included. According to the LIN specification, the data field can be 1 to 8 bytes long (for LIN 1.2 and newer). The parity bits P0 and P1 are calculated as follows: P0=ID0 ID1 ID2 ID4 P0=ID1 ID3 ID4 ID5 Because the application is for demonstration purposes, it uses two LIN messages for transmission with PC (2 bytes long for VNH2 diagnostic and 8 bytes long for L9950 diagnostic). 11/22 Local Interconnect Network (LIN) messages Table 2. AN2334 Application Messages Message ID Slave response source Slave response destination N.transmit [bytes] Message Data Description LinMsg1 (0xc1) Driver Door (M) FR RL RR Doors (S) 2 See Table 3 Master transmit doors lock / unlock command LinMsg2 (0x42) Driver Door (M) Front Right Door (S) 2 See Table 4 Master transmit FR Door commands LinMsg4 (0x73) Driver Door (M) PC-L9950 Diag (S) 8 See Table 7 Master transmit diagnostic signals LinMsg3 (0xC4) Driver Door (M) PC-VNH2 Diag (S) 2 See Table 5 LinMsg5 (0x11) Dashboard (S) Driver Door (M) 2 See Table 6 Master data request Table 3. Table 4. Master transmit RL Door commands FR RL RR data Description Data Value Unlock Doors 0x01 Lock Doors 0x02 Front Right Door Description Data Value Front Right Mirror Dx 0x01 Front Right Mirror Sx 0x02 Front Right Mirror Up 0x03 Front Right Mirror Down 0x04 Front Right Mirror Close 0x05 Front Right Mirror open 0x06 Front Right Window Up 0x07 Front Right Window Down 0x08 Table 5. PC-VNH2 Diag. data Description Data Value No diag err 0x01 Therm. Shutdown Leg A 0x27 Therm. Shutdown Leg B 0x28 Short Circ. Leg A 0x29 Short Circ. Leg B 0x2A Open Load 0x2B 12/22 AN2334 Table 6. Local Interconnect Network (LIN) messages Dashboard data Description Data Value No action 0x01 Defroster turn on 0x02 Turn light turn on 0x03 Defroster and Turn light turn on 0x04 Table 7. PC - L9950 Diag. data Data0 Bit Description Data1 Bit Description Data2 Bit Description Data3 Bit Description Data4 Bit Description 0 VS Over Voltage 0 Out 2 HS Over Current 0 Out 6 HS Over Current 0 Out 2 LS Open Load 0 Out 6 LS Open Load 1 VS Under Voltage 1 Out 3 LS Over Current 1 Out 7 HS Over Current 1 Out 2 HS Open Load 1 Out 6 HS Open Load 2 Thermal Shutdown 2 Out 3 HS Over Current 2 Out 8 HS Over Current 2 Out 3 LS Open Load 2 Out 7 HS Open Load 3 Temperature Warning 3 Out 4 LS Over Current 3 Out 9 HS Over Current 3 Out 3 HS Open Load 3 Out 8 HS Open Load 4 N.U. 4 Out 4 HS Over Current 4 Out 10 HS Over Current 4 Out 4 LS Open Load 4 Out 9 HS Open Load 5 Out 1 LS Over Current 5 Out 5 LS Over Current 5 Out 11 HS Over Current 5 Out 4 HS Open Load 5 Out 10 HS Open Load 6 Out 1 HS Over Current 6 Out 5 HS Over Current 6 Out 1 LS Open Load 6 Out 5 LS Open Load 6 Out 11 HS Open Load 7 Out 2 LS Over Current 7 Out 6 LS Over Current 7 Out 1 HS Open Load 7 Out 5 HS Open Load 7 N.U. 13/22 PC Keypad software 4 AN2334 PC Keypad software Before switching on the board, the PC “Keypad” software must be run, defining the parallel port base address (see Windows Device Manager) and the COM serial port to be used. PC software has four different functions: Keyboard, dashboard, LIN analyzer, VNH2 and L9950 diagnostic view. – Table 8. Keyboard is connected to the microcontroller via a parallel port and provides to the microcontroller an 8-bit word that encodes all possible user actions as described in the following Table 8 and Table 9: Window and door lock coding Window Door Parallel Port 14/22 Up Left Down Left Up Right Down Right Lock / Unlock 0 0 0 0 0 192 0 0 0 1 0 194 0 1 0 1 0 202 0 1 0 0 0 200 0 0 1 0 0 196 1 0 1 0 0 212 1 0 0 0 0 208 0 0 0 0 1 193 0 0 0 1 1 195 0 1 0 1 1 203 0 1 0 0 1 201 0 0 1 0 1 197 1 0 1 0 1 213 1 0 0 0 1 209 AN2334 PC Keypad software Table 9. Mirror and door lock coding Mirror Door Parallel Port Open Close Left / Right Up Down Left Right Lock / Unlock 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 128 0 1 0 0 0 0 0 0 64 1 0 1 0 0 0 0 0 160 0 1 1 0 0 0 0 0 96 0 0 0 1 0 0 0 0 16 0 0 0 0 1 0 0 0 8 0 0 0 0 0 1 0 0 4 0 0 0 0 0 0 1 0 2 0 0 1 1 0 0 0 0 48 0 0 1 0 1 0 0 0 40 0 0 1 0 0 1 0 0 36 0 0 1 0 0 0 1 0 34 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 129 0 1 0 0 0 0 0 1 65 1 0 1 0 0 0 0 1 161 0 1 1 0 0 0 0 1 97 0 0 0 1 0 0 0 1 17 0 0 0 0 1 0 0 1 9 0 0 0 0 0 1 0 1 5 0 0 0 0 0 0 1 1 3 0 0 1 1 0 0 0 1 49 0 0 1 0 1 0 0 1 41 0 0 1 0 0 1 0 1 37 0 0 1 0 0 0 1 1 35 – Dashboard is a LIN slave node and is used to switch on or off the turn indicator light and the defroster. – LIN Analyzer “sniffs” all LIN messages that flow through bus. – VNH2 and L9950 diagnostic graphically shows the LIN messages addressing VNH2 and L9950 diagnostic nodes. Figure 6 displays the program main window snapshot. 15/22 PC Keypad software Figure 6. AN2334 PC keypad screenshot Keyboard Dashboard LIN analyzer 16/22 VNH2 and L9950 diagnostics AN2334 PC Keypad software PC software can also change the thresholds for the window lift routine. Any threshold change modifies the motor torque in a pinch state. For further details, please refer to “AN2095 - VNH2 for window lift with antipinch routine”. Figure 7. Adjust thresholds screenshot 17/22 Hardware implementation 5 AN2334 Hardware implementation The voltage regulator, which provides the required 5V during normal mode, is enabled by the LIN transceiver through Inhibit Output pin INH. To reset the microcontroller with the watchdog timer in case of a missing pulse, a jumper must be installed in the Voltage Regulator Reset connector (#1 - Figure 8). The jumper must be removed in case of microcontroller reprogramming; in fact, in this phase, the microcontroller cannot provide pulses to the voltage regulator that should provide a low level reset. Moreover, during the programming phase, to enable the Voltage regulator a jumper must be installed in the Voltage Regulator Enable connector (#2 - Figure 8) because in this case the LIN bus interface L9638 cannot provide the enabling voltage. In summary, the microcontroller can be reprogrammed using the ICP connector (#10 Figure 8) by removing the Reset jumper (#1 - Figure 8) and settling the Enable jumper (#2 Figure 8). See the ST72F561 datasheet for more details. A jumper on CB4 connector (#8 - Figure 8) allows using the board without using the LIN Interface as detailed in Section 3: Local Interconnect Network (LIN) messages. The board connector locations are given in Figure 8. Figure 8. Board connectors 4 Down Key 3 L9950 Outputs 6 - CB5 / 7 – CB3 / 8 - CB4 5 Up Key 9 - Window Up Switch 1 Reset 10 ICP Conn 2 Enable 11 Window Motor 16 LIN Conn. 12 Power Supply 13 L9950 Outputs 18/22 15 Wake Up 1 3 5 7 9 11 13 15 2 4 6 8 10 12 14 16 14 Parallel Port AN2334 Hardware implementation The L9950 loads are shown in the following table: Table 10. L9950 Loads L9950 Outputs Load OUT1 Common Mirror Motors OUT2 X Mirror Motor OUT3 Y Mirror Motor OUT4 Lock Motor OUT5 Lock Motor OUT6 Mirror Fold Motor OUT7 Exterior Light OUT8 Footstep Light OUT9 Safety Light OUT10 Turn Indicator OUT11 Defroster The input signals INA and INB are directly interfaced with the microcontroller to select the motor direction and the brake condition. The DIAGA/ENA or DIAGB/ENB, connected to the I/O microcontroller and configured as input pull-up, enable the legs of the bridge. They also provide a digital diagnostic signal. The CS pin allows monitoring the motor current by delivering a current proportional to its value. The PWM, up to 20 KHz, allows control of the motor speed in all possible conditions. The reverse polarity protection MOSFET needs a zener diode and a resistor between gate and source to protect against ISO pulses and for proper turn off in static reverse polarity. In master node application, a LOW ohmic resistor must be connected externally between LIN and battery to allow the maximum transmission rate. Finally, all outputs need a 10nF capacitor to protect the module against 8 kV ESD events. Out1 Out1 Out2 Out4 Out3 Out3 Out5 Reset Out6 Board Layout ICP Connector Down Enable Window A Window B Up Gnd +12 Gnd Out10 Out11 Out9 Out8 Out7 Gnd Lin +12 Figure 9. Parallel Port Connector Wake Up 19/22 20/22 3 2 1 CP CB2 TxD EN RxD R9 Osc1 U5 M2 CSN 1 2 3 4 5 6 7 8 9 10 J8 D2 GND LIN Vs INH 100k R31 INH R30 10K PE6 CB3 BATTERY SO8 TxD WUP EN RxD L9638D VBAT 4 3 2 1 J2 XT1 16 MHz to PC Parallel P ort C1 18pF M1 10k +5V R29 100K D1 10k R28 R26 1KOhm R24 1k VBAT Wake Up J7 4.7k R1 10k R2 VBAT Window Up Switch J1 5 6 7 8 29 20 23 34 30 25 31 24 44 3 4 5 6 7 8 32 33 C21 4 2 8 1 1 2 18 1nF INH CB5 CM R3 R4 R5 R10 R14 R11 R12 R13 100uF C20 1K R23 PF1 CB4 1K R15 1K 1K 1K 1K 1K 1K 1K 1K C2 18pF 10nF SO8 Vcr Ground Vs En L4979D C15 Vcw Vo Wi Res out VBAT R27 100Ohm R25 500 Ohm VBAT TQFP44 C22 5 7 6 3 PD0/SP I_ss/AIN6 T16_EXTCLK/(HS)/PC2 PC3/CAN_RX PF5 PF1/AIN7 PE6/AIN5 PF2/AIN8 PC4/CAN_TX PD7/AIN11 PWM0/PA1 PWM1/(HS)P A2 PWM3/PA3 PWM3/PA4 ARTCLK/(HS)PA5 ARTIC2/(HS)PA6 PD1/linSCL1_RD1 PD2/linSCL1_TDO T16_ICAP1/AIN4/PC0 Osc1 Osc2 ST72F561 47nF Ext Wdg CB1 CON3 1 2 3 J6 100uF C23 10nF C24 +5V RESET Vss_0 Vssa Vss2 ICCSEL/Vpp RESET ICCDATA/AIN1/PB5 ICCCLK/AIN0/PB4 PE4 PD5/linSCL2_TDO PC5/SPI_MISO PC6/SPI_MOSI T8_ICAP1/PB2 MCO/PB3 T16_OCMP1/AIN2/PB6 T16_ICAP2/(HS)/P C1 PD6/AIN10 T16_OCMP2/AIN3/PB7 PD4/linSCL2_RDl PD3(HS)/linSCL2_SCK T8_OCMP1/PB1 PC7/SPI_SCK Vdd2 Vdd_0 VddA 38 37 15 22 42 13 12 21 41 26 27 10 11 14 19 43 17 36 35 9 28 16 40 39 10nF R6 R16 10 K Vpp/ICCSEL RxD EN PWM1 SpiClock 1K ICCDATA ICCCLOCK Ext Wdg TxD 1K R7 C3 Vdd C28 R21 R20 R19 10K +5V C25 10nF 36 19 18 1 12 32 29 28 25 24 23 15 14 7 6 Tab 26 11 10 8 13 9 27 3 4 5 16 17 20 21 22 30 31 33 34 35 2 14 15 16 21 1 2 30 25 20 19 18 17 29 28 27 26 10nF C27 J5 10k R36 50k Defroster C29 33nF CM C11 10nF 10nF C17 10nF C16 Safety Light C12 C18 Turn Indicator C13 Lock Mot. B 10nF 10nF 10nF 10nF ICCCLOCK ICCDATA C19 Defroster RESET Vdd Vpp/ICCSEL Osc1 10nF 10nF 10nF Mirror Retract Motor C9 Left-Right Mirror Motor C6 Common Mirror Motors 10nF C7 Up-Down Mirror Motor Common Mirror Motors 10nF Footstep Light C8 Lock Mot. A C10 Common Mirror Motors Exteriour Light 10nF C26 MOTOR DC PWM1 2.7k R34 R32 Lock Mot. B Mirror Retract Motor Exteriour Light Footstep Light Safety Light Turn Indicator Lock Mot. A Common Mirror Motors Up-Down Mirror Motor Left-Right Mirror Motor R33 10k OutB OutB OutB OutB OutA OutA OutA OutA GNDB GNDB GNDB GNDB GNDA GNDA GNDA GNDA SpiClock Clk CM/PWM2 PWM1 Out1 Out2 Out3 Out4 Out4 Out5 Out5 Out6 Out7 Out8 Out9 Out10 Out11 Out11 Multi Power SO30 CSens DiagB/EnB DiagA/EnA PWM PWM IN A IN B VCC VCC VCC VCC VCC VCC VCC VNH2SP30 Power SO36 GND GND GND GND Vcc Vs Vs Vs Vs Vs Vs Vs Vs Vs Vs Tab CP DO CSN Di L9950 R22 2.2K 9 10 6 7 8 5 11 3 4 12 13 24 23 22 VBAT C5 100uF VBAT 2.7K R35 2.7K 10K 10K CP Master in-Slave out CSN Master out-Slave in 33nF R17 C4 100nF 10K R18 Master in-Slave out Master out-Slave in RESET R8 47K +5V ICC Program 1 2 3 4 5 6 7 8 9 10 J4 CON7 1 2 3 4 5 6 7 J9 C14 10nF CON8 1 2 3 4 5 6 7 8 J3 Appendix A Close d Door +5V Schematic AN2334 Schematic Figure 10. Board Schematic AN2334 Revision history Revision history Table 11. Document revision history Date Revision Changes 07-Apr-2006 1 Initial release. 19-Sep-2013 2 Updated disclaimer. 21/22 AN2334 Please Read Carefully: Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice. All ST products are sold pursuant to ST’s terms and conditions of sale. Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no liability whatsoever relating to the choice, selection or use of the ST products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein. UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. ST PRODUCTS ARE NOT DESIGNED OR AUTHORIZED FOR USE IN: (A) SAFETY CRITICAL APPLICATIONS SUCH AS LIFE SUPPORTING, ACTIVE IMPLANTED DEVICES OR SYSTEMS WITH PRODUCT FUNCTIONAL SAFETY REQUIREMENTS; (B) AERONAUTIC APPLICATIONS; (C) AUTOMOTIVE APPLICATIONS OR ENVIRONMENTS, AND/OR (D) AEROSPACE APPLICATIONS OR ENVIRONMENTS. WHERE ST PRODUCTS ARE NOT DESIGNED FOR SUCH USE, THE PURCHASER SHALL USE PRODUCTS AT PURCHASER’S SOLE RISK, EVEN IF ST HAS BEEN INFORMED IN WRITING OF SUCH USAGE, UNLESS A PRODUCT IS EXPRESSLY DESIGNATED BY ST AS BEING INTENDED FOR “AUTOMOTIVE, AUTOMOTIVE SAFETY OR MEDICAL” INDUSTRY DOMAINS ACCORDING TO ST PRODUCT DESIGN SPECIFICATIONS. PRODUCTS FORMALLY ESCC, QML OR JAN QUALIFIED ARE DEEMED SUITABLE FOR USE IN AEROSPACE BY THE CORRESPONDING GOVERNMENTAL AGENCY. Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any liability of ST. ST and the ST logo are trademarks or registered trademarks of ST in various countries. Information in this document supersedes and replaces all information previously supplied. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners. © 2013 STMicroelectronics - All rights reserved STMicroelectronics group of companies Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Philippines - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com 22/22