Touch sensor and PH sensor
We human beings had five sensor organs to interact with our surroundings. Machine also needs some sensing elements to observe surroundings for which a sensor is invented.
Touch sensors are electronic sensors that can detect touch ,these sensors are used in touch mobile screens, touch laptops, finger authentications.
working principle of touch sensor:
Touch sensors work similar to switch, when a pressure force is applied sensor get activated and it acts like a closed switch. When the pressure is removed it acts like a open switch. Based on their function there are two types of touch sensors Capacitive sensor and Resistive sensor.
capacitive sensors work by measuring capacitance they are seen in portable devices ,it contains two parallel conductors with an insulator between them it will carry a capacitance of C0.When these conductor plates come in contact with our fingers, our fingers acts as conductive objects there will be increase in capacitance. When circuit detects a change in capacitance it generates a signal. These sensors are used in phones, ipods, automative.
.Resistive touch sensor:
The resistive touch sensors calculate the pressure applied on surface. These sensors contain two conductive films coated with indium tin oxide. It works only when suuficient pressure is applied used in musical instruments,keypads.
#define tsPin 2 // touch sensor pin
int ledPin = 3; // led pin
Serial.begin(9600); //sensor buart rate
pinMode(ledPin, OUTPUT); // led
pinMode(tsPin, INPUT); // touch sensor
int tsValue = digitalRead(tsPin);
if (tsValue == HIGH)
digitalWrite(ledPin, HIGH); // led on
digitalWrite(ledPin,LOW); // led off
Touch sensor has 3 pins:
It has three pins vcc, gnd, signal pin.
- GND pin needs to be connected to GND(0 V)
- VCC pin needs to be connected to VCC (5v or 3.3v)
- SIGNAL pin is an output pin.LOW when it is not touched,HIGH when it is touched.This pin is need to coonect to be connected to Arduino’s input pin.
PH sensor is used to measure acidity and alkalinity in water and other solutions.
modern PH sensors PHE-45P,WQ201