You are on page 1of 3

Proximity sensor :

A proximity sensor is very much useful in Smartphone. It detects how close the screen of the phone is to your body. This allows the phone to sense when you have brought the phone up to your ear. At that point, the display turns off in order to save battery. It also stops detecting touches, as to avoid unwanted input, until you take the phone away from your ear. Proximity Sensor can turn off the screen to avoid accidental touch of the screen by ear. Besides it is useful for detecting towers and sources of interference. So that one can amplify or filter them out using beam forming techniques or others. In the case of iPhone, the proximity sensor shuts off the screen and touch-sensitive circuitry when the iPhone is brought close to the face, both to save battery and prevent unintentional touches. So in a word, The proximity sensor in Smartphone senses how close the phone is to the users cheek/face, so that it can pause whatever activity it is in the middle of (playing music or browsing the web, for example) so the user can take a phone call. When the phone is removed from the ear after the call, the phone resumes its previous activity

The proximity sensor is common on most smart-phones, the ones that have a touchscreen. This is because the primary function of a proximity sensor is to disable accidental touch events. The most common scenario being- The ear coming in contact with the screen and generating touch events, while on a call. To solve the "I didn't take that stupid picture, my ear did" issue, device manufacturers came up with the idea of a placing a proximity sensor close to the speaker, which will then detect any object in the vicinity of the speaker.

If any object is present (ex. user's ear), then the touch events can be assumed to be accidental & ignored. Now there are various technologies for proximity sensing: Electrical (Inductive, Capacitive) Optical. (IR, Laser) Magnetic. Sonar. Of all these, the most non-intrusive and low-cost modules are the optical proximity sensors. These can detect bodies in the vicinity of the device upto 5cm. This is perfect for use on smart-phones.

Coming to Sensors on Android-Gingerbread the proximity sensor is often implemented using a light sensor chip. Common ones are ISL29003/23 & GP2A by Intersil & Sharp respectively. Both these sensor-chips are primarily active light sensors, which provide the ambient light intensity in LUX units. The distance value is measured in centimeters. Note that some proximity sensors only support a binary "close" or "far" measurement. In this case, the sensor should report its maxRange value in the "far" state and a value less than maxRange in the "near" state.

Let us take an example. Say the device uses a GP2A chip placed close to the speaker facing the user (as shown in the adjoining pic). The normal light response of the GP2A is such that it triggers a proximity-detect interrupt at a distance of approximately 5cms in normal lighting. This means that when the user receives a call and brings the phone closer to his ear, the ambient-light around the light/proximity-sensor slowly drops down below the threshold & the sensor detects this and switches the state

from FAR to NEAR. This event can be detected by any android application which has registered a SensorEventListener.

In most Android phones, the proximity sensor is implemented as a booleansensor. Its returns just two values "NEAR" & "FAR". Thresholdingis done on the LUX value i.e. the LUX value of the light sensor is compared with a threshold. A LUX-value more than threshold means the proximity sensor returns "FAR". Anything less than the threshold value and the sensor returns "NEAR". The actual value of threshold is custom-defined depending on the sensor-chip in use and its light-response, coupled with the location & orientation of the chip on the smart-phone body. The proximity sensor is implemented very much like the other sensors except on one critical point Proximity sensor is interrupt-based (not Poll-based). All the other sensors are polled for at regular intervals, selected by the DELAY parameter used while registering a SensorEventListener. Proximity Sensor is interrupt based (NOT polling). This means that we get a proximity event only when the proximity changes (either NEAR to FAR or FAR to NEAR).