Welcome to this interesting series of sensors. Today, I will explain Proximity sensor.
🍁What is a Proximity sensor?
Proximity sensors detect the presence or movement of objects without requiring physical contact and transmit the information through an electrical signal.
🍁Types of Proximity Sensor
- Inductive Proximity Sensor
- Capacitive Proximity Sensor
- Ultrasonic Proximity Sensor
- IR Proximity Sensor
🍁What's the working funda of Proximity sensor?
Proximity sensor works by turning data about an object's existence or mobility into an electrical signal at its most basic level. When anything enters its range, it emits an ON signal.
As listed below, there are numerous important differences in how different proximity sensors work:
🔗An Inductive Proximity Sensor's Working Principle
Inductive sensors detect eddy currents, which are produced by external magnetic fields on a conductive surface and induce magnetic loss. The detecting coil generates an alternating current magnetic field, which is utilised to monitor impedance changes caused by generated eddy currents.
🔗A Capacitive Proximity Sensor's Working Principle
Capacitive proximity sensors detect changes in capacitance between the sensor and an object. Factors like distance and object size influence the amount of capacitance. The sensor simply detects any capacity variations between the two.
🔗IR Proximity Sensor's Working Principle
Working Principle of an Infrared Proximity Sensor Infrared lights are Electromagnetic radiations with longer wavelengths that cannot be seen by human sight. We offer IR emitting and receiving LEDs in IR Sensors. When the angle of light and sensor meet at a great distance, the output is HIGH (+5v). If there is an obstruction, the angle narrows and the receiving LED is unable to detect the IR wave. As a result, it will provide a LOW signal (0v).
🍁Pin Description of Proximity Sensor
- Vcc -> Connect
Vcc
of proximity sensor to5V
of Arduino - Out -> Connect
Out
of proximity sensor toAnalog pin
of Arduino - Gnd -> Connect
Gnd
of proximity sensor toGnd
of Arduino
🍁Interfacing Of Proximity sensor with Arduino
🍁Source Code
int Pin = 0; // This is our input pin (LED at pin 0)
int sensorOut = HIGH; // HIGH at No Obstacle
void setup() {
pinMode(LED, OUTPUT);
pinMode(Pin, INPUT);
Serial.begin(9600);
}
void loop() {
sensorOut = digitalRead(Pin);
if (sensorOut == LOW)
{
Serial.println("What is this Obstacle?");
digitalWrite(LED, HIGH);
}
else
{
Serial.println("No Obstacle");
digitalWrite(LED, LOW);
}
delay(200);
}
🍁Applications of Proximity Sensor
In smartphones, proximity sensors detect whether or not a user is holding their phone close to their face.
On consumer electronics products, capacitive proximity sensors are utilised as touch switches.
On robots, it is used to detect collisions.
Proximity sensors may be found on both the front and back bumpers of an automobile. They aid in avoiding accidents with obstacles and objects while the automobile is moving ahead.
Stay tuned to this series to gain knowledge of next sensor.. [Temperature sensor].