What is a mobile proximity sensor?

Function Introduction:
The proximity sensor mainly uses the element to detect the physical change of the object,and converts the change into the distance to measure the distance and displacement from the sensor to the object.
Working Principle:
The proximity sensor works by transmitting a very short light pulse (infrared), and measuring the time of the light pulse from emission to reflection by the object,and calculating the distance from the object by measuring the time.
However, the proximity sensor in the mobile phone has only two states,indicating that there is no object occlusion at the top of the screen,and it is impossible to measure the distance from the object to the mobile phone.
Application Introduction:
At present,proximity sensors are mainly widely used in mobile phones.
Take Mi 3 as an example: during the call,when the face blocks the proximity sensor (Mi Logo and the middle part of the receiver), the screen will turn black, which can effectively prevent mis-operation and save electricity.When the face leaves the screen, the mobile phone screen will be lit up automatically.
 
Note:
1. All Mi phones, REDMI phones are equipped with proximity sensors,Mi tablet does not have proximity sensors.
2. When the screen does not blacken during call,please check whether the "proximity sensor is enabled"in the call setting,and enter the hardware detection (* # * # 64663) to see if the proximity sensor is normal,if the proximity sensor is blocked by the film of the mobile phone,it may also lead to the failure of the proximity sensor.
3. Because the proximity sensor emits infrared light,some people can see the proximity sensor emit weak red light,which is a normal phenomenon.