Let's start with one of the most commonly used sensors – the accelerometer. As its name implies, it measures the acceleration that the handset is experiencing relative to freefall. Move it in any direction and data from this sensor will spike, but leave it still and it will go flat. The same sensor is also used to determine a device's orientation along its three axes. Apps use this data to tell if a phone is in portrait or landscape orientation, if its screen is facing up- or downward.
gyroscope is a sensor that can provide orientation information as well, but with greater precision. Thanks to this particular sensor, Android's Photo Sphere camera feature can tell how much a phone has been rotated and in which direction. It is also used by Google's Sky Map for telling what constellation you're pointing a phone at.
Another sensor that most (if not all) smartphones now have is the magnetometer. Yup, it is able to detect magnetic fields. The magnetometer is one of the sensors that compass applications use to point at the planet's north pole. Apps made to detect metal use this sensor as well.
Next up we have the proximity sensor, which is comprised of an infrared LED and an IR light detector. It is placed near the earpiece of a phone, and for a good reason – when you place the handset up to your ear, the sensor lets the system know that you're most probably in a call and that the screen has to be turned off. The sensor works by shining a beam of invisible to humans infrared light which is reflected from a nearby object and picked up by the IR detector.
light sensor is what measures how bright the ambient light is. The phone's software uses this data to adjust the display's brightness automatically – when ambient light is plentiful, the screen's brightness is pumped up, and when it is dark, the display is dimmed down. An interesting fact is that high-end Samsung Galaxy phones use an advanced light sensor that can measure white, red, green, and blue light independently. And that's not overkill. In fact, the Adapt Display feature uses this data to fine tune image representation.
Higher-end phones have a built-in barometer – a sensor that can measure atmospheric pressure. Data measured by it is used to determine how high the device is above sea level, which in turn results in improved GPS accuracy. On a related note, the Motorola XOOM and the Samsung Galaxy Nexus were among the first Android devices to feature this sensor.
Some folks might remember that the Samsung Galaxy S4 bragged with a thermometer for measuring ambient temperature. However, there's a thermometer in pretty much any smartphone, and some handsets might have more than one of them. The difference is that they're used to monitor the temperature inside the device and its battery. If a component is detected to be overheating, the system shuts itself down to prevent damage. And speaking of the Galaxy S4, it pioneered the use of an air humidity sensor in a smartphone. Data provided by it was used in the S Health application to tell whether or not the user was in their "Comfort Zone" – one with optimal air temperature and humidity.
While we're at the health and fitness topic, the pedometer is a sensor used for counting the number of steps that the user has taken. Such data is usually obtained by the device's accelerometer, but a dedicated pedometer is a lot more accurate and power efficient. The Google Nexus 5 is among the few phones that have a true pedometer built into them.
heart rate monitor on the Galaxy S5. As you can tell, it is made to measure one's pulse, and it does that by detecting the minute pulsations of the blood vessels inside one's finger.
We must also mention the fingerprint sensors built into a number of smartphones, including the iPhone 5s, the Samsung Galaxy S5, and the HTC One Max. Of these, the 5s has the sensor most convenient to use as it does not require swiping in order to read fingerprint data. Fingerprint scanners are most often used as an extra layer of security – as a substitute for a lock screen password.
A sensor that you wouldn't expect to find on a smartphone is one capable of detecting harmful radiation. Yet there's a phone that sports one – the Sharp Pantone 5. Released only in Japan, it features a dedicated button which launches an app used to measure the current radiation level in the area.
Adding the microphone and the cameras to the list gives us a figure of at least 14 different sensors that are (or have been) used in a smartphone. That's quite a lot of data that a smartphone can pick up, use, and provide. And with smartphones getting more and more awesome by the year, the list is surely to keep on growing. Think there's a sensor that we've missed? Let us know down in the comments!