Application Note Rev. 1.00 / July 2015 ZSC31050, ZSC31150, ZSSC313x, ZSSC3154, and ZSSC3170 RBIC1 Calibration DLL Multi-Market Sensing Platforms Precise and Deliberate RBIC1 Calibration DLL ZSC31050 / ZSC31150 / ZSSC313x / ZSSC3154 / ZSSC3170 Contents 1 2 RBIC1 Dynamic-Link Library (DLL) .................................................................................................................. 3 Calibration Sequence ....................................................................................................................................... 4 2.1. Set-up and Initialization ............................................................................................................................. 5 2.2. Data Collection .......................................................................................................................................... 6 2.3. Coefficient Calculation ............................................................................................................................... 7 2.3.1. Function Call for Main Sensor Channel .............................................................................................. 7 2.3.2. Function Call for Temperature Channel .............................................................................................. 8 2.3.3. Returned Error Codes ....................................................................................................................... 10 2.3.4. Calculation Examples ....................................................................................................................... 11 2.4. EEPROM Programming .......................................................................................................................... 11 2.5. Verification ............................................................................................................................................... 12 3 Glossary ......................................................................................................................................................... 13 4 Document Revision History ............................................................................................................................ 13 List of Figures Figure 1.1 Figure 2.1 Figure 2.2 Figure 2.3 Figure 2.4 Figure 2.5 SSC Block Diagram and Signal Flow for a Pressure Sensor Example .............................................. 4 Basic Analog Front-End ...................................................................................................................... 5 Calibration Points ................................................................................................................................ 6 Calibration Points and Target Values for Sensor Measurements ...................................................... 7 Calibration Points and Target Values for Temperature Measurement ............................................... 9 Calculation and Measurement Results ............................................................................................. 12 List of Tables Table 1.1 Table 2.1 Table 2.2 Table 2.3 Coefficients that Result from ZMD31050_cal1 ................................................................................... 3 List of Calibration Parameters ............................................................................................................ 7 List of Temperature Calculation Function Parameters ....................................................................... 8 Returned Error Codes ....................................................................................................................... 10 For more information, contact ZMDI via [email protected]. Application Note July 9, 2015 © 2015 Zentrum Mikroelektronik Dresden AG — Rev. 1.00 All rights reserved. The material contained herein may not be reproduced, adapted, merged, translated, stored, or used without the prior written consent of the copyright owner. The information furnished in this publication is subject to changes without notice. 2 of 13 RBIC1 Calibration DLL ZSC31050 / ZSC31150 / ZSSC313x / ZSSC3154 / ZSSC3170 1 RBIC1 Dynamic-Link Library (DLL) The calibration DLL described in this document is designed to expedite the calibration process for the ZSC31050, ZSC31150, ZSSC313x, ZSSC3154, and ZSSC3170 Sensor Signal Conditioner (SSC) products. Unless otherwise noted, the term SSC IC will be used in this document to refer to these five products. The calibration process compensates the sensor input offset, sensor linearization, and sensor’s sensitivity temperature dependency. It uses a polynomial function called ZMD31050_cal1, which calculates coefficients for rd nd up to 3 order linearization compensation and up to 2 order for the temperature compensation. The RBIC1 DLL is contained in the Evaluation Software installation folder. Coefficients resulting from ZMD31050_cal1 are stored in the SSC EEPROM memory. Table 1.1 provides a list of the resulting coefficients. Table 1.1 Coefficients that Result from ZMD31050_cal1 Coefficient Name EEPROM Address C0 00HEX Offset Input signal when no sensor excitation is present C1 01HEX Gain Sensor signal gain value C2 02HEX Linearization 2 order non-linearity for three-point calibration C3 03HEX Linearization 3 order non-linearity for four-points calibration C4 04HEX Temperature compensation 1 order temperature coefficient sensor offset C5 05HEX Temperature compensation 2 order temperature coefficient sensor offset C6 06HEX Temperature compensation 1 order temperature coefficient gain dependency C7 07HEX Temperature compensation 2 order temperature coefficient gain dependency Application Note July 9, 2015 Polynomial Function Description nd nd st st st st © 2015 Zentrum Mikroelektronik Dresden AG — Rev. 1.00 All rights reserved. The material contained herein may not be reproduced, adapted, merged, translated, stored, or used without the prior written consent of the copyright owner. The information furnished in this publication is subject to changes without notice. 3 of 13 RBIC1 Calibration DLL ZSC31050 / ZSC31150 / ZSSC313x / ZSSC3154 / ZSSC3170 Figure 1.1 illustrates a typical signal flow from measuring the physical value to the output of the conditioned result with offset compensation and gain compensation to meet the voltage output targets and signal linearization requirements for the application. Figure 1.1 SSC Block Diagram and Signal Flow for a Pressure Sensor Example Physical Value Sensor Measurement Calculation Output Sensor Signal Conditioner p diode t0 AFE CMC Main Channel(s) Linearization & Compensation Output D/A Supplementary Channel Linearization Serial Interface Analog Digital Pressure Sensor Output V mV T1 T2 T3 p 2 p Calibration Sequence A typical calibration flow contains five steps in the following order: 1. Set-up and initialization 2. Data collection 3. Coefficient calculation 4. EEPROM programming 5. Verification These five steps are very similar for all applicable products; there might be some insignificant differences in the Evaluation Software user interface. 2 Connect the SSC IC to the user’s PC using the selected interface applicable to the product: I C™*, OWI, LIN, or SPI. Refer to the product’s Functional Description document for the available command set. * I2C™ is a trademark of NXP. Application Note July 9, 2015 © 2015 Zentrum Mikroelektronik Dresden AG — Rev. 1.00 All rights reserved. The material contained herein may not be reproduced, adapted, merged, translated, stored, or used without the prior written consent of the copyright owner. The information furnished in this publication is subject to changes without notice. 4 of 13 RBIC1 Calibration DLL ZSC31050 / ZSC31150 / ZSSC313x / ZSSC3154 / ZSSC3170 2.1. Set-up and Initialization Prior to data collection, the SSC must to be configured so that the analog front-end (AFE), temperature measurement, and additional SSC functions fit the sensor’s parameters and application requirements. This includes gain selection, sensor signal range, ADC resolution, temperature sensor in use, output format, and diagnostic functions. The goal is to adjust the gain so the sensor signal is as close as possible to the acceptable ADC voltage range for the full operational temperature range. For this, the sensor span, offset, and tolerances must be taken into account. Next, write the initial configuration into the RAM or the EEPROM of the SSC IC. Note: Setting initial coefficients values is not required (initially coefficients can be set to 0 or any value). Figure 2.1 Basic Analog Front-End Sensor Signal Conditioner AFE VADC_REF D Analog Block Digital Block A P diode VIN N Resolution (res) ∑ a1 CMC a2 ±V VADC A D Output ADCOUT ∑ Amplifier with Gain a1 Amplifier with Gain a2 [mV] ADC Saturation [V] VSS = 0 ADC Output with range shift +/- ½ [counts] Max 2res VADC_REF Saturation Max 90% VADC_REF ADC input VADC +½ x 2res a2.VXZC ½ VADC_REF VIN Sensor Output -½ x 2res Min 10% VADC_REF 0 Min Application Note July 9, 2015 - 2res 0 Physical Value Max Min Measurant (Analog) Max Measurant (Digital) © 2015 Zentrum Mikroelektronik Dresden AG — Rev. 1.00 All rights reserved. The material contained herein may not be reproduced, adapted, merged, translated, stored, or used without the prior written consent of the copyright owner. The information furnished in this publication is subject to changes without notice. 5 of 13 RBIC1 Calibration DLL ZSC31050 / ZSC31150 / ZSSC313x / ZSSC3154 / ZSSC3170 2.2. Data Collection After the coefficients in EEPROM are initialized, data collection can begin. The minimum number of calibration points required varies between two and as many as eight for the main sensor and two or three for the temperature sensor. This depends on the precision required and the behavior of the sensor in use. In general, taking more calibration points will result in a better calibration. Figure 2.2 shows the expected placement of calibration points for the different calibration options. The order of the points taken is not important; however, the number of points per temperature must be followed or the calibration might fail. The location and order of the temperature values is also not important – however for best results, the temperatures should be spread evenly throughout the user’s specification range. It is important to keep the calibration points as orthogonal as possible to maximize calibration accuracy. Figure 2.2 Calibration Points -40o °C Min. Linear sensor signal with linear temperature compensation Min. -40o °C 2 nd o 25o 125 Min. -40o °C Max. Input signal Input signal Max. o 25o 125 o 25o 125 2nd order sensor signal (non-linearity compensation) Linear sensor signal (2-points measurement) -40o Min. o 25o 125 °C 3rd order sensor signal (non-linearity compensation) Max. Input signal o 25o 125 Max. Input signal Min. -40o Max. Input signal Input signal Max. °C order sensor signal with linear temperature compensation Min. -40o o 25o 125 °C rd 3 order sensor signal with 2nd order temperature compensation rd The calibration point configuration can be any setup from 2-points linear calibration to 3 order non-linearity comnd pensation and 2 order temperature dependency compensation. Application Note July 9, 2015 © 2015 Zentrum Mikroelektronik Dresden AG — Rev. 1.00 All rights reserved. The material contained herein may not be reproduced, adapted, merged, translated, stored, or used without the prior written consent of the copyright owner. The information furnished in this publication is subject to changes without notice. 6 of 13 RBIC1 Calibration DLL ZSC31050 / ZSC31150 / ZSSC313x / ZSSC3154 / ZSSC3170 2.3. Coefficient Calculation 2.3.1. Function Call for Main Sensor Channel ZMD31050_cal1 (Zp1m, Zp2m, Zp4m, Zp3m, Zp1u, Zp2u, Zp1l, Zp2l, A, B, M2, M, Ztmed, Ztupp, Ztlow, adc_res, &C0, &C1, &C2, &C3, &C4, &C6, &C5, &C7); Figure 2.3 Calibration Points and Target Values for Sensor Measurements 3rd Order Sensor Signal with 2nd Order Temperature Compensation Output Target %[VDDA] Zp2l B Zp2m Zp2u Max.90% Zp4m M2 Zp3m M Zp1l A Zp1m Zp1u Min.10% l -40 o Min. -5 u m o 25 Ztlow o Ztmed 85o 125o Ztupp Max. o C Acquired Data (ADC counts) Table 2.1 List of Calibration Parameters Name ZMD31050_cal1 Zp1m Zp2m Description Function call, main sensor channel Sensor minimum output Sensor maximum output Type Range int 4 bytes float float If not used Returns 0 if successful ±2 15 Required ±2 15 Required 0 Medium temperature Zp3m Sensor output (2nd order nonlinearity) float ±2 15 Zp4m Sensor output (3rd order nonlinearity) float ±2 15 0 Zp1u Sensor minimum output float ±2 15 0 0 Upper temperature Zp2u Sensor maximum output float ±2 15 Zp1l Sensor minimum output float ±2 15 0 ±2 15 0 Zp2l Sensor maximum output A M M2 B Application Note July 9, 2015 Target output value in [%] multiplied by 0.01 for digital output target 0.006875 for analog output target float Condition Lower temperature float 0 to 1 Required float 0 to 1 0 float 0 to 1 0 float 0 to 1 Required A < M < M2 < B © 2015 Zentrum Mikroelektronik Dresden AG — Rev. 1.00 All rights reserved. The material contained herein may not be reproduced, adapted, merged, translated, stored, or used without the prior written consent of the copyright owner. The information furnished in this publication is subject to changes without notice. 7 of 13 RBIC1 Calibration DLL ZSC31050 / ZSC31150 / ZSSC313x / ZSSC3154 / ZSSC3170 Name Description Ztmed Type Temperature sensor Ztupp float Temperature sensor Ztlow Temperature sensor adc_res ADC resolution C0 to C7 Calculated coefficients float float Range If not used Condition ±2 15 -33000.0 Medium temperature ±2 15 -33000.0 Upper temperature ±2 15 -33000.0 Lower temperature int 9 to 16 - Given in bits float 4 bytes 0 Results upon success Data acquisition commands: D8HEX for sensor and D9HEX for calibration temperature. Command format: [7bit Slave Address] [0] [8-bit command] Evaluation software command: 2 I C™ interface: IW_78001D8 OWI interface: OW_78001D8 LIN interface: LW_3c0087F05B4D8FFFFFFFF 2.3.2. Function Call for Temperature Channel TQuad (Ztlow, Ztupp, Ztmed, Tlow, Tupp, Tmed, adc_res, &Ct0, &Ct1, &Ct2); TLin Table 2.2 (Ztmed, Ztupp, Tmed, Tupp, &Ct0, &Ct1); List of Temperature Calculation Function Parameters Name Description Type nd TQuad Function call, temperature channel 2 TLin Function call, temperature channel linear Ztmed bool float Temperature sensor Ztlow** Temperature sensor Tlow Target value calculated by: 𝑡𝑒𝑚𝑝𝑟𝑎𝑛𝑔𝑒 ∗ 𝑇𝑎𝑟𝑔𝑒𝑡𝑚𝑎𝑥 −𝑇𝑎𝑟𝑔𝑒𝑡𝑚𝑖𝑛 [%𝑉𝐷𝐷𝐴] 𝑇𝑎𝑟𝑔𝑒𝑡𝑚𝑎𝑥 −𝑇𝑎𝑟𝑔𝑒𝑡𝑚𝑖𝑛 [℃] float float + 𝑇𝑎𝑟𝑔𝑒𝑡𝑚𝑖𝑛[%𝑉𝐷𝐷𝐴] 100 Tupp Where VDDA stands for analog power supply and ADC reference voltage of the IC. adc_res ADC resolution, temperature channel Ct1 to Ct3 Calculated coefficients, temperature channel Application Note July 9, 2015 Condition Returns 0 if successful bool Temperature sensor Ztupp Tmed order Range Returns 0 if successful ±2 15 Medium temperature ±2 15 Upper temperature ±2 15 Lower temperature float 0 to 1 𝑡𝑒𝑚𝑝𝑟𝑎𝑛𝑔𝑒 = 𝑇𝑙𝑜𝑤 − 𝑇𝑚𝑖𝑛 float 0 to 1 𝑡𝑒𝑚𝑝𝑟𝑎𝑛𝑔𝑒 = 𝑇𝑚𝑒𝑑 − 𝑇𝑚𝑖𝑛 float 0 to 1 𝑡𝑒𝑚𝑝𝑟𝑎𝑛𝑔𝑒 = 𝑇𝑢𝑝𝑝 − 𝑇𝑚𝑖𝑛 int 9 to 16 Given in bits float 4 bytes Result upon success © 2015 Zentrum Mikroelektronik Dresden AG — Rev. 1.00 All rights reserved. The material contained herein may not be reproduced, adapted, merged, translated, stored, or used without the prior written consent of the copyright owner. The information furnished in this publication is subject to changes without notice. 8 of 13 RBIC1 Calibration DLL ZSC31050 / ZSC31150 / ZSSC313x / ZSSC3154 / ZSSC3170 Data acquisition commands: DAHEX Command format: [7bit Slave Address] [0] [8-bit command] Evaluation Software Command: 2 I C™ interface: IW_78001DA OWI interface: OW_78001DA LIN interface: LW_3c0087F05B4DAFFFFFFFF Figure 2.4 Calibration Points and Target Values for Temperature Measurement 2nd Order Temperature Compensation %VDDA Output Target Max. 90%[VDDA] o C 125o Tlow Ztupp 85o Tlow Ztmed 25o Tlow Ztlow -5o Min. 10%[VDDA] -40o Acquired Data (ADC counts) The upper and lower limits (Max. and Min.) are usually selected as 10% and 90% of the ADC reference voltage (the analog voltage supply). Note that this varies depending on the SSC IC. In this input range, the ADC has the best performance for linearity. Application Note July 9, 2015 © 2015 Zentrum Mikroelektronik Dresden AG — Rev. 1.00 All rights reserved. The material contained herein may not be reproduced, adapted, merged, translated, stored, or used without the prior written consent of the copyright owner. The information furnished in this publication is subject to changes without notice. 9 of 13 RBIC1 Calibration DLL ZSC31050 / ZSC31150 / ZSSC313x / ZSSC3154 / ZSSC3170 2.3.3. Returned Error Codes Note: bit [0] is not used Table 2.3 Returned Error Codes Flags HEX Bit Description 0000 0000 0000 0010 0002HEX bit[1] No solution found for given input data. 0000 0001 0000 0010 0102HEX bit[1] and bit[8] Calculated coefficients are out of range (linear calibration). 0000 0010 0000 0010 0202HEX bit[1] and bit[9] Offset: No solution found or coefficients are out of range. 0000 0100 0000 0010 0402HEX bit[1] and bit[10] Gain: No solution found or coefficients are out of range. 0000 1000 0000 0010 0802HEX bit[1] and bit[11] 2 nd order: No solution found or coefficients are out of range. rd 0001 0000 0000 0010 1002HEX bit[1] and bit[12] 3 order: No solution found or coefficients are out of range. 0000 0000 0000 0100 0004HEX bit[2] Range check error. 0000 0001 0000 0100 0104HEX bit[2] and bit[8] Offset compensation error. 0000 0010 0000 0100 0204HEX bit[2] and bit[9] Gain calculation error. 0000 0100 0000 0100 0404HEX bit[2] and bit[10] C1 and C2 calculation error. 0000 0100 0000 0100 0804HEX bit[2] and bit[11] C3 and C4 calculation error. 0000 1000 0000 0100 1004HEX bit[2] and bit[12] C5 calculation error. 0010 0000 0000 0100 2004HEX bit[2] and bit[13] C6 calculation error. 0100 0000 0000 0100 4004HEX bit[2] and bit[14] C7 calculation error. 0000 0000 0000 1000 0008HEX bit[3] Temperature behavior linearization calculation error. 0000 0001 0000 1000 0108HEX bit[3] and bit[8] Offset temperature coefficient calculation (C4 and C5). 0000 0010 0000 1000 0108HEX bit[3] and bit[9] Gain temperature coefficient calculation (C6 and C7). 0000 0000 0001 0000 0010HEX bit[4] Coefficients range check error. 0000 0001 0001 0000 0110HEX bit[4] and bit[8] Coefficient range check (C0 and C1) error. 0000 0010 0001 0000 0210HEX bit[4] and bit[9] Non-linearity coefficient range check (C2 and C3). Application Note July 9, 2015 © 2015 Zentrum Mikroelektronik Dresden AG — Rev. 1.00 All rights reserved. The material contained herein may not be reproduced, adapted, merged, translated, stored, or used without the prior written consent of the copyright owner. The information furnished in this publication is subject to changes without notice. 10 of 13 RBIC1 Calibration DLL ZSC31050 / ZSC31150 / ZSSC313x / ZSSC3154 / ZSSC3170 2.3.4. Calculation Examples ADC max.: ADC min.: ADC resolution: Data points: Temperature points: 90%[VDDA] 10%[VDDA] 14 bit 10%, 50%, 70% and 90% -40°C, -5°C, 25°C, 85°C and 125°C Linear (two points, no non-linearity and temperature compensation) ZMD31050_cal1 (data #1, data #2, 0, 0, 0, 0, 0, 0, 0.1, 0.9, 0, 0, -33000, -33000, -33000, 14, &C0, &C1, &C2, &C3, &C4, &C6, &C5, &C7 ); nd 2 order non-linearity compensation (three points at 10%, 50%, and 90%, no temperature compensation) ZMD31050_cal1 (data #1, data #2, 0, data #3, 0, 0, 0, 0, 0.1, 0.9, 0, 0.5, -33000, -33000, -33000, 14, &C0, &C1, &C2, &C3, &C4, &C6, &C5, &C7 ); rd 3 order non-linearity compensation (four points at 10%, 50%, 70%, and 90%, no temperature compensation) ZMD31050_cal1 (data #1, data #2, data #4, data #3, 0, 0, 0, 0, 0.1, 0.9, 0.7, 0.5, -33000, -33000, -33000, 14, &C0, &C1, &C2, &C3, &C4, &C6, &C5, &C7 ); rd nd 3 order non-linearity and 2 order temperature compensation (8 points for sensor and 3 points for temperature) ZMD31050_cal1 (data #1, data #2, data #4, data #3, data #5, data #6, data #7, data #8, 0.1, 0.9, 0.7, 0.5, temp#1, temp#2, temp#3, 14, &C0, &C1, &C2, &C3, &C4, &C6, &C5, &C7 ); TQuad (temp#1, temp#2, temp#3, 0.27, 0.71, 0.42, 14, &Ct0, &Ct1, &Ct2); 2.4. EEPROM Programming Programming of the SSC IC can be done via the Evaluation Software provided for each SSC IC. Software can be downloaded from the product page on www.ZMDi.com. Refer to the Evaluation Kit Description for the SSC IC for further details. Application Note July 9, 2015 © 2015 Zentrum Mikroelektronik Dresden AG — Rev. 1.00 All rights reserved. The material contained herein may not be reproduced, adapted, merged, translated, stored, or used without the prior written consent of the copyright owner. The information furnished in this publication is subject to changes without notice. 11 of 13 RBIC1 Calibration DLL ZSC31050 / ZSC31150 / ZSSC313x / ZSSC3154 / ZSSC3170 2.5. Verification Figure 2.5 Calculation and Measurement Results Digital readout: After successful calibration, the output of the SSC IC should vary between the target limits specified during calibration. For digital data, the readout values match the resolution of the data format used. For analog output, the output voltage is generated using a resistor-string digital-to-analog converter (DAC) with 5632 steps, of which 5120 steps (256 to 5375) can be addressed. As a result, an adjustable range from 5% to 95% of the supply voltage is guaranteed, including all possible tolerances. Visit ZMDI’s website www.ZMDi.com or contact your nearest sales office for the latest version of various support documents. Application Note July 9, 2015 © 2015 Zentrum Mikroelektronik Dresden AG — Rev. 1.00 All rights reserved. The material contained herein may not be reproduced, adapted, merged, translated, stored, or used without the prior written consent of the copyright owner. The information furnished in this publication is subject to changes without notice. 12 of 13 RBIC1 Calibration DLL ZSC31050 / ZSC31150 / ZSSC313x / ZSSC3154 / ZSSC3170 3 Glossary Term Description ADC Analog-to-Digital Converter DAC Digital to Analog Converter DLL Dynamic-Link Library SSC Sensor Signal Conditioner 4 Document Revision History Revision 1.00 Date Description July 9, 2015 First release. Sales and Further Information www.ZMDi.com [email protected] Zentrum Mikroelektronik Dresden AG Global Headquarters Grenzstrasse 28 01109 Dresden, Germany ZMD America, Inc. 1525 McCarthy Blvd., #212 Milpitas, CA 95035-7453 USA Central Office: Phone +49.351.8822.306 Fax +49.351.8822.337 USA Phone 1.855.275.9634 Phone +1.408.883.6310 Fax +1.408.883.6358 European Technical Support Phone +49.351.8822.7.772 Fax +49.351.8822.87.772 DISCLAIMER: This information applies to a product under development. Its characteristics and specifications are subject to change without notice. Zentrum Mikroelektronik Dresden AG (ZMD AG) assumes no obligation regarding future manufacture unless otherwise agreed to in writing. The information furnished hereby is believed to be true and accurate. However, under no circumstances shall ZMD AG be liable to any customer, licensee, or any other third party for any special, indirect, incidental, or consequential damages of any kind or nature whatsoever arising out of or in any way related to the furnishing, performance, or use of this technical data. ZMD AG hereby expressly disclaims any liability of ZMD AG to any customer, licensee or any other third party, and any such customer, licensee and any other third party hereby waives any liability of ZMD AG for any damages in connection with or arising out of the furnishing, performance or use of this technical data, whether based on contract, warranty, tort (including negligence), strict liability, or otherwise. European Sales (Stuttgart) Phone +49.711.674517.55 Fax +49.711.674517.87955 Application Note July 9, 2015 Zentrum Mikroelektronik Dresden AG, Japan Office 2nd Floor, Shinbashi Tokyu Bldg. 4-21-3, Shinbashi, Minato-ku Tokyo, 105-0004 Japan ZMD FAR EAST, Ltd. 3F, No. 51, Sec. 2, Keelung Road 11052 Taipei Taiwan Phone +81.3.6895.7410 Fax +81.3.6895.7301 Phone +886.2.2377.8189 Fax +886.2.2377.8199 Zentrum Mikroelektronik Dresden AG, Korea Office U-space 1 Building Unit B, 906-1 660, Daewangpangyo-ro Bundang-gu, Seongnam-si Gyeonggi-do, 463-400 Korea Phone +82.31.950.7679 Fax +82.504.841.3026 © 2015 Zentrum Mikroelektronik Dresden AG — Rev. 1.00 All rights reserved. The material contained herein may not be reproduced, adapted, merged, translated, stored, or used without the prior written consent of the copyright owner. The information furnished in this publication is subject to changes without notice. 13 of 13