STM8T141 Single-channel capacitive sensor for touch or proximity detection with shielded sensing electrode Features Touch or proximity detection (a few centimeters) Built-in driven shield function: - Enhance proximity detection - Protect sensing electrode from noise interference Ultra-low power modes suitable for battery applications (11 A in extreme low power mode) On-chip integrated voltage regulator Environment compensation filter User programmable options include: - Four detection thresholds - Four output modes - Four low power modes - Reference freeze timeout SO8 (narrow) Table 1. Device summary Feature Operating supply voltage Supported interface Minimal external components UFDFPN8 (2 x 3 mm) STM8T141 2.0 V to 5.5 V Single key state output Operating temperature -40 to +85 C Packages 8-pin SO 8-pin UFDFPN Applications Consumer electronics Power-critical and battery applications - Wake-up on proximity Home and office appliances - Find-in-the-dark (FITD) applications using proximity detection - Sanitary ware and white goods Flameproof human interface devices for use in hazardous environments June 2011 Doc ID 15699 Rev 7 1/50 www.st.com 1 Contents STM8T141 Contents 1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2 Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3 Pin descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 4 STM8T ProxSense technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 5 4.1 Capacitive sensing overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.2 Charge transfer acquisition principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 STM8T processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.1 Signal and reference calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.2 Determining touch/proximity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.3 Environment compensation filter (ECF) . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.3.1 ECF principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.3.2 Reference freeze timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5.3.3 Debounce filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 6 Typical application diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 7 Device operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 7.1 Option byte description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 7.2 TOUT/POUT output mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Active . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 7.2.2 Toggle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 7.2.3 3-second latch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 7.2.4 30-second latch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 7.3 Detection threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 7.4 Power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 7.5 2/50 7.2.1 7.4.1 Normal Power mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 7.4.2 Low Power mode with Zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 7.4.3 Extreme Low Power mode with Zoom . . . . . . . . . . . . . . . . . . . . . . . . . . 24 7.4.4 Extreme Low Power mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Charge transfer frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Doc ID 15699 Rev 7 STM8T141 Contents 7.6 8 Sampling period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Design guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 8.1 Shield function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 8.1.1 8.2 8.3 9 Sensitivity adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 8.2.1 CS influence on sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 8.2.2 PCB layout and construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Influence of power supply variation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 9.1 10 Shield application example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Parameter conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 9.1.1 Minimum and maximum values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 9.1.2 Typical values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 9.1.3 Typical curves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 9.1.4 Loading capacitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 9.2 Absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 9.3 Operating conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 9.3.1 General operating conditions and supply characteristics . . . . . . . . . . . 30 9.3.2 Average current consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 9.3.3 Output characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 9.4 Regulator and reference voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 9.5 Capacitive sensing characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 9.6 EMC characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 9.6.1 Functional EMS (electromagnetic susceptibility) . . . . . . . . . . . . . . . . . . 35 9.6.2 Prequalification trials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 9.6.3 Electromagnetic interference (EMI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 9.6.4 Absolute maximum ratings (electrical sensitivity) . . . . . . . . . . . . . . . . . 36 9.6.5 Electrostatic discharge (ESD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 9.6.6 Static latchup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Package characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 10.1 10.2 Package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 10.1.1 SO8 package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 10.1.2 UFDFPN8 package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Package thermal characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 10.2.1 Reference document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Doc ID 15699 Rev 7 3/50 Contents 11 STM8T141 Ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 11.1 STM8T141 ordering information scheme . . . . . . . . . . . . . . . . . . . . . . . . . 42 11.2 Orderable favorite device lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 11.3 In-factory option byte programming service . . . . . . . . . . . . . . . . . . . . . . . 43 12 STM8T141 development tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 13 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4/50 Doc ID 15699 Rev 7 STM8T141 List of tables List of tables Table 1. Table 2. Table 3. Table 4. Table 5. Table 6. Table 7. Table 8. Table 9. Table 10. Table 11. Table 12. Table 13. Table 14. Table 15. Table 16. Table 17. Table 18. Table 19. Table 20. Table 21. Table 22. Table 23. Table 24. Table 25. Table 26. Table 27. Table 28. Device summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 STM8T141 pin descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Explanation of ECF example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Explanation of ECF example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Option bytes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Option byte description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Detection thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Low power period according to selected power mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Voltage characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Current characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Thermal characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Operating characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Average current consumption without shield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Output pin characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Regulator and reference voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 General capacitive sensing characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Response times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 External sensing component characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 EMS data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 EMI data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 ESD absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Electrical sensitivities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 8-lead plastic small outline - package mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 8-lead ultra thin fine pitch dual flat - package mechanical data . . . . . . . . . . . . . . . . . . . . . 40 Thermal characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Orderable favorite device lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Ordering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Doc ID 15699 Rev 7 5/50 List of figures STM8T141 List of figures Figure 1. Figure 2. Figure 3. Figure 4. Figure 5. Figure 6. Figure 7. Figure 8. Figure 9. Figure 10. Figure 11. Figure 12. Figure 13. Figure 14. Figure 15. Figure 16. Figure 17. Figure 18. Figure 19. Figure 20. Figure 21. Figure 22. Figure 23. Figure 24. Figure 25. Figure 26. Figure 27. Figure 28. Figure 29. 6/50 STM8T141 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 S08 pinout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 UFDFPN8 pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Coupling with hand increases the capacitance of the sensing electrode . . . . . . . . . . . . . . 10 STM8T measuring circuitry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Conversion period examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Environmental compensation filter (ECF) example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Environmental compensation filter (ECF) example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Reference freeze timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Typical application shematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Possible load configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Active mode output operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Toggle mode output operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3-second latch mode output operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 30-second latch mode output operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Charge cycle timing diagram in Normal Power mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Charge cycle timing diagram in Low Power mode with Zoom . . . . . . . . . . . . . . . . . . . . . . 24 Charge cycle timing diagram in Extreme Low Power mode with Zoom . . . . . . . . . . . . . . . 24 Charge cycle timing diagram in Extreme Low Power mode . . . . . . . . . . . . . . . . . . . . . . . 25 Connecting the shield (coaxial cable implementation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Pin loading conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 IDD average current consumption vs RSHIELD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Sigma variation across VDD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 SO8-lead plastic small outline - package outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 UFDFPN8-lead ultra thin fine pitch dual flat package (MLP) package outline . . . . . . . . . . 40 STM8T141 ordering information scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 STM8T141-EVAL evaluation kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 STM8T141 blank module box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 STM8T141-EVAL programming tool. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Doc ID 15699 Rev 7 STM8T141 1 Description Description The STM8T141 is a ProxSenseTM single-channel, fully integrated, charge-transfer, capacitive sensor that is designed to replace conventional electromechanical switches in cost-sensitive applications. The STM8T141 is offered in 8-pin packages and is ideally suited for 1-button applications. It can be configured either in touch or proximity sensing mode for wake-up or backlighting on actuation. The extremely low current consumption makes it an ideal solution for battery-powered applications. The device features an internal voltage regulator to enhance detection sensitivity and stability. The STM8T141 touchpad can sense through almost any dielectric and can thereby contain the electronics in a sealed environment. The STM8T141 also incorporates the advantages of using a driven shielding capability. This makes it possible to separate the sealed electronics from the sensing electrode. The shield feature enables the designer to protect part of the sensing element from unwanted environmental interference and enhances proximity detection when used with battery (DC) applications. Note: ProxSenseTM is a trademark of Azoteq. Doc ID 15699 Rev 7 7/50 Block diagram STM8T141 2 Block diagram Figure 1. STM8T141 block diagram CX CS ProxSense engine VREG Voltage regulator VDD VSS POR MCU system engine SHLDIN 500 kHz RC oscillator TOUT/POUT SHLDOUT ai17207 RC oscillator The 500-kHz RC oscillator is an internal fixed frequency oscillator used to supply the clock to the MCU system engine. Power-On-Reset (POR) The POR generates a reset signal depending on the power supply level and the clock pulses received from the RC oscillator. Voltage regulator The voltage regulator has an internal comparison and feedback circuit that ensures the VREG voltage is kept stable and constant. The regulator requires an external smoothing capacitor. MCU system engine The MCU system engine controls the capacitive sensing engine and processes touch and proximity detection signals. ProxSense engine The ProxSense engine circuitry employs a charge-transfer method to detect changes in capacitance. 8/50 Doc ID 15699 Rev 7 STM8T141 3 Pin descriptions Pin descriptions Figure 2. S08 pinout 633 #3 #8 3(,$). 4/540/54 6$$ 3(,$/54 62%' !) Figure 3. UFDFPN8 pinout 633 #3 #8 3(,$). 4/540/54 6$$ 3(,$/54 62%' !) Table 2. STM8T141 pin descriptions Pin no. SO8 PIn type(1) Pin name Pin function UFDFPN8 1 S VSS Ground 2 SNS CS Capacitive sensing channel pin to CS(2) 3 SNS CX Capacitive sensing channel pin to RX 4 I SHLDIN(3) Shield input 5 S VREG Internal voltage regulator output (4) 6 OD SHLDOUT Shield output 7 S VDD Supply voltage 8 PP TOUT/POUT Touch/proximity(5) output (active high) 1. I: input pin, OD: open drain, PP: output push-pull pin, S: supply pin and SNS: capacitive sensing pin. 2. Use COG or NPO capacitor type. 3. If the active shield is unused, please connect this pin to VSS. 4. Requires a low ESR, 1F capacitor to ground. This output must not be used to power other devices. 5. Depending on the value of bits [1:0] of OPT0. Doc ID 15699 Rev 7 9/50 STM8T ProxSense technology STM8T141 4 STM8T ProxSense technology 4.1 Capacitive sensing overview A capacitance exists between any reference point and ground as long as they are electrically isolated. If this reference point is a sensing electrode, it can help to think of it as a capacitor. The positive electrode of the capacitor is the sensing electrode, and the negative electrode is formed by the surrounding area (virtual ground reference in Figure 4). Figure 4. Coupling with hand increases the capacitance of the sensing electrode Sensing electrode CT CX Lower capacitance Higher capacitance When a conductive object is brought into proximity of the sensing electrode, coupling appears between them, and the capacitance of the sensing electrode relative to ground increases. For example, a human hand raises the capacitance of the sensing electrode as it approaches it. Touching the dielectric panel that protects the electrode increases its capacitance significantly. 4.2 Charge transfer acquisition principle To measure changes in the electrode capacitance, STM8T devices employ bursts of chargetransfer cycles. The measuring circuitry is connected to the CX pin. It is composed of a serial resistor RX plus the sensing electrode itself of equivalent capacitance CX (see Figure 5). The sensing electrode can be made of any electrically conductive material, such as copper on PCBs, or transparent conductive material like Indium Tin Oxide (ITO) deposited on glass or Plexiglas. The dielectric panel usually provides a high degree of isolation to prevent ESD discharge from reaching the STM8T touch sensing controller. Connecting the serial resistor (RX) to the CX pin improves ESD immunity even more. 10/50 Doc ID 15699 Rev 7 STM8T141 STM8T ProxSense technology Figure 5. STM8T measuring circuitry CT (~5 pF) STM8T141 Serial resistor (RX)(1) Earth CX Cx (~20 pF) CS CS (a few nF) Ai15249a 1. RX must be placed as close as possible to the STM8T device. The principle of charge transfer is to charge the electrode capacitance (CX) using a stable power supply. When CX is fully charged, part of the accumulated charge is transferred from CX to an external sampling capacitance, referred to as CS. The transfer cycle is repeated until the voltage across the sampling capacitor CS reaches the end of acquisition reference voltage (VTRIP). The change in the electrode capacitance is detected by measuring the number of transfer cycles composing a burst (see Figure 6). Throughout this document the following naming conventions apply: The charge transfer period (tTRANSFER) refers to the charging of CX and the subsequent transfer of the charge to CS. The burst cycle duration (tBURST) is the time required to charge CS to VTRIP. The sampling period (tSAMPLING) is the acquisition rate. Figure 6. Conversion period examples T #3 42!.3&%2 T3!-0,).' 62%' T"5234 642)0 T MS !I Doc ID 15699 Rev 7 11/50 STM8T processing 5 STM8T141 STM8T processing The STM8T141 device is designed to ensure reliable operation whatever the environment and operating conditions. To achieve this high level of robustness, dedicated processing have been implemented: 5.1 Signal and reference calculation Determining touch/proximity Self-calibration Environmental compensation filter Debounce filter Signal and reference calculation Capacitive touch or proximity sensing is a technique based on detecting the electrode capacitance change when someone is in proximity of the sensing electrode. The capacitance change, induced by the presence of a finger or a hand in the device detection area, is sensed by the variation in the number of charge transfer pulses composing the burst. The charge transfer pulse number, also called "signal" is compared to a reference to decide if there is a touch/proximity detection or not. At power-up, a calibration sequence is performed to compute one reference value per capacitive sensing channel. The reference is extracted from 32 burst measurements. Then, the ECF takes care of its slow evolution over time. To speed up the calibration process, the device is kept in normal mode whatever the low power mode selected. The device operates in the selected low power mode when the calibration process is completed. 5.2 Determining touch/proximity The minimum difference between the reference and the signal necessary to report a touch/proximity is the detection threshold (DTh). A time filtering, similar to the debouncing of the mechanical switches, is applied to avoid noise induced detections. Four different detection threshold settings are available and selectable by option byte. The touch and sensitive touch levels are relative, which means the actual sensing distance is not influenced by the Cs capacitor. The two thresholds should be able to adapt to various surroundings and panel material or thickness. The proximity sensitivity thresholds are absolute. This implies that the detection distance increases with the Cs capacitor. It provides an easy way to tune the proximity sensing distance according to the application needs. 12/50 Doc ID 15699 Rev 7 STM8T141 STM8T processing 5.3 Environment compensation filter (ECF) 5.3.1 ECF principle The capacitive sensing channel reference value increases or decreases according to environmental conditions such as temperature, power supply, moisture, and surrounding conductive objects. The STM8T141 includes a built-in digital infinite impulse response (IIR) filter capable of tracking slow changes in the environment called the Environment Compensation Filter (ECF). This is a first order digital low pass filter with a gain of one. The filter makes the reference follow slow changes of the signal while fast changes are recognized as a touch or proximity. When a touch or proximity condition is detected, the corresponding capacitive sensing channel reference is frozen. Figure 7. Environmental compensation filter (ECF) example 1 .UMBER OF COUNTS 2EFERENCE 3IGNAL $ETECTION 2EFERENCE $4H :ONE :ONE :ONE :ONE :ONE T AI Table 3. Explanation of ECF example 1 Zone 1 Event description Zone 2 Zone 3 The object, is inside the The object comes inside the The object (finger) is electrode field range. It detection range before the outside the induces a signal change reference compensates for electrode field but, not large enough to its presence. range. cross the detection A touch or proximity event is threshold (Dth). Electrode triggered because the environment is The reference adapts signal level falls below the stable slowly to the object reference - DTh. proximity. Zone 4 The object exits from the electrode's detection range. Detection state No detection Detection No detection ECF operation Active Halt Active Adapting Frozen Adapting Reference Doc ID 15699 Rev 7 13/50 STM8T processing Figure 8. STM8T141 Environmental compensation filter (ECF) example 2 Number of counts Reference Signal Detection Reference - DTh Environment changing Zone 1 Zone 2 Zone 3 Zone 4 t ai17429 Table 4. Explanation of ECF example 2 Event description Detection operation Zone 1 Zone 2 Zone 3 Zone 4 The system environment changes and the device adapts its reference according to this environment change. An object (finger) is detected. The environment continues to change. The object is still under detection but, the environment is not changing anymore. The object exits from detection. No detection Detection No detection ECF state Active Halt Active Reference Adapting Frozen Adapting Surrounding environment 14/50 Changing Doc ID 15699 Rev 7 Stable STM8T141 5.3.2 STM8T processing Reference freeze timeout To prevent an object under detection from influencing the reference value, the ECF is halted as soon as a detection happens. Consequently, the reference is frozen. In order to be able to recover from a sudden environment change, the reference freeze ends after a maximum programmable delay called the "reference freeze timeout" (tRFT). When a detection lasts longer than the tRFT, the ECF is enabled again and the reference moves toward the detection signal. After a short period of time, the difference between the signal and the reference become smaller than the detection threshold and the device reports no detection. Note: Reference freeze timeout was incorrectly called "recalibration timeout" in previous versions of this document. Figure 9. Reference freeze timeout .UMBER OF COUNTS .O DETECTION 2EFERENCE 3IGNAL 2EFERENCE $4H $ETECTION .O DETECTION %#& FROZEN .O DETECTION %#& ACTIVE %#& ACTIVE 3IGNAL LIMIT T 2&4 %#& FREEZE TIMEOUT T -ASKED DETECTION WINDOW AI 1. See max values of tRFT in Table 16: General capacitive sensing characteristics. 2. Between the moment when the finger is removed from the sensor and the instant the reference - DTh curve crosses the signal limit, the device is unable to detect a new touch. This delay is called "masked detection window". It depends on the environmental change or object signal variation speed inside the electrode's field. The detection threshold also impacts the masked detection window. Doc ID 15699 Rev 7 15/50 STM8T processing 5.3.3 STM8T141 Debounce filter The debounce filter mechanism works together with the ECF to dramatically reduce the effects of noise on the touch and proximity detection. Debouncing is applied to acquisition samples to filter undesired abrupt changes. The number of consecutive detection debounce count (DDC) and end of detection debounce count (EDDC) needed to identify a proximity/touch detection are defined in Section 9.5: Capacitive sensing characteristics on page 33. 16/50 Doc ID 15699 Rev 7 STM8T141 6 Typical application diagram Typical application diagram Figure 10. Typical application shematic 4/540/54 4/540/54 633 6$$ '.$ N& #3 6$$ #8 3(,$/54 23()%,$ '.$ '.$ 3HIELD & 3(,$). 62%' N& 28 & 3ENSING ELECTRODE '.$ '.$ AI 1. If the active shield is not used, The SHLDIN pin must be grounded, SHLDOUT should be left unconnected, and RSHIELD can be removed. 2. Use COG or NPO or higher grade capacitor. The smaller the value of the RSHIELD resistor, the better its effect but, the greater the device consumption. Pin TOUT/POUT can directly drive a HV FET (as shown in Figure 11) that, in turn, can drive any load. Figure 11. Possible load configurations A Load POS Load voltage B Load POS Load POS Relay on Load terminals to Switch any High Voltage Load Load NEG LED as Load 3 TOUT/POUT Load POS Low Voltage DC Light Bulb as Load R 1 2 D 1 G C S 2 K1 4 3 5 GND LED Load NEG Load NEG Load NEG ai15523 A touch or proximity detection is defined as an actuation (high = logical '1' and low = logical '0'). Doc ID 15699 Rev 7 17/50 Device operation 7 STM8T141 Device operation The STM8T141 can be configured through a set of selectable one-time programmable (OTP) option bytes. These options can be used in their default (unconfigured) state or set for specific applications. For large orders, preconfigured devices are available (please refer to Section 11: Ordering information). The STM8T141 can be configured to act as a touch or proximity detection device. A number of other options are also user programmable, including: - Active mode - Toggle mode - 3-second Latch mode - 30-second Latch mode TOUT/POUT output mode selection Four detection thresholds 7.1 Four output modes - Two for touch detection - Two for proximity detection Four power modes - Normal power mode - Three low power modes Reference freeze timeout Option byte description A set of tools is supplied by STMicroelectronics to program the user OTP options for prototyping purposes. Please refer to Section 12: STM8T141 development tools for more details. Note: Devices that are not yet programmed ("blank" devices) are delivered cleared (at value `0') for all bits. Table 5. Option byte no. Option bytes Option bits Bit 7 Bit 6 OPT1 OPT0 Bit 5 Bit 4 Bit 3 Detection threshold Bit 1 Bit 0 Charge Sampling transfer Reserved period frequency Reserved Power mode Bit 2 Reference freeze timeout TOUT/POUT output mode Factory default setting 0xX0 0x00 The user options allow the STM8T141 to be customized for each specific application. Default values for the oscillator, conversion rate (tSAMPLING), filter freeze and device reset settings should be used initially for first designs. 18/50 Doc ID 15699 Rev 7 STM8T141 Device operation Table 6. Option byte description Option byte no. Description Bits [7:3]: Reserved Bit 2: Sampling period (tSAMPLING)(Section 7.6: Sampling period) 0: Conversion period is 20 ms 1: Conversion period is 10 ms OPT1 Bit 1: Charge transfer frequency (fTRANSFER)(Section 7.5: Charge transfer frequency) 0: 125 kHz 1: 250 kHz Bit 0: Reserved Bits [7:6]: Power mode (Section 7.4: Power modes) 00: Low Power mode with Zoom 01: Normal Power mode 10: Extreme Low Power mode with Zoom 11: Extreme Low Power mode Bits [5:4]: Detection threshold (Section 7.3: Detection threshold) 00: Standard proximity 01: Standard touch 10: Sensitive proximity 11: Sensitive touch OPT0 Bits [3:2]: Reference freeze timeout (Section 5.3.2: Reference freeze timeout) 00: 15-second reference freeze timeout 01: 45-second reference freeze timeout 10: Reserved 11: Infinite reference freeze Bits [1:0]: TOUT/POUT output mode (Section 7.2: TOUT/POUT output mode) 00: Active mode 01: Toggle mode 10: 3-second Latch mode 11: 30-second Latch mode Doc ID 15699 Rev 7 19/50 Device operation 7.2 STM8T141 TOUT/POUT output mode Four output modes are available on the STM8T141: Active mode Toggle mode 3-second Latch mode 30-second Latch mode For each output operation described, touch or proximity detection can be used. Upon the detection of either of these actions, the TOUT/POUT pin will latch high, otherwise the TOUT/POUT pin stays low. The detailed working of each user interface is described below. The TOUT/POUT pin is active high, and can source enough current to directly drive a LED. The pin is sourced from VDD when active. The TOUT/POUT pin always goes high for a minimum time of tHIGH. For more information, please refer to Section 9: Electrical characteristics. Bits [1:0] of option byte OPT0 are used to select the correct output mode. 7.2.1 Active Upon the detection of an actuation, the condition of the TOUT/POUT pin will change to high and stay high for as long as the touch or proximity detection condition occurs. Figure 12 illustrates this output operation. Figure 12. Active mode output operation 4OUCHPROXIMITY DETECTION $ETECTION T .O DETECTION 4/540/54 (IGH T ,OW ? 20/50 Doc ID 15699 Rev 7 STM8T141 7.2.2 Device operation Toggle Upon the detection of an actuation, the TOUT/POUT pin will toggle between high and low. Thus if TOUT/POUT is low, an actuation will change it to high, and also if TOUT/POUT is high, an actuation will change it to low. Figure 13 illustrates this output operation. Figure 13. Toggle mode output operation 4OUCHPROXIMITY DETECTION $ETECTION T .O DETECTION 4/540/54 (IGH T ,OW ? 7.2.3 3-second latch Upon the detection of an actuation the TOUT/POUT pin will latch high for 3 seconds minimum. If the actuation occurs for longer than 3 seconds, the TOUT/POUT pin will stay high and will only go low when the actuation stops. Figure 14. 3-second latch mode output operation 4OUCHPROXIMITY DETECTION $ETECTION .O DETECTION 4/540/54 SEC SEC SEC T 4IME THAT TOUCH OR PROXIMITY DETECTION IS STILL ACTIVE (IGH T ,OW ? Doc ID 15699 Rev 7 21/50 Device operation 7.2.4 STM8T141 30-second latch Upon the detection of an actuation, the TOUT/POUT pin will latch high. After 30 seconds from when the actuation stops, the TOUT/POUT pin will go low. If the TOUT/POUT pin is high and another actuation occur before the 30 seconds has expired, the counter will reset and only 30 seconds after the new actuation has stopped, will the TOUT/POUT pin go low. Figure 15 illustrates this output operation. Figure 15. 30-second latch mode output operation 4OUCHPROXIMITY DETECTION $ETECTION T .O DETECTION 4/540/54 SEC SEC SEC (IGH T ,OW ? 7.3 Detection threshold The user has a choice between four detection threshold levels (DTh) at which the touch or proximity detection condition is triggered. This depends on which threshold configuration is selected. See Table 7 for more details regarding the detection threshold selections. Bits [5:4] of option byte OPT0 are used to select the correct detection threshold levels. Table 7. Detection thresholds Sensitivity Most sensitive Least sensitive 22/50 DTh setting Description Sensitive proximity threshold Proximity for battery-powered applications. Standard proximity threshold Proximity with good ground. Contact through 3 mm acrylic glass and no ground. Sensitive touch threshold Contact through thin acrylic glass with battery application. Standard touch threshold Contact through thin dielectric with good ground. Doc ID 15699 Rev 7 STM8T141 7.4 Device operation Power modes The STM8T141 device offers four power modes. The low power modes are specifically designed for battery applications: Normal Power mode Low Power mode with Zoom Extreme Low Power mode with Zoom Extreme Low Power mode Burst cycles can occur either every 10 ms or 20 ms according to the selected sampling period (tSAMPLING). By selecting low power modes, extra delays are interlaced between bursts. This improves the device current consumption at the expense of the response time. Bits [7:6] of option byte OPT0 are used to select the correct power mode. Table 8. Low power period according to selected power mode Power mode Condition tLP value Normal Power mode 0 Touch or proximity detection 0 Low Power mode with Zoom Untouched Extreme Low Power mode with Zoom 4 x tSAMPLING Touch or proximity detection 0 Untouched 16 x tSAMPLING Extreme Low Power mode 7.4.1 16 x tSAMPLING Normal Power mode When in Normal Power mode, burst cycles occur at the rate of tSAMPLING. No extra delays are added between burst cycles (Figure 16). Figure 16. Charge cycle timing diagram in Normal Power mode CS Burst cycle duration t 1 2 3 4 5 6 7 8 9 10 11 Doc ID 15699 Rev 7 12 13 14 15 16 17 18 19 20 23/50 Device operation 7.4.2 STM8T141 Low Power mode with Zoom With the STM8T141 in Low Power mode with Zoom, burst cycles occur every 5th tSAMPLING period (or 20% of the Normal Power mode). Once activity is detected, the STM8T141 device wakes up from Low Power mode with Zoom to Normal Power mode with charge cycles occurring every tSAMPLING period. The device will return to Low Power mode after an end of low power period (tELP) when no touch or proximity detection conditions are detected. This enables the device to reduce power consumption when not in use, and still have a sufficient response time when needed (Figure 17). Figure 17. Charge cycle timing diagram in Low Power mode with Zoom CS Zoom to Normal mode after touch or proximity detection occurred Burst cycle duration t 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 tLP 7.4.3 Extreme Low Power mode with Zoom With the STM8T141 in Extreme Low Power Mode with Zoom, burst cycles only occur every 17th tSAMPLING period (or 5.88% of the Normal Power mode). Once activity is detected, the STM8T141 device wakes up from Extreme Low Power mode and Zoom to Normal Power mode with charge cycles occurring every tSAMPLING. The device will return to Low Power mode after an end of low power period (tELP) when no touch or proximity detection conditions are detected. This enables the device to reduce power consumption when not in use and still have a sufficient response time when needed (Figure 18). Figure 18. Charge cycle timing diagram in Extreme Low Power mode with Zoom CS Zoom to Normal mode after touch or proximity detection occurred Burst cycle every 17th tSAMPLING period t 1 2 3 4 5 6 7 8 9 10 11 tLP 24/50 Doc ID 15699 Rev 7 12 13 14 15 16 17 18 19 20 STM8T141 7.4.4 Device operation Extreme Low Power mode With the STM8T141 in Extreme Low Power mode, burst cycles only occur every 17th tSAMPLING period (or 5.88% of the Normal Power mode), thus adding 16 extra delays of tSAMPLING between charge cycles to conserve power. This reduces the amount of burst cycles in Extreme Low Power mode even more than Low Power mode which in turn saves even more power but comes at the expense of a higher system response time (Figure 19). Figure 19. Charge cycle timing diagram in Extreme Low Power mode CS Burst cycle every 17th tSAMPLING period t 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 tLP 7.5 Charge transfer frequency The STM8T141 offers two charge transfer frequencies. The charge transfer frequency must be adjusted depending on the CS capacitor. The charge transfer frequency may need to be raised to 250 kHz in order to reduce tBURST when the CS capacitance is large. 125 kHz 250 kHz Bit 1 of option byte OPT1 is used to select the correct charge transfer frequency. 7.6 Sampling period The default sampling period (tSAMPLING) is configurable in order to allow different compromises between power consumption and conversion rates: 20-ms sampling rate to reduce average power consumption 10-ms sampling rate to increase detection response time When using a faster sampling rate (tSAMPLING = 10 ms), all the timing values of the Power modes will occur at twice the speed. BIt 2 of option byte OPT1 is used to select the correct conversion period. Doc ID 15699 Rev 7 25/50 Design guidelines STM8T141 8 Design guidelines 8.1 Shield function The STM8T141 offers a built-in shielding function. This function provides the following advantages for designing the end-application: Sensing electrode separated from sealed electronics. Sensing wire shielded from unwanted environmental interferences. Enhanced proximity detection when used with battery (DC) applications. The shield principle consists in actively driving the shield plane or element with the same signal as that of the electrode. The parasitic capacitance between the electrode and the shield does not need to be charged anymore and its effect on the sensitivity is cancelled. Note: Grounding the shield reduces the sensitivity of the keys and may render the system unusable. 8.1.1 Shield application example Ideally, a coaxial cable is used for the shield. A RX (typically 2 k) resistor should be connected to the CX pin. The other side of the RX resistor should be connected to the center core of the coaxial cable. The SHLDOUT pin should be connected to the metallic shield part of the coaxial cable. A pull-up resistor (RSHIELD) should be added between SHLDOUT and VDD as shown in Figure 20. The example shown in Figure 20 is given for RX = 2 k, RSHIELD = 100 k, and VDD = 5 V(a). This setup has been successfully implemented with a coaxial cable of up to 4 m. A longer coaxial cable could be used, but this would mean decreasing the RSHIELD resistor, and consequently increasing current consumption. Note: A smaller RSHIELD ensures better shielding but increases current consumption (see Figure 20). a. VDD must range from 4.5 to 5.5 V to use the shield function.Please refer to Table 12: Operating characteristics for the correct power supply operating voltage when using the shield function. 26/50 Doc ID 15699 Rev 7 STM8T141 Design guidelines Figure 20. Connecting the shield (coaxial cable implementation) VDD Coaxial cable 100 k Plastic jacket R SHIELD Metal shield SHLDOUT Center core RX CX 2 k SHLDIN Dielectric insulator 8.2 ai15527 Sensitivity adjustment Several factors impact device sensitivity: 8.2.1 The sensing electrode material and size The touch panel material and thickness The board layout and in particular the sensing signal tracks The value of the sampling capacitor (CS) for proximity thresholds only The ground coupling of the object (finger or hand) and sensor. The touch or proximity detection threshold selected by the option byte. CS influence on sensitivity In touch mode, the Cs capacitor value has no influence on the sensitivity as the thresholds are relative to the actual reference value. In proximity mode, the Cs value allows the sensivity to be tuned. A higher sampling capacitor value increases the resolution and the sensitivity but also the charging time. Decreasing the sampling capacitor value therefore decreases the sensitivity. For more details, please refer to application note AN2966. 8.2.2 PCB layout and construction The PCB traces, wiring, and components associated or in contact with CX pins become touch sensitive and should be treated with caution to limit the touch area to the desired location. As an example, multiple touch electrodes connected to a sensing channel can be used to create control surfaces on both sides of an object. It is important to limit the amount of stray capacitance on the CX pin. This can be done by minimizing trace lengths and widths to achieve for higher gain without using higher values of CS. To minimize cross-coupling, electrode traces from adjacent sensing channel should not run close to each other for long distances. For detailed information on the impacts of the first three factors, refer to application note AN2869. Doc ID 15699 Rev 7 27/50 Design guidelines 8.3 STM8T141 Influence of power supply variation The stability of the device power supply is critical in order to provide a precise and repeatable capacitance measure. For this reason, a linear regulator is embedded into the device to provide the best power supply noise rejection possible. Even with the embedded regulator, variations of the power supply voltage may have an impact on the measured signal, especially in proximity configurations with a large acquisition gain and small detection threshold. A variation of the power supply voltage (V) induces a variation of the signal burst count (BC) according to Equation 1. Equation 1 BC = G V The gain, G, of the acquisition is the ratio Cs/Cx. The parameter is the power supply rejection ratio. For stability reasons, it is advised to limit BC to less than half the detection threshold. If VDD is less than 2.9 V, special care should be taken of the supply quality. An external voltage regulator may be necessary. 28/50 Doc ID 15699 Rev 7 STM8T141 Electrical characteristics 9 Electrical characteristics 9.1 Parameter conditions Unless otherwise specified, all voltages are in reference to VSS. 9.1.1 Minimum and maximum values Unless otherwise specified, the minimum and maximum values are guaranteed in the worst conditions of ambient temperature and supply voltage by tests in production on 100% of the devices with an ambient temperature at TA = 25 C and TA = TAmax (given by the selected temperature range). Data based on characterization results, design simulation and/or technology characteristics are indicated in the table footnotes and are not tested in production. Based on characterization, the minimum and maximum values refer to sample tests and represent the mean value plus or minus three times the standard deviation (mean 3 ). 9.1.2 Typical values Unless otherwise specified, typical data are based on TA = 25 C, and VDD = 5 V. They are given only as design guidelines and are not tested. 9.1.3 Typical curves Unless otherwise specified, all typical curves are given only as design guidelines and are not tested. 9.1.4 Loading capacitor The loading conditions used for pin parameter measurement are shown in Figure 21. Figure 21. Pin loading conditions Output pin 50 pF Doc ID 15699 Rev 7 29/50 Electrical characteristics 9.2 STM8T141 Absolute maximum ratings Stresses above those listed as "absolute maximum ratings" may cause permanent damage to the device. This is a stress rating only and functional operation of the device under these conditions is not implied. Exposure to maximum rating conditions for extended periods may affect device reliability. Table 9. Voltage characteristics Symbol VDD VSS Table 10. Ratings Supply voltage Maximum value Unit 5.5 V Maximum value Unit Current characteristics Symbol Ratings IVDD Total current into VDD power lines (source)(1) 11 IVSS (sink)(1) 11 IIO Total current out of VSS ground lines mA Output current sunk by output pin 10 Output current sourced by output pin 10 1. All power (VDD) and ground (VSS) lines must always be connected to the external supply. Table 11. Thermal characteristics Symbol TSTG TJ Ratings Storage temperature range Value Unit 65 to +150 C 90 C Junction temperature range (SO8 narrow and UFDFPN8 packages) 9.3 Operating conditions 9.3.1 General operating conditions and supply characteristics Table 12. Symbol VDD TA tVDD Operating characteristics Parameter Condition Min. Max. Unit 2.0 4.5 5.5 5.5 V -40 85 C Turn-on slope (Rise time rate) 0 1 Turn-off slope (Fall time rate) 1(1) Shield feature not used Shield feature used Supply voltage Operating temperature - 1. This constraint must be respected only if the voltage does not reach 0 V. 30/50 Doc ID 15699 Rev 7 V/s STM8T141 9.3.2 Electrical characteristics Average current consumption Test conditions: TA = 25 C, CX = 20 pF, CS = 47 nF and RX = 2 k.. Table 13. Average current consumption without shield Symbol Parameter Conditions Normal Power mode Low Power IDD Extreme Low Power mode Typ. - Shield output unconnected - Shield input grounded - Options other than Low Power are left in default configuration Max. Unit 45(1) 30 17 A 11 1. Data based on characterization results, not tested in production. Consumption does not depend on either detection threshold or acquisition rate. Figure 22. IDD average current consumption vs RSHIELD %XT ,0 )$$ ! Note: ,0 .0 23()%,$ K/HMS AI 1. ExtLP = External Low Power mode 2. LP = Low Power mode 3. NP = Normal Power mode Doc ID 15699 Rev 7 31/50 Electrical characteristics 9.3.3 STM8T141 Output characteristics Table 14. Output pin characteristics Symbol Parameter VDD = 5 V VOL VDD = 3.3 V VDD = 2.9 V VDD = 2.0 V 9.4 Typ. Max. ILOAD = 8 mA 1200 1600 ILOAD = 4 mA 540 750 ILOAD = 2 mA 250 450 ILOAD = 4 mA 650 1000 ILOAD = 2 mA 320 500 ILOAD = 2 mA 400 500 500 ILOAD = 1 mA 300 ILOAD = -2 mA 4.7 ILOAD = -4 mA 4.4 ILOAD = -8 mA 3.9 ILOAD = -2 mA 3.0 ILOAD = -4 mA 2.7 VDD = 2.9 V ILOAD = -2 mA 2.5 VDD = 2.0 V ILOAD = -100 A 1.8 VDD = 5 V VOH Conditions VDD = 3.3 V tHIGH Output minimum high time 40 tLOW Output minimum low time 40 mV V ms Regulator and reference voltage Table 15. Symbol Regulator and reference voltage Parameter Min. Typ. Cref Voltage regulator decoupling capacitance(1) Vreg Regulated voltage during acquisition 2.1 Vtrip End of acquisition reference voltage 0.68 1. Equivalent serial Rresistor 0.2 at 1 MHz. 32/50 Unit Doc ID 15699 Rev 7 1 Max. Unit 10 F V STM8T141 9.5 Electrical characteristics Capacitive sensing characteristics . Table 16. General capacitive sensing characteristics(1) Symbol Parameter Charge-transfer frequency at 125-kHz setting fTRANSFER tSAMPLING tLP tELP tRFT(2) tBURST DDC Min. Typ. Max. 90 125 160 Unit kHz Charge-transfer frequency at 250-kHz setting 185 250 315 Scanning period at 10-ms setting 7.5 10 12.5 Scanning period at 20-ms setting 15 20 25 Low Power 4 tSAMPLING Extreme Low Power 16 tSAMPLING Time before switching back to Low Power mode ms 540 15 s reference freeze timeout 11 15 19 45 s reference freeze timeout 33 45 57 Burst detection 32 s 214 Detection debounce count 4 End of detection debounce count 3 Proximity detection threshold -8 Sensitive proximity detection threshold -2 tTRANSFER Counts EDDC DTh(3) (4) Counts Touch detection threshold Ref./16 Sensitive touch detection threshold Ref./32 Power supply rejection ratio VDDMIN < VDD < 3 V) 0.0250 Power supply rejection ratio (3.5 V < VDD < VDDMAX) 0.0005 Count/V 1. Values guaranteed by design. 2. See tRFT in Figure 9: Reference freeze timeout. 3. Reference value (Ref.) described in Section 5.3.3: Debounce filter on page 16. 4. Between 3 V and 3.5 V, evolves as shown in Figure 23. Doc ID 15699 Rev 7 33/50 Electrical characteristics STM8T141 Figure 23. Sigma variation across VDD 3IGMA "#6 6$$ 6 Table 17. AI Response times (1) tSAMPLING = 10 ms tSAMPLING = 20 ms Mode Unit Min. Max. Min. Max. Normal Power mode 30 50 60 100 Low Power with Zoom mode 30 100 60 200 Extreme Low Power with Zoom mode 30 250 60 500 Extreme Low Power mode 510 850 1020 1700 ms 1. Values guaranteed by design. Table 18. Symbol External sensing component characteristics Parameter Min. Typ. Max. Unit 47 214 x CX nF CS Sampling capacitor (COG or NPO type)(1) CX Equivalent electrode capacitance CT Equivalent touch capacitance 5 RX Electrode serial resistance 2 100 pF kOhm RSHIELD Shield pull-up resistance 1 1. For more information about capacitors, please refer to Application note: AN2966. 34/50 22 Doc ID 15699 Rev 7 1000 STM8T141 9.6 Electrical characteristics EMC characteristics Susceptibility and emission tests are performed on a sample basis during product characterization. Both the sample and its applicative hardware environment (Figure 10) are mounted on a dedicated specific EMC board defined in the IEC61967-1 standard. 9.6.1 Functional EMS (electromagnetic susceptibility) While running in the above described environment the product is stressed by two electromagnetic events until a failure occurs. ESD: Electrostatic discharge (positive and negative) is applied on all pins of the device until a functional disturbance occurs. This test complies with the IEC 1000-4-2 standard. FTB: A burst of fast transient voltage (positive and negative) is applied to VDD and VSS through a 100 pF capacitor, until a functional disturbance occurs. This test complies with the IEC 1000-4-4 standard. A device reset allows normal operations to be resumed. The test results are given in Table 19 based on the EMS levels and classes defined in application note AN1709. 9.6.2 Prequalification trials Table 19. Symbol EMS data Parameter Conditions Level/class VFESD Voltage limits to be applied on any pin to induce a functional disturbance VDD 5 V, TA+25 C, SO8 (Narrow) package, complies with IEC 1000-4-2 1B VEFTB Fast transient voltage burst limits to be VDD5 V, TA+25 C, SO8 applied through 100pF on VDD and VSS pins (Narrow) package, complies with IEC 1000-4-4 to induce a functional disturbance 4A Doc ID 15699 Rev 7 35/50 Electrical characteristics 9.6.3 STM8T141 Electromagnetic interference (EMI) Emission tests conform to the IEC61967-2 standard for board layout and pin loading. Worse case EMI measurements are performed during maximum device activity. Table 20. Symbol EMI data Parameter General conditions Peak level SEMI SAE EMI level Peak level SAE EMI level RCOSC = Monitored frequency band 500 kHz (1) VDD 5 V, TA +25 C, 0.1 MHz to 30 MHz SO8 (Narrow) package, 30 MHz to 130 MHz Complies with SAE 130 MHz to 1 GHz J1752/3, No finger on touch electrode -4 VDD 5 V, TA +25 C, 0.1 MHz to 30 MHz SO8 (Narrow) package, 30 MHz to 130 MHz Complies with SAE 130 MHz to 1 GHz J1752/3, Finger on touch electrode 20 -9 Unit dBV -6 -1 -8 dBV -7 15 1. Data based on characterization results, not tested in production. 9.6.4 Absolute maximum ratings (electrical sensitivity) Based on two different tests (ESD and LU) using specific measurement methods, the product is stressed in order to determine its performance in terms of electrical sensitivity. For more details, refer to the application note AN1181. 9.6.5 Electrostatic discharge (ESD) Electrostatic discharges (3 positive then 3 negative pulses separated by 1 second) are applied to the pins of each sample according to each pin combination. The sample size depends on the number of supply pins in the device (3 parts*(n+1) supply pin). This test conforms to the JESD22-A114A/A115A standard. For more details, refer to the application note AN1181. Table 21. Symbol ESD absolute maximum ratings Ratings Conditions Maximum Unit value(1) VESD(HBM) Electrostatic discharge voltage (Human body model) TA +25C, conforming to JESD22-A114 A 2000 V VESD(CDM) Electrostatic discharge voltage (Charge device model) TA +25C, conforming to JESD22-C101 IV 1000 V 1. Data based on characterization results, not tested in production 36/50 Class Doc ID 15699 Rev 7 STM8T141 9.6.6 Electrical characteristics Static latchup Two complementary static tests are required on 10 parts to assess the latchup performance. A supply overvoltage (applied to each power supply pin) and A current injection (applied to each input, output and configurable I/O pin) are performed on each sample. This test conforms to the EIA/JESD 78 IC latchup standard. For more details, refer to application note AN1181. Table 22. Symbol LU Electrical sensitivities Parameter Static latchup class Conditions Class(1) TA +25 C A TA +85 C A 1. Class description: A Class is an STMicroelectronics internal specification. All its limits are higher than the JEDEC specifications, that means when a device belongs to class A it exceeds the JEDEC standard. B class strictly covers all the JEDEC criteria (international standard). Doc ID 15699 Rev 7 37/50 Package characteristics 10 STM8T141 Package characteristics In order to meet environmental requirements, ST offers these devices in different grades of ECOPACK(R) packages, depending on their level of environmental compliance. ECOPACK(R) specifications, grade definitions and product status are available at www.st.com. ECOPACK(R) is an ST trademark. 10.1 Package mechanical data 10.1.1 SO8 package mechanical data Figure 24. SO8-lead plastic small outline - package outline h x 45 A2 A c ccc b e 0.25 mm GAUGE PLANE D k 8 E1 1 E A1 L L1 SO-A 38/50 Doc ID 15699 Rev 7 STM8T141 Package characteristics Table 23. 8-lead plastic small outline - package mechanical data inches (1) millimeters Symbol Min. Typ. Max. Min. Typ. Max. A - - 1.750 - - 0.0689 A1 0.100 - 0.250 0.0039 - 0.0098 A2 1.250 - - 0.0492 - - b 0.280 - 0.480 0.0110 - 0.0189 c 0.170 - 0.230 0.0067 - 0.0091 ccc - - 0.100 - - 0.0039 D (2) 4.800 4.900 5.000 0.1890 0.1929 0.1969 E 5.800 6.000 6.200 0.2283 0.2362 0.2441 3.800 3.900 4.000 0.1496 0.1535 0.1575 e - 1.270 - - 0.0500 - h 0.250 - 0.500 0.0098 - 0.0197 k 0 - 8 0 - 8 L 0.400 - 1.270 0.0157 - 0.0500 L1 - 1.040 - - 0.0409 - E1 (3) 1. Values in inches are rounded to 4 decimal digits 2. Dimension D does not include mold flash, protrusions or gate burrs. Mold flash, protrusions or gate burrs shall not exceed 0.15mm in total (both side). 3. Dimension E1 does not include interlead flash or protrusions. Interlead flash or protrusions shall not exceed 0.25 mm per side. Doc ID 15699 Rev 7 39/50 Package characteristics 10.1.2 STM8T141 UFDFPN8 package mechanical data Figure 25. UFDFPN8-lead ultra thin fine pitch dual flat package (MLP) package outline e D b L1 L3 E E2 L A D2 ddd A1 UFDFPN-01 Table 24. 8-lead ultra thin fine pitch dual flat - package mechanical data inches (1) millimeters Symbol Min Typ Max Min Typ Max A 0.450 0.550 0.600 0.0177 0.0217 0.0236 A1 0.000 0.020 0.050 0.0000 0.0008 0.0020 b 0.200 0.250 0.300 0.0079 0.0098 0.0118 D 1.900 2.000 2.100 0.0748 0.0787 0.0827 D2 1.500 1.600 1.700 0.0591 0.0630 0.0669 E 2.900 3.000 3.100 0.1142 0.1181 0.1220 E2 0.100 0.200 0.300 0.0039 0.0079 0.0118 e - 0.500 - - 0.0197 - L 0.400 0.450 0.500 0.0157 0.0177 0.0197 L1 - - 0.150 - - 0.0059 L3 0.300 - - 0.0118 - - Tolerance ddd (2) millimeters - 0.080 inches - - 0.0031 1. Values in inches are rounded to 4 decimal digits 2. Applied for exposed die paddle and terminals. Exclude embedding part of exposed die paddle from measuring. 40/50 Doc ID 15699 Rev 7 - STM8T141 10.2 Package characteristics Package thermal characteristics The maximum chip junction temperature (TJmax) must never exceed the values given in Table 12: Operating characteristics on page 30. The maximum chip-junction temperature, TJmax, in degrees Celsius, may be calculated using the following equation: TJmax = TAmax + (PDmax x JA) Where: TAmax is the maximum ambient temperature in C JA is the package junction-to-ambient thermal resistance in C/W PDmax is the sum of PINTmax and PI/Omax (PDmax = PINTmax + PI/Omax) PINTmax is the product of IDD and VDD, expressed in Watts. This is the maximum chip internal power. PI/Omax represents the maximum power dissipation on output pins Where: PI/Omax = (VOL*IOL) + ((VDD-VOH)*IOH), taking into account the actual VOL/IOL and VOH/IOH of the I/Os at low and high level in the application. Table 25. Thermal characteristics(1) Symbol Parameter Value Unit JA Thermal resistance junction-ambient SO8 (Narrow) 130 C/W JA Thermal resistance junction-ambient UFDFPN 8 (2 x 3 mm) 120 C/W 1. Thermal resistances are based on JEDEC JESD51-2 with 4-layer PCB in a natural convection environment. 10.2.1 Reference document JESD51-2 integrated circuits thermal test method environment conditions - natural convection (still air). Available from www.jedec.org. Doc ID 15699 Rev 7 41/50 Ordering information STM8T141 11 Ordering information 11.1 STM8T141 ordering information scheme Figure 26. STM8T141 ordering information scheme Example: STM8T 141 A M XXXY TR Device type STM8T: ST touch sensing MCU Device sub-family 141 = 1 channel/proximity Pin count A: 8 pins Package M: S08 (small outline) U: FPN (dual flat no lead) Device configuration XXXY: device with specific configuration(1) 61T: OTP blank device (all user bits set to 0)(2) Packing No character: tray or tube TR: tape and reel 1. See Table 26: Orderable favorite device lists and the explanation below of "in factory option byte programming service" 2. The STM8T141 OTP devices are available for production and development. These parts are blank devices with unconfigured option bytes (all option bits are set to `0'). For more information, please refer to Section 7: Device operation. 42/50 Doc ID 15699 Rev 7 STM8T141 Ordering information 11.2 Orderable favorite device lists Table 26. Orderable favorite device lists Option byte configuration(1) Config. Default config. (OTP) Part numbers Sampling period Charge transfer frequency Power modes Detection threshold Reference freeze timeout TOUT/ POUT output mode SO8 UFDFPN8 20 ms 125 kHz Low Power mode with zoom Standard proximity 15 s Active mode STM8T141AM61T STM8T141AU61TTR 20 ms 125 kHz Low Power mode with zoom Sensitive touch Infinite Active mode Not yet available STM8T141AUMAJ1TR (XXXY = MAJ1) 1. Please refer to Section 7: Device operation. 11.3 In-factory option byte programming service For specific configurations not listed in Table 26: Orderable favorite device lists, in-factory option byte programming is available on customer request and for large order quantities. Customers have to fill out the option list (see below) and send it back to STMicroelectronics. Customers are then informed by STMicroelectronics about the ordering part number corresponding to the customer configuration. The XXXY parameter of the final ordering part number (e.g. STM8T141AMXXXY) depends on the device configuration and is assigned by STMicroelectronics. Doc ID 15699 Rev 7 43/50 Ordering information STM8T141 STM8T141 programming service option list (last update: February 2010) Customer name: Address: Contact name: Phone number: Select the package type (tick one box) STM8T141AM6 - S08 or STM8T141AU6 DFN8 Customer settings (tick one box by option) Sampling period (see Section 7.6: Sampling period) 10 ms sampling period (1) 20 ms sampling period Charge transfer frequency (see Section 7.5: Charge transfer frequency) (1) 125 kHz 250 kHz Power modes (see Section 7.4: Power modes) Normal Power mode (1) Low Power mode with Zoom Extreme Low Power mode with Zoom Extreme Low Power mode Detection threshold (see Section 7.3: Detection threshold) Sensitive proximity (1) Standard proximity Sensitive touch Standard touch Reference freeze timeout (see Section 5.3.2:Reference freeze timeout) (1) 15-second reference freeze timeout 45-second reference freeze timeout Infinite reference freeze TOUT/POUT output mode (see Section 7.2: TOUT/POUT output mode) (1) Active mode Toggle mode 3-second Latch mode 30-second Latch mode Packaging Tape & reel Tube Comment : Date Signature : 1. Configuration by default in OTP devices. 44/50 Doc ID 15699 Rev 7 STM8T141 12 STM8T141 development tools STM8T141 development tools STM8T141 evaluation kit The STM8T141-EVAL is an evaluation kit which introduces developers to the STM8T141. It contains an STM8T141 evaluation board, plus a set of preconfigured plug-in modules which allow the STM8T141 device performances to be evaluated in either touch or proximity detection. Figure 27. STM8T141-EVAL evaluation kit Doc ID 15699 Rev 7 45/50 STM8T141 development tools STM8T141 STM8T141 "blank" modules An additional box of 10 STM8T141 "blank" modules (STM8T141AM-MOD) can be ordered separately, where the device option bytes are left unprogrammed (see Figure 28). Figure 28. STM8T141 blank module box 1. The above figure is not binding. 46/50 Doc ID 15699 Rev 7 STM8T141 STM8T141 development tools Programming tool Figure 29 shows the STM8T141-EVAL programming tool. To program the device option bytes so that the device can be tested in different configurations, the following materials are available: A programming socket board (STM8T14X-SB). When connected to the programming dongle, this board allows SO8 and DFN8 devices as well as plug-in modules delivered in the evaluation kit to be programmed. A programming dongle (ST-TSLINK) and its associated programming software, STVP. Figure 29. STM8T141-EVAL programming tool Programming socket boards (STM8T14X-SB) Programming dongle (ST-TSLINK) Ordering information Table 27. Ordering information Part number Order codes STM8T141-EVAL STM8T141-EVAL STM8T-MOD STM8T141AM-MOD ST-TSLINK ST-TSLINK(1) STM8T14X-SB STM8T14X-SB(1) Description STM8T141 evaluation kit Box containing 10 blank modules based on STM8T141AM61T (OTP device in SO8 package) STM8T141 programming dongle STM8T141 socket board 1. The ST-TSLINK dongle and the STM8T14X-SB socket board are not part of the STM8T141-EVAL evaluation kit, and consequently must be ordered separately. Doc ID 15699 Rev 7 47/50 Revision history 13 STM8T141 Revision history Table 28. Document revision history Date Revision 09-Jun-2009 1 Initial release. 02-Jul-2009 2 VDD range changed to 2.9 to 5.5V. Table 12 and Table 14 updated. Internal voltage regulator bypassed configuration removed. IDDLP removed from Table 13. 3 Upgraded document from Preliminary Data to full Datasheet. Updated oscillator information in Figure 1: STM8T141 block diagram on page 8. Added detection threshold values in Table 16: General capacitive sensing characteristics on page 33. Updated values in Table 17: Response times on page 34. 4 Updated Section 11: Ordering information. Section 11.2: Orderable favorite device lists: added information on option byte programming; added option list. Added Section 12: STM8T141 development tools 5 Lower operating supply voltage changed from 2.9 V to 2.0 V. The following tables were impacted: Table 1: Device summary, Table 12: Operating characteristics, Table 13: Average current consumption without shield, Table 16: General capacitive sensing characteristics, and Table 16: General capacitive sensing characteristics. Introduced trademark for ProxSense (ProxSenseTM) Throughout document, "sensitivity threshold or level" replaced with "detection threshold", "automatic recalibration" with "reference freeze timeout", "STH" with "DTh", and "SO" with "SO8". Section 2: Block diagram: replaced `capacitive sensing engine' with `ProxSense engine'. Added Figure 3: UFDFPN8 pinout. Updated Table 2: STM8T141 pin descriptions. Renamed Section 4 as STM8T ProxSense technology Renamed Section 4.2 as Charge transfer acquisition principle and updated text. Figure 5: STM8T measuring circuitry: updated. Figure 6: Conversion period examples: updated. Sections 4.3 renamed Section 5: STM8T processing. Section reorganised and reworked with new figures and tables added. Section 6: Typical application diagram: removed introductory text; modified Figure 10, modified footnote 1, added footnote 2, added text regarding RSHIELD resistor, define a touch or proximity detection. Section 7: Device operation: Re-organisation of text; removed reference related to low power modes. Section 7.1: Option byte description: added reference to Section 12. Table 5: Option bytes: updated factory default setting of OPT1, recalibration timeout renamed reference freeze timeout. 31-Jul-2009 05-Oct-2009 24-Feb-2010 48/50 Changes Doc ID 15699 Rev 7 STM8T141 Revision history Table 28. Document revision history (continued) Date Revision Changes 24-Feb-2010 5 cont'd Section 7.2.1, Section 7.2.2, Section 7.2.3, and Section 7.2.4: replaced "output configuration" with "output operation". Section 7.2.3: 3-second latch: removed some text concerning the TOUT/POUT pin. Renamed Section 7.3: Detection threshold. Section 7.4: Power modes: small text changes; Table 8 moved to this section from Section 7.4.4: Extreme Low Power mode. Section 8.1: Shield function: removed text about RSHIELD. Figure 20: Connecting the shield (coaxial cable implementation): amended ohm symbol. Section 8.2: Sensitivity adjustment/ added text regarding sensitivity; updated bullet points. Added Section 8.3: Influence of power supply variation. Table 12: Operating characteristics: added tVDD data. Section 9.3.2: Average current consumption: for test conditions, 100 nF replaced with 47 nF; modified Table 13 and note underneath it; added Figure 22. Table 14: Output pin characteristics: removed tVDD data. Added Section 9.4: Regulator and reference voltage and Table 15. Section 9.5: Capacitive sensing characteristics: amended Table 16 for values of fTRANSFER, tRFT, and tBURST; updated symbols for tRFT, DTh, and ; added Figure 23. Table 18: External sensing component characteristics: modified CS parameter and RSHIELD min value. Section 11: Ordering information: updated Figure 26; added Section 11.2 and Section 11.3. Section 11.2: Orderable favorite device lists: updated ordering part number; added footnote to option list concerning default configuration of OPT devices, added packaging information to the option list, updated headings and date. Section 12: STM8T141 development tools: replaced STM8T1X1 with STM8T141. 01-Apr-2010 6 Added that ProxSenseTM is a trademark of Azoteq. 7 Figure 26: STM8T141 ordering information scheme: updated footnote 2. Programming tool: replaced STM8T141-SB with STM8T14X-SB. Figure 29: STM8T141-EVAL programming tool: replaced STM8T141-SB with STM8T14X-SB. Table 27: Ordering information: replaced STM8T1X1-EVAL and STM8T141-SB with STM8T141-EVAL and STM8T14X-SB respectively. 28-Jun-2011 Doc ID 15699 Rev 7 49/50 STM8T141 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. UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, 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. (c) 2011 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 50/50 Doc ID 15699 Rev 7