Sensor debugging (d...

  • 2022-09-24 18:08:59

Sensor debugging (driver) STK3311-X Shenzhen Guanghua Micro Technology Co., Ltd.

stk3311 is a three-in-one sensor, ambient light sensor, infrared light sensor, infrared light-emitting diode, infrared light sensor (photodiode), infrared light-emitting diode (IrLED) to complete the distance detection function.

a) Because the distance sensor includes infrared light sensor and infrared light-emitting diode, there will be two power supply pins to supply power to it respectively. These two power supplies can use the same power supply or different power supplies. When using the same power supply , because the current requirements of the two parts of the circuit are different, and the current of the infrared light-emitting diode may be large and periodically change, which will cause certain fluctuations in the power supply, so it is necessary to connect RC filter in series with VDD to reduce the light-emitting diode's effect on infrared light. Effects of light sensors. There is no such problem when using two-way power supply. Therefore, AE will reply that it is not a big problem to use the same power supply for two channels (filtering can solve the potential risk).

b) The infrared light emitted by the light-emitting diode is reflected back to the infrared light sensor by the human body, and the sensor will determine that the human body is approaching when the received amount exceeds a certain threshold.

During the debugging process, the light sensor is available, but the proximity function is not working. After checking for a long time, it is found that writing the value to the chip register 00H (status register) does not take effect. After writing, the cat value is always the default value of 0. At this point, the reason for the malfunction has been found. Put the previous chip (the same model, different series, the same register address, the same default value, the only difference is that the ID of the chip is different) into this project, do cross-validation, the new sensor can be used in the old project, I doubt this project The power supply is not disconnected. However, the possibility of hardware revision is not large, and software is required to avoid it. After countless debugging methods, it was found that when the test APP was opened, the only power supply 2.85V had a drop, and the infrared LED signal of the sensor could not be seen with the infrared camera, and the sensor could not work normally at this time. The problem can be locked in the power supply of the sensor. The power supply for the sensor in this project is ALDO1 on the PMU. Continue to dig deep into the chip manuals of the PMU and the sensor. It is found that the current limit of ALDO1 is only 20mA, and the sensor infrared LED drive current defaults to 100mA, which is now modified. The value of the chip register 03H, after changing the infrared LED drive current to 12.5mA, manually modifying the value of 00H can take effect, open the test APP, and the proximity sensor functions normally.

Summarize the cause of the problem: The hardware design only provides one ALDO1 power supply to power the sensor. The chip manual recommends using two independent power supplies, and the current limit of ALDO1 is only 20mA, while the default drive current of the sensor infrared light is 100mA, resulting in an external drive current. insufficient. The previous project used two independent power supplies (VSYS and DLAO1), and the current limit of DLAO1 was 300mA. The pit is too deep! ! !

———————————————

Copyright statement: This article is an original article by CSDN blogger "mjxiha" and follows the CC 4.0 BY-SA copyright agreement. Please attach the original source link and this statement for reprinting.

Original link: https://blog.csdn.net/bmj_rookies/java/article/details/90902595