Sensors in Android
What is a sensor -
A sensor is a device which detects and measures changes in its environment.
Sensors measure various environmental parameters such as light, motion, temperature, pressure, humidity, magnetic field.
Available sensors on Android -
- Fingerprint Scanner
- Iris scanner
- Accelerometer
- Gyroscope sensor
- Magnetic sensor
- Gravity sensor
- Rotation sensor
- Proximity sensor
- Hall effect sensor
- Light sensor
- Temperature sensor
- Pressure sensor
- Humidity sensor
- Step detector
You can test most of these sensors in this app if they are available on device.
- Fingerprint sensor -
A fingerprint sensor is an electronic device which captures pattern of fingerprint, It usually matches captured pattern with pre-stored pattern for authentication.
There are many technologies used for fingerprint sensor including optical, capacitive, ultrasonic. but optical and capacitive types are most commonly used.
Capacitive type -
Capacitance sensors use principles associated with capacitance in order to form fingerprint images. In this method of imaging, the sensor array pixels each act as one plate of a parallel-plate capacitor, the dermal layer (which is electrically conductive) acts as the other plate, and the non-conductive epidermal layer acts as a dielectric. It is most commonly used in modern smartphones as it is fast and compact.
Optical type -
Optical fingerprint imaging involves capturing a digital image of the print using visible light. This type of sensor is, in essence, a specialised type of digital camera. The top layer of the sensor, where the finger is placed, is known as the touch surface. Beneath this layer is a light-emitting phosphor layer which illuminates the surface of the finger. The light reflected from the finger passes through the phosphor layer to an array of solid state pixels (a charge-coupled device) which captures a visual image of the fingerprint
- Iris Scanner -
Iris recognition is an automated method of biometric identification that uses mathematical pattern-recognition techniques on video images of one or both of the irises of an individual's eyes, whose complex patterns are unique, stable, and can be seen from some distance.Currently only High end smartphones have Iris scanners.
- SpO2 Sensor -
Pulse oximetry is a noninvasive method for monitoring a person's oxygen saturation (SO2). The blood oxygen saturation or SpO2 level shows the amount of oxygen in the blood. SpO₂ is an estimate of arterial oxygen saturation, which refers to the amount of oxygenated hemoglobin in the blood.
Reading your SpO₂ level works the same as reading your heart rate.
- Heart rate sensor -
SpO2 and Heart rate sensors are same sensor. Heart rate sensor measures heart rate in beats per minute using an optical LED light and a light sensor. The light goes through skin and sensor measures amount of light reflects back which changes according to blood pluses under skin. The change in light reflection are interpreted as heartbeats.
- Accelerometer -
Accelerometer is an electromechanical device which measures acceleration i.e. change in velocity. Android devices have 3-axis accelerometer which detects acceleration in X, Y, Z axis. Z axis is perpendicular to the Earth surface so in ideal condition when we keep device flat on surface, Z axis will give value 9.7 m/s2 , which is acceleration due to gravity.
It is used to detect device screen orientation and for steps counter.
- Gyroscope sensor
- Magnetic sensor
- Gravity sensor
The gravity sensor measures the acceleration effect of Earth's gravity on the device enclosing the sensor. It is typically derived from the accelerometer, where other sensors (e.g. the magnetometer and the gyroscope) help to remove linear acceleration from the data. The Gravity unit are in m/s² like the accelerometer, and they are measured along the X,Y, and Z axes.
- Rotation sensor
It is software based sensor which usages values from Accelerometer and Magnetometer to calculate values of the pitch, roll and yaw(azimuth) angles of smartphone relative to normal horizon.
- Proximity sensor
It is an electronic device which detects presence of object in its region. there are many types proximity sensors available but most smartphones use optical type. It emits beam of infrared light and sense the reflection in order to determine the objects proximity distance from the sensor. It is most commonly used to avoid accidental screen touches while on call.
- Hall effect sensor
- Light sensor
It is a photodetector which converts light photons in to current. In Android it measures ambient light falling on device to adjust screen brightness accordingly.
- Temperatur sensor
It is a Thermistor which changes its electric resistance with respect to temperature. It measures ambient air temperature. There are many temperature sensors present in android to monitor CPU and Battery temperature in order to protect device from overheat but they are part of SOC system and their value is not meant to read by user. Only ambient temperature is available in Android API to use.
- Pressure sensor
- Step detector
It is software based sensor which detects steps while walking or running. IT usages variation pattern in accelerometer to detects steps.