Application note, Rev 0.3, November 2007 Sense accuracy of smart power switches to diagnose lamps Application note By Stéphane Fraissé Automotive Power Application note Sense Accuracy Abstract 1 Abstract Note: The following information is given as a hint for the implementation of the device only and shall not be regarded as a description or warranty of a certain functionality, condition or quality of the device. This application note is intended to provide application hint in regard to the required sense accuracy of a system in order to diagnose the loss of a lamp. The case of the side indicators is taken as an example with the BTS52412L as driver. 2 Introduction Car manufacturers are increasingly asking an advanced diagnosis of lamps in automobiles. Several kinds of problems can occur with lamps in automobiles, among the most regular being a blown lamp. One common request for diagnosis of side indicators, required by law in many countries. If one main lamp is broken, the driver is notified by a doubling of the side indicator blinking frequency. If only one lamp is connected to the power channel, the failure is easy to detect. However, diagnosis becomes more challenging if lamps are switched in parallel. In this case, a diagnosis can be performed by measuring a change in the current flowing through the power DMOS. 3 Few reminders regarding bulb lamps 3.1 Normalization of the wattage Every bulb used in automotive applications is standardized based on its wattage. The wattage is defined at a predetermined voltage and has a given power accuracy. Table 1 Electrical parameter of the automotive bulb lamp Official power of the lamp in W Power accuracy in % Voltage definition in V 5 10 13.5 7 10 12.8 10 10 13.5 15 10 13.5 21 6 12 27 6 12.8 55 6 13.2 65 6 13.2 It’s interesting to see each lamp is defined as a certain voltage and the lamp’s accuracy is also function of the wattage. 3.2 Lamp behavior in DC operation The current flowing through a lamp is not proportional to the battery voltage and thus cannot be approximated by Ohm's law. Equation (1) is a better description of the non-linearity of the lamp current, taking into account the battery and reference voltages. The equation is derived from observed measurements. Figure 1 sketches the 27W bulb current. Ilamp = Plamp Vbat Vbat ------------ × ---------------- = ------------------× Plamp 3⁄2 Vref Vref Vref Application note current sense (1) 2 Rev 0.3, 2007-11-03 Application note Sense Accuracy Few reminders regarding bulb lamps 3,5 27W bulb without PWM max 27W bulb without PWM typ 3,0 Lamp current (A) 27W bulb without PWM min 2,5 2,0 1,5 1,0 5 7 9 11 13 15 17 Battery voltage (V) Figure 1 27W bulb current 3.3 Lamp behavior in PWM operation 19 27Wbulbcurrent.vsd The purpose of the PWM is to maintain the light emited by the lamp constant, regardless of the battery voltage applied. Maintaining a constant light constant has for consequence to maintain the electrical power constant. The lamp’s resistance is linked to the filament’s temperature. As soon as the lamp is in PWM, and with the purpose to maintain the electrical power constant, the resistance is not influenched by the battery voltage and it’s sticked to the value where the PWM starts. Figure 2 sketches the current of the 27W bulb, with and without PWM, assuming PWM starting at 13.2V. 3,5 27W bulb with PWM max 27W bulb with PWM typ 3,0 27W bulb with PWM min Lamp current (A) 27W bulb without PWM max 27W bulb without PWM typ 2,5 27W bulb without PWM min 2,0 1,5 1,0 5 7 9 11 13 Battery voltage (V) Figure 2 15 17 19 27WbulbcurrentwithPWM.vsd 27W bulb current in PWM application Application note current sense 3 Rev 0.3, 2007-11-03 Application note Sense Accuracy Lamps switched in parallel 4 Lamps switched in parallel 4.1 General statement As soon as several lamps are connected to the same switch, the current of each individual lamp must be summed up together, as described in Equation (2). However, to properly diagnose the failure of one lamp, the diagnosis must be able to differentiate between the minimum current if all lamps are functioning to the maximum current if one lamp is blown. This is expressed in Equation (2) Imax is the current defined with the highest possible tolerance on the lamp. Imin is the current defined with the lowest possible tolerance on the lamp. n–1 n ∑ Imax Vbat Wi 0 < ∑ Imin Vbat Wi (2) 0 The Equation (2) has to be considered with the battery voltage fixed and identical from the both side of the inequality. The consequence is the battery voltage will have to be considered in the diagnostic formula. If Equation (2) cannot be respected, it means there are over-lapping between the loss of one lamp and normal operation. No easy solution can be found to diagnose a loss of a lamp. 4.2 Example : 2x27W +5W application In this configuration, combining Equation (1) with Equation (2) looks like the following Equation (3): P27Wmax - ---------------------------P5Wmax P27Wmin - ---------------------------P5Wmin ------------------------------+ < 2 × ------------------------------+ 3⁄2 3⁄2 3⁄2 3⁄2 Vref27W Vref5W Vref27W Vref5W (3) Equation (3) considers the case if one 27W bulb is blown in the 2x27W+5W application. If the 5W bulb were blown instead, Equation (2) would then not be fulfilled. In other words, the diagnosis would not be able to differentiate between the minimum current if all lamps are functioning and the maximum lamp current if a 5W bulb were blown. 5 Current sense Almost all devices in Infineon's ProFET family of smart power switches offer the current sense feature. Current sense provides a diagnosis current proportional to the load current flowing through the power switch with a kilis ratio. The current sense is defined with nominal values for given load currents, as well as with inaccuracies due to temperature and load current. The following chapter describes parameters to be checked as well as an example based on the BTS5241-2L when used to detect the loss of a 27W bulb, out of 2x27W+5W. 5.1 Current sense inaccuracy The two main contributors to current sense inaccuracy are chip temperature and load current. The greatest inaccuracies occur at low chip temperatures and low load currents. Because low load currents occur at low battery voltages, the worst-case scenario can also be described as occurring at low temperatures and low battery voltages. It is important to note that high kilis values lead to low sense current values. Likewise, low kilis values lead to high current sense values. This relationship should be taken into consideration when considering the differentiation between the minimum current if all lamps are functioning to the maximum current if one lamp is blown. This consideration is expressed in Equation (4). Application note current sense 4 Rev 0.3, 2007-11-03 Application note Sense Accuracy Current sense n – 1 Imax ∑ 0 5.2 n ⁄ ( kilismin ) < ∑ Imin 0 Vbat Wi Vbat Wi ⁄ ( kilismax ) (4) Example : 2x27W+5W application with BTS5241L Table 2 presents kilis information from the BTS 5241L datasheet. Table 2 Extract of the BTS5241L datasheet Pos. Parameter min. typ. max. 4.3.7 Current sense ratio kilis IL = 0.5A IL = 3A IL = 6A 4170 4300 4350 5420 4850 4850 6670 5400 5350 Tj = -40°C IL = 0.5A IL = 3A IL = 6A 4450 4500 4550 5250 4950 4950 6050 5400 6350 Tj = 150°C 5.2.1 Symbol Limit values Unit Test Conditions Load current Figure 3 shows the load current values of 2x27W+5W and 1x27W+5W, respectively, in DC operation. Figure 4 shows the same load current values but in PWM operation. The nominal, maximum and minimum values in each condition are shown. 5.2.2 Equivalent current sense Figure 5 shows the current sense values resulting from 2x27W+5W and 1x27W+5W, respectively, in DC operation. Figure 6 shows the same load current values but in PWM operation. The maximum and minimum values in each condition are shown. 5.2.3 Conclusion It is possible to detect, with the worst case kilis values and worst case loads, the loss of a 27W bulb, out of a 2x27W+5W system. Nevertheless, it is seen that to do it, it is necessary to monitor the battery voltage, because the minimum sense current when all loads are present is bigger than the maximum current sense, when one load is missing. A look up table has to be implemented. Application note current sense 5 Rev 0.3, 2007-11-03 Application note Sense Accuracy Current sense Load current with PWM max 9 Load current with PWM typ Load current with PWM min 8 load current with one loss with PWM max load current with one loss with PWM typ load current with one loss with PWM min 7 Load current (A) 6 5 4 3 2 1 0 5 7 9 11 13 15 17 ECU battery voltage (V) Figure 3 19 loadcurrentavecPWMavecerreur.vsd 2x27W+5W bulbs current, without PWM 9 Load current with PWM max 8 Load current with PWM typ Load current with PWM min 7 load current with one loss with PWM max load current with one loss with PWM min Load current (A) 6 load current with one loss with PWM typ 5 4 3 2 1 0 5 7 9 11 13 Battery voltage (V) Figure 4 15 17 19 2x 27W+5bulbcurrentwithPWM.vsd 2x27W+5W bulbs current, with PWM Application note current sense 6 Rev 0.3, 2007-11-03 Application note Sense Accuracy Current sense 1600 current sense max, no failure (µA) current sense typ, no failure (µA) current sense min, no failure (µA) 1400 current sense max with failure (µA) current sense typ with failure (µA) current sense min with failure (µA) Current sense (µA) 1200 1000 800 600 400 200 0 5 7 9 11 13 15 Battery voltage (V) Figure 5 17 19 sense current 2x 27W+5.vsd Sense current, with and without 27W bulb loss, without PWM 2000 current sense with PWM min, no failure (µA) current sense with PWM typ, no failure (µA) 1800 current sense with PWM max, no failure (µA) current sense with PWM min with failure (µA) 1600 current sense with PWM typ with failure (µA) current sense with PWM max with failure (µA) current sense (µA) 1400 1200 1000 800 600 400 200 0 5 7 9 11 13 Battery voltage (V) Figure 6 15 17 19 sense current 2x 27W+5withPWM.vsd Sense current, with and without 27W bulb loss, with PWM Application note current sense 7 Rev 0.3, 2007-11-03 Application note Sense Accuracy Current sense interface with the microcontroller 6 Current sense interface with the microcontroller 6.1 Determining the sense resistor value A sense resistor Rsense is required to properly convert the current sense signal of the smart power switch into a voltage signal that can be read by the microcontroller's A/D converter. Two factors should be taken into account when selecting a proper sense resistor value: • • The maximum sense current, occurring at the maximum battery voltage and minimum kilis value. The microcontroller supply voltage required for the full range of the microcontroller's A/D converter (typically 5V). Given these factors, the maximum value of the sense resistor can be described using the following Equation (5) Vcc min Rsense ≤ --------------------------Isense max 6.2 (5) Digital conversion The resolution of the microcontroller's A/D converter can be described by the number of bits used in the conversion (i.e. 8, 10, 12 bits). In other words, the voltage resolution is the full range of the microcontroller's A/D converter (typically 5V) divided by the number of conversion bits (2n). 6.3 Example : 2x27W+5W application with BTS5241-2L Let’s take the former example, described in Chapter 5.2. Assuming the micro controller is supplied with 5V, and the A/D converter is a 10bit. The minimum voltage the A/D can read is then 5V / 1024 (210) = 4.9mV. The maximum nominal current the sense current provides in the example is 1,57mA @ 18V. The maximum Rsense is then 5V / 1.57mA = 3184Ω. Let use 3kΩ. Figure 7 gives the converted sense current, without PWM. Application note current sense 8 Rev 0.3, 2007-11-03 Application note Sense Accuracy Current sense interface with the microcontroller 1000 digital sense, no failure (V), no PWM, max digital sense, no failure (V), no PWM, typ 900 digital sense, no failure (V), no PWM, min digital sense, with failure (V), no PWM, max 800 digital sense, with failure (V), no PWM, typ digital sense, with failure (V), no PWM, min 700 Bits 600 500 400 300 200 100 0 5 Figure 7 7 9 11 13 15 ECU battery voltage (V) 17 19 ADsense current 2x 27W+5.vsd Sense current digitalized, with and without 27W bulb loss, without PWM. 3kΩ sense resistor digital 1200 sense, no failure (V), with PWM, min digital sense, no failure (V), with PWM, typ digital sense, no failure (V), with PWM, max 1000 sense, with failure (V), with PWM, min digital digital sense, with failure (V), with PWM, typ digital sense, with failure (V), with PWM, max Bits 800 600 400 200 0 5 7 9 11 13 ECU battery voltage (V) Figure 8 15 17 19 ADsense current 2x 27W+5withPWM.vsd Sense current digitalized, with and without 27W bulb loss, with PWM. 3kΩ sense resistor Application note current sense 9 Rev 0.3, 2007-11-03 Application note Sense Accuracy Other sources of inaccuracy 7 Other sources of inaccuracy Although temperature and load current have the largest influence on current sense inaccuracy in the smart power switch, the following factors can also have an influence on the sense inaccuracy in the microcontroller. • • • • • • • A/D conversion :inaccuracy of the A/D converter, expressed in LSB (i.e. 1,3,5, etc...) A/D supply : affecting the A/D reference voltage (i.e. 0.5%, 1%, 2%, etc...) Sense resistor : inaccuracy of the sense resistor value (i.e. 0.1%, 1%, etc...) Battery voltage measurement : inaccuracy of the battery voltage measurements due to the voltage divider, A/D converter inaccuracy, and the possible variation of the battery voltage between two battery measurments Ground shift : The ground shift between the module’s ground and load ground can be a big source of inaccuracy. (shifts of up to ±1.5V should be considered). PWM inacurracy : timing inaccuracies (i.e. differences between the turn-on and turn-off time of the smart power switch) can cause a difference between the desired PWM duty cycle and actual duty cycle, affecting the equivalent lamp resistance and load current during PWM operation. Number of devices connected to the A/D converter : if multiple current sense outputs are connected to a single A/D converter on the microcontroller, leakage currents from other devices. Figure 9 describes the effect of all inaccuracies and tendency on the overall measurements. It shows how to proceed to compute, step by step, the system inaccuracy and influence. The previous sections have described the influence of the battery voltage, the tolerance on the power of the lamps and kilis accuracy. Now will be described influence on system of all tolerances. ILL IL ∆ P IL ∆V 2 1 ∆GND Vbat Vbat IL Vbat IL 3 4 ∆kilis 5 ∆PWM Vbat Vbat VSENSE IL bits 6 7 ∆lk ∆R ∆ A/D Vbat Vbat Vbat longstoryshort.vsd Figure 9 System inaccuracy to diagnose lamp Application note current sense 10 Rev 0.3, 2007-11-03 Application note Sense Accuracy Other sources of inaccuracy 7.1 Battery voltage measurement Let us know consider the example in 5.2.2, but now factoring in further sources of inaccuracy, including: • • • • A/D converter has an error of 3LSB, A/D converter is supplied by a voltage reference with 2% inaccuracy. Resistors used for the battery voltage divider and current sense have 1% inaccuracies. 50µs inaccuracy between turn-ON and turn-OFF of the smart power switch. Figure 10 shows a typical inaccuracy present in the battery voltage measurement. Figure 11 shows the impact then on the PWM generation. Figure 12 shows the influence on the load current when driving 27W in DC operation and with PWM inaccuracy. . 6 Error (%) 5 4 3 2 1 0 5 7 9 11 13 15 Battery voltage(V) Figure 10 17 19 battery voltage inaccuracy.vsd Inaccuracy of the battery voltage measurement 120 duty cycle (%) 100 80 duty cycle max duty cycle ideal duty cycle min 60 40 20 0 5 7 9 11 13 Battery voltage (V) Figure 11 15 17 19 PWM inaccuracy.vsd Inaccuracy in the PWM generation Application note current sense 11 Rev 0.3, 2007-11-03 Application note Sense Accuracy Other sources of inaccuracy 3,5 27W bulb with PWM max 27W bulb with PWM typ 3,0 27W bulb with PWM min Lamp current (A) 27W bulb without PWM max 27W bulb without PWM typ 2,5 27W bulb without PWM min 2,0 1,5 PWM error 1,0 5 7 9 11 13 15 Battery voltage (V) Figure 12 PWM error influence 7.2 Example : 2x27W+5W application with BTS5241-2L 17 19 lampenPWMavecerreur.vsd As already presented above, let’s apply then the results to the 2x27W+5W application with BTS5241-2L. We will assume the following additional contributors : • • A ground shift of ±1V. 5 current sense outputs are connected to the single A/D converter, with 1µA of leakage current for each output Figure 13 shows the influence of the inaccuracies on the load current when driving 2x27W+5W and 1x27W+5W, respectively, Figure 14 with PWM. It represents the complete current range, playing with inaccuracy due to above PWM generation, as well as the possible ground shift between module’s ground and lamps. Figure 15 shows the influence of the inaccuracies on a digitized sense current in DC operation, Figure 16 in PWM operation Application note current sense 12 Rev 0.3, 2007-11-03 Application note Sense Accuracy Other sources of inaccuracy . 7 Load current max 6 Load current typ Load current min Load current with one loss max Load current (A) 5 Load current with one loss typ Load current with one loss min 4 3 2 1 0 5 Figure 13 7 9 11 13 ECU battery voltage (V) 15 17 19 loadcurrentsansPWMavecerreur.vsd 2x27W+5W bulbs current, without PWM 8 Load current with PWM max Load current with PWM typ 7 Load current with PWM min load current with one loss with PWM max 6 load current with one loss with PWM min Load current (A) load current with one loss with PWM typ 5 4 3 2 1 0 5 7 9 11 13 ECU battery voltage (V) Figure 14 15 17 19 loadcurrentavecPWMavecerreur.vsd 2x27W+5W bulbs current, with PWM Application note current sense 13 Rev 0.3, 2007-11-03 Application note Sense Accuracy Other sources of inaccuracy 1000 digital sense, no failure (V), no PWM, max digital sense, no failure (V), no PWM, typ 900 digital sense, no failure (V), no PWM, min digital sense, with failure (V), no PWM, max 800 digital sense, with failure (V), no PWM, typ digital sense, with failure (V), no PWM, min 700 Bits 600 500 400 300 200 100 0 5 Figure 15 7 9 11 13 15 17 ECU battery voltage (V) sensecurrentsansPWMavecerreur.vsd 19 Sense current digitalized, with and without 27W bulb loss, without PWM 1200 digital sense, no failure (V), with PWM, min digital sense, no failure (V), with PWM, typ A/D converter saturation digital sense, no failure (V), with PWM, max 1000 digital sense, with failure (V), with PWM, min digital sense, with failure (V), with PWM, typ digital sense, with failure (V), with PWM, max Bits 800 600 400 200 0 5 7 9 11 13 ECU battery voltage (V) Figure 16 15 17 19 sensecurrentavecPWMavecerreur.vsd Sense current digitalized, with and without 27W bulb loss, with PWM Application note current sense 14 Rev 0.3, 2007-11-03 Application note Sense Accuracy Other sources of inaccuracy 7.3 Conclusion As shown in Figure 15 and Figure 16, at low battery voltages, the minimum current sense signal when driving 2x27W+5W is overlaping the maximum signal when driving a 1x27W+5W lamp. The red curve is above the green curve until 8V. Under these conditions, it is not possible to distinguish if a 27W bulb has failed in the application or not. Above 8V, the system allows the distinction. 7.4 Diagnostic range It is usually necessary to have the diagnostic operational, only in the range [9V;16V] or [8V;18V]. Below this range, the diagnostic makes no sense, and above this range, the battey voltage is so high that we should rather turn OFF the lamps for protection. At this point we will limit then the study to the range [8V;18V]. 7.5 System inaccuracy factor Figure 17 shows the comparison, assuming in one hand only the kilis derating, and on the other hand, all parameters derating. From this picture, it is obvious that the system error cannot be neglected. 1200 All worst case, with nominal load max Worst case sense, rest ideal, with nominal load max Everything typical, with nominal load All worst case, with nominal load typ Worst case sense, rest ideal, with nominal load min All worst case, with nominal load min All worst case with failure max Worst case sense, rest ideal with load loss max Everything typical, with load loss All worst case with failure typ Worst case sense, rest ideal with load loss min All worst casewith failure min 1000 Bits 800 600 400 200 0 8 Figure 17 10 12 14 ECU battery voltage (V) 16 18 comparaisonsenseonlyettoutpirecas.vsd Comparison kilis error only versus all error possible The above description is sometimes quite heavy handle, to have a first opinion on the possibility to detect or not the request for diagnostic. To simplify the discussion, we can compute the shift on the typical value. Figure 18 describes the shift between the typical values, everything nominal except kilis, and everything worst case. This picture is given in PWM. In other words, to know, with the assumption taken in Chapter 7.2, the typical value of the current wense, with and without load loss, we can use the simplification to shift the typical value by 6% with load loss and 14% without. Figure 19 shows then the error, compared to the typical value. Application note current sense 15 Rev 0.3, 2007-11-03 Application note Sense Accuracy Other sources of inaccuracy 20,0% 18,0% Shift of the typical value, with nominal load Shift of the typical value, with one load loss Relative error of the typical value 16,0% 14,0% 12,0% 10,0% 8,0% 6,0% 4,0% 2,0% 0,0% 8 Figure 18 10 12 14 ECU battery voltage (V) 16 18 decalagedutypique.vsd Shift in the typical value 35% E rror in % 30% 25% Worst case sense, rest ideal, with load loss, relative error 20% Worst case sense, rest ideal, with nominal load, relative error All worst case, relative error with load loss All worst case with nominal load relative error 15% 10% 8 Figure 19 10 12 14 ECU battery voltage 16 18 comparaisonerrorsenseonlyettoutpirecas.vsd Comparison on the error commited, assuming sense only and assuming all system error Application note current sense 16 Rev 0.3, 2007-11-03 Application note Sense Accuracy Conclusion 8 Conclusion To the simple question “is it possible to diagnose the loss of a lamp out of xW ?” there is not only the kilis accuracy to consider. Considering the kilis accuracy will lead to consier something like 10 to 15% inaccuracy, when considering all possible missmatching in the system will lead to consider something like 25 to 35% inaccuracy. It will also lead to consider a shif of the typical value by 6 to 14%. In the example used in this application note, it is possible to detect the loss of a 27W bulb, out of 2x27W+5W with the BTS5241-2L, assuming monitoring the battery voltage. 9 Revision History Application note Revision History: Rev 0.3, 2007-11-03 Page Subjects (major changes since last revision) version 0.2 Correction of the typos and grammar Adding Chapter 7 and following. version 0.1 Adding the Chapter 6 Application note current sense 17 Rev 0.3, 2007-11-03 Edition 2007-11-03 Published by Infineon Technologies AG 81726 Munich, Germany © 2007 Infineon Technologies AG All Rights Reserved. LEGAL DISCLAIMER THE INFORMATION GIVEN IN THIS APPLICATION NOTE IS GIVEN AS A HINT FOR THE IMPLEMENTATION OF THE INFINEON TECHNOLOGIES COMPONENT ONLY AND SHALL NOT BE REGARDED AS ANY DESCRIPTION OR WARRANTY OF A CERTAIN FUNCTIONALITY, CONDITION OR QUALITY OF THE INFINEON TECHNOLOGIES COMPONENT. THE RECIPIENT OF THIS APPLICATION NOTE MUST VERIFY ANY FUNCTION DESCRIBED HEREIN IN THE REAL APPLICATION. INFINEON TECHNOLOGIES HEREBY DISCLAIMS ANY AND ALL WARRANTIES AND LIABILITIES OF ANY KIND (INCLUDING WITHOUT LIMITATION WARRANTIES OF NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OF ANY THIRD PARTY) WITH RESPECT TO ANY AND ALL INFORMATION GIVEN IN THIS APPLICATION NOTE. Information For further information on technology, delivery terms and conditions and prices, please contact the nearest Infineon Technologies Office (www.infineon.com). Warnings Due to technical requirements, components may contain dangerous substances. For information on the types in question, please contact the nearest Infineon Technologies Office. Infineon Technologies components may be used in life-support devices or systems only with the express written approval of Infineon Technologies, if a failure of such components can reasonably be expected to cause the failure of that life-support device or system or to affect the safety or effectiveness of that device or system. Life support devices or systems are intended to be implanted in the human body or to support and/or maintain and sustain and/or protect human life. If they fail, it is reasonable to assume that the health of the user or other persons may be endangered.