AN2378 Application note Software filter algorithm for open-load detection on the L9935 device Introduction This document describes a software algorithm used for detecting an open-load condition. The algorithm refers to the L9935 two-phase stepper motor driver. The algorithm identifies the open-load failure within the failure class and filters out occurrences of false open-load failures. L9935 bipolar stepper motor driver device 0LFURFRQWUROOHU / 2SHQORDG FLUFXLW 2SHQORDG FLUFXLW 2SHQORDG '(7(&7,21 2SHQORDG 6WHSSHU 0RWRU 2SHQORDG FLUFXLW O$ RL & 6RIWZDUH ILOWHU & RL O% Figure 1. 2SHQORDG FLUFXLW *$3*5, September 2013 Doc ID 12435 Rev 3 1/13 www.st.com Contents AN2378 Contents 1 When does L9935 open-load checking occur? . . . . . . . . . . . . . . . . . . . 5 1.1 Full step mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 Half step mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2 Open-load detection of L9935 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3 L9935 open-load production test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 4 Open-load filter algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Appendix A Further information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 A.1 Reference documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2/13 Doc ID 12435 Rev 3 AN2378 List of tables List of tables Table 1. Table 2. Production test conditions (Rshunt includes max 0.2 ohm contact resistance) . . . . . . . . . . . 9 Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Doc ID 12435 Rev 3 3/13 List of figures AN2378 List of figures Figure 1. Figure 2. Figure 3. Figure 4. Figure 5. 4/13 L9935 bipolar stepper motor driver device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Output current of L9935 in full step mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Output current of L9935 in half step mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Open-load detection during free-wheeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Open-load measurement concept with simplified Vmes curve (if Vmes < 0 V TLSI is switched off) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Doc ID 12435 Rev 3 AN2378 1 When does L9935 open-load checking occur? When does L9935 open-load checking occur? The flyback pulse indicates the availability of an inductive load. The flyback pulse is checked after reversing the polarity of the motor current (full step mode), namely 61% Ishunt(a) or 100% Ishunt, or after changing the current from 61% Ishunt to 0% Ishunt (half step mode) (please refer to L9935 datasheet; see A.1: Reference documents). 1.1 Full step mode Figure 2. Output current of L9935 in full step mode IXOO ,/$ IXOO W ,/ % W *$3*5, ● 1full: 61% Ishunt or 100% Ishunt, regulated with chopping at low-side and slow decay mode; flyback using the high-side path. ● 2full: reversing the polarity of the motor coil A, using fast decay (as shown in Figure 4). During this polarity reversal, the flyback pulse is used for the open-load detection. The process described above is also valid for motor coil B. a. The symbol “Ishunt” in this application note is equivalent to the symbol “IRX” in the device datasheet. Doc ID 12435 Rev 3 5/13 When does L9935 open-load checking occur? 1.2 AN2378 Half step mode Figure 3. Output current of L9935 in half step mode KDOI ,/$ KDOI W ,/% W *$3*5, ● 1half: 61% Ishunt plus 100% Ishunt, regulated with chopping at low-side and slow decay mode; flyback using the high-side path. ● 2half: changing from +61% Ishunt to 61% Ishunt is done in two steps, with a zero ampere current step in between. The curve to obtain 0 A in the motor coil A is used to detect the open-load, because in this step the current is free-wheeling. This step to 0 A in the motor coil uses fast decay, as shown in Figure 4. The process described above is also valid for motor coil B. 6/13 Doc ID 12435 Rev 3 AN2378 2 Open-load detection of L9935 Open-load detection of L9935 The open-load detection is done during flyback, using fast decay. The fast decay path is shown in Figure 4: the coil energy, stored in LM is fed back from GND to VBatt. Figure 4. Open-load detection during free-wheeling 9%DWW 7+6, 7+6U 50 /0 (0) &RPS RSHQ ORDG V 7/6, 7/6U 9UHI P9 5VKXQW / 0RWRU *$3*5, If the voltage drop at Rshunt plus RDS,ON of TLSl does not reach the reference voltage Vref, an open-load failure is detected. A failure is flagged only if the failure lasts longer than 16 µs. Figure 5. Open-load measurement concept with simplified Vmes curve (if Vmes < 0 V TLSI is switched off) ,): 9PHV &RPS RSHQ V ORDG 9UHI P9 7/6, 9PHV 5VKXQW P9 W V *$3*5, Doc ID 12435 Rev 3 7/13 Open-load detection of L9935 AN2378 The flyback pulse is dependent on different parameters: Equation 1 V Batt + R I + EMF V dI ----- = ------L = -------------------------------------------------L L dt R = R shunt + R M + 2 R DS,ON Equation 2 dI L dt = -------------------------------------------------- 16s V Batt + R I + EMF ● Decreasing motor current leads to an increase of sporadic open-load failures. ● Increasing motor resistance RM (temperature increase, production spread, new motor generation) leads to an increase of sporadic open-load failures. ● Increasing motor speed increases back-EMF (electromagnetic force) increase of sporadic open-load failures. ● In case of resonance effects back-EMF could be similar to VBatt decrease of motor current “I” increase of sporadic open-load failures. ● In case of current regulation mode: increase of VBatt decrease of flyback time increase of sporadic open-load failures. Therefore it is not possible to directly test against a certain open-load current threshold without also defining application dependent parameters. 8/13 Doc ID 12435 Rev 3 AN2378 3 L9935 open-load production test L9935 open-load production test For testing the open-load functionality, STMicroelectronics™ uses a special go/no-go test with the parameters defined in Table 1. Devices that pass this test do not generate an openload error if the load current—16 µs after going in flyback—remains higher than 90 mA. Table 1. Production test conditions (Rshunt includes max 0.2 ohm contact resistance) Parameters ST screening test Unit VBatt 14 V Rshunt 1.2 ohm RDS,ON 0.4 ohm RLoad 82 ohm LLoad 5 mH I(t=0µs) 0.17 A I(t=16µs) 0.089 A VOUT(16µs) 0.143(1) V 1. Open-load case: the current is not regulated, that is, I = VBatt/R < IREG and ignoring back-EMF gives the voltage over the comparator as expressed in Equation 3. Equation 3 R DS ON + R shunt R V mes t = V Batt * -------------------------------------------- * 1 – 2 * exp – t ------- L M R An open-load is detected if the magnitude of the flyback voltage, 16 µs after going in flyback, is less than 60 mV: Equation 4 V mes t = 16s 60mV Doc ID 12435 Rev 3 9/13 Open-load filter algorithm 4 AN2378 Open-load filter algorithm To ensure recognition of a true open-load failure, the following algorithm is recommended: 10/13 ● First of all it is helpful to separate the open-load failure from other failures. In this case the failure code has to be related to the sent data. In case of switching the output current to 0 A or inverting the current, the failure code has to be monitored. As specified in the datasheet, if the error codes 11 01 11 occur, the combination of these three error codes plus the sent command indicates an open-load error. ● Secondly, an error counter should be used. For example, all open-load failure occurrences should be counted. It should be possible to increase the functionality of the counter by resetting the counter in case of detecting a possible open-load situation without open-load failure. Doc ID 12435 Rev 3 AN2378 Further information Appendix A A.1 Further information Reference documents ● L9935 Two-phase stepper motor driver (Datasheet, Doc ID 5198) Doc ID 12435 Rev 3 11/13 Revision history AN2378 Revision history Table 2. 12/13 Document revision history Date Revision Changes 19-Jun-2006 1 Initial release. 28-Feb-2011 2 Editorial and formatting changes throughout Added Figure 5: Open-load measurement concept with simplified Vmes curve (if Vmes < 0 V TLSI is switched off) Added Section 3: L9935 open-load production test 19-Sep-2013 3 Updated disclaimer. Doc ID 12435 Rev 3 AN2378 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 Doc ID 12435 Rev 3 13/13