Reply to topic  [ 1 post ] 
TTP229 16 Key Capacitive Keypad (HCMODU0079) 
Author Message
Site Admin

Joined: Sun Aug 05, 2012 4:02 pm
Posts: 650
Post TTP229 16 Key Capacitive Keypad (HCMODU0079)
Image


Image

This 16 key capacitive touch keypad is based on the TTP229 capacitive sensor with accurate sensing of up to 16 points. Using this keypad provides a solid state alternative to mechanical type keypads providing the advantage of greater durability especially in dusty environments. They kaypad can also be configured in different modes providing various key group options up to 16 independent keys. Outs 1 to 8 on the header connector mimic the sates of the first 8 keys. When in 16 key mode the state of all 16 keys can be read via its 2 wire serial interface. Please see our example Arduino sketch or datasheet for more information on how read the key states via the serial interface.

Please note: By default the keypad is in 8 key mode. To configure it to 16 key mode you will need to link pads TP2 together (see diagram).



Image

Product Code: HCMODU0079ƒ
Operating voltage:2.4V~5.5V
ƒBuilt-in regulator
ƒStand-by current At 3V, and sleep mode slow sampling rate 8Hz:
=> Typical 2.5uA for 16 input keys
=> Typical 2.0uA for 8 input keys
ƒ8 Key or 16 key modes
ƒSeparate outputs to 8 keys in 8 key mode
2 wires serial output interface for both 16 key and 8 key mode
Outputs can be set to CMOS/OD/OC with active high/low
2 Wires serial interface can select active high or low by option
Optional Multi-key or single-key
ƒProvides two kinds of sampling rate: slow sampling rate 8Hz and fast sampling rate 64Hz at sleep mode
Optional maximum key-on time about 80sec
Auto calibration at power up (keypad must not be touched for 0.5 seconds after power up)
Auto calibration for changes in environment



Image

1.....VCC (2.4 - 5.5V)
2.....GND
3.....SCL (serial clock in)
4.....SDO (serial data out)
5.....OUT 1 (key 1 state)
6.....OUT 2 (key 2 state)
7.....OUT 3 (key 3 state)
8.....OUT 4 (key 4 state)
9.....OUT 5 (key 5 state)
10...OUT 6 (key 6 state)
11...OUT 7 (key 7 state)
12...OUT 8 (key 8 state)


Image




Image


Image

Code:
/* FILE:    TTP229_16_Key_Capacitive_Touch_Example
   DATE:    25/02/15
   VERSION: 0.1
   
REVISIONS:

25/02/15 Created version 0.1

This is an example of how to use the Hobby Components 16 key capacitive touch
keypad (HCMODU0079). This example sketch will read the current state of the
of the keypad and if a key is pressed output its key number to the serial port.

The sketch assumes that the keypad is configured to 16 key active low mode
by shorting pads P1-3 and P1-P4 together (see schematic or sport forum for more
information). Connect the keypad to your Arduino as follows:

Keypad......Arduino
VCC.........+5V
GND.........GND
SCL.........Digital pin 8
SDO.........Digital pin 9

You may copy, alter and reuse this code in any way you like, but please leave
reference to HobbyComponents.com in your comments if you redistribute this code.

This software may not be used directly for the purpose of promoting products that
directly compete with Hobby Components Ltd's own range of products.

THIS SOFTWARE IS PROVIDED "AS IS". HOBBY COMPONENTS MAKES NO WARRANTIES,
WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ACCURACY OR
LACK OF NEGLIGENCE. HOBBY COMPONENTS SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE
FOR ANY DAMAGES INCLUDING, BUT NOT LIMITED TO, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES FOR ANY REASON WHATSOEVER. */



/* Define the digital pins used for the clock and data */
#define SCL_PIN 8
#define SDO_PIN 9

/* Used to store the key state */
byte Key;

void setup()
{
  /* Initialise the serial interface */
  Serial.begin(9600);
  /* Configure the clock and data pins */
  pinMode(SCL_PIN, OUTPUT); 
  pinMode(SDO_PIN, INPUT);
}


/* Main program */
void loop()
{
  /* Read the current state of the keypad */
  Key = Read_Keypad();
 
  /* If a key has been pressed output it to the serial port */
  if (Key)
    Serial.println(Key);

  /* Wait a little before reading again
     so not to flood the serial port*/
  delay(100);
}


/* Read the state of the keypad */
byte Read_Keypad(void)
{
  byte Count;
  byte Key_State = 0;

  /* Pulse the clock pin 16 times (one for each key of the keypad)
     and read the state of the data pin on each pulse */
  for(Count = 1; Count <= 16; Count++)
  {
    digitalWrite(SCL_PIN, LOW);
   
    /* If the data pin is low (active low mode) then store the
       current key number */
    if (!digitalRead(SDO_PIN))
      Key_State = Count;
   
    digitalWrite(SCL_PIN, HIGH);
  } 
 
  return Key_State;
}




Image

Attachment:
HCMODU0079_TTP229-BSF_V1.1_EN.pdf

Attachment:
HCMODU0079_TTP229B-Schematic-Diagram.pdf


You do not have the required permissions to view the files attached to this post.


Wed Feb 25, 2015 4:45 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Thank you to phpBB.com & phpBB.ro.
Design created by Florea Cosmin Ionut.
© 2011 All contents of this site are © Hobby Components LTD