The proximity sensor is one of those small but critical components in Xiaomi smartphones that users only remember when it stops working. This miniature sensor is responsible for automatically turning off the screen during a phone conversation, preventing accidental tapping of the cheek or ear, but its role goes beyond basic functionality: it depends on the energy efficiency of the device, the quality of voice calls and even the operation of some applications.
In this article, we will understand how the proximity sensor in Xiaomi smartphones (including Redmi models) works, POCO And you'll learn how to test the sensor yourself, adjust its sensitivity, and fix the typical problems, from software glitches to hardware breakdowns. Particular attention will be paid to the differences between infrared and capacitive sensors, as well as the nuances of their operation in devices with a high-performance system. AMOLED-screen.
The device and principle of operation of the proximity sensor
The proximity sensor in Xiaomi smartphones is a compact electronic module that detects the presence of an object (like your head) near the top of the device. Most models use an infrared (IR) sensor consisting of two key elements:
- π¦ Emitter β LED emitting infrared rays (invisible to the human eye).
- ποΈ Receiver - photodiode that captures the infrared signal reflected from the object.
When you hold the phone to your ear, the infrared beam bounces off the surface of your head and returns to the receiver. The microcontroller analyzes the strength of the reflected signal and, if it exceeds a predetermined threshold, sends a command to turn off the screen and touch layer, which takes a split second and operates completely autonomously without loading the main processor.
Some budget models (e.g. Redmi 9A or POCO C31) can use a capacitive sensor that responds to changes in the electrostatic fieldnear surface of the screen, which is cheaper to produce, but less accurate and often gives false positives when moisture is ingested or protective glasses are used.
Where is the proximity sensor in Xiaomi
In most Xiaomi smartphones, the proximity sensor is integrated into the top of the display, next to the front camera and speaker.
- π± In notch devices (e.g. Xiaomi Mi 11, Redmi Note 10 Pro) the sensor is on the left or right of the camera.
- π₯οΈ In the hole-screen models (POCO F4, Xiaomi 12T) β sensor hidden under the display in the upper central part.
- π In smartphones with a full-screen design (Xiaomi Mix 4) β the sensor can be combined with a subscreen camera.
To accurately determine the location of the sensor on your model, use the test mode:
- Open the Phone app and enter the code ##6484## (for some models, #4636###).
- Select the Hardware Testing option β Proximity Sensor.
- Close the sensor with your hand β the value of 0 (object detected) or 1 (no obstacles) should appear on the screen.
π‘
If the test code doesnβt work, try installing the Phone INFO app β Samsungβ (although itβs called Xiaomi) from Google Play, which has a Sensors section with detailed sensor information.
Why you need a proximity sensor: key functions
The main purpose of the proximity sensor is to prevent accidental taps during a conversation, but its role in the smartphone ecosystem is much broader:
| Function | How it works. | Examples of use |
|---|---|---|
| Screen shutdown | The screen goes out when approaching the ear, saving battery power. | Calls, voice messages on WhatsApp. |
| Sensor locking | Turns off touches to avoid pressing buttons with the cheek. | Voice chat games, video calls. |
| Optimization of sound | Activates the "talk speaker" mode for better audibility. | Calls in noisy places (streets, transport). |
| Accessories work | Recognizes magnetic lock cases or wireless charging. | Automatic on/off when opening the cover. |
Xiaomiβs MIUI 13+ smartphones also use the proximity sensor for the Settings β Display β Ambient display β Lift to wake function. When you bring your hand to the top of the screen, the system recognizes the gesture and turns on the display without pressing the buttons.
Some apps, like Google Assistant or Xiaomi AI Voice, also rely on the proximity sensor to activate voice control, for example, if you hold your phone to your ear and say, "OK, Google," the assistant will turn on even with the screen locked.
Typical malfunctions of the proximity sensor and their causes
If the proximity sensor has stopped working, this may occur as follows:
- π΅ The screen does not go out during the call (remains active, leading to occasional taps).
- π The screen spontaneously turns on/off in a pocket or bag.
- π§ The βRise to Awakenβ function does not work.
- π The sound from the speaker switches to the spoken for no reason.
The causes of problems can be divided into software and hardware:
| Type of malfunction | Possible causes | How to eliminate |
|---|---|---|
| Programmatic | Misfired MIUI after the update, conflicts with applications (e.g. launchers), incorrect sensitivity settings. | Resetting, flashing, sensor calibration. |
| Hardware. | Sensor contamination or damage (dust, moisture) detachment of sensor plume after falling, failure of infrared emitter. | Cleaning, replacing the sensor or plume in the service center. |
What to do if the sensor is triggered in your pocket?
How to check the proximity sensor on Xiaomi
Before you bring your phone to the service, do the diagnostics yourself. Here is a step-by-step instruction:
Enable Engineer Mode (#6484##)
Select Proximity Sensor from the test menu
Close the sensor with your hand β the value should change from 5 to 0
Check the screen response during the call simulation (type ##4636## β Usage statistics β Phone information β Run ping test)
-->
If the test code does not work, use third-party utilities:
- CPU-Z (Sensors section) β shows the status of all sensors in real time.
- Sensor Test is a specialized application for checking sensors.
- MIUI Hidden Settings β reveals additional MIUI settings, including sensor calibration.
Pay attention to the sensor values:
- π’ 0 - object detected (sensor closed).
- π΄ 5 - no obstacles (sensor open).
- β οΈ -1 or null β the sensor is faulty or disabled.
π‘
If the sensor shows a value of 0 even when nothing closes the sensor, this indicates sticking (typical for devices after moisture hits).
How to Calibrate the Approximation Sensor on Xiaomi
If the sensor is unstable (for example, the screen goes out with a delay or fires too early), it can be recalibrated.
- Install the Proximity Sensor Reset app from Google Play.
- Run it and press Calibrate.
- Follow the instructions on the screen: first close the sensor with your hand, then remove it.
- Reboot your smartphone.
For manual calibration through the engineering menu:
- Enter the code ##36446337## (for some models, #4636###).
- Go to Hardware Testing β Sensor β Proximity Sensor.
- Press Calibration and perform the procedure.
If the calibration didnβt help, try resetting MIUI settings:
- Open Settings β About Phone β Backup & Reset
- Select Erase all data (factory reset).
- After reset, check the sensor before recovering data from the backup (sometimes old settings conflict).
fastboot devices
fastboot erase persistAttention!
What to do if the proximity sensor is not working
If the diagnosis showed that the sensor is defective, act on the algorithm:
β οΈ Warning: Don't try to disassemble your smartphone yourself unless you have experience with microelectronics.The proximity sensor at Xiaomi is often soldered to the motherboard, and replacing it requires a soldering station and an accurate tool.
- π§ Software methods: Update MIUI Up to the latest version (Settings) β About phone β Remove recently installed applications (especially launchers and optimizers). Reset via Fastboot (fastboot erase persist command).
- π οΈ Hardware methods: Clean the top of the screen from dust and dirt (use a soft brush or compressed air). Check the integrity of the sensor plume (disassembly required). Replace the sensor at an authorized service center (cost from 800 to 2500 rubles depending on the model).
If the sensor is physically damaged, but you do not want to spend money on repairs, you can turn it off programmatically:
- Install the Button Mapper app.
- Create a rule: when an incoming call, the screen goes out after 2 seconds (simulate the operation of the sensor).
- Use a headset with a microphone to avoid accidental taps.
For models with AMOLED-There is an alternative way to use the Always-on Display feature in the Notifications Only mode (for example, Xiaomi 13 Ultra), which will reduce the risk of accidental touches, but will not replace the full operation of the sensor.