Developer Functions of Mobile Phones
Developer Functions of Mobile Phones
The magnetometer is a digital compass that works and can be used like an analog compass. The magnetometer uses the earth’s magnetic field to determine north direction. A mini version of a so-called fluxgate magnetometer is built into the smartphone.
This consists of thin metal alloy plates to which a voltage is applied. The conduction path of the electrodes varies depending on the position of the smartphone in relation to the electromagnetic field of the earth. This is determined electrically and read out by the operating system. Often, however, the digital compass is not only used to determine the direction of the compass. For more precision, the data from the barometer for height measurement and the acceleration sensor to determine the spatial position are also used.
A barometer in the smartphone – why is that? This sensor turns the cell phone into a mobile weather station and gives the GPS module a head start. A ten micrometer thin silicon membrane in which stretch marks are embedded measures the air pressure. The size of the sensor is just two millimeters wide and two and a half millimeters long. The barometer is also installed as a support for the acceleration sensor and can therefore also be helpful for the accuracy of the GPS system. By combining the measured values from the sensors mentioned, a very precise location and position positioning can be carried out.
Ambient light sensor
The aim of the ambient light sensor is to measure the ambient light and to transfer this measured value to the system. The sensor consists of a photodiode with a color filter. The color temperature of light sources is measured. The screen brightness, contrast and color saturation are adjusted based on the measurement results.
The proximity sensor is used to check whether something is approaching the smartphone display. An infrared beam is used, which has a range of up to six centimeters. The sensor is i. d. Usually above the display next to the camera or earpiece. It is only half a millimeter thin and measures two by two millimeters in length and width.
The proximity sensor is used to switch off the display during an active telephone call. If the smartphone is brought to the ear, the sensor registers the reflection of the infrared rays through the cheek and the software switches off the display.
This prevents the user from accidentally triggering an action by inadvertently touching the touchscreen during the call. The touchscreen is reactivated when the smartphone is removed from the ear.
The acceleration sensor measures the acceleration of the device. In the smartphone it has the task of recognizing the current position of the device and its changes. When turning the smartphone, the direction from which gravity acts on the device changes.
This change is measured by a so-called accelerometer, which is only three by three millimeters in size. A silicon rod, just a few micrometers wide, acts as a spring. The acceleration sensor detects the movement on three axes: The X-axis (left / right), the Y-axis (up / down) and the Z-axis (front / back).
When the device moves, the position relative to a fixed electrode changes. The software then calculates the strength of the acceleration from the changing electrical capacitance. In this way it can be determined when a change in movement occurs. A typical application is rotating the smartphone and then aligning the screen.
Heart rate monitor
LEDs are used to measure the pulse. The change in color is measured by a photodiode when the blood flows slower or faster through the veins. The information is passed on to the system and the pulse rate is calculated from this value.
Although modern smartphones already contain a large number of sensors, the measurement options can be expanded using external sensors. Some examples:
- Gas meter for detecting carbon monoxide, alcohol and other toxic gases
- Temperature sensor or non-contact infrared temperature sensor
- Sensor for measuring the pressure
- Sensor for measuring brightness and color intensity
- Sensor for measuring radioactive radiation
- a proximity switch with which cables or bars can be found in the wall
- Sensors for measuring electrical quantities, for example voltage; so the smartphone can be used as a simple replacement for a voltmeter
- Special sensors for measuring medical parameters
Such sensors can be purchased as external devices and linked to the smartphone. Data transfer works wirelessly, usually via Bluetooth. Coupling the smartphone with a smartwatch is also an extension of the sensors.
Sensor simulation during development and testing
Sensors usually process current input data from outside. Emulators (Android) and simulators (iOS) are very often used during the development and testing of an app. Apps that actively evaluate data from sensors must, if possible, be triggered with real-time data. This can only be measured on real physical devices. However, some measured values can be simulated.