Types of Sensors
Types of Sensors
● It should not modify the measured phenomenon during the measurement process
● Passive or Active. Passive sensors do not require an external power source to monitor an
environment, while Active sensors require such a source in order to work.
● Another classification is based on the method used to detect and measure the property
(mechanical, chemical, etc.).
● Analog and Digital. Analog sensors produce an analog, or continuous, signal while
digital sensors produce a discrete signal.
Types of sensors:-
● Temperature Sensor
● Proximity Sensor
● Accelerometer
● IR Sensor (Infrared Sensor)
● Pressure Sensor
● Light Sensor
● Ultrasonic Sensor
● Smoke, Gas and Alcohol Sensor
● Touch Sensor
● Color Sensor
● Humidity Sensor
● Tilt Sensor
● Flow and Level Sensor
1. Temperature sensors:-
A temperature sensor is a device, typically, a thermocouple or RTD, that provides for
temperature measurement through an electrical signal. A thermocouple (T/C) is made
from two dissimilar metals that generate electrical voltage in direct proportion to changes
in temperature. An RTD (Resistance Temperature Detector) is a variable resistor that will
change its electrical resistance in direct proportion to changes in temperature in a precise,
repeatable and nearly linear manner.
2) Proximity sensor:-
A proximity sensor is an electronic sensor that can detect the presence of objects within its
vicinity without any actual physical contact. In order to sense objects, the proximity sensor
radiates or emits a beam of electromagnetic radiation, usually in the form of infrared light, and
senses the reflection in order to determine the object's proximity or distance from the sensor.
Proximity sensors are commonly used in industrial applications, from manufacturing and food
production to recycling. They are also used in vehicles for detecting the proximity of other
vehicles relative to one's own car, as well as for parking-assist functions. In mobile devices,
especially phones, the proximity sensor is used to detect whether the user's face is close to the
phone during a phone call, prompting the screen to turn off to prevent false touches on the
touchscreen.
There are many types of proximity sensors and they use different methods for sensing. For
example, capacitive and photoelectric sensors are more suited to plastic and organic targets,
whereas inductive proximity sensors can only detect metal targets.
3) Accelerometer:-
At rest, an accelerometer measures 1g: the earth’s gravitational pull, which registers 9.81 meters
per second or 32.185 feet per second. Accelerometers that use the piezoelectric effect measure a
small voltage change. Others measure capactitance between two components.
Code:-
// defines variables
long duration;
int distance;
int safetyDistance;
void setup() {
pinMode(buzzer, OUTPUT);
pinMode(ledPin, OUTPUT);
void loop() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
distance= duration*0.034/2;
safetyDistance = distance;
digitalWrite(buzzer, HIGH);
digitalWrite(ledPin, HIGH);
else{
digitalWrite(buzzer, LOW);
digitalWrite(ledPin, LOW);
Serial.print("Distance: ");
Serial.println(distance);