What is the purpose of a touch sensor?

Author: Molly

Sep. 30, 2024

Touch sensors: What it is, How it works, Arduino Guide

Touch sensor has been common nowadays for displays and IoT projects with Arduino. They can be found in lamps, touch screens of smartphones, and other wide arrays of applications as well. However, do you understand the working principle of a touch sensor and how to use it alongside your Arduino?

Sihovision Product Page

Well, in this touch sensor guide, I&#;ll be covering the following to help you better understand Arduino and touch sensor by covering:

  • What is a touch sensor
  • How does a touch sensor work
  • Touch sensor applications
  • Types of touch sensor
  • List of touch sensor recommendations
  • How to use touch sensor with Arduino

As this guide may be exhaustive, simply press CTRL + F on your keyboard to search for what you&#;re looking for!

What is a touch sensor?

Grove &#; Touch Sensor

A touch sensor is an electronic sensor used in detecting and recording physical touch. Also known as tactile sensors, it&#;s a small, simple, low-cost sensor made to replace old mechanical switches we seen in the past.

How does touch sensor work?

Working principle

A touch sensor works like a switch, where when there&#;s contact, touch, or pressure on the surface of a touch sensor, it opens up an electrical circuit and allows currents to flow through it.

What is touch sensor used for? Key Applications

As mentioned in my introduction, a touch sensor is used for a wide array of applications, with those being:

  • Touch sensor in robotics; a touch sensor is commonly used in robots, enabling basic movement and the ability to detect touch in its surroundings (E.g. When the robot runs into something, the touch sensor can have it to stop moving)
  • Smartphones, automotive, industrial applications
  • Touch sensor faucet in kitchens; allowing for control of running water without having to physically turn the knob
  • Most other applications that require pressure/distance measurement

Types of touch sensor

The above explanations of how a touch sensor work and its applications apply to a generic sensor, where there are still different type of touch sensor that works uniquely and is more applicable for certain applications. Hence, I&#;ll be introducing the two main touch sensor types with its working principle/usages!

*Note: The following types of touch sensors can be referenced as touch technology too; used on touch screens to enable your device to interpret and deliver your commands.

Capacitive touch sensor

Commonly associated with MicroChip at42qt, a Capacitive touch sensor measures touch based on electrical disturbance from a change in capacitance. It consists of an electrode film on top of the glass panel that&#;s conductively coated with a printed circuit pattern around the outer viewing area.

How capacitive touch sensor work:

  1. The user applies touch on the glass panel
  2. The printed circuit panel around the outer viewing area of the glass panel creates an electrical charge across the surface
  3. It results in a decrease in capacitance and allows the system to determine the touchpoint
    • Multiple touchpoints can be detected as well, allowing for touch pinch and spread

Capacitive touch sensor applications:

  • Portable devices such as smartphones and tablets (iPhones, iPad, etc.)
  • Home applications such as touch lamps
  • Automotives
  • Industrial

Advantages of a capacitive touch sensor:

  • Doesn&#;t require pressure to be applied since
    it&#;s built on the glass itself, hence making force insignificant to sensing requirements
  • Support for multi-touch
  • High responsiveness

Disadvantages of a capacitive touch sensor:

  • Vulnerable to abrasion
  • Reliability concerns when used in harsh environments
  • Doesn&#;t work with gloves or stylus

Resistive touch sensor

Resistive touch sensor measures touch through responding to the pressure applied to their surface. It consists of two conductive layers and a non-conductive separator. Unlike the capacitive touch sensors, it&#;s not multi-touch compatible.

How resistive touch sensor work:

  1. The user applies pressure against the surface
  2. The outside conductive layer is then pressed against the inner layer, resulting in voltage changes
  3. The voltage changes are then compared to the starting voltage, allowing for the point at which the touch took place to be calculated

Resistive touch sensor applications:

  • Musical instruments, touchpads, etc.
  • Older music players, game consoles, etc.
  • Office equipment

Advantages of a resistive touch sensor:

  • Cost-effective and durable to be used in harsh environments
  • Able to be used with stylus and gloves
  • Less complex
  • Low power consumption

Disadvantages of a resistive touch sensor:

  • The inability for multi-touch technology unlike the capacitive touch sensors
  • Dependent on pressure, require more pressure to be applied for sensing to take place

Capacitive vs Resistive touch sensor

Based on what I&#;ve covered above, here&#;s the summarised comparative table between the two main types of touch sensors; Capacitive and Resistive touch sensor!

Capacitive touch sensor Resistive touch sensor How it measures Electrical disturbance from a change in capacitance Amount of pressure applied to the surface Multi touch Multi touch capable Not multi touch capable Pressure Requirement Does not require pressure to be applied Require and relies on pressure to be applied Compatibility with gloves/stylus Doesn&#;t work with gloves or stylus Work with gloves or stylus Applications Portable devices; smartphones and tablets
Home applications
Automotives and industrial usages Musical instruments, touchpads, etc.
Older music players, game consoles
Office equipment

Others: Infrared and surface acoustic wave (SAW) touch sensor 

Though the following two touch sensors are less talked about, it&#;s still applicable as touch screen technology. Hence, here&#;s a brief summary of both!

Infrared touch sensor

Infrared touch sensor measures touch through whether the emitting LED beam is broken or changed when an object makes contact with it. Commonly used in kiosks or gaming applications, infrared touch sensors are long-lasting and insensitive to pressure (similar to capacitive touch sensor)

Surface acoustic wave (SAW) touch sensor

As its name suggests, the SAW touch sensor measures the disturbance of ultrasonic waves sent across the surface of a glass layer. It consists of Piezoelectric crystals attached to the glass layer on the LCD display, making such sensing possible.

Which touch sensors to buy? Recommended list at Seeed

Now that we&#;ve understood most about touch sensors, here are the various types to consider! Ranging from MPR121 to AT42QT, we&#;ve options for beginners and avid tinkerers! All available at Seeed and Grove compatible!

Grove system is Seeed very own initiative, mainly aimed at helping users like yourself to easily use different modules, sensors, and more through our plug and play system!

  • We currently already hold more than 200 Grove modules, including other sensor types for you to choose from!

Don&#;t believe how easy pairing is made possible with Grove? Below shows a general touch sensor vs one of our Grove &#; Touch Sensors:

Like how simple and less messy it is?

All you need is a Grove Base Shield alongside your Arduino and you&#;re good to go!

  • We&#;ll talk more about the touch sensor pairing guide later on

Now let&#;s move on to our recommendations!

1) Grove &#; Touch Sensor: Low cost, perfect for beginners

Need a simple, fast, and compact touch sensor to easily help you get started with your first touch sensing project? This is the one for you!

Based on the TTP223 touch detecter IC, it&#;s a capacitance touch sensor, integrating the same technology used on the iPhone!

Waterproof, fast response time, and low power consumption, it can be used as an inconspicuous button, tradition button key replacement, and as a waterproofed electric product!

Here are its features:

  • Grove compatible interface 
  • 2.0-5.5V DC supply 
  • response time max about 60mS at fast mode, 220mS at low power mode @VDD=3V 
  • Low power consumption 
  • 2.0cm x 2.0cm twig module 
  • Power indicator led 

Interested to find out more on the Grove &#; Touch Sensor?

  • We&#;ve provided an Arduino guide, projects and more available on our product page here!

Need a touch sensor not only capable of capacitance and touch sensing but proximity sensing as well? This MPR121 based sensor does the job!

The Grove &#; 12 Key Capacitive I2C Touch Sensor contains 12 completely independent electrodes with build-in autoconfiguration, alongside our Grove port which allows you to detect all 12 electrodes signals with only that!

  • Multiple Grove &#; 12 Key Capacitive I2C Touch Sensor (MPR121) can be used in a single system as well, allowing you to build a touch system with 3 times the number of electrodes! Yes, 36 electrodes!

Here are its features:

  • Internal 10-bit ADC
  • Integrated independent autocalibration for each electrode input
  • Completely independent electrodes with built-in autoconfiguration
  • I2C interface, with IRQ Interrupt output to advise electrode status changes
  • Hardware configurable I2C address
  • 12 electrodes/capacitance sensing inputs in which 8 are multifunctional for LED driving and GPIO
  • Autoconfiguration of charge current and charge time for each electrode input
  • Separate touch and release trip thresholds for each electrode, providing hysteresis and electrode independence

Interested to find out more on the Grove &#; 12 Key Capacitive I2C Touch Sensor V2?

  • We&#;ve provided an Arduino guide, projects and more available on our product page here!

3) MPR121 touch sensor with feeler: Grove &#; I2C Touch Sensor

We&#;ve covered an MPR121 standalone module in the previous recommendation, but do you need one that comes with touch sensor feelers can allow you to feel your finger touch or proximity for touch controlling?

This sensor does just that! It includes a Touch Sensor controller and 4 finger feelers. One can insert the connectors of feelers into the base of the Sensor controller, and start sensing the touch.

Interested to find out more on the Grove &#; I2C Touch Sensor?

  • We&#;ve provided an Arduino guide, library and more available on our product page here!

Based on the Atmel AT42QT, this touch sensor delivers high touch sensing performance with low external noise due to burst modulation in a spread-spectrum fashion!

External sampling capacitors are not added as well with the QT using a dual pulse method of acquisition. This allows for touch sensing with only a single pin!

Here are its specifications:

  • Operating Voltage: 3 ~ 5.5V
  • Operating Current @3.3V: 1mA
  • Touch Keys: 7 Keys ; key0 ,key1 ,key2 are on the Grove PCB bottom side
  • Communicating Protocol: I2C
  • I2C Address: 0x1B

Interested to find out more on the Grove &#; Q Touch Sensor?

  • We&#;ve provided an Arduino guide, library and more available on our product page here!

Ending of the list of touch sensor recommendations is this fun and unique option that&#;s applicable for game controller applications!

Unlike the other 4 recommendations above, the Grove &#; Capacitive Touch Slider Sensor contains a 5-segment slider, with each touchpad having a corresponding LED to indicate touch status.

Here are its features:

  • 32-bit MCU Subsystem
  • 2 Buttons and a 5-segment slider
  • 16-MHz ARM Cortex-M0 CPU
  • Up to 16KB of flash with Read Accelerator
  • Up to 2KB of SRAM
  • Automatic hardware tuning (SmartSense&#;) over a sensor range of 5 pF to 45 pF
  • I2C interface

Interested to find out more on the Grove &#; Capacitive Touch Slider Sensor (CY8CLQI)?

  • We&#;ve provided an Arduino guide, library and more available on our product page here!

Arduino touch sensor guide

To end today&#;s guide to touch sensors, I&#;ll be providing a tutorial on how to pair a touch sensor with Arduino!

  • The following tutorial uses the 2nd touch sensor on my list; The MPR121 based Grove &#; 12 Key Capacitive I2C Touch Sensor V2

Here&#;s what you need:

  • Seeeduino is Seeed&#;s very own version of Arduino, build with benefits over the regular version

Hardware configurations:

  • Step 1: Connect the Grove &#; 12 Key Capacitive I2C Touch Sensor V2 (MPR121) to the I2C port of the Base Shield
    • You can directly connect the module to Seeeduino as well
  • Step 2: Plug Grove &#; Base Shield into Seeeduino
  • Step 3: Connect Seeeduino to PC via a USB cable

It should look something like this after the above steps:

Software configurations:

  • Step 1: Download the Grove touch sensor MPR121 Library from Github
  • Step 2: Refer to How to install library to install library for Arduino
  • Step 3: Restart the Arduino IDE. Open the example, you can open it by copying the following code into a new sketch in Arduino IDE
#include "Seeed_MPR121_driver.h"

Mpr121 mpr121;

u16 touch_status_flag[CHANNEL_NUM]={0};
void setup()
{
  s32 ret=0;
  Serial.begin();
  if(mpr121.begin()<0)
  {
    Serial.println("Can't detect device!!!!");
  }
  else
  {
    Serial.println("mpr121 init OK!");
  }
  delay(100);
}
void loop()
{
  u16 result=0;
  u16 filtered_data_buf[CHANNEL_NUM]={0};
  u8 baseline_buf[CHANNEL_NUM]={0};

  result=mpr121.check_status_register();

  mpr121.get_filtered_reg_data(&result,filtered_data_buf);

  for(int i=0;i<CHANNEL_NUM;i++)
  {
    if(result&(1<<i))                             /*key i is pressed!!*/
    {
      if(0==touch_status_flag[i])             
      { 
        touch_status_flag[i]=1;
        Serial.print("key ");
        Serial.print(i);
        Serial.println("pressed");
      }
    }
    else
    {
      if(1==touch_status_flag[i])
      {
        touch_status_flag[i]=0;
        Serial.print("key ");
        Serial.print(i);
        Serial.println("release");
      }
    }
  }
  delay(50); 
}
  • Step 4: Upload the demo. If you do not know how to upload the code, please check How to upload code.
  • Step 5. Open the Serial Monitor of Arduino IDE by click Tool-> Serial Monitor. Or tap the Ctrl+Shift+M key at the same time. Set the baud rate to .

You should get the result if everything goes well. When you touch the CH0 ~ CH11 pads, it will trigger key ?pressed and key ?release

mpr121 inmpr121 init OK!
key 11pressed
key 11release
key 10pressed
key 10release
key 0pressed
key 0release
key 2pressed
key 2release

*Note: The above tutorial is for Arduino interfacing. There&#;s a touch sensor raspberry pi guide on our wiki page as well!

Summary

That&#;s all for today on touch sensors. I hope with today&#;s blog, you get a deeper understanding of what it is, how it works, and what it takes to build one with an Arduino!

To help you easily get started, do consider the list of touch sensor I&#;ve recommended:

  • Suitable for beginners and low-cost:
    • Grove &#; Touch Sensor
  • Higher performance requirements:
    • Grove-Q Touch Sensor

About Author

Continue Reading

Touch Sensor | Capacitive and Resistive ...

In this tutorial, we will learn about Touch Sensors. Today, almost all user interface is based on touch. The range of applications is count-less and some important ones are Mobile Phones, Tablets, Laptop computers, Cars, Elevators, ATMs, Cameras, etc. Touch Sensors are the important components in modern Touch Screen Applications.

Also Check: Interfacing Flex Sensor with Arduino

Introduction

The sense of touch is an important sensory channel in many animals and some plants. Our senses inform to us when our hands touch something. Computer input devices are indifferent to human contact as there is no reaction from software in the event of making, maintaining or breaking physical contact like touches or releases.

Thus, touch sensing input devices offers numerous possibilities for novel interaction techniques. Touch sensor technology is slowly replacing the mechanical objects like mouse and keyboard.

A touch sensor detects touch or near proximity without relying on physical contact. Touch sensors are making their way into many applications like mobile phones, remote controls, control panels, etc. Present day touch sensors can replace mechanical buttons and switches.

Touch sensors with simple rotational sliders, touch pads and rotary wheels offer significant advantages for more intuitive user interfaces. Touch sensors are more convenient and more reliable to use without moving parts. The use of touch sensors provides great freedom to the system designer and help in reducing the overall cost of the system. The overall look of the system can be more appealing and contemporary.

BACK TO TOP

Want more information on 10.1 inch touch sensor company? Feel free to contact us.

Principle of Working

Touch sensors are also called as tactile sensors and are sensitive to touch, force or pressure. They are one of the simplest and useful sensors. The working of a touch sensor is similar to that of a simple switch.

When there is contact with the surface of the touch sensor, the circuit is closed inside the sensor and there is a flow of current. When the contact is released, the circuit is opened and no current flows.

The pictorial representation of working of a touch sensor is shown below.

BACK TO TOP

Capacitive Touch Sensor

Capacitive touch sensors are widely used in most of the portable devices like mobile phones and MP3 players. Capacitive touch sensors can be found even in home appliances, automotive and industrial applications. The reasons for this development are durability, robustness, attractive product design and cost.

Touch sensors, unlike mechanical devices, do not contain moving parts. Hence, they are more durable than mechanical input devices. Touch sensors are robust as there are no openings for humidity and dust to enter.

The principle of a capacitive touch sensor is explained below.

The simplest form of capacitor can be made with two conductors separated by an insulator. Metal plates can be considered as conductors. The formula of capacitance is shown below.

C = ε0 * εr * A / d

Where

ε0 is the permittivity of free space

εr is relative permittivity or dielectric constant

A is area of the plates and d is the distance between them.

Capacitance is directly proportional to the area and inversely proportional to the distance.

In capacitive touch sensors, the electrode represents one of the plates of the capacitor. The second plate is represented by two objects: one is the environment of the sensor electrode which forms parasitic capacitor C0 and the other is a conductive object like human finger which forms touch capacitor CT.

The sensor electrode is connected to a measurement circuit and the capacitance is measured periodically. The output capacitance will increase if a conductive object touches or approaches the sensor electrode. The measurement circuit will detect the change in the capacitance and converts it into a trigger signal.

The working of a capacitive touch sensor is shown in below figure.

Image Resource Link: www.fujitsu.com/downloads/MICRO/fme/articles/fujitsu-whitepaper-capacitive-touch-sensors.pdf

If the area of the sensor electrode is bigger and the thickness of the cover material is less, the touch capacitance CT is also big. As a result, the capacitance difference between touching pad and untouched sensor pad is also big. This means that the size of the sensor electrode and covering material will influence the sensitivity of the sensor.

The measurement of capacitance is used in many applications like determining distance, pressure, acceleration, etc. Capacitive Touch sensors are another area of application. There are numerous methods to measure capacitance. Some of them are: amplitude modulation, frequency modulation, time delay measurement, duty cycle, etc.

In case of capacitive touch sensors, presence of a conductive material is enough to trigger the load and do not require any force. Hence, the risk of false or unintended triggers is higher in case of capacitive touch sensors. This problem is more in the presence of moisture or water, which is a good conductor.

The method of measurement of capacitance in touch sensors requires a reference plane located near by the sensing pad. In capacitive touch sensors, a finger trip forms the capacitance between the sensing electrode and reference plane. The skin oils or sweat from human body may cause a false trigger.

To distinguish between intended and false touches, additional sensing pads or software algorithms are used. The best solution is to get rid of reference ground electrode.

There are two types of capacitive touch sensors: surface capacitive sensing and projected capacitive sensing.

In surface capacitive sensing, an insulator is applied with a conductive coating on one side of its surface. On top of this conductive coating, a thin layer of insulator is applied. Current is applied to all the corners of the conductive coating.

When an external conductor like a human finger comes in contact with the surface, a capacitance is formed between them and draws more current from the corners. The current at each corner is measured and their ratio will determine the position of the touch on the surface.

In projected capacitive sensing, the whole surface is not charged, but an X &#; Y grid of conductive material is placed between two insulating materials. The grid is often made of Copper or Gold on a PCB or Indium Tin Oxide on glass. An IC is used to charge and monitor the grid.

When a charge is pulled by external conducting object like a finger(s) from an area on the grid, the IC calculates the location of the finger on the touch surface. Touch sensors, made of projective capacitive technology can be used to sense a finger that is not touching its surface. They act as near proximity sensors.

BACK TO TOP

Resistive Touch Sensor

Resistive touch sensors are used for a longer time than capacitive solutions as they are simple control circuits. A resistive touch sensor does not depend on the electrical property of capacitance. Hence, resistive touch sensors can accommodate non &#; conducting materials like stylus and glove wrapped finger.

In contrast to capacitive touch sensors which measure the capacitance, resistive touch sensors sense the pressure on the surface.

A resistive touch sensor consists of two conductive layers separated by small spacer dots. The bottom layer is made up of either glass or film and the top layer is made up of film. The conductive material is coated with metallic film generally Indium Tin Oxide and is transparent in nature. A voltage is applied across the surface of the conductor.

When any probe like a finger, stylus pen, pen, etc. is used to apply pressure on the top film of the sensor, it activates the sensor. When ample pressure is applied, the top film flexes inward and makes contact with the bottom film. This results in voltage drop and the point of contact creates a voltage divider network in the X &#; Y directions.

This voltage and the changes in the voltage are detected by a controller and calculate the position of the touch where the pressure is applied based on the X &#; Y coordinates of the touch.

The functioning of a resistive touch sensor can be explained using the following figure.

The resistance of the object touching the electrodes will come into the picture in the working of resistive touch sensors. For example, when finger touches the surface, the small resistance of the finger allows some current to flow through it, completing a circuit. The transistor acts as a switch. The resistor Rp is used to protect the transistor from any possible short circuit of the electrodes. The resistor Rb is used to keep the base at the ground when the circuit is open, i.e. there is no finger.

When both the electrodes are touched, small current flows through the finger and the transistor switches ON, as a result the load becomes active.

A simple resistive touch sensitive circuit is shown below.

It consists of two electrodes, two transistors connected in Darlington configuration, a resistor and an LED. When a finger is placed on the electrodes, the circuit is complete and current amplification takes place. The resistor is used to restrict the amount of the current to the LED.

There are three types of resistive touch sensors: 4 &#; wire, 5 &#; wire and 8 &#; wire.

4 &#; Wire resistive touch sensor is most cost effective. 5 &#; Wire resistive touch sensors are most durable. They are similar to 4 &#; wire sensors except that all the electrodes in this type are on the bottom layer. The top layer in 5 &#; wire sensors act as a voltage measuring probe. Because of this type of construction, 5 &#; wire resistive touch sensors allow higher number of actuations.

In 8 &#; wire resistive touch sensors, each edge of the sensor provides a sensing line. These sensing lines act as a stable voltage gradient for the touch controller. The actual baseline voltage levels at the touch area are reported by these sensing lines to the controller. They are the most accurate type of resistive touch sensors.

Any object like a finger, stylus, pen, gloved finger, etc. are used to apply pressure on resistive touch sensors, they are mostly used in harsh environments. But the response time of resistive touch sensors is less than capacitive touch sensors. Hence, the capacitive touch sensors are slowly replacing them.

BACK TO TOP

PREVIOUS &#; IR SENSOR

Are you interested in learning more about 12-inch touch sensor producer? Contact us today to secure an expert consultation!

16

0

Comments

Please Join Us to post.

0/2000

All Comments ( 0 )

Guest Posts

If you are interested in sending in a Guest Blogger Submission,welcome to write for us!

Your Name: (required)

Your Email: (required)

Subject:

Your Message: (required)