Capacitive Touch Remote Control Reference Design User s Guide Microchip Korea V0.8-page 1
Capacitive Touch Remote Control Reference Design User s Guide Table of Contents Chapter 1. Introduction 1.1 Introduction 1.2 Hardware and Software Requirement 1.2.1 Hardware 1.2.2 Software and Documentation 1.3 Capacitive Touch Remote Control Reference Board Construction and Layout Chapter 2. Low Power Operation Modes 2.1 Introduction 2.2 Wake-up by Mechanical Shock Sensor 2.3 Wake-up by Proximity Sensor (Option1) 2.4 Wake-up by Proximity Sensor (Option2) Chapter 3. Electrical Characteristics 3.1 PIN Description (PIC16F727) 3.2 Absolute Maximum Ratings Chapter 4. Getting Started 4.1 Introduction 4.2 Demonstration 4.3 GUI with PICkit Serial Analyzer Appendix A. Hardware Schematics Appendix B. Gerbers Microchip Korea V0.8-page 2
Chapter 1. Introduction 1.1 Introduction The goal of this reference design is to show how simple is the implementation of capacitive touch technology using the PIC16F72X family. It will also demonstrate the low power operations of the Cap Sense Module (CSM). Microchip has exclusive rights to this demo board and offers a royalty-free license. The accompanying CD-ROM includes resource documentation such as Schematics, Gerbers, BoM, Source codes and User s guide. The User s Guide describes the specification of capacitive sensing remote control and generic electronic module in terms of input/output pins assignments, and electrical characteristics. The Cap sensing Remote Control is built around a high performance PIC16F727 8-bit Microcontroller. For the capacitive sensing, Cap Sensing Module with 16 multiplexed channels is used. The PIC16F727 provides up to 36 I/O pins and 8K words program memory. Onboard PIC16F727 can be reprogrammed using PICkit 2 or MPLAB-ICD2 and the board allows the user to monitor the capacitance on each button using PICkit Serial Analyzer. The main features of Cap sensing Remote Control are Offer 8 Capacitive Touch Pads Use NEC format for IR Transmit Use CR2032 Battery (3V) Use Mechanical Shock Sensor (Current Consumption < 1uA) Can be waked up MCU from Shock sensor or Proximity Sensor Put the device in Sleep mode for low-power consumption. Use the Watchdog Timer (WDT) as the time base while in Sleep mode and the CSM is able to continue oscillating during Sleep mode. Timer1 will continue to count until Watchdog Timer overflows and wakes the MCU. Once the device wakes from Sleep and detects a change in capacitance, due to a finger or hand in close proximity to the sensor, then the program can be set to another time base to detect the actual button pressed and perform the desired function. Current consumption while in standby mode : Shock sensor(5.43ua), Proximity sensor(7.26ua) 1.2 Hardware and Software Requirement 1.2.1 Hardware - Capacitive Touch Remote Control Reference Board - CR2032 Battery (3V) - PICkit 2 or MPLAB-ICD2 for programmer and Debugger - PICkit Serial Analyzer for GUI Microchip Korea V0.8-page 3
1.2.2 Software and Documentation - MPLAB IDE V8.10 or later - Hi-tech C V9.60 PL2 or later - mtouch Diagnostic Tool Software V2.0.2 or later - CD-ROM including: User s Guide Source Codes Schematics and Gerbers 1.3 Capacitive Touch Remote Control Reference Board Construction and Layout Capacitive Touch Remote Control Reference Board is constructed using a three layer sandwich assembly. The middle layer is the Printed Circuit Board (PCB) which holds all the electronic components as well as the touch sensor pads and shock sensor (see Figure 1-2 and Figure 1-3). FIGURE 1-1: Reference Board (TOP) without Silk-screened Cover plate 1 10 1 Power Button 2 Channel-Up Button 2 9 3 Enter Button 4 Volume-Down Button 3 8 5 PICkit Analyzer Connector (GND,SDA,SCL) 6 PICkit 2 Programmer Connector 4 7 7 Channel-Down Button 8 Volume-Up Button 5 6 9 Proximity Sensor Pad 10 Select Button Microchip Korea V0.8-page 4
FIGURE 1-2: Reference Board (BOTTOM) 1 6 1 IR Transmitter 2 Shock Sensor 3 Supervisor (MCP111) 2 5 4 Battery(CR2032) Holder 3 4 5 PIC16F727 Micro-controller 6 Buzzer FIGURE 1-3: Assembled Capacitive Touch Remote Controller Reference Board (TOP) 1 10 1 Power Button 2 Channel-Up Button 2 9 3 Enter Button 4 Volume-Down Button 3 8 5 PICkit Analyzer Connector (GND, SDA, SCL) 6 PICkit 2 Programmer Connector 4 7 7 Channel-Down Button 8 Volume-Up Button 5 6 9 Proximity Sensor Pad 10 Select Button Microchip Korea V0.8-page 5
2.1 Introduction Chapter 2. Low Power Operation Modes This section provides an introduction to low power operations of the Cap Sense Module (CSM). There are two kinds of modes for low power operation. The device can be waked up by Mechanical shock sensor or Proximity Sensor. If the device does not detect the actual button pressed for 5 seconds, then the device goes to standby mode. In case of shock sensor mode, Current consumption while in standby mode is 5.4uA. In case of Proximity sensor mode, Current consumption while in standby mode is 7.26uA. 2.2 Wake-up by Mechanical Shock Sensor ( #define METHOD 1 in main727.h) This is a procedure for low power operations by Shock sensor: 1) Put the device in Sleep mode for low-power consumption (POR/BOR disabled, WDT disabled, CSM disabled). 2) Wake up PIC16F72X by INT External interrupt from Sleep mode. 3) Once the device wakes from Sleep and enables CSM, Timer1 and Timer0(the time base) and detects a change in capacitance, then the program can detect the actual button pressed and perform the desired function. 4) If the device does not detect the actual button pressed for 5 seconds, then the device goes to sleep mode. This is the current consumption: 1) Condition: 3V@4Mhz, WDT disabled, POR/BOR disabled, FVR disabled, CSM Disabled 2) Result: < Wake-up Mode > < Sleep Mode > - 5.43uA while in Sleep mode - 600uA while in wake-up @ IntOSC 4MHz - 8000uA while in actual button pressed @ IntOSC 4MHz (LED lighting and IR Transmit, 100msec per one pressed) - Estimated life cycle ( If No wake-up, No actual button pressed and Average AAA Alkaline battery Capacity = 1000mAh) 1000mA/5.43uA = 184162 Hours = 7673 Days = 255 Months = 21 Years - Estimated life cycle ( If 0.99 Hour of wake-up, 0.01 Hour of actual button pressed per a day (360 times pressed per a day), Average battery Capacity : 1000mAh) Average Current consumption = (5.43uA*23hrs + 600uA*0.99hrs + 8000uA*0.01hrs) / 24hrs = 33.29uA 1000mA/33.29uA = 30041 Hours = 1251 Days = 41 Months = 3 Years 5 Months Microchip Korea V0.8-page 6
2.3 Wake-up by Proximity Sensor (Option1) ( #define METHOD 2 in main727.h) This is a procedure for low power operations by Proximity sensor: 1) Put the device in Sleep mode for low-power consumption (POR/BOR disabled, WDT enabled, CSM enabled and Oscillator is in low range). 2) Use the Watchdog Timer (WDT) as the time base while in Sleep mode and the CSM is able to continue oscillating during Sleep mode. 3) Timer1 will continue to count until Watchdog Timer overflows and wakes the MCU. 4) Once the device wakes from Sleep and detects a change in capacitance, due to a finger or hand in close proximity to the sensor, then the program can be set to another time base to detect the actual button pressed and perform the desired function. 5) Timing diagram of standby mode 126msec (Sleep) 70usec (Wake-up) 6) If the device does not detect the actual button pressed for 5 seconds, then the device goes to standby mode. This is the current consumption: 1) Condition: 3V@4Mhz, WDT enabled, POR/BOR disabled, FVR disabled, CSM Enabled 2) Result: < Wake-up Mode > < Standby Mode > - 10.39uA while in Standby mode (See Timing diagram above) - 600uA while in wake-up @ IntOSC 4MHz - 8000uA while in actual button pressed @ IntOSC 4MHz (LED lighting and IR Transmit, 100msec per one pressed) - Estimated life cycle ( If No wake-up, No actual button pressed and Average AAA Alkaline battery Capacity = 1000mAh) 1000mA/10.39uA = 96246 Hours = 4010 Days = 133 Months = 11 Years 1 Months - Estimated life cycle ( If 0.99 Hour of wake-up, 0.01 Hour of actual button pressed per a day (360 times pressed per a day), Average battery Capacity : 1000mAh) Average Current consumption = (10.39uA*23hrs + 600uA*0.99hrs + 8000uA*0.01hrs) / 24hrs = 38.04uA 1000mA/38.04uA = 26287 Hours = 1095 Days = 36 Months = 3 Years Microchip Korea V0.8-page 7
2.4 Wake-up by Proximity Sensor (Option2) ( #define METHOD 3 in main727.h ) This is a procedure for low power operations by Proximity sensor: 1) Put the device in Sleep mode for low-power consumption (POR/BOR disabled, WDT enabled, CSM disabled, Timer1 stopped). 2) Enables the Watchdog Timer (WDT) while in Sleep mode and the CSM and Timer1 are disabled during Sleep mode. 3) Once the device wakes from Sleep and enables CSM, Timer1 and Timer0(the time base) and detects a change in capacitance, due to a finger or hand in close proximity to the sensor, then the program can detect the actual button pressed and perform the desired function. Because Timer1 does not continue to count until Watchdog Timer overflows, Option 2 will be taken a longer time to detect a change in capacitance comparing with Option 1. 4) Timing diagram of standby mode 126msec (Sleep) 350usec (Wake-up) 5) If the device does not detect the actual button pressed for 5 seconds, then the device goes to standby mode. This is the current consumption: 1) Condition: 3V@4Mhz, WDT enabled, POR/BOR disabled, FVR disabled, CSM Disabled 2) Result: < Wake-up Mode > < Standby Mode > - 7.26uA while in Standby mode (See Timing diagram above) - 600uA while in wake-up @ IntOSC 4MHz - 8000uA while in actual button pressed @ IntOSC 4MHz (LED lighting and IR Transmit, 100msec per one pressed) - Estimated life cycle ( If No wake-up, No actual button pressed and Average AAA Alkaline battery Capacity = 1000mAh) 1000mA/7.26uA = 137741 Hours = 5739 Days = 191 Months = 15 Years 11 Months - Estimated life cycle ( If 0.99 Hour of wake-up, 0.01 Hour of actual button pressed per a day (360 times pressed per a day), Average battery Capacity : 1000mAh) Average Current consumption = (7.26uA*23hrs + 600uA*0.99hrs + 8000uA*0.01hrs) / 24hrs = 35.04uA 1000mA/35.04uA = 28538 Hours = 1189 Days = 39 Months = 3 Years 3 Months Microchip Korea V0.8-page 8
Chapter 3. Electrical Characteristics 3.1 PIN Description (PIC16F727) Pin Name Pin Function I/O Description RA0 VCAP IN Filter capacitor for Voltage Regulator RA1 GPO OUT LED1 Drive RA2 GPO OUT LED2 Drive RA3 GPO OUT NC RA4 CPS6 (Cap Sensor Module) IN VOLUME DOWN RA5 CPS7 (Cap Sensor Module) IN SELECT RA6 GPO OUT NC RA7 GPO OUT NC RB0 IOC/INT IN Shock Sensor IN RB1 CPS1 (Cap Sensor Module) IN MENU RB2 CPS2 (Cap Sensor Module) IN POWER ON/OFF RB3 CPS3 (Cap Sensor Module) IN VOLUME UP RB4 CPS4 (Cap Sensor Module) IN CHANNEL + RB5 CPS5 (Cap Sensor Module) IN CHANNEL - RB6 PGC IN ICSP Clock RB7 PGD IN ICSP Data RC0 GPO OUT IR ON/OFF RC1 CCP2 OUT BUZZER OUTPUT RC2 CCP1 OUT IR Carrier RC3 I2C_SCL IN PICKIT Serial Analyzer (SCL) RC4 I2C_SDA IN PICKIT Serial Analyzer (SDA) RC5 GPO OUT NC RC6 UART_TX IN NC RC7 UART_RX IN NC RD0 CPS8 (Cap Sensor Module) IN Proximity Sensor Pad RD1 GPO OUT NC RD2 GPO OUT LED7 RD3 GPO OUT LED8 RD4 GPO OUT LED9 RD5 GPO OUT LED10 RD6 GPO OUT LED11 RD7 GPO OUT NC RE0 GPO OUT LED12 RE1 GPO OUT LED13 RE2 GPO OUT LED14 RE3 MCLR IN RESET Microchip Korea V0.8-page 9
3.2 Absolute Maximum Ratings SYMBOL PARAMETER MIN MAX UNITS NOTES VDD Voltage on VDD with respect to -0.3 6.5 V VSS, Vin Voltage on all other pins -0.3 Vdd+0.3 V Ik Clamp Current -20.0 20.0 ma Tstrg Storage Temperature -65 150 C Operating Conditions SYMBOL PARAMETER MIN MAX UNITS NOTES VDD Supply Voltage 2.5 3.0 V Vth Reset Threshold Voltage 2.285 2.355 V Iddd Dynamic Current in Wake-up mode 610 ua Idds Standby Current in Standby mode 5.5 10 ua Ta Ambient Temperature -40 125 C Microchip Korea V0.8-page 10
Chapter 4. Getting Started 4.1 Introduction This section provides an introduction to the Capacitive Touch Remote Control Reference Design using the demonstration application firmware pre-programmed on the PIC MCUs and monitoring environment using PICkit Serial Analyzer. 4.2 Demonstration 4.2.1 Wake-up by shock sensor - Put the Device on the Table for 5 sec, then Device goes to Standby mode. - Shake the Device, then LEDs (both side) are flashing and buzzer sounds. - Press actual buttons, then LEDs (Top side) is blinking, buzzer sounds and IR data is transmitted. - Leave the Device for 5 sec, then Device goes to Standby mode again. 4.2.2 Wake-up by proximity sensor - Put the Device on the Table for 5 sec, then Device goes to Standby mode. - Touch Proximity sensor pad (both side), then LEDs (both side) are flashing and buzzer sounds - Press actual buttons, then LEDs (Top side) is blinking, buzzer sounds and IR data is transmitted. - Leave the Device for 5 sec, then Device goes to Standby mode again. Caution: If you touch ICSP Connectors, It may cause abnormal operation. 4.3 GUI with PICkit Serial Analyzer 4.3.1 Connecting the board with PICkit Serial Analyzer Ensure that the Capacitive Touch Remote Control Reference Board is sitting on a flat nonconductive surface. Connect the PICKit Serial Analyzer to the Board and then to an available USB port on your PC as shown in Figure 4-1. FIGURE 4-1: Connecting the board with PICkit Serial Analyzer to PC USB Port 4.3.2 Starting the mtouch Diagnostic Tool and Board Selection Start the mtouch Diagnostic Tool by selecting Start>Programs>Microchip>mTouch. The mtouch Diagnostic Tool main window and Board Selection window should appear as shown in Figure 4-2. Microchip Korea V0.8-page 11
Select the Custom Tab and write the Slave Address (0x52). If Slave Address is matched with PIC16F727, Total Num Sensors would be 8 automatically. And then Click the button until non-activation. A more detailed discussion on the mtouch technology is provided in the mtouch User s Guide (DS41328). FIGURE 4-2: mtouch DIAGNOSTIC TOOL WINDOWS AND BOARD SELECTION AND ASSOCIATED PAD SENSIBILITY Power Enter(Microchip Logo) Volume-Up Channel-Down Select Channel-Up Volume-Down Proximity Sensor Microchip Korea V0.8-page 12
Appendix A. Hardware Schematics Microchip Korea V0.8-page 13
Appendix B. Gerbers PCB (BOTTOM) PCB (TOP) Microchip Korea V0.8-page 14