A distance-based automatic lighting brightness adjustment method and mobile terminal thereof
By automatically adjusting the brightness of the flashlight using a distance sensor in a mobile terminal, the problem of not being able to automatically adjust the brightness of the lighting in the prior art is solved, and the effect of saving power and extending the service life is achieved.
Patent Information
- Application Number
- CN202310434366.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-21
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2043-04-21
AI Technical Summary
Existing mobile terminals cannot automatically adjust the lighting brightness of the flashlight, resulting in long-term high-brightness lighting that heats up the phone, affects the service life and increases unnecessary power consumption.
By introducing a distance sensor into the mobile terminal, when the flashlight function is activated, the processor reads the data of the distance sensor, determines whether the distance exceeds the set working range, and automatically adjusts the brightness of the lighting.
It realizes that the flashlight brightness can be automatically adjusted according to the distance between the user and the mobile terminal without human operation, saving electricity, extending service life, and improving safety.
Smart Images

Figure CN116760925B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of terminal technology, and in particular to a distance-based lighting brightness automatic adjustment method and a mobile terminal thereof. Background Art
[0002] Mobile terminals are easy to carry and have many internal functions, which greatly facilitates users in their daily work and life. Taking mobile phones as an example, users often use the flashlight function of mobile phones for lighting. The flashlight function is a relatively common basic function in existing mobile phones. The hardware uses the LED driver chip to power the LED light, and the software controls the working mode of the LED light according to the user's application operation (different application modes are different), such as lighting, flashing, warning lights, etc.
[0003] Due to the characteristics of high-power LED lights, in actual use, long-term or high-brightness lighting of the flashlight will cause the phone to heat up, accelerate the aging of internal components, and affect the service life of the phone. Some poor-quality mobile phones may also cause users to be burned when illuminated for a long time. In addition, some flashlights can be manually operated to adjust the brightness, which requires manual operation and cannot be adjusted automatically, which increases the unnecessary power consumption of the phone to a certain extent and is not conducive to the long-term battery life of the phone.
[0004] Therefore, the prior art still needs to be improved and developed. Summary of the invention
[0005] In view of the above-mentioned deficiencies in the prior art, an object of the present invention is to provide a distance-based automatic lighting brightness adjustment method and a mobile terminal thereof, so as to solve the problem that the existing mobile terminal cannot automatically adjust the lighting brightness.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] A distance-based automatic lighting brightness adjustment method comprises the following steps:
[0008] When the flashlight function is activated, the processor reads the current data of the distance sensor;
[0009] When it is determined that the current data exceeds the set working range, the brightness of the lighting lamp is adjusted to be brighter or darker accordingly.
[0010] In the distance-based lighting brightness automatic adjustment method, before the step of the processor reading the current data of the distance sensor when the flashlight function is started, the method further includes:
[0011] When the flashlight function is detected, the distance sensor is initialized.
[0012] In the distance-based lighting brightness automatic adjustment method, when it is determined that the current data exceeds the set working range, the step of correspondingly brightening or dimming the brightness of the lighting lamp includes:
[0013] Determine whether the current data of the distance sensor is greater than or equal to the first threshold and less than or equal to the second threshold, if yes, output the reference current to light up the lighting lamp; otherwise, execute the next step;
[0014] Determine whether the current data of the distance sensor is less than the first threshold value, if yes, increase the reference current to brighten the lighting lamp; otherwise, execute the next step;
[0015] It is determined whether the current data of the distance sensor is greater than the second threshold value, and if so, the reference current is reduced to dim the lighting lamp.
[0016] In the distance-based automatic lighting brightness adjustment method, the step of increasing the reference current to brighten the lighting lamp comprises:
[0017] The reference current is added to the set step current to obtain the value of the supply current, and the output supply current becomes larger to brighten the lighting lamp.
[0018] In the distance-based automatic lighting brightness adjustment method, the step of reducing the reference current and then dimming the lighting lamp comprises:
[0019] Under the condition that the current data of the distance sensor is greater than the second threshold, the reference current is subtracted from the set step current value to obtain the power supply current; the calculation formula is: Io=Ii-Ir, Io is the power supply current, Ii is the reference current, and Ir is the step current.
[0020] In the distance-based lighting brightness automatic adjustment method, after the step of outputting a reference current to light up the lighting lamp, the method further includes:
[0021] When it is determined that the collected temperature value is greater than or equal to the high temperature alarm threshold, a high temperature alarm prompt is given on the display screen of the mobile terminal.
[0022] A mobile terminal for implementing the distance-based automatic lighting brightness adjustment method, comprising a distance sensor, a processor, a driving module and a lighting lamp;
[0023] When the flashlight function is activated, the processor is used to read the current data of the distance sensor. When it is determined that the current data exceeds the set working range, the control driving module is used to adjust the brightness of the lighting lamp accordingly.
[0024] The mobile terminal also includes a temperature detection module for detecting the temperature of the lighting lamp and outputting the corresponding temperature value; when the processor determines that the collected temperature value is greater than or equal to the high temperature alarm threshold, a high temperature alarm prompt is displayed on the display screen of the mobile terminal.
[0025] Compared with the prior art, the distance-based automatic adjustment method for lighting brightness and the mobile terminal provided by the present invention include the following steps: when the flashlight function is activated, the processor reads the current data of the distance sensor; when it is determined that the current data exceeds the set working range, the brightness of the lighting lamp is adjusted accordingly to be brighter or darker. The brightness of the flashlight can be automatically adjusted according to the distance between the obstruction and the mobile terminal, without manual operation, and can also save unnecessary power consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A flowchart of the steps of the distance-based lighting brightness automatic adjustment method provided by the present invention;
[0027] Figure 2 This is a functional block diagram of the mobile terminal provided by the present invention. DETAILED DESCRIPTION
[0028] The present invention provides a distance-based lighting brightness automatic adjustment method and a mobile terminal thereof, which can automatically adjust the brightness of a flashlight according to the distance between a user and the mobile terminal, without manual operation, and can also save unnecessary power consumption. In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0029] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any module and all combinations of one or more associated listed items.
[0030] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.
[0031] See also Figure 1 , which is a flow chart of the distance-based lighting brightness automatic adjustment method provided by the present invention. Figure 1 As shown, the lighting brightness automatic adjustment method comprises the following steps:
[0032] S10, when the flashlight function is activated, the processor reads the current data of the distance sensor;
[0033] S20: When it is determined that the current data exceeds the set working range, the brightness of the lighting lamp is adjusted to be brighter or darker accordingly.
[0034] The distance-based automatic illumination brightness adjustment method is applicable to mobile terminals with flashlight functions and current-adjustable LED driver ICs (chips), such as mobile phones, smart watches, etc. A brightness self-adjustment function (specifically, the corresponding program code, which can be written into the processor) is added to the existing flashlight function of the mobile terminal.
[0035] Based on the fact that mobile terminals are usually used by users, in step S10, the obstruction is usually the user, such as the user's face or various parts of the body; in specific implementation, the obstruction may also be other objects, such as walls, tables, etc., which are not limited here. The distance between the front of the mobile terminal and the user is detected by adding a distance sensor, which uses the principle of infrared light reflection: the infrared diode inside the distance sensor emits infrared light outward, and the infrared light reflected back by the obstruction will be absorbed by its photodiode. The data obtained can reflect the distance between the obstruction and the mobile terminal. The processor reads its data to determine whether the set threshold condition is currently reached, and then performs corresponding operations.
[0036] In actual use, the display screen of the mobile terminal is usually facing the user, and the lighting is set on the back of the mobile terminal. In order to prevent the handheld mobile terminal from affecting the reception and transmission of infrared light, the distance sensor is preferably set on the top of the front of the mobile terminal, such as near the front camera. The front of the mobile terminal faces the user's face or body, or faces other obstructions. The distance sensor can detect the corresponding data. The closer the distance, the larger the data value, thereby reflecting the distance between the mobile terminal and the obstruction.
[0037] Each time the mobile terminal is turned on, before step S10, the distance sensor is initialized for calibration. When the flashlight function of the mobile terminal is detected to be activated, the processor reads the current data of the distance sensor to determine which brightness level threshold condition is currently met, thereby adjusting the flashlight brightness.
[0038] In this embodiment, step S20 specifically includes:
[0039] Step 21, determine whether the current data is greater than or equal to the first threshold and less than or equal to the second threshold, if yes, output the reference current to light the lamp; otherwise, execute step 22.
[0040] This step is a normal lighting state, and the working range is when the flashlight function is used normally, that is, the distance between the mobile terminal and the user satisfies the condition that the distance is greater than or equal to the first threshold and less than or equal to the second threshold; at this time, the brightness of the lighting lamp lit according to the reference current is the normal brightness of the flashlight function. The reference current is provided by the driving module 30, and the driving module 30 can be composed of an LED driving chip and its peripheral circuits when it is implemented.
[0041] Step 22, determining whether the current data of the distance sensor is less than the first threshold value, if yes, increasing the reference current to brighten the lighting lamp; otherwise, executing step 23.
[0042] This step is the super-bright lighting state. If it is less than the first threshold, it means that the distance between the mobile terminal and the user is far. For example, if the user stretches out his hand to shine into the distance, the brightness of the lighting lamp needs to be increased. Only in super-bright lighting can a sufficiently bright lighting effect be provided for the distant scene to ensure that the user's vision remains clear.
[0043] When the reference current is increased, a fixed step current is set to be superimposed on the reference current to obtain the final power supply current to light the lamp. Specifically, the duty cycle of the PWM signal of the LED driver chip is adjusted to adjust the size of the final output power supply current. The calculation formula is: Io=Ii+Ir, Io represents the output power supply current after adjustment, Ii represents the reference current, and Ir represents the step current.
[0044] Preferably, more brightness levels can be set in this step, for example, a brighter level with a brightness lower than that of super bright lighting is added, and the software can add different thresholds, such as the third threshold, and the corresponding Ir value, such as Ir2. According to the threshold condition reached by the current data of the distance sensor, the corresponding step current value is selected to increase, so that the brightness can be automatically adjusted to more levels with the distance under super bright lighting.
[0045] Preferably, the power supply current can also be dynamically increased or decreased according to the current data of the distance sensor, and the step current is adjusted according to the difference between the first threshold value and the data value, and the reference current and the adjusted step current are added to obtain the power supply current. That is, when the data is less than the first threshold value, the quotient of the difference between the first threshold value and the data divided by the step value is a few, and a few step currents are added on the basis of the current power supply current, and the calculation formula is: Io = Ii + n × Ir, n represents the quotient. The step value represents the size of the distance change and the degree of brightness adjustment. For every change of the distance between the mobile terminal and the user by 1 step value, the brightness is adjusted once. It should be understood that the definition of the threshold and data is not in centimeters, but a specific value, such as 1000, 3000, etc., and the specific setting is related to the background noise value of the distance sensor. For example, the first threshold value is 2000, the step value is 300, the first current data is 1600, (2000-1600) ÷ 300 = 1.3, the quotient is 1.3, then Io = Ii + 1.3 × Ir. The second time the current data is 1100, (2000-1100) ÷ 300 = 3, the quotient is 3, then Io = Ii + 3 × Ir. The third time the current data is 1900, (2000-1900) ÷ 300 = 0.3, the quotient is 0.3, then Io = Ii + 0.3 × Ir. The increase and decrease of the quotient corresponds to the increase and decrease of the control power supply current, so that the brightness can be automatically adjusted dynamically according to the distance in the ultra-bright lighting state.
[0046] Step 23: determine whether the current data of the distance sensor is greater than the second threshold value, and if so, reduce the reference current to dim the lighting lamp.
[0047] The above step 21 is used to determine whether the current data of the distance sensor is greater than or equal to the first threshold and less than or equal to the second threshold. Step 22 is used to determine whether the distance value is less than the first threshold. In the case of both determinations being no, the distance value can only be greater than the second threshold, that is, step 23 is the energy-saving lighting state, indicating that the distance between the mobile terminal and the user is relatively close. At this time, the brightness can be appropriately reduced to save power consumption.
[0048] Preferably, the brightness of this solution can be adjusted to three gears: high brightness, constant brightness, and low brightness. When the processor determines that the current distance sensor data is greater than the second threshold, the reference current is subtracted from the set step current value to obtain the power supply current; the calculation formula is: Io = Ii-Ir.
[0049] In this step 23, more brightness levels can also be set, for example, a darker level with a brightness lower than low-brightness lighting is added, and the software can add different thresholds, such as the fourth threshold, and the corresponding Ir value, such as Ir3. According to the threshold condition reached by the current distance sensor data, the corresponding step current value is selected to reduce, so that the brightness can be automatically adjusted to more levels with the distance under the energy-saving lighting state.
[0050] Preferably, in this step 23, the power supply current can also be dynamically increased or decreased according to the current data of the distance sensor, the step current is adjusted according to the difference between the data and the second threshold, and the reference current is subtracted from the adjusted step current to obtain the power supply current, and the calculation formula is: Io=Ii-m×Ir, m is the quotient of the difference between the data and the second threshold divided by the step value. That is, when the data is greater than the second threshold, the quotient of the difference between the second threshold and the data divided by the step value is a few, and the step current is reduced on the basis of the current power supply current. For example, the second threshold is 1500, the step value is 300, the first current data is 1700, (1700-1500)÷300=0.67, the quotient is 0.67 (rounded), then Io=Ii-0.67×Ir. The second current data is 2100, (2100-1500)÷300=2, the quotient is 2, then Io=Ii-2×Ir. The third time, the current data is 1800, (1800-1500)÷300=1, the quotient is 1, then Io=Ii-1×Ir. The increase and decrease of the quotient corresponds to the increase and decrease of the control power supply current, so that the brightness is automatically adjusted dynamically according to the distance in the energy-saving lighting state.
[0051] It should be understood that when ultra-bright lighting is used, heating may easily occur due to the large power supply current. A temperature detection module, such as an NTC thermistor or a temperature sensor, may be added to the circuit board near the lighting lamp for the system to detect the temperature. A high temperature alarm threshold is set in the processor. When the processor determines that the temperature value calculated based on the resistance value of the NTC thermistor, or the temperature value collected by the temperature sensor is greater than or equal to the high temperature alarm threshold, a high temperature alarm prompt may be displayed on the display screen of the mobile terminal to remind the user to turn off the flashlight or adjust the use distance to reduce the brightness, so as to avoid long-term high brightness causing heat and burns to the user, and to avoid high temperature accelerating the aging of other components on the circuit board, thereby extending the service life of the mobile terminal.
[0052] Please also read Figure 2In addition to disclosing the above-mentioned distance-based lighting brightness automatic adjustment method, this embodiment also discloses a mobile terminal, which includes a distance sensor 10, a processor 20, a driving module 30 and a lighting lamp 40; when the flashlight function is started, the processor 20 is used to read the current data of the distance sensor 10, and when it is determined that the current data exceeds the set working range, the driving module 30 is controlled to make corresponding brightening or dimming adjustments to the brightness of the lighting lamp.
[0053] Preferably, the mobile terminal further comprises a temperature detection module 50, which is arranged near the lighting lamp and is used to detect the temperature of the lighting lamp and output a corresponding temperature value. When the processor determines that the collected temperature value is greater than or equal to the high temperature alarm threshold, a high temperature alarm prompt is issued on the display screen of the mobile terminal.
[0054] In summary, the distance-based automatic lighting brightness adjustment method and mobile terminal provided by the present invention can automatically adjust the lighting brightness when using the flashlight function by adjusting the distance between the mobile terminal and the user. While ensuring the existing normal lighting, ultra-bright lighting and energy-saving lighting are added. It can also detect when the mobile terminal is heated up due to long-term lighting and issue an alarm prompt. It can save electricity and prevent burns at the same time, thereby improving the safety of use, preventing overheating and burning of components, and increasing the service life of the mobile terminal.
[0055] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A distance-based automatic lighting brightness adjustment method, applied to mobile terminals, It is characterized in that The method comprises the following steps: when the lighting function is started, the processor reads the current data of the distance sensor; When it is determined that the current data exceeds the set working range, the brightness of the lighting lamp is adjusted accordingly to be brighter or darker; When it is determined that the current data exceeds the set working range, the step of correspondingly brightening or dimming the brightness of the lighting lamp comprises: Determine whether the current data of the distance sensor is greater than or equal to the first threshold and less than or equal to the second threshold, if yes, output the reference current to light up the lighting lamp; otherwise, execute the next step; Determine whether the current data of the distance sensor is less than the first threshold value, if yes, then increase the reference current to brighten the lighting lamp; specifically include: dynamically increase or decrease the power supply current according to the current data of the distance sensor, the calculation formula is: Io=Ii+n×Ir, n represents the quotient of the difference between the first threshold value and the data divided by the step value, Io represents the power supply current output after adjustment, Ii represents the reference current, and Ir represents the step current; the threshold value and the data are specific values, which are related to the background noise value of the distance sensor; the increase and decrease of the quotient correspond to the increase and decrease of the control power supply current, and the dynamic brightness adjustment is automatically performed as the distance is far or near; otherwise, execute the next step; the step value represents the size of the distance change and the degree of brightness adjustment; Determine whether the current data of the distance sensor is greater than the second threshold, and if so, reduce the reference current to dim the lighting lamp; The distance sensor is arranged on the top of the front of the mobile terminal, and detects the distance between the front of the mobile terminal and the user. The lighting lamp is arranged on the back of the mobile terminal.
2. The method for automatically adjusting lighting brightness based on distance according to claim 1, It is characterized in that When the lighting function is started, before the processor reads the current data of the distance sensor, the method further includes: When the detection lighting function is activated, the distance sensor is initialized.
3. The method for automatically adjusting lighting brightness based on distance according to claim 1, It is characterized in that The step of reducing the reference current and dimming the lighting lamp comprises: 25 Under the condition that the current data of the distance sensor is greater than the second threshold value, the reference current is subtracted from the set step current value to obtain the power supply current; the calculation formula is: Io=Ii-Ir, Io is the power supply current, Ii is the reference current, and Ir is the step current.
4. The method for automatically adjusting lighting brightness based on distance according to claim 1, It is characterized in that After the step of outputting a reference current to light the lamp, the method further includes: When it is determined that the collected temperature value is greater than or equal to the high temperature alarm threshold, a high temperature alarm prompt is given on the display screen of the mobile terminal.
5. A mobile terminal for implementing the distance-based automatic lighting brightness adjustment method of claim 1, It is characterized in that Including distance sensor, processor, drive module and lighting; When the lighting function is started, the processor is used to read the current data of the distance sensor, and when it is determined that the current data exceeds the set working range, the control driving module performs corresponding brightening or dimming adjustment on the brightness of the lighting lamp.
6. The mobile terminal according to claim 5, It is characterized in that It also includes a temperature detection module for detecting the temperature of the lighting lamp and outputting the corresponding temperature value; when the processor determines that the collected temperature value is greater than or equal to the high temperature alarm threshold, a high temperature alarm prompt is issued on the display screen of the mobile terminal.
Citation Information
Patent Citations
Electric torch, focusing method of electric torch and device
CN109827099A
Brightness-adjustable digital flashlight
CN203340357U