A gun sighting device OLED low-power consumption brightness partition control method
Patent Information
- Application Number
- CN202611120912.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]针对枪瞄设备中电压控制型OLED图标显示模块、目标有效驱动电压、预设直供阈值、升压电路、控制器供电节点和PWM驱动信号的联合处理,现有技术仍存在供电模式判定、升压启停、控制器供电路径切换和PWM加载时序之间衔接不足的共性短板
(1)针对现有方案中亮度档位、PWM占空比和电池供电域之间对应关系不清的问题,通过亮度设定值到目标有效驱动电压的映射以及目标有效驱动电压与预设直供阈值的比较,使OLED亮度控制过程形成与低亮直供模式和高亮升压模式相对应的供电模式控制结果。
Smart Images

Figure CN123016914A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of power management for rifle aiming devices and OLED display driving control technology, and particularly to a method for low-power brightness zone control of OLED in rifle aiming devices. Background Technology
[0002] In the field of power management and OLED display driving control technology for rifle aiming equipment, the aiming display unit in rifle aiming equipment typically consists of a battery-powered unit, a controller, a display driver, and an OLED icon display module. The controller outputs PWM drive signals based on the brightness level or button input to drive the OLED icon display module to display the corresponding brightness. For battery-powered display devices, existing solutions also include boost circuits, brightness adjustment circuits, or sleep control circuits to handle power supply control in high-brightness, low-brightness, and standby modes, respectively. While such solutions can complete brightness level adjustment and display on / off control in conventional display scenarios, they are prone to limitations in scenarios where rifle aiming equipment is powered by a single battery and the OLED icon display module uses voltage control. These limitations include mismatch between the effective target driving voltage and the battery power supply domain, discontinuous connection between the boost circuit's start / stop and the controller's power supply path, and asynchronous loading timing of the PWM drive signal with the power supply state.
[0003] Existing solutions often rely on fixed PWM duty cycles, fixed brightness levels, normally open boost circuits, or single power supply paths. When the brightness setpoint crosses the voltage boundary corresponding to the battery's direct power supply capability, there is a lack of stable connection between brightness level determination, boost circuit status, controller power supply node status, and PWM drive signals, easily causing a disconnect between power supply mode determination and drive output. When switching between high and low brightness display, if the boost output status does not correspond to the PWM drive signal loading process, the switching states between the controller power supply node, boost output path, and battery power supply path cannot be directly invoked by subsequent PWM drive processes.
[0004] For the joint processing of voltage-controlled OLED icon display modules, target effective driving voltage, preset direct supply threshold, boost circuit, controller power supply node, and PWM drive signal in rifle aiming devices, existing technologies still suffer from common shortcomings: insufficient coordination between power supply mode determination, boost start / stop, controller power supply path switching, and PWM loading timing. Therefore, it is necessary to address the issue of PWM loading timing matching based on target effective driving voltage partitioning, through boost start / stop and controller power supply node switching, in rifle aiming device OLED brightness zoning control scenarios, under single-cell battery power supply. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a method for low-power brightness zone control of an OLED in a gun aiming device, comprising: S100: Receive the brightness setting value of the voltage-controlled OLED icon display module in the gun aiming device, and generate target effective driving voltage and brightness control status data according to the brightness-voltage mapping relationship; S200: Based on the brightness control status data, compare the target effective driving voltage with the preset direct supply threshold, determine the low brightness direct supply mode or the high brightness boost mode, and generate the power supply mode control result. S300. Based on the power supply mode control results, in the low brightness direct power supply mode, the boost circuit is turned off and power is supplied to the controller power supply node through the battery power supply path. In the high brightness boost mode, the boost circuit is enabled and power is supplied to the controller power supply node through the boost output path after the boost output meets the preset stability conditions. The battery power supply path and the boost output path are respectively connected to the controller power supply node through unidirectional conductive elements to generate power supply execution status data. S400: Generate a PWM duty cycle based on the power supply execution status data and the target effective drive voltage; when switching from low brightness direct supply mode to high brightness boost mode, load the PWM drive signal after the preset stability condition is met; when switching from high brightness boost mode to low brightness direct supply mode, update the PWM drive signal first and then shut down the boost circuit.
[0006] Furthermore, the brightness-voltage mapping relationship includes a lookup table mapping relationship, a piecewise linear mapping relationship, or a calibration mapping relationship between the brightness level and the target effective driving voltage; the voltage range of the target effective driving voltage is 2.2V to 4.8V.
[0007] Furthermore, the preset direct supply threshold is generated based on the battery voltage, the voltage drop of the unidirectional conducting element, and the safety margin; when the target effective driving voltage is between 2.2V and 3V, the low brightness direct supply mode is generated; when the target effective driving voltage is between 3V and 4.8V, the high brightness boost mode is generated.
[0008] Furthermore, in the low-brightness direct supply mode, the controller outputs a boost shutdown signal to the boost enable terminal and supplies power to the controller power supply node through the battery power supply path; the controller generates the low-brightness zone PWM duty cycle according to the ratio of the target effective drive voltage to the battery power supply domain voltage, and outputs the low-brightness zone PWM drive signal.
[0009] Furthermore, in the high-brightness boost mode, the controller outputs a boost enable signal to the boost enable terminal, and the boost circuit outputs a preset high-brightness power supply voltage of 4.8V. After the boost output meets the preset stability condition, the controller supplies power to the controller power supply node through the boost output path, and generates the high-brightness zone PWM duty cycle according to the ratio of the target effective drive voltage to the boost power supply domain voltage.
[0010] Furthermore, the battery power supply path includes a first unidirectional conducting element connected between the battery terminal and the controller power supply node; the boost output path includes a second unidirectional conducting element connected between the boost output terminal and the controller power supply node; the controller power supply node is powered by the boost output path when the boost circuit is enabled, and is powered by the battery power supply path when the boost circuit is disabled.
[0011] Furthermore, the preset stability conditions include a fixed delay condition, a boost feedback terminal voltage condition, or a controller ADC sampling voltage condition; when the preset stability conditions are not met, the controller maintains the unloaded state of the PWM drive signal in the high-brightness area.
[0012] Furthermore, in response to a standby event, the controller saves the brightness context, turns off the OLED drive output, turns off the boost circuit, and enters sleep mode; in response to a wake-up event, the controller resumes operation through the battery power supply path and restores the low-brightness direct supply mode or the high-brightness boost mode according to the brightness context; the brightness context includes brightness level, target effective drive voltage, pattern channel status, and power supply mode identifier.
[0013] Furthermore, the voltage-controlled OLED icon display module includes multiple OLED pattern channels; the controller selects one or more OLED pattern channels to output the PWM drive signal according to the pattern channel status; the multiple OLED pattern channels share the power supply mode control result.
[0014] Furthermore, anomaly handling is performed based on the power supply execution status data; the anomaly handling includes: stopping the loading of the high-brightness PWM drive signal and reverting the power supply mode control result to the low-brightness direct supply mode when the boost output fails to meet the preset stability condition within a preset time; and maintaining the current power supply mode identifier when the target effective drive voltage is within the boundary hysteresis range of the preset direct supply threshold.
[0015] The key innovations of this invention include: (1) The brightness setting value of the voltage-controlled OLED icon display module in the gun aiming device is first converted into the target effective driving voltage according to the brightness-voltage mapping relationship, and then the target effective driving voltage is compared with the preset direct supply threshold to form the power supply mode control result corresponding to the low brightness direct supply mode or the high brightness boost mode.
[0016] (2) Link the power supply mode control result with the boost circuit, battery power supply path, boost output path and controller power supply node; in low brightness direct supply mode, turn off the boost circuit and supply power to the controller power supply node through the battery power supply path; in high brightness boost mode, enable the boost circuit and supply power to the controller power supply node through the boost output path after the boost output meets the preset stability conditions; and the battery power supply path and the boost output path are respectively connected to the controller power supply node through unidirectional conduction elements to form power supply execution status data.
[0017] (3) The power supply execution status data is used as the control basis for PWM duty cycle generation and PWM drive signal loading; when switching from low brightness direct supply mode to high brightness boost mode, the PWM drive signal is loaded according to the state of satisfying the preset stability conditions; when switching from high brightness boost mode to low brightness direct supply mode, the PWM drive signal is updated first and then the boost circuit is turned off, so that the PWM drive signal and the power supply mode switching sequence form a corresponding relationship.
[0018] The following are its main beneficial effects: (1) To address the problem of unclear correspondence between brightness level, PWM duty cycle and battery power supply domain in the existing scheme, the OLED brightness control process forms a power supply mode control result corresponding to the low brightness direct supply mode and the high brightness boost mode by mapping the brightness set value to the target effective driving voltage and comparing the target effective driving voltage with the preset direct supply threshold.
[0019] (2) To address the problem of discontinuous connection between the start / stop of the boost circuit and the power supply path of the controller in the existing scheme, the battery power supply path and the boost output path are connected to the power supply node of the controller through a unidirectional conduction element, and the low brightness direct supply mode, high brightness boost mode and boost stable state are written into the power supply execution status data, so that the status of the controller power supply node and the power supply mode control result are continuously correlated.
[0020] (3) To address the problem that the timing of PWM drive signal loading is not synchronized with the power supply status in the existing scheme, the power supply execution status data is used for PWM duty cycle generation and cross-mode switching timing control, so that the PWM loading when switching from low brightness to high brightness corresponds to the boost stable state, and the PWM update when switching from high brightness to low brightness corresponds to the boost shutdown sequence. Attached Figure Description
[0021] Figure 1 A flowchart illustrating a method for controlling the low power consumption brightness zones of an OLED in a gun aiming device, as provided in an embodiment of this application; Figure 2 This is a structural block diagram of a method for controlling the low power consumption brightness zoning of an OLED in a gun aiming device, provided in an embodiment of this application. Detailed Implementation
[0022] Example 1: Refer to Figure 1 This is a flowchart illustrating a method for controlling the low power consumption brightness zones of an OLED in a gun aiming device, provided by an embodiment of the present invention. The process may include at least steps S100-S400: S100: Receive the brightness setting value of the voltage-controlled OLED icon display module in the gun aiming device, and generate target effective driving voltage and brightness control status data according to the brightness-voltage mapping relationship; S200: Based on the brightness control status data, compare the target effective driving voltage with the preset direct supply threshold, determine the low brightness direct supply mode or the high brightness boost mode, and generate the power supply mode control result. S300. Based on the power supply mode control results, in the low brightness direct power supply mode, the boost circuit is turned off and power is supplied to the controller power supply node through the battery power supply path. In the high brightness boost mode, the boost circuit is enabled and power is supplied to the controller power supply node through the boost output path after the boost output meets the preset stability conditions. The battery power supply path and the boost output path are respectively connected to the controller power supply node through unidirectional conductive elements to generate power supply execution status data. S400: Generate a PWM duty cycle based on the power supply execution status data and the target effective drive voltage; when switching from low brightness direct supply mode to high brightness boost mode, load the PWM drive signal after the preset stability condition is met; when switching from high brightness boost mode to low brightness direct supply mode, update the PWM drive signal first and then shut down the boost circuit.
[0023] S100: Receives the brightness setting value of the voltage-controlled OLED icon display module in the gun aiming device, and generates target effective driving voltage and brightness control status data according to the brightness-voltage mapping relationship.
[0024] In this embodiment, S100 is executed by the controller within the gun sight device. The controller may be a low-power MCU, which has a brightness setting input, a PWM output, a boost enable, a sleep control function, and an external interrupt wake-up function. The voltage-controlled OLED icon display module is connected to the PWM output of the controller. The voltage-controlled OLED icon display module includes one or more OLED pattern channels; each OLED pattern channel is an independent drive channel for displaying the aiming point, aiming circle, crosshairs, or a combination of patterns. The brightness setting value comes from the button input of the gun sight device, the brightness level register, the factory default brightness configuration, or the brightness context read by the controller after wake-up; after the brightness setting value enters the controller, it is written into the current brightness register by the controller's internal brightness level management program.
[0025] In this step, the brightness setting value represents the brightness level or brightness grade that the OLED icon display module currently needs to load; the brightness-voltage mapping relationship represents the correspondence between the brightness level and the target effective driving voltage. The target effective driving voltage represents the equivalent driving voltage that the controller needs to form on the OLED pattern channel when driving the OLED icon display module with PWM. The brightness control status data is used to carry the target effective driving voltage formed in this step and records the brightness level, pattern channel status, and current power supply mode identifier corresponding to the target effective driving voltage; the current power supply mode identifier is the low-brightness direct supply mode, high-brightness boost mode, or sleep recovery state recorded by the controller in the previous control cycle.
[0026] Specifically, after receiving the brightness setting value, the controller first reads the current pattern channel status; the pattern channel status includes the selected OLED pattern channel number, the OLED pattern channel on / off status, and the current PWM output status. The controller binds the brightness setting value with the pattern channel status to form a brightness input record; when the brightness setting value comes from button input, the controller writes the brightness increase or decrease result generated by the button trigger into the brightness level field; when the brightness setting value comes from wake-up recovery, the controller writes the brightness level in the brightness context into the brightness level field; when the brightness setting value comes from the factory default configuration, the controller writes the default brightness level into the brightness level field.
[0027] In one embodiment, the brightness-voltage mapping relationship is a lookup table mapping relationship, with a brightness level table pre-stored in the controller. Each brightness level table entry includes a brightness level field, a target effective drive voltage field, a pattern channel enable field, and a PWM calculation index field. The controller uses the brightness setpoint to retrieve the brightness level table and reads the target effective drive voltage field that matches the brightness setpoint, using it as the target effective drive voltage for the current control cycle. In another embodiment, the brightness-voltage mapping relationship is a piecewise linear mapping relationship. The controller calls the corresponding linear calculation coefficient according to the brightness segment in which the brightness setpoint belongs, converting the brightness setpoint into a target effective drive voltage. In yet another embodiment, the brightness-voltage mapping relationship is a calibration mapping relationship. The controller reads the calibration voltage field from the factory calibration table and uses the calibration voltage field as the target effective drive voltage for the corresponding brightness level.
[0028] In one embodiment, the target effective driving voltage ranges from 2.2V to 4.8V; where 2.2V to 3V corresponds to low-brightness display conditions, and 3V to 4.8V corresponds to high-brightness display conditions. This voltage range is the brightness control range of the OLED icon display module. When performing mapping, the controller does not directly convert the brightness setpoint into a PWM duty cycle, but first generates the target effective driving voltage, and then compares the target effective driving voltage with a preset direct supply threshold in subsequent steps. Understandably, in different batches of OLED icon display modules, the mapping table between brightness levels and target effective driving voltages can be written into the controller's non-volatile memory area according to the factory calibration results. The controller loads the mapping table into the operating register area when powered on or woken up.
[0029] The triggering conditions for this step include a change in the brightness setting value, the gun sight being woken up from sleep mode, a switch in the OLED pattern channel state, the controller completing initialization, and the brightness context being restored. Upon receiving these triggering conditions, the controller first reads the brightness setting value and the pattern channel state, then reads the current power supply mode identifier. If the current power supply mode identifier is missing, the controller sets it to low-brightness direct supply mode. If the brightness setting value exceeds the range of the brightness level table, the controller limits the brightness setting value to the lowest or highest level in the brightness level table and generates a brightness input correction flag. If the pattern channel state is not written, the controller maintains the pattern channel state from the previous control cycle.
[0030] During the project implementation, the gun aiming device is powered by a single 3V button battery. The user adjusts the brightness level to level 7 using the brightness button. After receiving the button trigger, the controller reads the OLED pattern channel status, such as the currently selected dot-and-circle pattern channel. The controller binds the level 7 brightness setting value with the dot-and-circle pattern channel status and retrieves the target effective driving voltage corresponding to level 7 from the brightness level table, such as 3.8V. The controller writes 3.8V into the target effective driving voltage field, writes the dot-and-circle pattern channel status into the pattern channel status field, and writes the power supply mode identifier of the previous control cycle into the current power supply mode identifier field, forming brightness control status data.
[0031] When the brightness setting value is obtained from wake-up recovery, the controller reads the brightness context after being woken up by an external interrupt. The brightness context includes the brightness level before sleep, the target effective drive voltage, the pattern channel status, and the power supply mode identifier. The controller preferentially uses the brightness level in the brightness context to re-execute the brightness-voltage mapping. When the target effective drive voltage in the brightness context is inconsistent with the target effective drive voltage in the current brightness level table, the controller updates the brightness control status data with the target effective drive voltage in the current brightness level table and writes the context difference into the status record area.
[0032] This step ultimately generates brightness control status data. The brightness control status data includes a brightness setpoint field, a target effective driving voltage field, a pattern channel status field, a current power supply mode identifier field, and a brightness input correction flag field. This brightness control status data is transmitted to S200; wherein, the target effective driving voltage field serves as the input for comparison with a preset direct supply threshold in S200, the current power supply mode identifier field serves as the input for identifying the mode switching direction in S200, and the pattern channel status field is retained in S400 for selecting the OLED pattern channel for PWM drive signal output.
[0033] S200. Based on the brightness control status data, compare the target effective driving voltage with the preset direct supply threshold, determine the low brightness direct supply mode or the high brightness boost mode, and generate the power supply mode control result.
[0034] S200 is executed by the power supply mode determination program in the controller. This step receives the brightness control status data generated in S100 and reads the preset direct supply threshold; the preset direct supply threshold is stored in the controller's configuration register or non-volatile memory. The preset direct supply threshold represents the effective driving voltage boundary that can be used for the OLED icon display module by the battery power supply path and the controller's PWM output when the boost circuit is not enabled. The controller compares the target effective driving voltage field in the brightness control status data with the preset direct supply threshold and generates the power supply mode control result according to the comparison result.
[0035] The low-brightness direct supply mode represents the operating mode when the target effective drive voltage is not higher than the preset direct supply threshold. In this mode, the boost circuit is off, and the controller supplies power to the controller power supply node via the battery power supply path. The controller then generates the low-brightness PWM duty cycle based on the battery power supply domain voltage. The high-brightness boost mode represents the operating mode when the target effective drive voltage is higher than the preset direct supply threshold. In this mode, the controller needs to enable the boost circuit in subsequent steps and generate the high-brightness PWM duty cycle based on the boost power supply domain voltage after the boost output meets the preset stability condition. The power supply mode control result is the data object output in this step, which includes the target power supply mode field, mode switching direction field, target effective drive voltage field, preset direct supply threshold field, and current power supply mode identifier field.
[0036] In one implementation, the preset direct supply threshold is generated based on the battery voltage, the voltage drop of the unidirectional conductive element, and a safety margin. The controller reads the sampled battery voltage value, subtracts the voltage drop of the unidirectional conductive element in the battery power supply path, and then subtracts the safety margin to obtain the dynamic direct supply threshold. The controller writes this dynamic direct supply threshold into the preset direct supply threshold field and compares it with the target effective driving voltage. In another implementation, the preset direct supply threshold is configured as a fixed threshold around 3V. When the target effective driving voltage of the OLED icon display module is between 2.2V and 3V, the controller generates a low-brightness direct supply mode; when the target effective driving voltage is between 3V and 4.8V, the controller generates a high-brightness boost mode.
[0037] Specifically, the controller first reads the target effective drive voltage from the brightness control status data; then it reads the preset direct supply threshold from the configuration register; and then performs a comparison operation. When the target effective drive voltage is not higher than the preset direct supply threshold, the controller writes the target power supply mode field as low brightness direct supply mode; when the target effective drive voltage is higher than the preset direct supply threshold, the controller writes the target power supply mode field as high brightness boost mode. The controller then reads the current power supply mode identifier and compares it with the target power supply mode field; if they are the same, the mode switching direction field is written as "keep current mode"; if the current power supply mode identifier is low brightness direct supply mode and the target power supply mode field is high brightness boost mode, the mode switching direction field is written as "low brightness to high brightness"; if the current power supply mode identifier is high brightness boost mode and the target power supply mode field is low brightness direct supply mode, the mode switching direction field is written as "high brightness to low brightness".
[0038] In one implementation, the controller sets a boundary hysteresis range near a preset direct supply threshold. This boundary hysteresis range handles situations where the target effective drive voltage is near the direct supply threshold during continuous voltage adjustments or slight battery voltage fluctuations. When the target effective drive voltage is within the boundary hysteresis range of the preset direct supply threshold, the controller reads the current power supply mode identifier and maintains the target power supply mode field as the power supply mode corresponding to the current power supply mode identifier. If the current power supply mode identifier is missing, the controller writes the target power supply mode field as a low-brightness direct supply mode and writes the boundary hysteresis handling flag into the power supply mode control result. This processing prevents subsequent steps S300 from repeatedly executing boost enable and boost disable actions near the mode boundary.
[0039] The trigger condition for this step is that S100 outputs brightness control status data, or the controller detects an update in any of the following fields: target effective driving voltage, preset direct supply threshold, or current power supply mode identifier. If the target effective driving voltage field is missing in the brightness control status data output by S100, the controller calls the target effective driving voltage corresponding to the default low brightness level and writes it into the field, and generates a field completion mark; if the preset direct supply threshold is not configured, the controller uses the default direct supply threshold corresponding to the battery power supply domain voltage; if the target effective driving voltage is lower than the minimum driving voltage of the OLED icon display module, the controller corrects it to the value corresponding to the minimum driving voltage and outputs the correction mark along with the power supply mode control result.
[0040] During the engineering implementation, the controller receives the brightness control status data generated by S100, in which the target effective driving voltage is 2.6V and the current power supply mode is identified as high brightness boost mode; the controller reads the preset direct supply threshold as 3V, compares 2.6V with 3V and generates low brightness direct supply mode; the controller further compares the current power supply mode identifier and the target power supply mode field to obtain the mode switching direction as high brightness to low brightness; the controller writes this mode switching direction into the power supply mode control result, so that S300 retains the controller power supply node state in subsequent processing and then executes the PWM update process before boost shutdown.
[0041] In another engineering implementation, the target effective driving voltage generated by S100 is 3.8V, and the current power supply mode is identified as low brightness direct supply mode; the controller reads the preset direct supply threshold as 3V, compares 3.8V with 3V and generates high brightness boost mode; the controller writes the mode switching direction as low brightness to high brightness; after the power supply mode control result enters S300, the controller enables the boost circuit according to this field and waits for the boost output to meet the preset stability conditions.
[0042] This step ultimately generates the power supply mode control result. The power supply mode control result includes a target power supply mode field, a mode switching direction field, a target effective drive voltage field, a preset direct supply threshold field, a boundary hysteresis handling flag, and a current power supply mode identifier field. The power supply mode control result is passed to S300; wherein, the target power supply mode field determines whether the boost circuit is off or enabled, the mode switching direction field determines the order of subsequent PWM loading or PWM updating, and the target effective drive voltage field is retained in S400 for generating the PWM duty cycle.
[0043] S300. Based on the power supply mode control results, in the low brightness direct supply mode, the boost circuit is turned off and power is supplied to the controller power supply node through the battery power supply path. In the high brightness boost mode, the boost circuit is enabled and power is supplied to the controller power supply node through the boost output path after the boost output meets the preset stability conditions. The battery power supply path and the boost output path are respectively connected to the controller power supply node through unidirectional conduction elements to generate power supply execution status data.
[0044] S300 is jointly executed by a controller, a boost circuit, a battery power supply path, a boost output path, a unidirectional conduction element, and a controller power supply node. The controller receives the power supply mode control result generated in S200 and controls the boost enable terminal based on the target power supply mode field and mode switching direction field. The boost circuit is connected between the battery terminal and the boost output terminal; the boost enable terminal is connected to the controller's output terminal; the controller outputs a boost enable signal or a boost disable signal through the boost enable terminal. The battery power supply path is connected between the battery terminal and the controller power supply node, and the boost output path is connected between the boost output terminal and the controller power supply node; both are connected to the controller power supply node via unidirectional conduction elements.
[0045] In one embodiment, the battery power supply path includes a first unidirectional conducting element connected between the battery terminal and the controller power supply node, and the boost output path includes a second unidirectional conducting element connected between the boost output terminal and the controller power supply node. The first and second unidirectional conducting elements can be diodes or Schottky diodes; both have their conduction direction pointing towards the controller power supply node. The battery power supply path supplies power to the controller power supply node when the boost circuit is off; the boost output path supplies power to the controller power supply node when the boost circuit is enabled and the boost output voltage is higher than the battery power supply path output voltage. The controller power supply node is the power input node of the controller, and the PWM output level of the controller varies with the voltage domain of the controller power supply node.
[0046] When the power supply mode control result indicates a low-brightness direct supply mode, the controller outputs a boost shutdown signal to the boost enable terminal, disabling the boost circuit. At this time, there is no boost output on the boost output path, and the second unidirectional conducting element is either off or in a reverse isolation state. The battery supplies power to the controller's power supply node via the first unidirectional conducting element. The controller reads the target effective drive voltage field from the power supply mode control result, writes the boost enable state in the power supply execution status data as off, writes the controller power supply path status as the battery power supply path, and writes the boost stable state as inapplicable or not requested.
[0047] When the power supply mode control result indicates high-brightness boost mode, the controller outputs a boost enable signal to the boost enable terminal, activating the boost circuit. The boost circuit converts the battery terminal voltage to a preset high-brightness power supply voltage. In one embodiment, the preset high-brightness power supply voltage is 4.8V. After enabling the boost circuit, the controller enters the boost stability judgment process; the preset stability condition may include a fixed delay condition, a boost feedback terminal voltage condition, or a controller ADC sampling voltage condition. When using the fixed delay condition, the controller starts timing after outputting the boost enable signal, and writes the boost stability state as satisfied after the timing reaches the preset delay time. When using the boost feedback terminal voltage condition, the controller reads the boost feedback terminal voltage, and writes the boost stability state as satisfied when the boost output corresponding to the feedback terminal voltage reaches the preset high-brightness power supply voltage range. When using the controller ADC sampling voltage condition, the controller samples the boost output terminal voltage through the ADC, and writes the boost stability state as satisfied when the sampled value is within the preset high-brightness power supply voltage range.
[0048] In high-brightness boost mode, once the boost output meets the preset stability condition, the boost output path supplies power to the controller power supply node via the second unidirectional conducting element. Because the boost output path voltage is higher than the battery power supply path voltage, the first unidirectional conducting element is either not conducting or isolated by the boost output path; the controller power supply node enters the boost power supply domain. The controller writes the boost enable state in the power supply execution status data as enabled, the boost stability state as satisfied, the controller power supply path state as boost output path, and the current power supply mode identifier as high-brightness boost mode. If the preset stability condition is not met, the controller writes the boost stability state as unsatisfied and maintains the unloaded state of the high-brightness area PWM drive signal; after this state enters S400, S400 does not output the high-brightness area PWM drive signal.
[0049] In one implementation, S300 simultaneously processes the mode switching direction field. When the mode switching direction is from low brightness to high brightness, the controller first enables the boost circuit and, after writing "satisfied" in the boost stable state, then hands over the power supply execution state data to S400 to load the high brightness PWM duty cycle. When the mode switching direction is from high brightness to low brightness, the controller in S300 does not immediately shut down the boost circuit, but instead writes the power supply execution state data as a state to be shut down, and hands this state over to S400 to update the PWM drive signal first; after S400 completes the update of the low brightness PWM duty cycle, the controller outputs the boost shutdown signal, causing the controller power supply node to fall back from the boost output path to the battery power supply path. Understandably, the state to be shut down is a state field in the power supply execution state data and does not change the low brightness direct supply mode result generated by S200.
[0050] The trigger condition for this step is the power supply mode control result output by the S200. If the target power supply mode field is low-brightness direct power supply mode, the controller performs boost shutdown and battery power supply path writing; if the target power supply mode field is high-brightness boost mode, the controller performs boost enable and boost stability judgment; if the boundary hysteresis handling flag in the power supply mode control result is valid, the controller retains the current power supply mode identifier and writes the power supply execution status data according to the power supply path corresponding to the current power supply mode identifier. If the controller detects that the output status of the boost enable terminal is inconsistent with the power supply mode control result, the controller rewrites the boost enable terminal status and generates a boost enable rewrite flag.
[0051] During the project implementation, the S200 outputs a high-brightness boost mode with a target effective driving voltage of 4.2V. The mode switching direction is from low brightness to high brightness. The controller outputs a high-level boost enable signal to the boost enable terminal, and the boost circuit starts and outputs a boost voltage close to 4.8V. The controller samples the boost output voltage through an ADC. When the sampled value reaches the preset high-brightness power supply voltage range, the controller writes the boost stability state as satisfied. The boost output path supplies power to the controller's power supply node through the second unidirectional conduction element. The controller writes the power supply path status in the power supply execution status data as the boost output path and sends this power supply execution status data to the S400.
[0052] In another project implementation, the S200 outputs a low-brightness direct supply mode with a target effective drive voltage of 2.6V and a mode switching direction from high brightness to low brightness. The controller first writes the boost state to be turned off into the power supply execution status data and then transmits the target effective drive voltage and the boost state to be turned off to the S400. After the S400 completes the update of the PWM duty cycle in the low-brightness zone, the controller outputs a boost shutdown signal. The boost output path stops supplying power to the controller power supply node, and the battery supplies power to the controller power supply node through the first unidirectional conduction element. The controller updates the power supply path status in the power supply execution status data to the battery power supply path.
[0053] This step also includes exception handling. If the boost output fails to meet the preset stability condition within a preset time, the controller writes the boost stability state as timeout, writes the high-brightness PWM loading state as unloaded, and reverts the power supply mode control result to the low-brightness direct supply mode; the controller shuts down the boost circuit and supplies power to the controller power supply node via the battery power supply path. If the boost output path voltage is abnormally lower than the battery power supply path voltage, the controller maintains the battery power supply path and writes the boost output exception flag into the power supply execution status data. If the battery voltage is lower than a preset low-voltage threshold, the controller may, in one embodiment, restrict the entry of the high-brightness boost mode and write the battery low-voltage limit flag into the power supply execution status data.
[0054] This step ultimately generates power supply execution status data. This data includes a target power supply mode field, a mode switching direction field, a boost enable state field, a boost stabilization state field, a controller power supply path state field, a controller power supply node state field, a high-brightness zone PWM loading state field, a boost state field to be turned off, and an exception flag field. This power supply execution status data is transmitted to S400; wherein, the boost stabilization state field determines the timing of the high-brightness zone PWM drive signal loading, the controller power supply path state field determines the power supply domain voltage corresponding to the PWM duty cycle, and the mode switching direction field determines the PWM update order for switching from low brightness to high brightness or vice versa.
[0055] In one specific embodiment: S300 executes boost start / stop and controller power supply path switching based on power supply mode control results, and generates power supply execution status data.
[0056] The controller reads the power supply mode control results transmitted by the S200 in real time and extracts the target power supply mode field from the data object. Mode switching direction field Target effective drive voltage field Preset direct supply threshold field and the current power supply mode identifier field and boundary back handling markers Meanwhile, the controller periodically samples the battery terminal voltage using its internal ADC to obtain... The voltage at the sampled boost output terminal is obtained And read the preset high-brightness power supply voltage from the configuration register. And the voltage tolerance in the preset stability conditions and longest stable waiting time To determine whether the boost output has reached stability, the controller first constructs a stability metric based on a Lyapunov function. This metric quantifies the energy deviation between the current boost output voltage and the target high-brightness supply voltage, thus transforming stability determination into a comparison problem of a nonlinear energy threshold. The boost output voltage deviation is defined as follows: And introduce discrete-time index ( ), then the first The Lyapunov candidate function value at the next sampling time is To eliminate single-sample noise and reflect the average stable trend over a recent period, the controller employs a length of... Sliding window Perform convolutional smoothing to obtain a smoothed stability metric. As shown in formula ①.
[0057] Formula①
[0058] in, : No. The stability measure after moving average at each sampling time is obtained by moving average of the squared deviations between the boost output voltage and the target high-brightness power supply voltage; Discrete-time sampling index ; : Position index within the sliding window, range of values to ; : Length of the sliding window, here This indicates that the 5 most recent sampling points are taken; : No. Individual weight coefficients, here meaning equally weighted. ,satisfy ; : No. The Lyapunov candidate function value at each sampling point is defined as follows: ,in ; : No. The boost output voltage at each sampling moment, in volts ( ), obtained by sampling from the controller's ADC; : Preset high-brightness power supply voltage, fixed at Read from the controller configuration register; : Summation operator.
[0059] Data source: Voltage sequence sampled from the boost output terminal by the controller's ADC With preset high brightness power supply voltage co-generated And thus obtain Then, through equal-weighted convolution, we obtain... .
[0060] The formula addresses the practical problem of how the output voltage of a boost circuit may oscillate or rise slowly when the single-cell battery-powered gun sight is started. Directly determining stability based on instantaneous sampled values can easily lead to false triggering. By introducing the Lyapunov energy function and moving average filtering, noise can be suppressed and the energy convergence process of the boost output entering a steady state can be accurately reflected.
[0061] The controller outputs the smoothness and stability measure of formula ① With preset stability threshold The comparison is made based on the allowable voltage error. Squared and multiplied by a safety factor To obtain, that is At the same time, the controller also needs to consider the longest stable waiting time. If a timeout occurs, it is directly marked as unstable. Therefore, a timer variable is defined. (Unit: ms), initial value: 0, increments after the boost enable signal is output. Then the boost stability flag... It is determined by formula ②.
[0062] Formula②
[0063] in, : Boost stable status field, a value of 1 indicates that the stability condition has been met, 0 indicates that the condition has not been met but has not timed out, and -1 indicates that the timeout has occurred and the problem has failed; The stability metric output by formula ①; : Preset stable energy threshold, determined by allowable voltage error and safety factor calculate: Stored in the configuration register area; : Waiting time after boost enable, in milliseconds (milliseconds) ), generated by the controller's internal timer; Longest stable latency, in milliseconds (milliseconds) ), here Read from non-volatile memory; Comparison and logical operators.
[0064] Data source: Output from formula ①; The permissible voltage error is specified in the factory calibration table. and safety factor Calculated; Generated by the controller's internal timer; These are configuration parameters in the non-volatile storage area.
[0065] The practical problem solved by this formula is to quantify the dynamic response process of the boost output into a three-state flag, avoiding erroneous PWM loading caused by brief disturbances or long periods of inability to boost, and providing a reliable and stable basis for subsequent power supply execution status data.
[0066] Controller according to and the current target power supply mode field and current power supply mode identifier Begin building the initial version of the power supply execution status data: If In low-brightness direct supply mode, the controller outputs a shutdown signal to the boost enable terminal, thus setting the boost enable status field. Write it as 0 (off), controller power supply path status field Write it as "Battery Power Path", Boost Steady State Field Write it as -2 (indicating it is not applicable); if It is a high-brightness boost mode and The controller will maintain boost enable and... Write it as 1. Write it as "boost output path" Write it as 1; if If the controller does not set the PWM loading enable flag for the highlighted area, it will continue to maintain boost enable and wait for subsequent sampling. At the end of this section, the controller will include... And inherited from the power supply mode control results Boundary hysteresis processing marker and current power supply mode identifier The intermediate data structure is temporarily stored in the running register, ready for timing coordination processing in the mode switching direction. Technical benefits of this section: By using Lyapunov energy moving average and three-state stability determination, the dynamic response process of the boost output is quantified into a reliable state flag, eliminating misjudgments caused by single-point noise and providing a stable power domain reference for cross-mode switching.
[0067] The controller receives the boost stabilization status flag. Then, immediately read the mode switching direction field. This field can take the values "Keep Current Mode", "Switch from Low to High Brightness", or "Switch from High to Low Brightness". For "Keep Current Mode", the controller requires no special timing processing and directly uses the target power supply mode. The pending shutdown boost status field in the power supply execution status data Set to 0 (invalid), and reset the boost enable state. and controller power supply path status The rules in the previous paragraph are solidified. For "low brightness to high brightness" switching, the controller must ensure that the high brightness PWM drive signal is not applied before the boost voltage stabilizes. To achieve this, a state transition cost function is constructed. This is used to quantify the timing cost required to switch from the current mode to the target mode, where the cost includes the waiting time for stabilization, power consumption impact, and PWM mismatch risk. The state transition cost is defined as shown in Equation ③.
[0068] Formula③
[0069] in, Mode switching cost, used to quantify the timing cost of switching from the current mode to the target mode; Weighting coefficients, with values as follows: The switching cost coefficient table is provided by the controller configuration register area; : The boost steady-state output by formula ②; : Remaining expected stabilization time, in milliseconds (milliseconds) The calculation formula is: ,in and Same as the definition in formula ②; Target effective driving voltage, in volts ( The target effective drive voltage field comes from the power supply mode control result transmitted from S200. Preset high-brightness power supply voltage. ; Absolute value operator; Indicator function. When the condition is met. If true, set the value to 1; otherwise, set the value to 0. : Current power supply mode identifier, which comes from the current power supply mode identifier field in the power supply mode control result transmitted by S200; : Target power supply mode field, from the same power supply mode control result.
[0070] Data source: From formula ②; Provided by the controller timer; Results from power supply mode control; and It also comes from the power supply mode control results.
[0071] The formula addresses the following practical problem: during the transition from low brightness to high brightness, it is necessary to comprehensively assess the progress of voltage boost stabilization, the degree of deviation from the target voltage, and the necessity of mode change. If the cost is too high (e.g., the voltage boost has not stabilized for a long time and the target voltage is close to the upper limit of the battery voltage), the switching can be temporarily suspended or a safety degradation strategy can be adopted to avoid display flickering or controller reset caused by forced switching.
[0072] Simple numerical example: Let (Not yet stable) , ,but ; , ; For low-brightness direct supply mode, For high-brightness boost mode, the indicator function is 1; calculated as follows The controller sets a cost threshold. Since 12.25 > 10, the cost of judgment is too high. Therefore, the controller will not set the PWM loading enable flag for the high-brightness area for the time being, but will continue to maintain boost enable and wait. Allow loading only after the value becomes 1.
[0073] Next, for the "high brightness to low brightness" direction, the controller needs to generate a "boost status to be turned off" field. This field indicates that the S400 must update the low-brightness PWM before allowing the boost converter to be disabled. Define logic consistency score. This ensures that there is no conflict between the boost shutdown request and the PWM update order, as shown in Equation ④.
[0074] Formula④
[0075] in, Logical consistency score, value range ; Scaling factor, here Provided by factory calibration; Target effective driving voltage, in volts ( (This is the same as the definition in formula ③;) Preset direct supply threshold, unit: volts ( The preset direct supply threshold field comes from the power supply mode control results transmitted from S200; : Natural exponential function; Indicator function. When the mode switching direction field... The value is 1 if it equals "high brightness to low brightness", otherwise it is 0; : Mode switching direction field, which comes from the power supply mode control result transmitted by S200, and may take the values of "keep current mode", "low brightness to high brightness" or "high brightness to low brightness".
[0076] Data source: and All results are from power supply mode control. From the same data object.
[0077] The formula addresses the practical problem of switching from high brightness to low brightness, specifically regarding the effective driving voltage of the target. Still significantly higher than the direct supply threshold Immediately shutting down the boost converter would cause a sudden drop in the voltage of the controller's power supply node, which could lead to insufficient OLED driving. A consistency score is calculated using a sigmoid function. The lower the score, the less suitable it is to immediately shut down the boost converter, thus guiding the controller to generate a "boost-to-shutdown state" and prioritize updating the PWM.
[0078] Technical benefits in this section: By using the state transition cost function and logic consistency scoring, fine-grained timing control of two directional switching modes, namely low brightness to high brightness and high brightness to low brightness, is achieved, avoiding display abnormalities caused by loading the high brightness PWM too early or shutting down the boost converter too late.
[0079] After completing the timing coordination described above, the controller also needs to handle abnormal situations: the boost output does not occur within the preset time. The internal stability condition is satisfied (i.e.) ), or the voltage of the boost output path is abnormally lower than the voltage of the battery-powered path (comparative). and Subtract the voltage drop of the unidirectional conducting element ), or battery voltage Below the preset low voltage threshold For these anomalies, the controller constructs a penalty factor. This is used to correct the target power supply mode and generate corresponding anomaly flags. The penalty factor is defined as shown in Formula ⑤.
[0080] Formula⑤
[0081] in, Penalty factor, range of values to ; Penalty weights, with values as follows: This is provided by the "Abnormal Penalty Coefficient Table" in the controller's non-volatile memory area; : Indicator function. When formula ② outputs equal If the timeout occurs, return 1; otherwise, return 0. Same as the definition in formula ②; : Indicator function; when the boost output voltage Less than battery voltage Subtract the voltage drop of the unidirectional conducting element The value is 1 if the condition is met, otherwise it is 0. Real-time voltage at the boost output terminal, in volts (Volts) ), obtained by sampling from the controller's ADC; Battery terminal voltage, unit: volts (V) ), obtained by sampling from the controller's ADC; The typical forward voltage drop of a unidirectional conducting element (Schottky diode) is fixed at [value missing]. Read from the configuration register; Indicator function. When the battery voltage... Less than the preset low voltage threshold The value is 1 if the condition is met, otherwise it is 0. : Preset low-voltage threshold, fixed at Read from the configuration register.
[0082] Data source mapping: From formula ②; Sampled from ADC; From the configuration register or non-volatile memory. Output of Equation ⑤ Used to trigger abnormal rollback (with penalty threshold) (Compare), and generate an exception flag field. (The 0th digit corresponds to timeout, and the 2nd digit corresponds to low voltage).
[0083] Data source: From formula ②; and Sampled from the controller's ADC; and From the configuration register. This formula addresses the practical problem of forcing the device back to a low-brightness direct-supply mode to avoid unreliable high-brightness displays when there is a boost timeout, abnormally low boost output, or low battery voltage. The penalty factor quantifies the severity of the anomaly, and the controller can adjust accordingly. The value determines whether to roll back immediately and what exception flag to generate.
[0084] Simple numerical example: Suppose a boost timeout occurs, then If the other two conditions are not met, then... The controller sets a penalty threshold. Since 10 > 1, the controller immediately performs a rollback action: the target power supply mode field is changed. Force writing to low-brightness direct power supply mode, disable boost circuit, and mark the abnormal flag field in power supply execution status data. Bit 0 (timeout bit) is set to 1. Simultaneously, the controller will enter boost enable state. Write it as 0, controller power supply path status. Write it as a battery-powered path, boost stable state Write it as -2 (not applicable). If the battery voltage is below 2.5V, At least 20, the controller will also add Bit 2 (low voltage limit bit) is set to 1, and any subsequent requests attempting to enter the high-brightness boost mode are prohibited. Finally, the controller sets all fields (including And inherited from the power supply mode control results Boundary hysteresis processing marker Current power supply mode indicator and mode switching direction field This data is integrated into complete power supply execution status data.
[0085] In order to generate a comprehensive power supply path selection decision when multiple anomalies occur simultaneously, the controller further utilizes linear programming feasibility judgment to determine the final set of optional power supply modes, as shown in Equation ⑥.
[0086] Formula⑥
[0087] in, Objective function: Maximize the decision variables within the feasible region. Take 0 or 1; Decision variables; This indicates that the high-brightness boost mode has been selected. This indicates that the low-brightness direct power supply mode has been selected; st: subject to; Target effective driving voltage, in volts ( ), same as above; Battery terminal voltage, unit: volts (V) ), sampled by ADC; : Voltage drop of unidirectional conduction element ; Relaxation coefficient; , Read from the configuration register; : Indicator function; when an exception flag field The value is 1 if the second bit (low voltage limit bit) is equal to 1, otherwise it is 0. : The second bit (bit2) is set by formula ⑤ and its subsequent logic (set to 1 when the battery voltage is low). Preset high-brightness power supply voltage. ; Preset direct supply threshold, unit: volts ( ), the same as formula ④; : Indicator function; when an exception flag field If bit 0 (boost timeout bit) is equal to 1, then it is set to 1; otherwise, it is set to 0. : Bit 0 is set by formula ⑤ and its subsequent logic (set to 1 during boost timeout).
[0088] Data source: Results from power supply mode control; From ADC sampling; and from the anomaly flag field generated in this step.
[0089] The formula addresses the practical problem of how simple fallback rules can be inflexible when multiple anomalies occur (such as simultaneous low voltage and timeout). It uses a linear programming feasibility assessment to find usable power supply modes under constraints. If a feasible solution exists, the high-brightness boost mode is prioritized (maximizing...). Otherwise, you can only choose the low brightness direct supply mode.
[0090] Based on this result, the controller ultimately determines the target power supply mode field in the power supply execution status data. This is a low-brightness direct power supply mode, with the boost enable state set to off and the power supply path set to battery power. The final power supply execution status data includes the following fields: target power supply mode. Mode switching direction Boost enable state Boost stable state Controller power supply path status Controller power supply node status (Actual measured value, read from the controller power supply node voltage by the ADC), PWM loading status in the high-brightness area. Boost mode to be turned off and exception markers This data is transmitted to the S400, where the boost stable state field... The controller power supply path status field is used to determine when the PWM drive signal for the highlight area is applied. Used to determine the power supply voltage corresponding to the PWM duty cycle, mode switching direction field. The PWM update order is used to determine whether to switch from low brightness to high brightness or vice versa.
[0091] Technical benefits of this section: By using penalty factors and linear programming feasibility assessment, the system automatically reverts to a safe low-brightness direct supply mode under fault conditions such as boost timeout, output abnormality, or battery undervoltage. At the same time, it generates detailed abnormality flags for S400 to handle safely, ensuring the robustness and self-healing capability of the entire zone brightness control link.
[0092] S400: Generate a PWM duty cycle based on the power supply execution status data and the target effective drive voltage; when switching from low brightness direct supply mode to high brightness boost mode, load the PWM drive signal after the preset stability condition is met; when switching from high brightness boost mode to low brightness direct supply mode, update the PWM drive signal first and then shut down the boost circuit.
[0093] S400 is executed by the controller's PWM output control program and PWM output terminal. This step receives the power supply execution status data generated in S300 and calls the target effective drive voltage generated in S100 and continuously transmitted by S200 and S300. Based on the controller power supply path status field in the power supply execution status data, the controller selects either the battery power supply domain voltage or the boost power supply domain voltage as the voltage reference for calculating the PWM duty cycle; subsequently, it generates the PWM duty cycle according to the correspondence between the target effective drive voltage and the voltage reference, and loads this PWM duty cycle onto the PWM output terminal.
[0094] The PWM duty cycle represents the proportion of time the PWM drive signal is at an effective level within one PWM cycle. The PWM drive signal is output from the controller's PWM output terminal to the OLED pattern channel of the OLED icon display module. The controller power supply path status field in the power supply execution status data determines the high-level voltage domain of the controller's PWM output terminal; when the controller power supply path status is a battery power supply path, the PWM duty cycle is generated according to the ratio of the target effective drive voltage to the battery power supply domain voltage; when the controller power supply path status is a boost output path, the PWM duty cycle is generated according to the ratio of the target effective drive voltage to the boost power supply domain voltage. Understandably, compensation for the unidirectional conduction element voltage drop or the OLED pattern channel drive voltage drop can be added when calculating the PWM duty cycle; the compensation value comes from the controller configuration register or the factory calibration table.
[0095] In low-brightness direct supply mode, the controller reads the controller power supply path status from the power supply execution status data and identifies it as a battery power supply path. The controller reads the target effective drive voltage and combines it with the battery power supply domain voltage to generate the low-brightness zone PWM duty cycle. Specifically, the controller can form an initial duty cycle value based on the ratio of the target effective drive voltage to the battery power supply domain voltage, and then correct the initial duty cycle value according to the calibration field in the brightness-voltage mapping relationship to obtain the low-brightness zone PWM duty cycle. The controller writes the low-brightness zone PWM duty cycle into the PWM register and outputs the low-brightness zone PWM drive signal to the OLED icon display module.
[0096] In high-brightness boost mode, the controller first reads the boost stability state field from the power supply execution status data. When the boost stability state field is satisfied, the controller reads the target effective drive voltage and generates the high-brightness zone PWM duty cycle according to the ratio of the target effective drive voltage to the boost power supply domain voltage. Then, the high-brightness zone PWM duty cycle is written to the PWM register, and the high-brightness zone PWM drive signal is output to the OLED icon display module. When the boost stability state field is not satisfied or times out, the controller maintains the unloaded state of the high-brightness zone PWM drive signal. In this state, the controller does not write the high-brightness zone PWM duty cycle to the PWM register and retains the previous low-brightness zone PWM output state or disables the OLED drive output. The specific state is determined by the exception flag field in the power supply execution status data.
[0097] When switching from low-brightness direct supply mode to high-brightness boost mode, the power supply execution status data received by the S400 includes a mode switching direction field and a boost stability status field. The controller first checks the boost stability status; if the preset stability condition is not met, the controller does not load the high-brightness area PWM duty cycle and writes the PWM loading wait flag to the status record area; if the preset stability condition is met, the controller generates the high-brightness area PWM duty cycle according to the boost power supply domain voltage and loads the PWM drive signal to the selected OLED pattern channel. This process ensures that the loading of the high-brightness area PWM drive signal matches the boost output status.
[0098] When switching from high-brightness boost mode to low-brightness direct power supply mode, the power supply execution status data received by S400 includes the boost state to be turned off. The controller first generates the low-brightness zone PWM duty cycle according to the ratio of the target effective drive voltage to the battery power supply domain voltage, and updates the PWM output to the low-brightness zone PWM drive signal; after the PWM register is updated, the controller outputs a boost shutdown signal to the boost enable terminal, or returns a PWM update completion flag to S300, which then performs the boost shutdown action. After boost shutdown, the controller power supply node is powered by the battery power supply path; the controller writes the current power supply mode identifier back to low-brightness direct power supply mode.
[0099] In one embodiment, the voltage-controlled OLED icon display module includes multiple OLED pattern channels. The controller reads the pattern channel status before outputting the PWM drive signal; if the pattern channel status indicates that one OLED pattern channel is selected, the controller outputs a PWM drive signal to that OLED pattern channel and sets the unselected OLED pattern channels to a closed state; if the pattern channel status indicates that multiple OLED pattern channels are selected, the controller outputs PWM drive signals with the same duty cycle to multiple OLED pattern channels, or outputs corresponding PWM drive signals according to the channel duty cycle offset field in the pattern channel status. Multiple OLED pattern channels share the power supply mode control result formed by S200, and a boost enable state is not generated separately for each OLED pattern channel.
[0100] In one implementation, S400 also handles standby and wake-up events. In response to a standby event, the controller saves the brightness context, which includes the brightness level, target effective drive voltage, pattern channel status, and power supply mode identifier. The controller then shuts down the OLED drive output, sets the OLED control terminal to a low level or high impedance state, shuts down the boost circuit, and enters sleep mode. In response to a wake-up event, the controller resumes operation via the battery power path, reads the brightness context, and sends the brightness level and pattern channel status from the brightness context to S100. If the brightness context indicates that the previous sleep mode was a high-brightness boost mode, the controller re-enables the boost circuit via S100, S200, and S300, and loads the high-brightness area PWM drive signal by S400 after the boost circuit stabilizes. If the brightness context indicates that the previous sleep mode was a low-brightness direct supply mode, the controller keeps the boost circuit off, and loads the low-brightness area PWM drive signal by S400.
[0101] The triggering conditions for this step include the arrival of power supply execution status data, the change from unsatisfied to satisfied boost stabilization state, the generation of a PWM update completion marker, a change in the mode switching direction field, standby event triggering, and wake-up event triggering. If the controller power supply path status field in the power supply execution status data is missing, the controller selects either the battery power supply domain voltage or the boost power supply domain voltage according to the current power supply mode identifier; if the target valid drive voltage field is missing, the controller stops updating the PWM register and requests S100 to regenerate the brightness control status data; if the pattern channel status field is missing, the controller maintains the OLED pattern channel status of the previous control cycle.
[0102] In the engineering implementation, the target effective driving voltage in the low-brightness direct supply mode is 2.6V, the controller power supply path is in battery power supply mode, and the battery power supply domain voltage is 3V. The controller generates the low-brightness zone PWM duty cycle according to the ratio of 2.6V to 3V and outputs the low-brightness zone PWM drive signal to the currently selected OLED pattern channel. After the user increases the brightness level, S100 regenerates the target effective driving voltage of 3.8V, S200 generates the high-brightness boost mode, S300 enables the boost and forms power supply execution status data after the boost output meets the preset stability conditions; S400 generates the high-brightness zone PWM duty cycle according to the ratio of 3.8V to the boost power supply domain voltage and loads the high-brightness zone PWM drive signal.
[0103] In another project, the gun aiming device switched from high-brightness boost mode to low-brightness direct power supply mode. After receiving the state to be turned off boost, the S400 first generates the low-brightness zone PWM duty cycle according to the new target effective drive voltage and updates the PWM output. After the controller confirms that the PWM register has been updated, it turns off the boost circuit and allows the controller power supply node to be powered through the battery power supply path. Then the controller writes the current power supply mode identifier back to low-brightness direct power supply mode and writes the OLED target brightness display status into the status record area.
[0104] This step ultimately establishes the OLED target brightness display state. The OLED target brightness display state includes the current PWM duty cycle, PWM drive signal loading state, OLED pattern channel output state, current power supply mode identifier, target effective drive voltage, standby state field, and anomaly flag field. The OLED target brightness display state is written back to the operating state register by the controller; when the brightness setpoint changes in the next round, the current power supply mode identifier is read by S100; when a standby event is triggered, the brightness level, target effective drive voltage, pattern channel state, and power supply mode identifier are written into the brightness context; when a wake-up event is triggered, the brightness context re-enters S100, forming the next round of brightness zone power supply control process.
[0105] In one specific embodiment: S400 generates the PWM duty cycle based on the power supply execution status data and the target effective drive voltage, and loads or updates the PWM drive signal in an orderly manner according to the cross-mode switching direction.
[0106] The controller receives power supply execution status data transmitted by S300 and extracts the controller power supply path status field from the data object. Boost stable state field Mode switching direction field Boost status field to be closed Exception marker field and target effective driving voltage (This voltage is generated by S100 and continuously transmitted through S200 and S300). Simultaneously, the controller samples the battery-powered domain voltage in real time via its internal ADC. (Unit: V) and boost supply voltage (Unit: V), and read the preset high-brightness power supply voltage from the configuration register. unidirectional conduction element voltage drop And OLED pattern channel driving voltage drop compensation (Unit: V, from factory calibration table). To accurately identify the current power domain and provide a reliable voltage reference before generating the PWM duty cycle, the controller first... and Perform cross-correlation analysis to determine whether the boost output path effectively takes over the controller power supply node. Define the battery voltage sequence. and boost output voltage sequence ( , Given the sequence length, calculate the value of the normalized cross-correlation function of the two sequences at zero delay. As shown in formula ⑦.
[0107] Formula⑦
[0108] in, Zero-delay normalized cross-correlation coefficient, range of values Used to quantify the linear correlation between the battery voltage sequence and the boost output voltage sequence at zero delay; Sequence index, ; : Sequence length, here ; : No. Battery power supply voltage at each sampling point, in volts ( ), obtained by continuous sampling by the controller's ADC; Battery voltage sequence The arithmetic mean, in volts ( The calculation formula is: ; : No. The boost output voltage at each sampling point, in volts ( ), obtained by sampling from the controller's ADC; Boost output voltage sequence The arithmetic mean, in volts ( The calculation formula is: .
[0109] Data source: Battery voltage sequence and boost output voltage sequence sampled by ADC.
[0110] The formula addresses the practical problem of voltage fluctuations during the transition from boost to or from startup to shutdown. Relying solely on instantaneous comparisons can easily lead to misjudgments. Calculating zero-delay cross-correlation quantifies the consistency of voltage changes across the two paths. A value close to 1 indicates a strong positive correlation between the two (they may not have fully switched yet), while a value close to -1 indicates a strong negative correlation (they have already switched effectively), thus providing a statistical basis for the subsequent selection of the voltage reference.
[0111] Simple numerical example: Assume 10 sampling points It stabilized at around 3.0V. The voltage gradually increased from 3.0V to 4.8V, and the calculations yielded... , The covariance is negative (because the voltage rises while the battery is stable). This indicates a negative correlation, meaning the boost converter has effectively taken over. The controller will... This information is passed to formula ⑧ as an intermediate indicator.
[0112] The controller is obtained according to formula ⑦ and the controller power supply path status field in the power supply execution status data. Generate a weighted confidence score This is used to determine which supply domain voltage is ultimately used as the voltage reference for calculating the PWM duty cycle. The weighted confidence level is defined as shown in Formula ⑧.
[0113] Formula⑧
[0114] in, Weighted confidence level for power supply path selection, value range ; : Natural exponential function; Steepness factor, here This is used to control the sensitivity of the sigmoid function; : The zero-delay normalized cross-correlation coefficient output by formula ⑦; : Decision threshold, here ; : Indicator function, when the controller power supply path status field in the power supply execution status data... The value is 1 if it equals the string "boost output path", otherwise it is 0; Indicator function, when The value is 1 if it equals the string "battery-powered path", otherwise it is 0. First term: Product of S-function output and boost path indication; Second term: Product of complementary S-function output and battery path indication.
[0115] Data source: From formula ⑦; Power supply execution status data generated by S300; and Read from the configuration register.
[0116] The formula addresses the practical problem of transitioning between power supply modes. The actual voltage domain may not be reflected in real time due to timing lag. By mapping the cross-correlation results to confidence level through the S-shaped function, the subsequent voltage reference selection has smooth anti-jitter capability.
[0117] Output of Formula ⑧ This section serves as a reference verification before calculating the duty cycle in formula ⑨. Finally, the controller will determine the voltage reference. and the target effective drive voltage inherited from the power supply execution status data Boost stable state Mode switching direction Boost mode to be turned off The fields are temporarily stored, preparing to proceed to the PWM duty cycle generation step. The technical effect of this section is: through cross-correlation analysis and weighted confidence mapping, the true voltage domain is accurately identified during the power supply mode switching transition period, avoiding PWM duty cycle deviations caused by incorrect voltage reference selection.
[0118] The controller accepts the voltage reference determined by formula ⑧. Combined with the target effective driving voltage and the boost stability state field in the power supply execution status data and mode switching direction field The PWM duty cycle generation begins. In low-brightness direct-supply mode, the voltage reference is the battery-powered voltage minus the diode voltage drop; in high-brightness boost mode, the voltage reference is the boost output voltage. To achieve a smooth transition during mode switching, the controller introduces a one-step rolling optimization of MPC (Model Predictive Control) based on a quadratic cost function. This pre-calculates the potential duty cycle overshoot risk during switching and corrects the duty cycle accordingly. The duty cycle deviation cost in the prediction time domain is defined. As shown in formula ⑨.
[0119] Formula⑨
[0120] in, Duty cycle bias cost; Target effective driving voltage, in volts ( ), fields passed from S200 / S300; The voltage reference determined by formula ⑧ and its subsequent steps, in volts ( ); Duty cycle of the previous PWM control cycle, value range Read back from the PWM register; Predicted weights, here Read from the configuration register; : Target effective drive voltage of the previous control cycle, in volts ( Read from history; Voltage reference for the previous control cycle, in volts ( Read from history; Initial value of the ideal duty cycle for the current period; : Initial value of the ideal duty cycle in the previous cycle.
[0121] Data source: , From the brightness control link; , Provided by Formula ⑧ and its historical values; Read back from the PWM register; Read from the configuration table.
[0122] The practical problem this formula addresses is that during mode switching, the voltage reference may experience a step change (e.g., jumping from 3V to 4.8V). If directly applied... Calculating the duty cycle may cause sudden output changes that result in flickering. By using a quadratic cost function to evaluate the deviation between the current target duty cycle and the historical duty cycle, as well as the rate of change of the duty cycle, a quantitative basis is provided for subsequent duty cycle smoothing.
[0123] The cost obtained by the controller according to formula ⑨ And the boost stability state in the power supply execution status data and boost state to be shut down Construct a constrained duty cycle correction function to output the final PWM duty cycle. The definition is shown in formula 10.
[0124] Formula⑩
[0125] in, : The final output PWM duty cycle, value range ; , Same as formula ⑨; Learning rate, here ; :cost The gradient of the duty cycle; the specific expression is as follows: ; : Indicator function, when the boost stable state field in the power supply execution status data... If the condition is met, take 1; otherwise, take 0. Compensation coefficient, here ; : Indicator function, when the boost status field to be shut down in the power supply execution status data. The value is 1 if it is valid, otherwise it is 0. Real-time battery voltage, in volts (Volts) ), obtained by ADC sampling; : Voltage drop of unidirectional conduction element, fixed at Read from the configuration register; The actual voltage of the controller power supply node in the battery-powered path, in volts (V). ); , Same as formula ⑨.
[0126] Data source: The ratio of the current target to the benchmark; From formula ⑨ The partial derivative with respect to the duty cycle is obtained; , Data derived from power supply execution status; Sampled from ADC.
[0127] The formula addresses the following practical problems: when the boost is stable, the duty cycle is finely adjusted by the gradient descent direction to reduce the cost; when the boost is about to be turned off, a feedforward compensation term is added to make the duty cycle transition to the target value of the low brightness mode in advance, thereby eliminating the brightness jump at the moment the boost is turned off.
[0128] The controller will calculate The amplitude limit is written to the PWM register after [0,1], and the direction field is switched according to the mode. and boost state to be shut down This determines whether to output immediately or wait for timing coordination. The technical effect of this section is: through a quadratic cost function and gradient correction, a smooth transition of the PWM duty cycle is achieved during cross-mode switching. Simultaneously, feedforward compensation during the boost state before shutdown ensures consistent brightness before the boost is shut down.
[0129] After completing the PWM duty cycle calculation, the controller uses the mode switching direction field in the power supply execution status data. Boost status field to be closed and boost stable state field Perform final loading and timing control. For switching from low-brightness direct supply mode to high-brightness boost mode and... In this case, the controller directly Write to the PWM register and output the PWM drive signal for the highlight area, while simultaneously setting the PWM load status field for the highlight area. Write it as 1. For low brightness switching to high brightness but... (Boost voltage is not stable) The controller does not load a new PWM duty cycle, maintains the output of the previous cycle, and sets the PWM load wait flag. Write it as 1. For switching from high-brightness boost mode to low-brightness direct supply mode and... In this case, the controller first generates the PWM duty cycle for the low-brightness area. (Calculated according to formula ⑩, at this time) Immediately update the PWM output, and after the PWM register update is complete, return a PWM update completion flag to S300. The S300 performs the boost shutdown action. Simultaneously, the controller identifies the current power supply mode. The data is written back to the low-brightness direct supply mode and recorded in the OLED target brightness display status. To handle multiple OLED pattern channels, the controller reads the pattern channel status field before outputting the PWM drive signal. (From S100 and transmitted via S200 and S300).
[0130] like If a single channel is selected, the controller outputs a PWM drive signal to that channel; if multiple channels are selected, the controller generates a PWM signal with the same duty cycle for each channel, or based on the channel duty cycle offset field. ( Fine-tune the channel index as shown in formula ⑪.
[0131] Formula⑪
[0132] in, : No. The actual output duty cycle of each OLED pattern channel, and its range. ; Channel index, ; The total number of OLED pattern channels is determined by the hardware configuration of the OLED icon display unit; The baseline duty cycle is calculated using formula ⑩. : No. The duty cycle offset of each channel is read from the channel duty cycle offset table in the pattern channel status field; The constraint that the sum of all channel offsets must be zero; The calculation results are used to write the PWM register of the corresponding channel.
[0133] Data source: From formula 10; Pattern channel status transmitted from S100.
[0134] The formula addresses the practical problem of how to simultaneously illuminate multiple patterns (such as aiming points and crosshairs), where there may be slight differences in the driving efficiency of different channels. By introducing an offset to compensate for these differences, the brightness of each icon can be made consistent. At the same time, the same power supply mode control results can be shared, avoiding the need to generate a separate boost control signal for each channel and simplifying system overhead.
[0135] Simple numerical example: Let There are two channels with offsets of respectively and ,but , The sum is 1.6, the average is 0.8, satisfying the condition that the offset sum is zero. The controller writes the calculated duty cycle of each channel into the corresponding PWM register and outputs the drive signal. Finally, the controller handles standby and wake-up events: when responding to a standby event, it calls formula ⑫ to save the brightness context.
[0136] Formula⑫
[0137] in, : Brightness context data structure, used to save the state during standby and restore it upon wake-up; this data structure contains the following fields: Target effective driving voltage, in volts ( ); : Current power supply mode identifier, a string, with a value of "low brightness direct power supply mode" or "high brightness boost mode"; Pattern channel status, including channel selection information and duty cycle offset for each channel. The specific data structure is defined by S100; : The current PWM duty cycle of the output; : Boost steady state, integer, value 1, 0 or -1 (or -2 indicates not applicable); : Controller power supply path status, string, value can be "battery power supply path" or "boost output path"; curly braces Represents a set or structure.
[0138] Data source: All fields are generated by the S400 during operation or inherited from power supply execution status data. The controller writes this context to non-volatile memory, then disables the OLED driver output, sets the OLED control terminal to a high-impedance state, disables the boost circuit, and enters sleep mode.
[0139] When responding to a wake-up event, the controller resumes operation via the battery power path, reads the context and re-sends it into S100, and re-executes the brightness zone control process from S100 to S400.
[0140] Ultimately, the S400 establishes the OLED target brightness display state, which includes the current PWM duty cycle. PWM drive signal loading status OLED pattern channel output status (Actual duty cycle of each channel), Current power supply mode indicator Target effective driving voltage Standby status field and exception flag fields .
[0141] The OLED target brightness display status is written back to the operating status register by the controller. When the brightness setpoint changes again, the current power supply mode indicator will be updated. The brightness level, target effective drive voltage, pattern channel status, and power supply mode identifier are read by S100 when a standby event is triggered. When a wake-up event is triggered, the brightness context is re-entered into S100 to form the next round of brightness zone power supply control process.
[0142] Technical effects in this section: By using MPC with gradient correction to optimize duty cycle in one step, multi-channel offset compensation, and saving and restoring brightness context, a complete closed-loop control is achieved, including smooth transition of PWM drive signals during cross-mode switching, brightness consistency of multiple icons, and low-power standby wake-up.
[0143] Example 2: Figure 2 This diagram illustrates a structural block diagram of a low-power brightness zoning control method for an OLED in a gun aiming device according to an embodiment of the present invention. Figure 2 As shown, the structure may include: The brightness control state generation module 01 receives the brightness setting value from the voltage-controlled OLED icon display module in the gun sight device and generates target effective driving voltage and brightness control state data according to the brightness-voltage mapping relationship. Specifically, the brightness control state generation module receives the brightness setting value from the gun sight device's button input, brightness level register area, or brightness context, and reads the pattern channel state of the voltage-controlled OLED icon display module; the brightness control state generation module writes the brightness setting value into the brightness level field and calls the pre-configured brightness-voltage mapping relationship to map the brightness level field to the target effective driving voltage. The brightness-voltage mapping relationship includes the corresponding record between the brightness level and the target effective driving voltage; the pattern channel state includes the selected OLED pattern channel, the OLED pattern channel on / off state, and the current output state. The brightness control state generation module starts the mapping process when it receives a change in the brightness setting value, a change in the pattern channel state, or a recovery of the brightness context; when the brightness setting value does not match the corresponding record in the brightness-voltage mapping relationship, the brightness control state generation module uses the previous effective brightness level and writes a brightness input correction flag. The brightness control status data includes a brightness setpoint field, a target effective driving voltage field, a pattern channel status field, and a current power supply mode identifier field. The brightness control status generation module provides the brightness control status data to the power supply mode judgment module, and the power supply mode judgment module calls the target effective driving voltage field for subsequent comparison processing.
[0144] The power supply mode determination module 02, connected to the brightness control state generation module, is used to compare the target effective driving voltage with a preset direct supply threshold based on the brightness control state data, determine either a low-brightness direct supply mode or a high-brightness boost mode, and generate a power supply mode control result. Specifically, the power supply mode determination module receives brightness control state data from the brightness control state generation module and reads the preset direct supply threshold; the preset direct supply threshold is formed based on battery voltage, unidirectional conduction element voltage drop, and safety margin, or is written by the factory configuration of the gun sight. The power supply mode determination module extracts the target effective driving voltage field and compares the target effective driving voltage with the preset direct supply threshold; when the target effective driving voltage is not higher than the preset direct supply threshold, it writes the low-brightness direct supply mode; when the target effective driving voltage is higher than the preset direct supply threshold, it writes the high-brightness boost mode. The power supply mode determination module also reads the current power supply mode identifier field and matches it with the newly written low-brightness direct supply mode or high-brightness boost mode to form a mode switching direction field. When the target effective driving voltage is within the boundary hysteresis range of the preset direct supply threshold, the power supply mode determination module maintains the current power supply mode identifier and writes a boundary hysteresis processing flag into the power supply mode control result. The power supply mode control result includes a target power supply mode field, a mode switching direction field, a target effective driving voltage field, a preset direct supply threshold field, and a boundary hysteresis processing flag. The power supply mode determination module provides the power supply mode control result to the power supply execution module, and the power supply execution module calls the target power supply mode field and the mode switching direction field to perform power supply path control.
[0145] The power supply execution module 03 is connected to the power supply mode judgment module. The power supply execution module includes a boost circuit, a boost enable terminal, a battery power supply path, a boost output path, a unidirectional conduction element, and a controller power supply node. Based on the power supply mode control result, it disables the boost circuit and supplies power to the controller power supply node via the battery power supply path in low-brightness direct supply mode. In high-brightness boost mode, it enables the boost circuit and supplies power to the controller power supply node via the boost output path after the boost output meets a preset stability condition. The battery power supply path and the boost output path are respectively connected to the controller power supply node via the unidirectional conduction element, generating power supply execution status data. Specifically, the power supply execution module receives the power supply mode control result from the power supply mode judgment module and controls the boost enable terminal according to the target power supply mode field. When the target power supply mode field is low-brightness direct supply mode, the power supply execution module outputs a boost disable signal to the boost enable terminal, disabling the boost circuit and supplying power to the controller power supply node via the battery power supply path through the unidirectional conduction element. When the target power supply mode field is high-brightness boost mode, the power supply execution module outputs a boost enable signal to the boost enable terminal, enabling the boost circuit to form a boost output. The power supply execution module detects whether the boost output meets the preset stability condition based on a fixed delay condition, the boost feedback terminal voltage condition, or the controller sampling voltage condition. After the boost output meets the preset stability condition, the boost output path supplies power to the controller power supply node via a unidirectional conducting element. The battery power supply path and the boost output path are respectively connected to the controller power supply node, and the unidirectional conducting direction of both points to the controller power supply node. When the boost output fails to meet the preset stability condition within a preset time, the power supply execution module writes a boost stability timeout flag, stops providing the high-brightness area loading state to the PWM drive control module, and reverts the power supply mode control result to the low-brightness direct supply mode. The power supply execution status data includes a boost enable status field, a boost stability status field, a controller power supply path status field, a controller power supply node status field, and an anomaly flag field. The power supply execution module provides the power supply execution status data to the PWM drive control module, and the PWM drive control module uses the boost stability status field and the controller power supply path status field to generate the PWM duty cycle.
[0146] The PWM drive control module 04, connected to the power supply execution module, is used to generate a PWM duty cycle based on the power supply execution status data and the target effective drive voltage. When switching from low-brightness direct supply mode to high-brightness boost mode, it loads the PWM drive signal after the preset stability condition is met. When switching from high-brightness boost mode to low-brightness direct supply mode, it updates the PWM drive signal first and then shuts down the boost circuit. Specifically, the PWM drive control module receives power supply execution status data from the power supply execution module and calls the target effective drive voltage. The PWM drive control module reads the controller power supply path status field. When the controller power supply path status field corresponds to the battery power supply path, it generates a low-brightness PWM duty cycle according to the correspondence between the target effective drive voltage and the battery power supply domain voltage. When the controller power supply path status field corresponds to the boost output path, it generates a high-brightness PWM duty cycle according to the correspondence between the target effective drive voltage and the boost power supply domain voltage. The PWM drive control module reads the mode switching direction field. When switching from low-brightness direct supply mode to high-brightness boost mode, the PWM drive control module first reads the boost stability state field. After the boost stability state field is written to meet the preset stability condition, the high-brightness area PWM duty cycle is loaded as the PWM drive signal. When the boost stability state field does not meet the preset stability condition, the PWM drive control module maintains the high-brightness area PWM drive signal unloaded. When switching from high-brightness boost mode to low-brightness direct supply mode, the PWM drive control module first updates the PWM duty cycle to the low-brightness area PWM duty cycle and provides the power supply execution module with the PWM update completion status. The power supply execution module shuts down the boost circuit according to the PWM update completion status. The PWM drive control module outputs the PWM drive signal to the OLED icon display module and writes the PWM duty cycle field, PWM drive signal loading status field, and pattern channel status field into the OLED target brightness display status.
[0147] The OLED icon display module 05, connected to the PWM drive control module, receives the PWM drive signal and forms an OLED target brightness display state based on the PWM drive signal. Specifically, the OLED icon display module receives the PWM drive signal from the PWM drive control module and selects one or more OLED pattern channels for driving according to the pattern channel status field; the OLED pattern channel of the OLED icon display module receives the corresponding PWM drive signal and forms an OLED target brightness display state according to the PWM duty cycle field. The OLED target brightness display state includes the current PWM duty cycle, PWM drive signal loading state, OLED pattern channel output state, current power supply mode identifier, and target effective drive voltage; the OLED icon display module sends the OLED pattern channel output state back to the PWM drive control module, and the PWM drive control module writes the OLED pattern channel output state into the OLED target brightness display state. In response to a standby event, the PWM drive control module saves the brightness context according to the OLED target brightness display state and turns off the OLED drive output; in response to a wake-up event, the brightness control state generation module reads the brightness context and regenerates the target effective drive voltage and brightness control state data. The OLED target brightness display status is written back along with the current power supply mode identifier, so that the brightness control status generation module can read it in the next control cycle.
Claims
1. A method for low-power brightness zone control of an OLED in a gun aiming device, characterized in that, include: S100: Receive the brightness setting value of the voltage-controlled OLED icon display module in the gun aiming device, and generate target effective driving voltage and brightness control status data according to the brightness-voltage mapping relationship; S200: Based on the brightness control status data, compare the target effective driving voltage with the preset direct supply threshold, determine the low brightness direct supply mode or the high brightness boost mode, and generate the power supply mode control result. S300. Based on the power supply mode control result, in the low brightness direct power supply mode, the boost circuit is turned off and power is supplied to the controller power supply node through the battery power supply path. In the high brightness boost mode, the boost circuit is enabled and power is supplied to the controller power supply node through the boost output path after the boost output meets the preset stability conditions. The battery power supply path and the boost output path are respectively connected to the controller power supply node via unidirectional conduction elements to generate power supply execution status data; S400: Generate a PWM duty cycle based on the power supply execution status data and the target effective drive voltage; When switching from low-brightness direct supply mode to high-brightness boost mode, the PWM drive signal is loaded after the preset stability condition is met; when switching from high-brightness boost mode to low-brightness direct supply mode, the PWM drive signal is updated first and then the boost circuit is turned off.
2. The method according to claim 1, characterized in that, The brightness-voltage mapping relationship includes a lookup table mapping relationship, a piecewise linear mapping relationship, or a calibration mapping relationship between the brightness level and the target effective driving voltage; the voltage range of the target effective driving voltage is 2.2V to 4.8V.
3. The method according to claim 1, characterized in that, The preset direct supply threshold is generated based on the battery voltage, the voltage drop of the unidirectional conducting element, and the safety margin; when the target effective driving voltage is between 2.2V and 3V, the low brightness direct supply mode is generated; when the target effective driving voltage is between 3V and 4.8V, the high brightness boost mode is generated.
4. The method according to claim 1, characterized in that, In the low-brightness direct supply mode, the controller outputs a boost shutdown signal to the boost enable terminal and supplies power to the controller power supply node through the battery power supply path; the controller generates the low-brightness zone PWM duty cycle according to the ratio of the target effective drive voltage to the battery power supply domain voltage, and outputs the low-brightness zone PWM drive signal.
5. The method according to claim 1, characterized in that, In the high-brightness boost mode, the controller outputs a boost enable signal to the boost enable terminal, and the boost circuit outputs a preset high-brightness power supply voltage of 4.8V. After the boost output meets the preset stability condition, the controller supplies power to the controller power supply node through the boost output path, and generates the high-brightness zone PWM duty cycle according to the ratio of the target effective drive voltage to the boost power supply domain voltage.
6. The method according to claim 1, characterized in that, The battery power supply path includes a first unidirectional conducting element connected between the battery terminal and the controller power supply node; the boost output path includes a second unidirectional conducting element connected between the boost output terminal and the controller power supply node; the controller power supply node is powered by the boost output path when the boost circuit is enabled, and is powered by the battery power supply path when the boost circuit is disabled.
7. The method according to claim 1, characterized in that, The preset stability conditions include a fixed delay condition, a boost feedback terminal voltage condition, or a controller ADC sampling voltage condition; when the preset stability conditions are not met, the controller maintains the unloaded state of the PWM drive signal in the high-brightness area.
8. The method according to claim 1, characterized in that, In response to a standby event, the controller saves the brightness context, turns off the OLED driver output, turns off the boost circuit, and enters sleep mode; in response to a wake-up event, the controller resumes operation through the battery power supply path and restores the low-brightness direct supply mode or the high-brightness boost mode according to the brightness context; the brightness context includes brightness level, target effective driving voltage, pattern channel status, and power supply mode identifier.
9. The method according to claim 1, characterized in that, The voltage-controlled OLED icon display module includes multiple OLED pattern channels; the controller selects one or more OLED pattern channels to output the PWM drive signal according to the status of the pattern channels. The multiple OLED pattern channels share the same power supply mode control result.
10. The method according to claim 1, characterized in that, Anomaly handling is performed based on the power supply execution status data; the anomaly handling includes: stopping the loading of the high-brightness PWM drive signal and reverting the power supply mode control result to the low-brightness direct supply mode when the boost output fails to meet the preset stability condition within a preset time; and maintaining the current power supply mode identifier when the target effective drive voltage is within the boundary hysteresis range of the preset direct supply threshold.
