Grove - Touch Sensor

Introduction

3.3V 5.0V Digital

Grove - Touch Sensor enables you to replace press with touch. It can detect the change in capacitance when a finger is near by. That means no matter your finger directly touches the pad or just stays close to the pad, Grove - Touch Sensor would outputs HIGH also.

Specifications

  • Operating Voltage: 2.0 - 5.5V
  • Operating Current(Vcc=3V):1.5 - 3.0μA
  • Operating Current(VDD=3V):3.5 - 7.0μA
  • Output Response Time: 60 - 220mS
  • Used Chipset: TTP223-BA6

Tip

More details about Grove modules please refer to Grove System

Platforms Supported

Option features

AHLB TOG LPMB MOTB SLRFTB RST Q OPDO
Output Active High / Low Toggle mode Power Mode Max. On Time Sampling length RESET PIN CMOS Output Open Drain Mode
V V 0 1 1 X V X
Active High Disabled LOW Infinite 1.6 msec N/A Present N/A

Demonstration

With Arduino

This demo is going to show you how to turn on/off an LED.

Demo Code:

const int TouchPin=9;
const int ledPin=12;

void setup() {
    pinMode(TouchPin, INPUT);
    pinMode(ledPin,OUTPUT);
}

void loop() {
    int sensorValue = digitalRead(TouchPin);
    if(sensorValue==1)
    {
        digitalWrite(ledPin,HIGH);
    }
    else
    {
        digitalWrite(ledPin,LOW);
    }
}

With Raspberry Pi

  1. You should have a raspberry pi and a grovepi or grovepi+.
  2. You should have completed configuring the development environment, otherwise follow here.
  3. Connection

    • Plug the sensor to grovepi socket D4 by using a grove cable.
  4. Navigate to the demos’ directory:

    cd yourpath/GrovePi/Software/Python/
  • To see the code
    nano grove_touch_sensor.py   # "Ctrl+x" to exit #
    import time
    import grovepi

    # Connect the Grove Touch Sensor to digital port D4
    # SIG,NC,VCC,GND
    touch_sensor = 4

    grovepi.pinMode(touch_sensor,"INPUT")

    while True:
        try:
            print grovepi.digitalRead(touch_sensor)
            time.sleep(.5)

        except IOError:
            print "Error"

5.Run the demo.

    sudo python grove_touch_sensor.py

Resources


ArduinoWioBeagleBoneRaspberry PiLinkIt ONE

Caution

The platforms mentioned above as supported is/are an indication of the module's hardware or theoritical compatibility. We only provide software library or code examples for Arduino platform in most cases. It is not possible to provide software library / demo code for all possible MCU platforms. Hence, users have to write their own software library.

Help us make it better

Thank you for choosing Seeed. A couple of months ago we initiated a project to improve our documentation system. What you are looking at now is the first edition of the new documentation system. Comparing to the old one, here is the progresses that we made:

  • Replaced the old documentation system with a new one that was developed from Mkdocs, a more widely used and cooler tool to develop documentation system.
  • Integrated the documentation system with our official website, now you can go to Bazaar and other section like Forum and Community more conveniently.
  • Reviewed and rewrote documents for hundreds of products for the system’s first edition, and will continue migrate documents from old wiki to the new one.

An easy-to-use instruction is as important as the product itself. We are expecting this new system will improve your experience when using Seeed’s products. However since this is the first edition, there are still many things need to improve, if you have any suggestions or findings, you are most welcome to submit the amended version as our contributor or give us suggestions in the survey below, Please don’t forget to leave your email address so that we can reply.

Happy hacking