Home
AN3397 - STMicroelectronics
Contents
1. Doc ID 018809 Rev 1 ky AN3397 Software description Figure 7 Infinite routine flowchart N Advanced mode 2 Forced calibration flag set Yes Display CAL on LCD screen Execute the calibration routine user_calib Wakeup flag set Yes Temperature measurement performed by ADC Number of samples gt 20 Temperature average of last 20 temperature measurements 5 minute counter expired Is temperature gt temperature measured 5 mins before Is temperature lt temperature measured 5 mins before BAR 0 displayed on the LCD screen No bar displayed on the LCD Is temperature lt minimum temperature recorded so far Minimum temp current temp Is temperature gt maximum temperature recorded so far User push button used to disply max min and current temperature ai18765 ky Doc ID 018809 Rev 1 21 24 Conclusion AN3397 4 Conclusion The built in TS in STM8L15xxx devices can be used for many applications requiring a measurement of temperature The example application provided in this application note describes how to configure the TS peripheral and includes a description of the calibration technique This example is a starting point for users who want to develop their own TS applications 22 24 Doc ID 018809 Rev 1 ky AN3397 Revision history 5 Revision history Table 2 Document rev
2. 00 00 cet 14 3 Software description 0 000 cece eee eee eee 15 3 1 STMB8L peripherals used by the application 2000 15 3 2 Application software flowchart 2 0 0 0 eee ee 16 3 2 1 Main TS application routine flowchart 0 00 e eee aes 16 3 2 2 User calibration routine flowchart 0000 cece eee eee 18 3 2 3 Infinite routine flowchart 00 000 eee eee eee 20 4 CONCINSION ss 2c0ciceerannnen se meen Cenc a okie ames 22 5 REVISION history scsccte cei eee aeons eee eee eee ees 23 2 24 Doc ID 018809 Rev 1 ky AN3397 List of tables List of tables Table 1 Applicable products and toolS 000 tees 1 Table 2 Document revision history 0 0 0 eee eee 23 ky Doc ID 018809 Rev 1 3 24 List of figures AN3397 List of figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 4 24 Temperature sensor engineering tolerance 0000 e eee eee eee 7 Temperature sensor application block diagram 000 0c eee eee 9 STM8L DISCOVERY hardware settings 0 000 cece eee 10 TS application user interface 0 0 eee eens 11 Main TS application routine flowchart 0 00 0 ccc eee 17 User calibration routine flowchart 00 000 eee 19 Infinite routine flowchart 000 cee ee eee 21 Doc ID 018809 Rev 1 ky AN3397 Temperature sensor overview 1 1 N
3. 1 4 Bias 1 3 LCD voltage source internal Contrast 3 10 V No dead time Pulse on duration 1 ADC The ADC converts the TS output voltage into a digital value The ADC peripheral is configured as follows ADON 1 and TSON 1 Single conversion mode 12 bit resolution ADC clock frequency fepy clock prescaler 0 Sampling time 192 ADC clock cycles 12 us fepy 16 MHz TS channel selected Real time clock RTC The RTC generates the time base for waking up the microcontroller from low power Active halt mode The RTC peripheral is configured as follows Low speed external LSE clock selected as RTC clock source by default The low speed internal LSI clock can also be used by removing the USE_LSE definition in the project options RTC clock prescaler RTC clock source 1 Wakeup clock selection bits WUCKSEL 2 0 are set to 000 RTCCLK 16 to generate an RTC counter timebase of approximately 500 us Wakeup counter registers WUTRx are set to 100 to generate a 50 ms wakeup time Doc ID 018809 Rev 1 15 24 Software description AN3397 3 2 3 2 1 16 24 General purpose input output GPIO The GPIO ports C and E are interfaced with a user push button and light emitting diodes LEDs The GPIO peripheral is configured as follows e PC1 set as input floating pin with interrupt the user push button e PC7 and PE7 set as output push pull pin LED4 and LED3 respectively e When
4. wa AN3397 Sf Application note Temperature sensor example using the STM8L DISCOVERY board Introduction This application note proposes two methods for measuring and displaying temperature using the STMB8L built in temperature sensor connected to the STM8L DISCOVERY board The two methods are illustrated in the application code example provided with this application note within two configurable modes normal and advanced More generally this application note explains the care that should be taken with the temperature sensor and describes the peripheral settings and configuration required to develop the temperature sensor application The temperature sensor application does not require any additional hardware Once the STM8L DISCOVERY is powered up through a USB cable connected to the host PC the application immediately starts and the chip temperature is continuously displayed on the liquid crystal display LCD The minimum and maximum temperatures recorded over the past runtime period are automatically stored by the application and are available for display by pressing the user push button on the STM8L DISCOVERY The temperature tendency information is displayed as a bar graph on the LCD Reference documents m STM8L DISCOVERY user manual UM0970 m Developing and debugging your STM8L DISCOVERY application code user manual UM0991 Getting started with STM8L DISCOVERY user manual UM1014 STM8L15xx and STM8L162x microcontro
5. AV AT V90 Voeense T90 T Operating modes To make V90 appear in the formula the reference has been transposed with the origin defined by T90 V90 has been determined for the temperature characteristic Consequently the temperature formula in Equation 2 and Equation 3 becomes Equation 5 Equation 5 T C Voenge Avg slope offset 0 The TS application may be configured in two operating modes e Normal mode e Advanced mode Doc ID 018809 Rev 1 ky AN3397 Temperature sensor application description Normal mode Normal mode is the default mode configured in the software example In this mode the blue LED see Figure 2 is switched off To activate this mode comment the following define statement in the main c file of the TS application code define ADVANCED_MODE In Normal mode the temperature is processed from default typical values of Avg_slope and sensor reference voltage at 90 C V90 which are available in the STM8L15xxx datasheets Avg_slope 1 62 mV C V90 0 597 V This method has certain advantages It is straightforward and the measurement is rapidly obtained as it does not require the calculation of a second calibration point However data which are statically based on the typical characteristics of the TS may provide less accurate temperature estimations due to significant variations of the temperature characteristics during the manufacturing process If an application needs very
6. If the factory calibration data point is present in the memory 0x4911 it is used for temperature calculation Otherwise the user calibration procedure is bypassed and the application automatically switches back to normal mode Advanced method is more difficult to implement and has more constraints but it gives more precise results Doc ID 018809 Rev 1 13 24 Temperature sensor application description AN3397 Note 2 4 3 Note 14 24 In any application a user may decide to make a trade off and use the V90 datasheet typical value and the user calibration point to obtain less accurate but nevertheless very good temperature calculation results Calibration technique The calibration technique is a one off procedure which must be done when the STM8L DISCOVERY is received It consists of calculating the average slope of the TS and is available only when the TS application Advanced mode is selected The calibration technique makes use of Equation 5 to calculate the average slope The factory calibration value V90 is obtained from a fixed data address see Advanced mode Vampient S measured during the calibration procedure To accurately calculate the average slope Tanpient Must be measured using a temperature measuring device such as a thermometer The define Tambient must be updated with the temperature given by the thermometer By default Taypient which can be found in the main c file is set to 25 C in the TS
7. area to a lower range means that more reasonable results are obtained The recommended position of the calibration points should be as close as possible to the minimum and maximum values of the measurement range to cover the full device temperature range However the user calibration point can be performed at ambient temperature 20 C to 25 C as it is the easiest way to proceed Doc ID 018809 Rev 1 ky AN3397 Temperature sensor overview Figure 1 Temperature sensor engineering tolerance TS voltage C Error v90 V90 gt Veo a ern ane Pog Erorsoc 25 50 85 User calibration point V90 tolerance Max slope Min slope s MS30515V1 1 5 Temperature sensor error estimation Once the temperature sensor has been correctly calibrated with both factory and user calibration points the engineering tolerance of the temperature measurement is significantly improved see area between the two black lines in Figure 1 The temperature measurement error is caused by the following Temperature sensor linearity e ADC total unadjusted error TUE e Calibration related error Figure 1 shows that the temperature error is minimized in the neighbourhood of the user calibration point and that it slightly increases with distance from this point Temperature error calculation The temperature measurement error can be calculated as explained below Note that the user calibra
8. ATION 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 UNLESS EXPRESSLY APPROVED IN WRITING BY TWO AUTHORIZED ST REPRESENTATIVES ST PRODUCTS ARE NOT RECOMMENDED AUTHORIZED OR WARRANTED FOR USE IN MILITARY AIR CRAFT SPACE LIFE SAVING OR LIFE SUSTAINING APPLICATIONS NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY DEATH OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE ST PRODUCTS WHICH ARE NOT SPECIFIED AS AUTOMOTIVE GRADE MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER S OWN RISK 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 2012 STMicroelectronics All rights reserved STMicroelectronics group of companies Australia Belgium Brazil Canada China Czech Republic Finland France Germany H
9. L DISCOVERY hardware settings a a lt DISCOVERY z ve reg IDD jumper lta J oft ollo J ai18784 10 24 Doc ID 018809 Rev 1 ky AN3397 Temperature sensor application description 2 4 Temperature sensor application principle The STM8L152C6 has a built in temperature sensor TS which is internally connected to the analog to digital converter ADC TS input channel The ADC converts the sensor output voltage into a digital value The result is recalculated into standard temperature units C in this example and displayed on the LCD The temperature value displayed on the LCD panel is refreshed after every 1 s time period To improve measurement reliability this data point is obtained by averaging 20 measurements Between each temperature measurement the STM8L152C6 enters active halt mode to minimize average power consumption then automatically wakes up 50 ms later to get a new data point and process it The TS application may also display the minimum and maximum temperature values recorded since the STM8L DISCOVERY was powered up By default the current temperature is displayed with the symbol T When the user push button is pressed once the LCD displays the maximum temperature recorded with the symbol M The second time the user push button is pressed the minimum temperature recorded is displayed with the symbol m Pressing the user push button again displays the cur
10. TS application routine flowchart START Initialize variables GPIO configure interrupt sensitivity Init LCD ADC RTC peripherals Enable interrupts Advanced mode Factory byte V90 programmed Switch off Switch on blue LED blue LED Calibration done before Execute the calibration routine user calib VAMBIENT iS copied from Data EEPROM location V90 is copied from factory calibrated location Avg_slope V90 Default values The factory calibrated value V90 is within range Execute HALT instruction to enter Low power mode Avg_slope V90 V AMBIENT 20 TAMBIENT Infinite routine while 1 ai18763 4 Doc ID 018809 Rev 1 17 24 Software description AN3397 3 2 2 18 24 User calibration routine flowchart The user calibration routine performs the ADC measurement see Section 2 4 3 Calibration technique at ambient temperature VamgienT and calculates the average slope These values are stored in the Data EEPROM This routine is automatically launched in temperature sensor Advanced mode when the user calibration point has not been previously processed It may also be forced by the user if the calibration point is to be updated Before proceeding to this calibration the define Tambient in the main c file must be updated with the ambient temperature value of the environment It is set by default to 25 for 25 C As shown in Figure 6 the temp
11. accurate measurements it is better to use the Advanced operating mode described below Advanced mode To activate advanced mode uncomment the following define statement in the main c file of the TS application code define ADVANCED MODE When this mode is selected the blue LED see Figure 2 is switched on In advanced mode V90 is obtained precisely by reading the TS factory calibration byte TS_Factory_CONV_V90 This byte represents the 8 LSB of the result of the V90 12 bit ADC conversion see STM8L15xxx datasheet The MSB have a fixed value 0x3 The advantage of using this result is to get a more precise V90 value which consequently leads to greater precision when measuring the temperature To further reduce the error it is recommended to define another calibration point at ambient temperature to accurately define the average slope parameter and the offset This TS application code user calibration point implements a technique to obtain and store this user calibration see Section 2 4 3 Calibration technique and consequently gives a more precise temperature slope The average slope is accurately calculated from the user and factory calibration data using Equation 4 and replacing Vsense with VAMBIENT Equation 6 Avg_slope AV AT V90 Vanpient 1 90 T Before proceeding to perform the user calibration the factory calibration data point is tested for validity when the application is initialized
12. application code To start the calibration procedure press the user push button for at least 2 s then release the button If calibration is successful the message CAL OK is displayed on the LCD screen If no factory calibrated value is present or if the present value is out of range 580 mV 614 mV the message CALERR is displayed Press the user push button again to continue When calibration is successful the value is stored in the Data EEPROM of the microcontroller By default the value is stored as two bytes in the Data EEPROM addresses 0x1000 MSB and 0x1001 LSB In Advanced mode an automatic calibration is performed by the software if no calibration has been made by the user Automatic calibration may not be accurate because by default Taypient is set to 25 C Doc ID 018809 Rev 1 ky AN3397 Software description 3 3 1 Software description STMB8L peripherals used by the application The application software uses the standard STM8L firmware library to control the peripherals The peripherals and functions used by the application software are listed below Clock The HSI high speed internal 16 MHz oscillator is selected as clock source System clock divider 0 J fopu 16 MHz LCD controller The LCD controller drives the LCD glass mounted on the DISCOVERY board It is interfaced using 24 segment lines and four common lines and is configured as follows CLK PSC 1 and DIV 31 Duty
13. erature measurement is averaged from 20 acquisition samples and the resulting data is stored in the EEPROM to be re used even after STM8L DISCOVERY is powered off Doc ID 018809 Rev 1 ky AN3397 Software description Figure 6 User calibration routine flowchart User_calib V90 is copied from factory calibrated location Thefactory calibrated value V90 is within range Temperature measurement performed by ADC E Number of samples gt 20 VAMBIENT average of last 20 temperature measurements Avg_slope V90 VAMBIENT T9O TAMBIENT VAMBIENT is Stored in the Data EEPROM location Avg_slope V90 default values Display CALOK on LCD screen Display CALERR on LCD screen ai18764 4 Doc ID 018809 Rev 1 19 24 Software description AN3397 3 2 3 20 24 Infinite routine flowchart This routine is continuously executed to manage application behavior as follows Checks that forced calibration is performed in Advanced mode Measures the temperature and displays it on the LCD screen Manages the LCD bar graph to display the temperature variation over the last five minutes see Section 2 4 Temperature sensor application principle for details Manages the user push button in order to alternatively display the current temperature and the minimum and maximum temperatures recorded since the STM8L Discovery power up
14. ge can be obtained Even greater accuracy is possible if the temperature range is limited see Figure 1 STM8L15xxx devices are provided with a calibration data point V90 which is factory measured at hot temperatures 90 C 5 C during the manufacturing process and stored in the protected memory area of the device at address 0x4911 see device datasheet for details This single calibration point may be sufficient depending on the precision required by the application but it is highly recommended to perform a second calibration point user calibration point at ambient temperature Devices with a two point calibration are generally suitable for most embedded applications because the deviation versus the ideal linear curve is restrained and the individual characteristics of the temperature sensor are respected Temperature sensor engineering tolerance The engineering tolerance of the temperature estimation is illustrated in Figure 1 It is limited by two boundary lines the minimum biased values green line and the maximum biased values blue line This tolerance is directly linked to both the temperature margin of the factory calibrated data at hot temperatures V90 90 C 5 C and the Avg_slope uncertainty 1 62 mV C 0 03 mV C specified in the STM8L15xxx datasheets Figure 1 shows that the user calibration point significantly improves the accuracy of the temperature measurement since reducing the whole temperature tolerance
15. ision history Date Revision Changes 12 Oct 2012 1 Initial release Doc ID 018809 Rev 1 23 24 AN3397 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 LIMIT
16. ller family reference manual RM0031 STM8L151x4 STM8L151x6 STM8L152x4 STM8L152x6 datasheet STM8L151x8 STM8L152x8 STM8L151R6 STM8L152R6 datasheet STM8L151C2 K2 G2 F2 and STM8L151C3 K3 G3 F3 datasheet STM8L162R8 and STM8L162M8 datasheet The above documents are available on www si com Table 1 Applicable products and tools Type Part number or product category Microcontrollers STMB8L Ultra Low Power Evaluation tools STM8L DISCOVERY October 2012 Doc ID 018809 Rev 1 1 24 www st com Contents AN3397 Contents 1 Temperature sensor OvervieW 2 00 e eee eee 5 1 1 Temperature Sensor c c2 42d tegas wae pads ateseasveneatee we yeas 2 5 1 2 Temperature measurement and data processing 22 5 1 3 Temperature sensor accuraCy 00 adena 6 1 4 Temperature sensor engineering tolerance 000 eae 6 1 5 Temperature sensor error estimation 0000 cee eee es 7 2 Temperature sensor application description 0005 9 2 1 Updating the firmware cies cee bee ow house eeseoe Mes ged bine ede oneee 9 2 2 Hardware required os 0ic 2 oes de bee eewe dad padewaeadeanes de iwadd 9 2 3 STM8L DISCOVERY hardware settings 00 0 eee eee 10 2 4 Temperature sensor application principle 005 11 2 4 1 Temperature calculation theory 0 000 eee 12 2 4 2 Operating modes 0 c cee 12 2 4 3 Calibration technique
17. ong Kong India Israel Italy Japan Malaysia Malta Morocco Philippines Singapore Spain Sweden Switzerland United Kingdom United States of America www st com 24 24 Doc ID 018809 Rev 1 ky
18. ote 1 2 Note Temperature sensor overview This section provides an overview of the temperature sensor TS embedded in STM8L15xxx devices It describes how the TS works the data processing required and the accuracy that can be expected Temperature sensor The STM8L15xxx built in TS is based on a semiconductor diode embedded in the MCU The sensor provides an analog output voltage proportional to the junction temperature of the device The temperature information provided by the sensor is the thermal junction temperature temperature of the semiconductor and may differ from the ambient temperature MCU package The diode bias current is held as constant as possible Consequently the forward bias voltage across the diode is temperature dependent with a temperature coefficient of about 1 62 mV C see the device datasheet The TS provides a reasonably linear characteristic with a typical deviation of 1 2 max from linear asymptotic functions and a temperature range equal to that of the device 40 C to 85 C The sensor provides good linearity but quite poor interchangeability and must be calibrated to obtain good overall accuracy If the application is designed to measure only the relative temperature variations the temperature sensor does not need to be calibrated Temperature measurement and data processing The TS is internally connected to the ADC_TS channel of the analog to digital converter ADC which i
19. rent temperature once more see Figure 4 Figure 4 TS application user interface LCD T 24 7 C Current temperature M 26 4 C Max temperature recorded 6 HOU OUL WOU m 21 6 C Min temperature recorded Temperature rise Temperature drop USER push button ai18761 The TS can also be used to detect temperature variations Using the LCD bar graph the application displays the temperature trend over the past five minute period If the temperature values recorded during that time have dropped BARO is turned on On the other hand if the temperatures have increased BAR3 is turned on Doc ID 018809 Rev 1 11 24 Temperature sensor application description AN3397 2 4 1 2 4 2 12 24 Temperature calculation theory The voltage delivered by the TS is a linear function linearity error 2 C max of the diode temperature junction To calculate the temperature from the voltage delivered by the TS Vsense Equation 2 or Equation 3 is used depending on the reference chosen temperature in K or temperature in C Equation 2 T K Vsense Avg_slope Equation 3 T C Vgense Avg_slope 273 15 Where e K isthe absolute temperature Vsense is the measured voltage corresponding to the digital value present in the ADC data register e Avg_slope Equation 4 is the average slope of the characteristic Vseynse VS Temperature Equation 4 Avg_slope
20. ror 50 C 10 Therefore the calculation error at 50 C 4 47 C Doc ID 018809 Rev 1 ky AN3397 Temperature sensor application description 2 2 1 2 2 Temperature sensor application description Updating the firmware The STMB8L program memory needs to be updated with the latest firmware version associated with this application note This firmware is available on www st com www st com stm8l discovery For information on how to proceed please read UM1014 Getting started with STM8L DISCOVERY Hardware required The temperature sensor application uses the STM8L DISCOVERY on board 6 digit 4 bar LCD glass display and user push button No additional components are required Figure 2 Temperature sensor application block diagram VDD 30 4 7 Kohms R28 User push 330 F button LDA STM8L152C6 green LD4 blue Pi LCDCOM 3 0 LCDSEG 23 0 PNE ENE UNE UNEON N ANS NG Ne alis760 1 Legend Green LED LD3 green Blue LED LD4 blue Doc ID 018809 Rev 1 9 24 Temperature sensor application description AN3397 2 3 STM8L DISCOVERY hardware settings The IDD jumper see Figure 3 JP1 should be placed in the off position Both jumpers on CN3 must be fitted to enable communication between the STM8L microcontroller and the ST LINK debugging tool through the serial wire interface module SWIM Note Refer to UM0970 STM8L DISCOVERY user manual for details Figure 3 STM8
21. s used to sample and convert the sensor analog output voltage The raw ADC data must be further processed to display the temperature in standardized units of measurement for example Celsius Fahrenheit or Kelvin The ADC reference voltage is connected to the 3 V Vpp power supply of the STM8L DISCOVERY board If the Vpp value is not accurately known as is the case with battery operated applications it must be measured to obtain a correct overall ADC conversion range To easily measure the power supply voltage we recommend using the embedded internal reference voltage bandgap The device is well calibrated during the manufacturing process and its calibration data is stored in the protected memory area at address 0x4910 Check that the bandgap factory calibration data VREFINT_Factory_CONV is available from your STM8L 15xxx MCU device The embedded bandgap voltage calibration data is a 12 bit unsigned integer acquired by the ADC with Vpp 3 V 10 mV please refer to the device datasheet for more details Doc ID 018809 Rev 1 5 24 Temperature sensor overview AN3397 1 3 1 4 6 24 Temperature sensor accuracy Without calibration the TS is likely to give error readings in the order of 30 C If the sensor is calibrated significantly more accurate temperature measurements can be obtained For example if the TS characteristic slope and offset are calibrated a five fold improvement in accuracy over the full temperature ran
22. the user push button is pressed an interrupt with interrupt sensitivity set to falling edge and low level is generated on PC1 Application software flowchart Main TS application routine flowchart The main TS application routine Figure 5 initializes all the peripherals using the settings listed in Section 3 1 STM8L peripherals used by the application After initialization interrupts are enabled and the application operation mode is tested If define ADVANCED_MODE is commented in the main c file the application automatically switches to Normal operating mode using the typical V90 value and the default Avg_slope Section 2 4 2 Operating modes On the other hand in Advanced operating mode the factory calibration data point is tested for validity If the factory calibration point does not exist or is not within the tolerance defined in the datasheet the application automatically switches back to Normal mode If the factory calibration point does exist the application tests whether or not the user calibration point has already been processed If the user calibration point has been processed the application goes directly to the infinite loop for temperature acquisition If the user calibration point has not been processed the application uses this data point to accurately calculate the sensor characteristic slope before going into the main infinite loop Doc ID 018809 Rev 1 ky AN3397 Software description Figure 5 Main
23. tion point needs to be defined before the calculation 1 The maximum linearity error is 2 C see STM8L15xxx datasheets 2 The ADC TUE is 4 LSB considering Vper 3 V see STM8L15xxx datasheets To calculate the temperature measurement error linked to the ADC total unadjusted error use Equation 1 ky Doc ID 018809 Rev 1 7 24 Temperature sensor overview AN3397 Note 8 24 Equation 1 VREF TUE O ADC TUE C EL Solving with values 4 x 3 4096 1 62 mV C 1 80 C 3 The maximum calibration related error is considered to be 0 25 C at ambient temperature In this situation the temperature error 0 25 C is linked to the accuracy of the thermometer Total temperature error calculation Consequently the total measurement error at 25 C is the sum of the ADC TUE in C 1 80 C and the calibration related error 0 25 C which is 2 05 C The linearity error is cancelled at the user calibration point since it is obtained from the measurement By using Thales theorem we can estimate the temperature error for any point in the temperature sensor range First l see Figure 1 must be calculated using Thales theorem Error 25 C _ IA Error 90 C IC Solving with values 0 5 10 24 75 1 85 Therefore 21 6 An example of the calculation error at 50 C is as follows IB _ Error 50 C IC Error 85 C Solving with values 50 21 6 85 21 6 Er
Download Pdf Manuals
Related Search
Related Contents
QUICK INSTALLATION GUIDE CaipoBase User Manual User Manual of DS-7108HI series Net DVR V2.1 Rapport final-neutralisant porcherie - ORBi Poet®IQ 8500H Agent Gas Analyzer Operator`s Mode d`emploi des flèches à rembourrage de sécurité notice tonne classique+option Eglo TORTOLI VX8600 - LG.com CSOL14 - Oomipood Copyright © All rights reserved.
Failed to retrieve file