Self-adaptive dimming system for permanent magnet type key switch and control method of self-adaptive dimming system
By combining permanent magnet magnetic attraction reset, Hall sensor detection, and adaptive voltage regulation, the problems of mechanical wear, poor voltage compatibility, and insufficient fault protection of existing LED dimming switches are solved, achieving high precision, wide voltage compatibility, and intelligent regulation, thereby improving user experience and equipment reliability.
Patent Information
- Application Number
- CN202511770063.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-02-24
AI Technical Summary
Existing LED dimming switches have significant defects in mechanical structure, detection accuracy, voltage adaptation, control algorithm and fault protection, and cannot meet the user needs for long life, high precision, wide compatibility, intelligent adjustment and safety and reliability.
It adopts a permanent magnet magnetic attraction reset structure, Hall sensor detection, adaptive voltage regulation and load adaptive control module, combined with fuzzy PID control and fault handling unit to achieve high-precision sliding detection, wide voltage compatibility, intelligent regulation and fault protection of push button switches.
The button lifespan has been increased to over 10 million clicks, achieving an adjustment accuracy of 5% per millimeter within a 10mm travel distance. It supports a wide voltage input of 12V-60V, has strong anti-interference capabilities, an adjustment error of ≤±2%, and features multiple real-time monitoring and fault alarm functions. The overall structure has been reduced by 40%.
Smart Images

Figure CN121568255A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of LED dimming control technology, specifically to an adaptive dimming system and control method for a permanent magnet push-button switch. Background Technology
[0002] As core control devices in home and commercial lighting scenarios, LED dimmer switches have become a key user requirement due to their ease of operation, adjustment accuracy, lifespan, and compatibility with various scenarios. However, existing technologies have significant shortcomings in mechanical structure, detection accuracy, voltage adaptation, control algorithms, and fault protection, which limit product performance and user experience.
[0003] (1) Inherent defects of mechanical reset structure
[0004] Traditional mechanical push-button switches typically use springs or elastic metal sheets to achieve the reset function. Over long-term use, mechanical wear and metal fatigue can easily lead to button jamming or reset failure, resulting in a lifespan of only around 500,000 cycles. Furthermore, frequent operation increases contact resistance (up to several hundred milliohms), causing signal drift or increased conduction losses, affecting circuit stability. In addition, traditional sliding mechanisms (such as ordinary slide rails) have large clearances (≥0.5mm), making them prone to jamming or adjustment errors, and unable to meet the needs of fine-tuning.
[0005] (2) Limitations of sliding detection technology
[0006] Existing sliding adjustment schemes mostly rely on potentiometers or mechanical contact sensors, which suffer from problems such as short lifespan due to mechanical wear (≤500,000 operations) and signal distortion caused by changes in contact resistance; the adjustment accuracy is low (common step ≥10%), and smooth switching between brightness and color temperature cannot be achieved. At the same time, external magnetic field interference (such as motors, magnets) can easily cause abnormal detection signals, further reducing the reliability of adjustment.
[0007] (3) Insufficient voltage compatibility and circuit protection
[0008] Lack of wide voltage compatibility: Traditional switches typically only support fixed voltage input (such as 220V AC or specific low-voltage DC), which cannot be compatible with the wide range of 12V-60V LED light strip power supply requirements. Multiple application scenarios require matching with dedicated power supplies, increasing cost and complexity.
[0009] Weak surge protection: LED loads are sensitive to voltage fluctuations. Traditional circuits lack effective input protection mechanisms. Surge voltages caused by power grid fluctuations or electromagnetic interference can easily burn out LED strips or dimming modules.
[0010] Load identification failure: LED light strips with different voltage specifications (12V / 24V / 48V) require specific driving voltages. Traditional switches cannot automatically identify the load type, and manual configuration errors can easily cause equipment damage.
[0011] (4) Poor adaptability of control algorithm to load
[0012] Insufficient dynamic adjustment performance: Traditional two-dimensional fuzzy PID (which only relies on current deviation and rate of change) cannot reflect the user's operation speed (such as rapid sliding), resulting in high-speed adjustment lag or low-speed overshoot;
[0013] Lack of load characteristic adaptation: LED strips with different voltages have large differences in sensitivity to drive current, and fixed PID parameters are prone to causing nonlinear regulation; static gamma curves cannot compensate for the luminous efficacy decay in the dark area of low-voltage LED strips or the nonlinear luminous emission in the high-brightness section of high-voltage LED strips.
[0014] Weak environmental robustness: LED electrical characteristics are significantly affected by temperature (internal resistance increases at high temperatures). Traditional algorithms do not dynamically constrain the boundaries of PID parameters, which can easily lead to system instability under extreme conditions.
[0015] (5) Lack of fault protection mechanism
[0016] Existing dimming switches lack real-time monitoring of load current, voltage, and temperature. In case of a fault, they cannot cut off the output or record fault data in time, which can easily cause equipment damage or even safety hazards.
[0017] In summary, existing technologies cannot meet users' needs for "long lifespan, high precision, wide compatibility, intelligent adjustment, and safety and reliability." There is an urgent need for a new LED dimming technology solution that integrates permanent magnet magnetic attraction reset, Hall sensor detection, adaptive voltage regulation, intelligent control, and fault protection. Summary of the Invention
[0018] In order to overcome the shortcomings of the prior art, the present invention aims to provide an adaptive dimming system and control method for permanent magnet push-button switches, which solves the technical problems of short lifespan, low adjustment accuracy, poor wide voltage adaptability, weak anti-interference ability and insufficient fault response of traditional switches.
[0019] To solve the above problems, the technical solution adopted by the present invention is as follows:
[0020] An adaptive dimming system for a permanent magnet push-button switch, comprising:
[0021] The permanent magnet magnetic button module includes a slidable button body, a permanent magnet inside the button body, and an iron plate that cooperates with the permanent magnet. The button is reset by the magnetic attraction between the permanent magnet and the iron plate, and the sliding of the button body is used to trigger the adjustment of the light parameters.
[0022] The Hall effect sensor module is set along the sliding path of the button body to detect the sliding displacement and speed of the button body and output the corresponding electrical signal.
[0023] The adaptive voltage regulation circuit includes an input protection unit, a voltage conversion unit, and a light strip identification unit. The input protection unit is used to suppress input surge voltage, the voltage conversion unit dynamically adjusts the output voltage through a feedback closed loop, and the light strip identification unit is used to identify the type of connected LED load and match the driving voltage.
[0024] The load adaptive control module is electrically connected to the Hall sensor module and the adaptive voltage regulation circuit, respectively. It is used to generate PWM control signals based on the electrical signals output by the Hall sensor module to adjust the brightness and color temperature of the LED load, and to achieve fault protection by monitoring the load current, voltage and temperature in real time.
[0025] Preferably, the Hall sensor module includes at least two Hall sensors, which are respectively located on both sides of the sliding path of the button body. By detecting changes in the magnetic field of the magnet, the sensor outputs a pulse signal, and the load adaptive control module calculates the sliding speed and displacement based on the pulse frequency.
[0026] Preferably, the input protection unit of the adaptive voltage regulation circuit includes a TVS diode and a varistor connected in parallel, the voltage conversion unit includes a pre-boost circuit composed of a common-mode inductor and a MOSFET, supporting a wide voltage input of 12V-60V, and the LED strip identification unit identifies the voltage specification of the LED load through a resistor divider network and ADC sampling.
[0027] Preferably, the load adaptive control module includes:
[0028] The current sampling unit collects the load current through a 0.1Ω precision resistor;
[0029] Fuzzy PID control unit dynamically adjusts PWM duty cycle based on current deviation and deviation change rate;
[0030] The fault handling unit cuts off the PWM output and drives the buzzer to sound an alarm when the load current exceeds 120% of the rated value or the temperature exceeds the preset threshold, and at the same time stores the fault data in the EEPROM.
[0031] A control method for an adaptive dimming system for a permanent magnet push-button switch includes the following steps:
[0032] The permanent magnet magnetic button module receives the user's sliding operation and automatically resets itself through the magnetic attraction between the permanent magnet and the iron sheet.
[0033] The Hall effect sensor module is used to detect the sliding displacement and speed of the permanent magnet magnetic button module and output the corresponding pulse electrical signal.
[0034] Based on pulsed electrical signals, the load adaptive control module takes current deviation and deviation change rate as input variables, dynamically adjusts PID parameters based on a preset fuzzy inference table, outputs PWM duty cycle adjustment amount, generates PWM control signal, and adjusts the brightness and color temperature of LED load based on gamma curve.
[0035] The system collects current, voltage, and temperature data of the LED load in real time. When overload, overtemperature, or abnormal voltage is detected, the output is cut off and an alarm is triggered, while the fault data is recorded.
[0036] Preferably, when outputting the corresponding pulse electrical signal, it includes:
[0037] At least two Hall sensors are spaced apart on both sides of the sliding path of the button body, and output orthogonal pulse signals with a phase difference of 90° by detecting the gradient change of the magnetic field strength of the permanent magnet.
[0038] The sliding direction is determined by comparing the trigger timing of the output pulses from the two Hall sensors;
[0039] The pulse signals of a single Hall sensor are counted, and the total displacement is calculated by combining the sliding direction.
[0040] The real-time sliding speed is calculated based on the number of pulses per unit time, and the high-speed adjustment mode is automatically switched when the sliding speed exceeds 10mm / s.
[0041] Among them, the pulse signal is checked for consistency over three consecutive pulse cycles to eliminate abnormal signals caused by external magnetic field interference, and a Schmitt trigger shaping circuit is used to ensure the steepness of the signal edge.
[0042] Preferably, the consistency verification and shaping circuit includes:
[0043] A dynamic threshold range is established based on the average value of the previous multiple normal pulse cycles and the sliding speed.
[0044] The pulse period data of the Hall sensors on both sides are collected synchronously. When a single Hall sensor exceeds the dynamic threshold range for multiple consecutive periods, the cross-validation mechanism is activated.
[0045] For the verified abnormal cycle, a predicted cycle value is generated by the triple exponential smoothing method. After replacing the abnormal data, it is re-involved in the displacement accumulation calculation. At the same time, the abnormal flag bit is stored in the EEPROM. When the cumulative number of abnormalities exceeds the set value, a magnetic field interference alarm is triggered.
[0046] A secondary screening is performed by combining the steepness of the rising edge of the pulse after Schmitt trigger shaping and the pulse width to eliminate pseudo-periodic signals caused by edge jitter. The width threshold is dynamically calibrated based on the input voltage.
[0047] Preferably, when dynamically calibrating the width threshold based on the input voltage, the following steps are included:
[0048] The voltage conversion unit of the adaptive voltage regulation circuit has a built-in ADC module, which collects the input voltage at a preset sampling frequency and simultaneously acquires the voltage fluctuation.
[0049] The input voltage is divided into three ranges: low, medium, and high. The reference threshold range for each range is preset, and the range boundaries are seamlessly switched through a hysteresis comparator.
[0050] A threshold correction coefficient is established based on voltage fluctuation and sliding speed, and the reference threshold range of each interval is corrected by the threshold correction coefficient.
[0051] Acquire temperature sampling data. When the ambient temperature is greater than or equal to the set value, apply a temperature compensation factor to the corrected threshold range and simultaneously correct the upper and lower limit thresholds.
[0052] Preferably, when adjusting the output PWM duty cycle, it includes:
[0053] Add the sliding speed v as a third input variable, construct a three-dimensional fuzzy inference table of current deviation-deviation change rate-sliding speed, and output the PID parameter K. p K i K d ;
[0054] Based on the LED load voltage specifications identified by the LED strip recognition unit, the voltage coefficient of the PID parameters output by fuzzy inference is corrected.
[0055] The fuzzy PID control unit calls multiple sets of past effective adjustment data stored in EEPROM, and the rule weights of the three-dimensional fuzzy inference table are iteratively updated through the particle swarm optimization algorithm.
[0056] Replace the original 3D fuzzy inference table with the updated 3D fuzzy inference table, and store the parameter deviation rate before and after the update into EEPROM. Pause self-evolution when the deviation rate is <3% for 3 consecutive times.
[0057] When |current deviation e| > 5% of rated current, K i =0 and activate integral separation protection, while K p The current is attenuated inversely proportional to the absolute value of the current deviation e.
[0058] When |current deviation e|≤5% of rated current, an incomplete derivative PID structure is adopted, and the output of the derivative element is smoothed by a first-order low-pass filter.
[0059] During the points recovery process, K i The rebound from 0 to the target value is exponential, and the rebound time constant is correlated with the sign of the deviation change rate ec.
[0060] K is dynamically limited based on the temperature sampling value of the LED load. p K i K d The adjustment range.
[0061] Preferably, when adjusting the brightness and color temperature of the LED load based on the gamma curve, the following steps are included:
[0062] The voltage specifications and number of LEDs in series of the LED load are obtained through the LED strip recognition unit. The LED photoelectric characteristic database stored in the EEPROM is called up to dynamically adjust the reference mapping coefficient of the gamma curve.
[0063] Application strategy of dynamically adjusting the gamma curve by combining sliding velocity v and displacement acceleration a:
[0064] When v≤3mm / s and a≤0.5mm / s²: enable 1024-point high-precision gamma lookup table and superimpose Gaussian filter to smooth PWM duty cycle transitions;
[0065] When v>8mm / s or a>2mm / s²: automatically switch to the forward prediction gamma algorithm, pre-calculate the target gamma input value 0.2s later based on the current sliding trend, and compress the dynamic range of the gamma curve at the same time;
[0066] Real-time compensation, including temperature compensation and current-voltage cross-calibration, is performed using multi-dimensional sampling data. The compensation result is then filtered by a second-order low-pass filter to drive the PWM output.
[0067] In this process, the Weber-Fechner law correction model is introduced to dynamically allocate filter weights based on the current brightness range.
[0068] Preferably, the control method described above further includes: when it is necessary to replace the LED load with one of different voltage specifications, performing the following reset operation:
[0069] Perform the button body in a cycle of "adjusting to the maximum and then adjusting to below 80%" three times in sequence, and the interval between each step does not exceed the set value;
[0070] After a successful reset, the LED load will automatically turn off, and the power will be disconnected and the current LED load will be removed within a preset time, replaced by an LED load with the target voltage specification.
[0071] After power is restored, the system automatically identifies and matches the replaced LED load.
[0072] If the power is not disconnected within the preset time, the currently connected LED load will be automatically re-identified.
[0073] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0074] (1) Improved mechanical structure and resetting performance
[0075] Ultra-long lifespan: Adopting a magnetic reset structure of neodymium iron boron permanent magnet + silver-plated iron sheet to replace the traditional spring, the button lifespan is increased to more than 10 million times (traditional only 500,000 times).
[0076] Low contact resistance: The iron sheet is silver-plated, reducing the contact resistance to below 5mΩ, thus reducing conduction losses and heat generation;
[0077] High-precision sliding: T-shaped slider + dovetail guide rail (gap ≤ 0.1mm) to achieve 5% adjustment step per millimeter within 10mm stroke (total 50 levels), which is significantly more accurate than the traditional method;
[0078] Dual-parameter integration: Sliding left and right corresponds to brightness / color temperature adjustment respectively, and the operation is ergonomic.
[0079] (2) Enhanced sliding detection accuracy and anti-interference capabilities
[0080] Non-contact detection: Dual Hall sensors output orthogonal pulses with a 90° phase difference, eliminating mechanical wear and ensuring high accuracy in direction recognition;
[0081] Dynamic adjustment mode: Automatically switches to high-speed mode (10% / mm step) when the sliding speed is >10mm / s, balancing fine adjustment and response speed;
[0082] Strong anti-interference capability: Through continuous three-cycle consistency verification, dynamic threshold range, cross-validation and triple exponential smoothing, it effectively suppresses external magnetic field interference and signal jitter, with an anomaly recognition rate of ≥95%.
[0083] (3) Wide voltage compatibility and comprehensive circuit protection
[0084] Full voltage coverage: Supports 12V-60V wide input, compatible with different specifications of LED light strips (12V / 24V / 48V).
[0085] Surge protection: TVS diode + varistor in parallel, quickly absorbs surge voltage, protecting the circuit and load;
[0086] Automatic load identification: Real-time matching of drive voltage through resistor voltage division and ADC sampling avoids manual configuration errors;
[0087] Multi-load compatibility: It can simultaneously connect multiple LED strips with different voltage specifications without the need for a dedicated power supply.
[0088] (4) Optimization of intelligent control algorithm
[0089] Three-dimensional fuzzy PID: Introducing sliding speed as a third input variable, with adjustment error ≤ ±2% and response time ≤ 100ms;
[0090] Dynamic rule evolution: The fuzzy inference table is updated through particle swarm optimization (PSO) during off-peak hours every day to adapt to load aging and environmental changes;
[0091] No steady-state error regulation: Integral separation + incomplete derivative PID, steady-state error approaches 0;
[0092] Load adaptive correction: Dynamically adjusts PID parameters according to the LED strip voltage, compatible with a full range of loads from 12V to 60V.
[0093] (5) Gamma adjustment and visual experience enhancement
[0094] Load adaptation gamma curve: Dark area compensation for low-voltage LED strips (12V), segmented correction for high-voltage LED strips (48V), solving the problem of nonlinear light emission;
[0095] Dynamic application strategy: Low-speed sliding uses 1024-point high-precision lookup table + Gaussian filtering, while high-speed sliding uses forward prediction algorithm to compress dynamic range and reduce flicker;
[0096] Multi-dimensional compensation: Temperature and current-voltage cross-calibration ensure adjustment accuracy under different environments;
[0097] Human eye-adaptive filtering: Based on the Weber-Fechner law, weighted filtering in the low-brightness area enhances detail, while Kalman filtering in the medium-to-high-brightness area suppresses ripple (ripple coefficient ≤ 0.8%).
[0098] (6) Fault protection and data management
[0099] Multiple real-time monitoring: sampling of current, voltage, and temperature in all dimensions; immediate output cut-off in case of overcurrent (120% of rated) or overtemperature (≥70℃);
[0100] Alarm and data storage: The alarm is triggered by a buzzer and LED indicator. The fault type, time, and parameters are stored in the EEPROM for easy diagnosis.
[0101] Environmental robustness: The failure rate is significantly reduced in environments ranging from -10℃ to 60℃.
[0102] (7) Integration and volume optimization
[0103] Modular design: Permanent magnet magnetic attraction, Hall effect detection, voltage regulation, and control modules are highly integrated;
[0104] Miniaturization: Utilizing DBC technology, the size is reduced by 40%, offering flexible installation and enhancing home décor.
[0105] Through the above-mentioned technological innovations, this invention comprehensively improves the performance and user experience of LED dimming switches, making them suitable for various complex lighting scenarios and demonstrating significant technological advancement and market application value.
[0106] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0107] Figure 1 This is a structural diagram of a permanent magnet push-button switch according to an embodiment of the present invention;
[0108] Figure 2 This is a flowchart illustrating the control method steps of the adaptive dimming system according to an embodiment of the present invention;
[0109] Figure 3 This is a flowchart of the reset operation according to an embodiment of the present invention. Detailed Implementation
[0110] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0111] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0112] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the scope of this application and its application or use.
[0113] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0114] Example 1: The present invention provides an adaptive dimming system for a permanent magnet push-button switch, comprising: a permanent magnet magnetic push-button module, a Hall sensor module, an adaptive voltage regulation circuit, and a load adaptive control module.
[0115] The permanent magnet magnetic button module includes a slidable button body, a permanent magnet inside the button body, and an iron plate that cooperates with the permanent magnet. The button is reset by the magnetic attraction between the permanent magnet and the iron plate, and the sliding of the button body is used to trigger the adjustment of the light parameters.
[0116] The Hall effect sensor module is set along the sliding path of the button body to detect the sliding displacement and speed of the button body and output the corresponding electrical signal.
[0117] The adaptive voltage regulation circuit includes an input protection unit, a voltage conversion unit, and a light strip identification unit. The input protection unit is used to suppress input surge voltage, the voltage conversion unit dynamically adjusts the output voltage through a feedback closed loop, and the light strip identification unit is used to identify the type of connected LED load and match the driving voltage.
[0118] The load adaptive control module is electrically connected to the Hall sensor module and the adaptive voltage regulation circuit, respectively. It is used to generate a PWM control signal based on the electrical signal output by the Hall sensor module to adjust the brightness and color temperature of the LED load, and to achieve fault protection by monitoring the load current, voltage and temperature in real time.
[0119] Background Description: Traditional mechanical push-button switches generally use springs or elastic metal sheets to achieve the reset function. After long-term use, mechanical wear and metal fatigue can easily lead to button jamming or reset failure. Their lifespan is typically only around 500,000 cycles, and frequent operation increases contact resistance, affecting circuit stability. Meanwhile, traditional dimmer switches mostly rely on physical structures such as knobs and levers, offering limited adjustment methods (e.g., only brightness adjustment), low operational precision (common adjustment steps ≥10%), and the sliding mechanism often uses ordinary slide rails, which are prone to jamming or excessive gaps leading to adjustment errors. This fails to meet users' needs for precise and intuitive adjustment of lighting parameters (brightness / color temperature). Furthermore, the complex mechanical connection between traditional buttons and panels occupies a large space, limiting the miniaturization of the overall switch design. Therefore:
[0120] In one possible embodiment, the permanent magnet is made of neodymium iron boron material, the iron sheet surface is silver-plated to reduce contact resistance, and the bottom of the button body is provided with a T-shaped slider, which cooperates with the dovetail groove guide rail on the panel to achieve bidirectional sliding. The sliding stroke is 10mm, and each millimeter corresponds to a 5% brightness or color temperature adjustment step.
[0121] Specifically, in this embodiment, the permanent magnet is a ring-shaped magnet made of neodymium iron boron material, which is installed on the back of the button body by screws. It has high coercivity, stable and long-lasting magnetic field, and is lightweight, so the influence of its own gravity on the operation of the button body can be ignored.
[0122] This embodiment uses the magnetic attraction between a permanent magnet and an iron sheet to achieve switch control. A permanent magnet is installed inside the button body, and an iron sheet is embedded in a corresponding position on the panel. When the button body is pressed, the permanent magnet and the iron sheet attract each other, thus connecting the circuit; when released, the magnetic force of the permanent magnet causes the button body to automatically reset, disconnecting the circuit.
[0123] See Figure 1The diagram shows the structure of a permanent magnet push-button switch. The button body supports bidirectional sliding (left and right) and vertical sliding. Sliding to the left adjusts the light brightness via a mechanical linkage mechanism; sliding to the right adjusts the color temperature. During sliding, the change in the relative position between the permanent magnet and the iron plate triggers a Hall sensor, which converts the sliding displacement into an electrical signal and transmits it to the load adaptive control module.
[0124] In this embodiment of the invention, it is necessary to further explain that improvements are made in three aspects: material selection, structural design, and adjustment accuracy.
[0125] (1) Solve the problems of mechanical wear and contact reliability: The magnetic reset structure is composed of high magnetic force neodymium iron boron permanent magnet and silver-plated iron sheet, which replaces the traditional spring reset. There is no mechanical friction loss, and the button life is increased to more than 10 million times. The silver plating treatment of the iron sheet can reduce the contact resistance to below 5mΩ, reducing conduction loss and heat generation.
[0126] (2) Achieve bidirectional sliding and multi-functional integration: Through the precise cooperation between the T-shaped slider and the dovetail groove guide rail (fitting gap ≤ 0.1mm), the button body can achieve stable bidirectional sliding, breaking through the limitation of the traditional single function of the switch. Sliding to the left corresponds to brightness adjustment, and sliding to the right corresponds to color temperature adjustment. The operation logic conforms to ergonomics.
[0127] (3) Improve adjustment accuracy and stroke efficiency: Set the sliding stroke to 10mm, with each millimeter corresponding to a 5% parameter adjustment step (total adjustment range 0-50%), taking into account both the need for fine adjustment and ease of operation. Compared with traditional knob adjustment (the minimum step is usually 10%), the control accuracy is improved by 1 time, and the mechanical limit design avoids over-travel adjustment.
[0128] The above design, through the combination of mechanical structure and magnetic attraction principle, solves the core problems of traditional switches such as short lifespan, single function, and insufficient accuracy, laying the hardware foundation for the miniaturization, long lifespan, and intelligence of adaptive dimming switches.
[0129] Background Description: Traditional dimmer switches, when implementing sliding adjustment functions, generally face the dual challenges of insufficient adjustment precision and low mechanical structure reliability. Traditional products mostly rely on physical structures such as knobs and levers, offering only a single adjustment method (e.g., supporting only brightness adjustment), low operational precision (common adjustment steps ≥10%), and the sliding mechanism often uses ordinary slide rails, prone to jamming or excessive gaps leading to adjustment errors. This fails to meet users' needs for precise and intuitive adjustment of lighting parameters (brightness / color temperature). Furthermore, traditional sliding detection solutions often use potentiometers or mechanical contact sensors, which suffer from short lifespan due to mechanical wear (typically only 500,000 operations), increased contact resistance causing signal drift, and other problems affecting circuit stability and adjustment accuracy. Therefore:
[0130] In one possible embodiment, the Hall sensor module includes at least two Hall sensors, respectively located on both sides of the sliding path of the button body. The Hall sensors are of type A3144, which output pulse signals by detecting changes in the magnetic field of the magnet. The load adaptive control module calculates the sliding speed and displacement based on the pulse frequency.
[0131] In this embodiment of the invention, it is necessary to further explain that the present embodiment proposes a non-contact detection scheme based on Hall effect sensing technology. High-precision sliding parameter acquisition is achieved through dual-sensor differential detection and magnetic field change quantification, which fundamentally solves the inherent defects of mechanical contact detection.
[0132] Background Description: Traditional dimming switches have significant limitations in terms of voltage compatibility and circuit protection, specifically:
[0133] Poor input voltage adaptability: Traditional switches typically only support fixed voltage input (such as 220V AC or specific low-voltage DC), which cannot be compatible with the power supply requirements of LED light strips with a wide range of 12V-60V. In many scenarios (such as home and commercial lighting), a dedicated power supply is required, which increases the cost and complexity of use.
[0134] Voltage fluctuations and surge risks: LED loads are sensitive to voltage stability, and traditional circuits lack effective input protection mechanisms. Surge voltages caused by power grid fluctuations or external electromagnetic interference can easily lead to the burning out of the LED strip or damage to the dimming module.
[0135] Lack of load type identification: Different LED strips (e.g., 12V, 24V, 48V specifications) require specific drive voltages. Traditional switches cannot automatically identify load types, and manual configuration errors can easily damage the equipment. Furthermore, they cannot simultaneously connect multiple LED strips of different specifications. Therefore:
[0136] In one possible embodiment, the input protection unit of the adaptive voltage regulation circuit includes a TVS diode and a varistor connected in parallel, the voltage conversion unit includes a pre-boost circuit composed of a common-mode inductor and a MOSFET, supporting a wide voltage input of 12V-60V, and the LED strip identification unit identifies the voltage specification of the LED load through a resistor divider network and ADC sampling.
[0137] Specifically, input protection: connect a TVS diode (such as SMBJ60A) and a varistor (such as MYG14K471) in parallel at the input terminal to prevent surge voltage from damaging the circuit.
[0138] Voltage conversion: A pre-boost circuit is composed of a common-mode inductor (such as LF4) and a MOSFET (such as IRF840), and the output voltage is controlled by PWM. The load adaptive control module monitors the output voltage in real time and adjusts the PWM duty cycle to maintain stability.
[0139] LED strip identification: A resistor divider network is set at the terminal block to identify the LED strip type (such as 12V, 24V or 48V) through ADC sampling and automatically switch the voltage output mode.
[0140] In this embodiment of the invention, it is necessary to further explain that an input protection unit composed of a parallel TVS diode and a varistor is used to quickly absorb surge voltages (such as lightning strikes and power switching interference) and prevent high-voltage surges from damaging subsequent circuits. A pre-boost circuit composed of a common-mode inductor and a MOSFET, combined with feedback closed-loop control, achieves dynamic adjustment of the 12V-60V input voltage, ensuring stable output voltage under different power supply environments and meeting the driving requirements of low-voltage to high-voltage LED strips. Through a resistor divider network and an ADC sampling circuit, the voltage specifications (such as 12V / 24V / 48V) of the connected LED load are detected in real time, automatically matching the optimal driving voltage. This supports simultaneous connection of multiple different LED strips without manual configuration, improving compatibility and safety.
[0141] Background Description: Traditional dimmer switches face problems such as insufficient load control accuracy, poor reliability, and weak fault response capabilities in practical applications. On the one hand, traditional switches have limited adaptability to input voltage and LED strip type, easily leading to LED strip damage or poor dimming effect due to voltage mismatch. Furthermore, they lack real-time monitoring of load status, making it difficult to dynamically adjust output parameters according to load changes. On the other hand, when faults such as overload, overtemperature, or abnormal voltage occur, traditional switches often fail to respond promptly and take effective protective measures, potentially causing equipment damage or even safety hazards. Therefore:
[0142] In one possible embodiment, the load adaptive control module includes: a current sampling unit, a fuzzy PID control unit, and a fault handling unit.
[0143] The current sampling unit collects the load current through a 0.1Ω precision resistor (such as CRCW1206100RFKE), and after being amplified by an operational amplifier (such as LM358), it is input into the ADC channel.
[0144] The fuzzy PID control unit dynamically adjusts the PWM duty cycle based on the current deviation and the rate of change of the deviation.
[0145] When the load current exceeds 120% of the rated value or the temperature exceeds the preset threshold, the fault handling unit cuts off the PWM output and drives the buzzer to sound an alarm. At the same time, it stores the fault data in EEPROM (such as AT24C02), which can be read and analyzed via serial port.
[0146] In this embodiment of the invention, it is necessary to further explain that the load adaptive control module achieves precise control and safety protection of the LED load through the coordinated operation of current sampling, intelligent adjustment, and fault protection. The principle of each unit is as follows:
[0147] 1. Current sampling unit: Real-time monitoring of load status
[0148] Core principle: Current is collected through a 0.1Ω precision resistor connected in series in the LED load circuit. According to Ohm's law (I=V / R), the voltage drop across the resistor is proportional to the load current. This voltage signal is amplified, filtered, and then transmitted to the control module as the basis for subsequent adjustment and protection.
[0149] Accuracy Guarantee: High-precision, low-temperature drift resistors (e.g., 0.1% accuracy) are used to ensure that the current measurement error is ≤1%, providing a reliable input for fuzzy PID control.
[0150] II. Fuzzy PID Control Unit: Dynamically Optimizing PWM Output
[0151] Control logic: Combining fuzzy logic and PID control, adaptive adjustment of LED brightness / color temperature is achieved.
[0152] (1) Input variables: “Current deviation (the difference between the actual current and the target current)” and “deviation change rate (the rate of change of current deviation)” are used as core inputs.
[0153] (2) Fuzzy reasoning: Dynamically adjust PID parameters (proportional coefficient K) through a preset fuzzy rule table (e.g., "if the deviation is large and changes rapidly, then increase the adjustment intensity"). p Integral coefficient K i Differential coefficient K d ).
[0154] (3) PWM regulation: Based on the optimized PID parameters, the PWM duty cycle adjustment amount (Δu) is output to change the LED drive current in real time, and finally achieve smooth brightness / color temperature control without overshoot.
[0155] Advantages: Compared with traditional PID, fuzzy PID is more adaptable to nonlinear loads (such as LED light strips with different voltage specifications), improves the adjustment response speed by 30%, and has a steady-state error of ≤±2%.
[0156] III. Fault Handling Unit: Multiple Protection and Data Logging
[0157] Fault monitoring: Real-time monitoring of load current, voltage, and temperature; conditions triggering protection include:
[0158] Overcurrent protection: The load current exceeds 120% of the rated value (e.g., the threshold is 1.2A when the rated value is 1A).
[0159] Over-temperature protection: The temperature exceeds a preset threshold (e.g., 70℃, the specific value can be configured via EEPROM).
[0160] Protective actions:
[0161] Immediately cut off the output: Stop the PWM signal output, cut off the power supply to the LED load, and prevent damage to the device.
[0162] Alarm prompt: The driver buzzer will sound intermittently (e.g., at 1-second intervals) and may also trigger the LED indicator to flash (e.g., flashing red quickly).
[0163] Data storage: The fault type (overcurrent / overtemperature), occurrence time, and abnormal parameter values (such as peak current and temperature) are written into the EEPROM to facilitate subsequent fault diagnosis and system optimization.
[0164] IV. Module Collaboration Mechanism
[0165] (1) The current sampling unit provides real-time feedback for fuzzy PID control to ensure adjustment accuracy; at the same time, it provides overcurrent judgment basis for the fault handling unit.
[0166] (2) The fuzzy PID control unit dynamically optimizes the output based on the sampled data to achieve closed-loop control of "load change - parameter adjustment - stable output".
[0167] (3) The fault handling unit acts as a safety barrier, responds quickly under abnormal operating conditions, protects the circuit and load safety, and records key data.
[0168] Through the organic combination of the three units, the load adaptive control module can be adapted to LED loads with a wide voltage range of 12V-60V, realizing intelligent management of the entire process from precise adjustment to fault protection.
[0169] Background Description: Traditional push-button switches, due to their complex mechanical structures and discrete components, are difficult to further reduce in size. This not only affects installation flexibility but also negatively impacts the aesthetics of home décor. Therefore:
[0170] In one possible embodiment, the permanent magnet magnetic button module, Hall sensor module, adaptive voltage regulation circuit and load adaptive control module adopt a modular integrated design, reduce the number of circuit board layers through direct copper bonding (DBC) technology, and the overall structure is 40% smaller than that of traditional switches.
[0171] In this embodiment of the invention, it is necessary to further explain that a modular integrated design is proposed, which highly integrates the permanent magnet magnetic button module, Hall sensor module, adaptive voltage regulation circuit, and load adaptive control module together. At the same time, direct copper bonding (DBC) technology is used to reduce the number of circuit board layers. Through this design, the overall structure is 40% smaller than that of traditional switches, which not only improves installation flexibility but also enhances home décor.
[0172] Example 2, see Figure 2 The present invention provides a control method step diagram for an adaptive dimming system. Figure 2 The control method shown for an adaptive dimming system for a permanent magnet push-button switch includes the following steps:
[0173] S101. The permanent magnet magnetic button module receives the user's sliding operation and automatically resets the permanent magnet magnetic button module through the magnetic attraction between the permanent magnet and the iron sheet.
[0174] S102. Utilize the Hall effect sensor module to detect the sliding displacement and speed of the permanent magnet magnetic button module, and output the corresponding pulse electrical signal;
[0175] S103. Based on the pulse electrical signal, the load adaptive control module uses the fuzzy adaptive PID algorithm to output the PWM duty cycle adjustment amount, generates the PWM control signal, and adjusts the brightness and color temperature of the LED load based on the gamma curve;
[0176] S104. Real-time acquisition of current, voltage and temperature data of LED load. When overload, overtemperature or voltage abnormality is detected, the output is cut off and an alarm is triggered, and fault data is recorded at the same time.
[0177] Background Description: Traditional dimmer switches, when implementing sliding adjustment functions, generally face the dual challenges of insufficient adjustment precision and low mechanical structure reliability. Traditional products mostly rely on physical structures such as knobs and levers, offering only a single adjustment method (e.g., supporting only brightness adjustment), low operational precision (common adjustment steps ≥10%), and the sliding mechanism often uses ordinary slide rails, prone to jamming or excessive gaps leading to adjustment errors. This fails to meet users' needs for precise and intuitive adjustment of lighting parameters (brightness / color temperature). Furthermore, traditional sliding detection solutions often use potentiometers or mechanical contact sensors, which suffer from short lifespan due to mechanical wear (typically only 500,000 operations), increased contact resistance causing signal drift, and other problems affecting circuit stability and adjustment accuracy. Therefore:
[0178] In step S102 above, when the Hall sensor module detects the sliding displacement and speed of the permanent magnet magnetic button module and outputs the corresponding pulse electrical signal, the process includes:
[0179] Dual-sensor differential detection: At least two A3144 Hall sensors are set at intervals on both sides of the sliding path of the button body. The Hall sensors are spaced 5mm apart along the sliding direction. By detecting the gradient change of the magnetic field strength of the permanent magnet, an orthogonal pulse signal with a phase difference of 90° is output.
[0180] Sliding direction determination: The sliding direction is determined by comparing the trigger timing (lead / lag relationship) of the output pulses of the two Hall sensors. When the pulse of the left Hall sensor leads the pulse of the right Hall sensor, it is determined to slide to the left (brightness adjustment), and vice versa, it is determined to slide to the right (color temperature adjustment).
[0181] Displacement and velocity calculations:
[0182] Displacement: The pulse signals of a single Hall sensor are counted, with each pulse corresponding to a sliding displacement of 0.2 mm (matching 50 levels of adjustment accuracy for a total stroke of 10 mm). The total displacement is calculated by combining the sliding direction.
[0183] Sliding speed: The real-time sliding speed is calculated based on the number of pulses (pulse frequency) per unit time. When the sliding speed exceeds 10mm / s, it automatically switches to high-speed adjustment mode (stepping accuracy is improved to 10% / mm).
[0184] Among them, anti-interference processing: the pulse signal is checked for consistency for three consecutive pulse cycles to eliminate abnormal signals caused by external magnetic field interference, and a Schmitt trigger shaping circuit is used to ensure the steepness of the signal edge.
[0185] In this embodiment of the invention, it is necessary to further explain that two A3144 Hall sensors are arranged 5mm apart along the sliding path. They output orthogonal pulse signals through changes in magnetic field gradient, replacing the traditional mechanical contact detection, fundamentally eliminating the problem of mechanical wear, and at the same time improving the direction recognition accuracy by utilizing the pulse characteristics with a 90° phase difference.
[0186] By differentiating left and right sliding based on the pulse timing lead / lag relationship (corresponding to brightness / color temperature adjustment respectively), it breaks through the limitation of single parameter adjustment of traditional switches, realizes dual-parameter integrated control, and avoids signal distortion caused by changes in contact resistance based on non-contact magnetic field detection.
[0187] It adopts a displacement quantization accuracy of 0.2mm per pulse (50 levels / 10mm stroke), combined with dynamic speed switching adjustment step (5% / mm at low speed, 10% / mm at high speed), to solve the contradiction between low adjustment accuracy (step ≥10%) and slow response speed in traditional methods.
[0188] By performing three consecutive cycles of consistency verification, setting a dynamic threshold range, and shaping with a Schmitt trigger, external magnetic field interference (such as environmental interference from motors, magnets, etc.) and signal edge jitter are effectively suppressed, ensuring detection stability in complex electromagnetic environments and solving the adjustment error problem caused by interference in traditional sensors.
[0189] In one possible embodiment, the consistency check and shaping circuit includes:
[0190] Dynamic period threshold setting: A dynamic threshold range is established based on the average value (T_avg) and sliding speed (v) of the previous 5 normal pulse cycles, including: when the sliding speed v≤5mm / s, the deviation range between the current cycle T and T_avg is allowed to be ±15%; when v>5mm / s, the deviation range is dynamically expanded to ±30%.
[0191] Dual-sensor cross-validation: Pulse period data (T_left, T_right) of Hall sensors on both sides are collected synchronously. When a single Hall sensor exceeds the dynamic threshold range for three consecutive periods, the cross-validation mechanism is activated. If the deviation of the synchronous data of the other sensor is ≤50% of the threshold, it is determined to be unilateral interference, and the effective side period data is used for compensation.
[0192] Abnormal cycle replacement algorithm: For the verified abnormal cycle, a predicted cycle value is generated by the triple exponential smoothing method (α=0.6), and the abnormal data is replaced and re-participated in the displacement accumulation calculation. At the same time, the abnormal flag bit is stored in EEPROM. When the cumulative number of abnormalities exceeds 5 times / second, a magnetic field interference alarm is triggered.
[0193] Multi-parameter joint verification: The rise edge steepness (≥1.2V / μs) and pulse width (30μs~200μs) of the pulse after Schmitt trigger shaping are combined for secondary screening to eliminate pseudo-periodic signals caused by edge jitter. The width threshold is dynamically calibrated based on the input voltage.
[0194] In this embodiment of the invention, it is necessary to further explain that the embodiment adapts to different sliding states through dynamic threshold, eliminates unilateral interference through dual-sensor redundancy verification, maintains detection continuity through abnormal data replacement, and ensures signal quality through multi-parameter verification. Ultimately, it achieves multi-level suppression of external magnetic field interference, thereby improving the anti-interference capability and detection reliability of the Hall sensor module.
[0195] Background Description: In adaptive dimming systems using permanent magnet push-button switches, Hall effect sensors detect changes in the magnetic field of the permanent magnet and output pulse signals to accurately identify the sliding displacement and speed of the push-button. The signal quality directly determines the dimming accuracy and system stability. However, traditional Hall effect detection solutions face two major challenges: voltage fluctuation interference and the dynamic influence of the environment and load. Based on this:
[0196] In one possible embodiment, dynamically calibrating the width threshold based on the input voltage includes:
[0197] Real-time voltage sampling: The input voltage Vin is sampled at a sampling frequency of 1kHz through the built-in ADC module of the voltage conversion unit of the adaptive voltage regulation circuit, and the voltage fluctuation ΔV (the deviation between the current Vin and the average of the previous 5 cycles) is obtained simultaneously.
[0198] Voltage-threshold mapping model: The 12V-60V input voltage is divided into three intervals: low (12-24V), medium (24-40V), and high (40-60V). The preset reference threshold ranges for each interval are: low voltage region [40μs, 180μs], medium voltage region [35μs, 190μs], and high voltage region [30μs, 200μs]. The interval boundaries are seamlessly switched by a hysteresis comparator (hysteresis width 2V).
[0199] Dynamic coefficient adjustment: A threshold correction coefficient K is established based on the voltage fluctuation ΔV and the sliding speed v, and the reference threshold range of each interval is corrected by the threshold correction coefficient K. When |ΔV|≤5%, K=1+0.02×ΔV / Vin; when |ΔV|>5% and v≤5mm / s, K=1+0.03×ΔV / Vin; when v>5mm / s, K=1+0.015×ΔV / Vin.
[0200] Temperature compensation mechanism: Obtain temperature sampling data from the load adaptive control module. When the ambient temperature T≥45℃, apply a temperature compensation factor α=1+0.003×(T-45) to the corrected threshold range and simultaneously correct the upper and lower limit thresholds.
[0201] In this embodiment of the invention, it is necessary to further explain that a dynamic threshold calibration mechanism based on input voltage is proposed. This mechanism achieves adaptive filtering and shaping of the Hall pulse signal by real-time sampling of voltage parameters, establishing a voltage-threshold mapping model, dynamically adjusting correction coefficients, and introducing temperature compensation. Its core functions include:
[0202] Wide voltage compatibility: By dividing the 12V-60V input voltage into three ranges of low / medium / high, and matching differentiated reference threshold ranges, the detection failure problem of traditional fixed thresholds in wide voltage scenarios is solved, ensuring that both 12V low-voltage light strips (such as bedside ambient lights) and 60V high-voltage light strips (such as commercial window lighting) can stably identify sliding signals.
[0203] Anti-interference robustness: By dynamically adjusting the threshold correction coefficient (K) based on the voltage fluctuation (ΔV) and sliding speed (v), the threshold deviation range is expanded to avoid signal misjudgment when there are drastic voltage fluctuations (such as the moment the vehicle power supply is turned on) or high-speed sliding (when the user quickly adjusts the brightness). At the same time, the temperature compensation factor (α) is used to offset the circuit parameter drift in high-temperature environments (such as the decrease in the sensitivity of the Hall sensor).
[0204] System collaborative optimization: As a key link between the Hall sensor module and the load adaptive control module, dynamic threshold calibration ensures that the displacement / velocity signal input to the fuzzy PID control unit is accurate and reliable, providing high-quality data input for subsequent PWM duty cycle adjustment (such as fine stepping of brightness 5% / mm and smooth switching of color temperature), ultimately improving the overall dimming performance and user experience.
[0205] The above mechanism effectively compensates for the limitations of traditional static threshold circuits in wide voltage, multi-load, and complex environments, and is the core technical support for achieving "12V-60V full voltage coverage + 50-level high-precision adjustment + anti-magnetic field interference".
[0206] Background Description: Traditional two-dimensional fuzzy PID (based on current deviation e and deviation change rate ec) has the following problems in practical applications:
[0207] Insufficient dynamic adjustment performance: Relying solely on current deviation and rate of change, it cannot reflect the user's operating speed (such as adjustment needs when quickly sliding buttons), which can easily lead to lag in response during high-speed adjustment or large overshoot during low-speed adjustment.
[0208] Poor load compatibility: LED strips with different voltage specifications (12V / 24V / 48V) have significantly different sensitivities to drive current. Fixed PID parameters are difficult to adapt to multiple types of loads, which may result in nonlinear brightness / color temperature adjustment.
[0209] Weak environmental adaptability: The electrical characteristics of LED loads are significantly affected by temperature (e.g., internal resistance increases at high temperatures). Traditional control algorithms do not consider the dynamic constraints of temperature on the boundaries of PID parameters, which can easily lead to system instability under extreme conditions.
[0210] Rule solidification and error accumulation: Fixed fuzzy inference rules cannot adapt to changes in load characteristics over long-term use (such as LED strip aging), and adjustment errors accumulate over time, affecting control accuracy. Based on this:
[0211] In step S103 above, when outputting the PWM duty cycle adjustment using the fuzzy adaptive PID algorithm, the following steps are included: taking the current deviation (e) and the deviation change rate (ec) as input variables, and dynamically adjusting the PID parameters (K) based on a preset fuzzy inference table. p K i K d The output PWM duty cycle adjustment (Δu) is used to achieve zero steady-state error regulation.
[0212] In one possible embodiment, the PID parameters (K) are dynamically adjusted based on a preset fuzzy inference table. p K i K d When outputting the PWM duty cycle adjustment (Δu), it includes:
[0213] Three-dimensional fuzzy input expansion: Expand the traditional two-dimensional input (current deviation e, deviation change rate ec) to three-dimensional input, and add the sliding speed v (provided in real time by the Hall sensing module) as the third input variable to construct an e-ec-v three-dimensional fuzzy inference table, where:
[0214] When v ≤ 5 mm / s (low-speed adjustment), the inference table focuses on adjustment accuracy. Based on the reference ratio, reduce K p by 20% and increase K i by 15% to suppress overshoot;
[0215] When 5 mm / s < v ≤ 10 mm / s (medium-speed adjustment), adopt a balanced parameter configuration, and dynamically allocate K p , K i , K d at a reference ratio of 1:0.3:0.1;
[0216] When v > 10 mm / s (high-speed adjustment), prioritize the response speed. Based on the reference ratio, increase K p by 30% and reduce K d by 25% to reduce adjustment lag;
[0217] Load type adaptive correction: Based on the LED load voltage specifications (12V / 24V / 48V) identified by the light strip recognition unit, perform voltage coefficient correction on the PID parameters output by fuzzy inference:
[0218] Define the reference voltage U_ref = 24V, and combine the actual load voltage U_nom to correct the PID parameters. The correction formula is:
[0219] K p ' = KEvery day from 2:00 to 4:00 AM (outside of peak usage), the fuzzy PID control unit calls up the past 1000 sets of valid adjustment data stored in the EEPROM (including current deviation e, deviation change rate ec, sliding speed v, actual load voltage U_nom and corresponding adjustment error Δ_err).
[0223] The rule weights of the 3D fuzzy inference table are updated iteratively using the particle swarm optimization (PSO) algorithm. The objective function is min(Σ|Δ_err|), the number of iterations is set to 50, and the inertia weight is linearly decreased from 0.9 to 0.4.
[0224] Replace the original 3D fuzzy inference table with the updated 3D fuzzy inference table, and store the parameter deviation rate before and after the update into EEPROM. Pause self-evolution when the deviation rate is <3% for 3 consecutive times.
[0225] Separation without steady-state error and anti-saturation strategy:
[0226] When |e| > 5% of the rated current (large deviation zone), K will be... i =0 and activate integral separation protection, while K p The decay is inversely proportional to the absolute value of e (decay coefficient k = 0.8-1.2).
[0227] When |e|≤5% of rated current (small deviation range), an incomplete derivative PID structure is adopted. A first-order low-pass filter (time constant τ=0.1s) is used to smooth the output of the derivative stage to avoid K-axis distortion caused by high-frequency interference. d fluctuation;
[0228] During the points recovery process, K i The value rises exponentially from 0 to the target value, and the rise time constant is related to the sign of ec (τ=0.5s when ec is positive and τ=0.8s when ec is negative).
[0229] Parameter boundary dynamic clamping: Based on the temperature sampling value T of the LED load (provided by the load adaptive control module), K is dynamically limited. p K i K d Adjustment range:
[0230] When T≥60℃, K p_max Reduce by 15%, K i_max Reduce by 20% to prevent system stability from decreasing at high temperatures;
[0231] When T < 25℃, K d_min Reduced by 10%, improving dynamic response speed in low-temperature environments.
[0232] In this embodiment of the invention, it is necessary to further explain that the improvements are made from four aspects: input dimension expansion, load adaptation, rule evolution, and anti-interference design.
[0233] (1) Three-dimensional fuzzy input extension
[0234] Traditional two-dimensional inputs (e, ec) only focus on the static deviation of the load current, ignoring the dynamics of user operation (such as the speed v of sliding a button). By introducing the sliding speed v, which is collected in real time by a Hall sensor, as a third input variable, a three-dimensional fuzzy inference table of e-ec-v can be constructed, which can achieve:
[0235] Low-speed adjustment (v≤5mm / s): Prioritize adjustment accuracy and suppress overshoot (e.g., in scenarios where users finely adjust the dimming).
[0236] High-speed adjustment (v>10mm / s): Focuses on response speed and reduces lag (such as when users quickly switch brightness scenes) to match ergonomic operating habits.
[0237] (2) Adaptive correction of load type
[0238] LED strips with different voltage specifications (12V / 24V / 48V) exhibit significantly different sensitivities to PWM drive signals (e.g., low-voltage strips require higher current stability). The actual load voltage U_nom is obtained through the strip identification unit, and the PID parameters (K) are adjusted based on the reference voltage (24V). p , K i , K d Exponential correction can be performed to avoid nonlinear adjustment caused by changes in load type, and the correction coefficient can be optimized through 24-hour self-learning to improve long-term adaptability.
[0239] (3) Dynamic rule self-evolution mechanism
[0240] During long-term use, factors such as aging and dust accumulation in LED light strips can cause load characteristic drift, and fixed fuzzy rules are prone to adjustment errors. By recalling historical adjustment data (1000 sets) during off-peak hours (2:00-4:00) each day and using the particle swarm optimization (PSO) algorithm to iteratively update the weights of the three-dimensional inference table, dynamic optimization of the rules can be achieved, ensuring long-term stable control accuracy (convergence threshold ≤5%).
[0241] (4) Design with zero static error and anti-saturation
[0242] To address the integral saturation problem under large deviation conditions (such as sudden load changes), an integral separation strategy is introduced (K under large deviation conditions). i =0); To address the differential fluctuations caused by high-frequency interference, an incomplete differential PID (first-order low-pass filter) is employed; simultaneously, temperature sampling is used to dynamically clamp the PID parameter boundaries (e.g., reducing K at high temperatures).p_max K i_max This can improve the stability of the system under extreme operating conditions.
[0243] Through the above optimizations, this embodiment ultimately achieves the following:
[0244] Improved control precision: PWM duty cycle adjustment error ≤ ±2%, no steady-state error adjustment (steady-state error approaches 0);
[0245] Extended load compatibility: Supports 12V-60V wide voltage LED strips, automatically matching optimal PID parameters;
[0246] Enhanced environmental robustness: In ambient temperatures ranging from -10℃ to 60℃, the adjustment response time is ≤100ms, and the failure rate is reduced by more than 62%, meeting the complex usage requirements of home, commercial and other scenarios.
[0247] Background description: Existing LED dimming technology has the following shortcomings: poor load adaptability: the static gamma curve cannot adapt to the characteristics of different voltage light strips. For example, the light efficiency of 12V low voltage light strips is significantly reduced in the dark area, and the non-linear light emission of 48V high voltage light strips in the high brightness section causes adjustment distortion.
[0248] Poor adjustment experience: visual flickering is likely to occur when adjusting at high speed, the adjustment of low brightness area is not delicate enough (the human eye can perceive the step), and current ripple causes brightness jitter;
[0249] Weak robustness to environmental and load changes: Temperature and current / voltage fluctuations affect regulation accuracy, and static filtering strategies cannot simultaneously meet the requirements of response speed and anti-interference.
[0250] Lack of dynamic operation matching: The fixed gamma application mode cannot meet the dual requirements of low-speed fine adjustment and high-speed fast response, and is out of sync with the dynamic characteristics of user sliding operations. Based on this:
[0251] In step S103 above, adjusting the brightness and color temperature of the LED load based on the gamma curve includes:
[0252] The LED strip identification unit obtains the voltage specifications (12V / 24V / 48V) and the number of LEDs in series (N) of the LED load. It then calls the LED photoelectric characteristic database (containing voltage-current-brightness curves under different load voltages) pre-stored in the EEPROM and dynamically adjusts the reference mapping coefficient of the gamma curve.
[0253] When identified as a 12V low-voltage LED strip (N≤5), the low-voltage compensation factor (low-voltage compensation factor K_v=1.05+0.01×N) is enabled to correct the slope of the dark area (≤20% brightness) of the gamma curve and compensate for the luminous efficacy decay of the low-voltage LED.
[0254] When identified as a 48V high-voltage LED strip (N≥15), segmented gamma correction is adopted, dividing the 0-100% brightness range into 3 segments (0-30% / 30%-70% / 70%-100%), and configuring gamma values of 2.4 / 2.2 / 2.0 respectively to balance the nonlinear light emission characteristics of high-voltage LEDs in the high-brightness range;
[0255] The application strategy of dynamically adjusting the gamma curve by combining the sliding velocity (v) and displacement acceleration (displacement acceleration a = Δv / Δt) detected by the Hall sensor module:
[0256] Low-speed fine adjustment (v≤3mm / s, a≤0.5mm / s²): 1024-point high-precision gamma lookup table is enabled (interpolation interval 0.1% brightness), and Gaussian filtering (σ=0.8) is superimposed to smooth PWM duty cycle jumps, ensuring that the adjustment step is imperceptible to the human eye (the smallest discernible brightness difference measured is ≤1.2%).
[0257] High-speed coarse adjustment mode (v>8mm / s or a>2mm / s²): Automatically switches to forward prediction gamma algorithm, pre-calculates the target gamma input value 0.2s later based on the current sliding trend (fitting a quadratic curve through the displacement sequence of the past 5 sampling points), and compresses the dynamic range of the gamma curve to 30%-90% (skipping the extreme brightness segment) to reduce visual flicker during high-speed sliding.
[0258] Real-time compensation, including temperature compensation and current-voltage cross-calibration, is performed using multi-dimensional sampling data (load current, voltage, and temperature) from the load adaptive control module. The compensation result is then filtered by a second-order low-pass filter (cutoff frequency 3Hz) to drive the PWM output.
[0259] Specifically, by introducing the Weber-Fechner law correction model, the filter weights are dynamically allocated according to the current brightness range:
[0260] Low brightness area (≤30% of rated brightness): A weighted moving average filter (window size 5, weight coefficient [0.1,0.2,0.4,0.2,0.1]) is used to enhance the finesse of dark area adjustment;
[0261] Medium to high brightness area (>30% of rated brightness): Adaptive Kalman filtering is enabled, and the noise covariance matrix Q is dynamically adjusted according to the sliding speed (the larger the v, the more significant the increase in Q value), so as to suppress brightness jitter caused by current ripple while ensuring response speed (ripple coefficient ≤0.8% after filtering).
[0262] In this embodiment of the invention, the core innovations that need further explanation include:
[0263] Load-adaptive gamma mapping: Dynamically adjusts the gamma curve reference coefficient according to the LED strip voltage specifications (low voltage compensates for dark area slope, high voltage segmented gamma correction).
[0264] Operational dynamic adaptation strategy: Combine sliding speed and acceleration to switch gamma application modes (low-speed fine adjustment, high-speed forward prediction);
[0265] Multi-dimensional compensation and dynamic filtering: Introducing temperature and current-voltage cross-calibration compensation, and dynamically allocating filter weights based on the Weber-Fechner law (low brightness weighted filtering, medium and high brightness Kalman filtering).
[0266] Cross-module collaborative optimization: It works in conjunction with the Hall sensor module and the load adaptive control module to achieve closed-loop collaboration of operation perception, load adaptation and accurate output.
[0267] The technical principle of this embodiment is as follows:
[0268] Load parameter sensing and gamma adaptation: The LED voltage specifications (12V / 24V / 48V) and the number of LEDs in series are obtained through the LED strip recognition unit, and the gamma reference mapping coefficient is dynamically adjusted by calling the photoelectric characteristic database (low voltage compensation dark area, high voltage segment correction).
[0269] Operational dynamic response: Based on the sliding speed (v) and acceleration (a) of the Hall sensor module, switch gamma application strategy: at low speed, use 1024-point high-precision lookup table + Gaussian filtering to ensure fineness, and at high speed, use forward prediction algorithm to compress dynamic range and reduce flicker.
[0270] Multi-dimensional compensation and filtering: Load current, voltage and temperature data are collected for cross-calibration and temperature compensation, and PWM is output after second-order low-pass filtering; combined with Weber-Fechner law, weighted moving average filtering is used to enhance the detail in the low brightness area, and adaptive Kalman filtering is used to suppress ripple jitter in the medium and high brightness areas.
[0271] Closed-loop collaborative control: In conjunction with fuzzy adaptive PID algorithm and fault protection mechanism, it ensures adjustment accuracy and system stability.
[0272] This embodiment effectively solves the problems of load adaptation, dynamic operation matching and environmental robustness of traditional dimming technology, and improves the smoothness and accuracy of LED dimming.
[0273] In step S104 above, the fault data includes the fault type, occurrence time and abnormal parameter value, and the alarm is achieved by flashing LED indicator and sounding a buzzer.
[0274] See Figure 3The reset operation flowchart is provided. In one possible embodiment, the control method provided in this embodiment further includes a reset operation step when replacing LED loads with different voltage specifications:
[0275] When you need to replace the LED load with one of different voltage specifications, perform the following reset operation:
[0276] Perform the button body in a cycle of "adjusting to the maximum and then adjusting to below 80%" three times in sequence, with the interval between each step not exceeding 1 second;
[0277] After a successful reset, the LED load will automatically turn off. Within 10 seconds, the power must be disconnected and the current LED load removed, and replaced with an LED load of the target voltage specification.
[0278] After power is restored, the system automatically identifies and matches the replaced LED load.
[0279] If the power is not disconnected within 10 seconds, the currently connected LED load will be automatically re-identified.
[0280] In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An adaptive dimming system for permanent magnet push-button switches, characterized in that, include: The permanent magnet magnetic button module includes a slidable button body, a permanent magnet inside the button body, and an iron plate that cooperates with the permanent magnet. The button is reset by the magnetic attraction between the permanent magnet and the iron plate, and the sliding of the button body is used to trigger the adjustment of the light parameters. The Hall effect sensor module is set along the sliding path of the button body to detect the sliding displacement and speed of the button body and output the corresponding electrical signal. The adaptive voltage regulation circuit includes an input protection unit, a voltage conversion unit, and a light strip identification unit. The input protection unit is used to suppress input surge voltage, the voltage conversion unit dynamically adjusts the output voltage through a feedback closed loop, and the light strip identification unit is used to identify the type of connected LED load and match the driving voltage. The load adaptive control module is electrically connected to the Hall sensor module and the adaptive voltage regulation circuit, respectively. It is used to generate PWM control signals based on the electrical signals output by the Hall sensor module to adjust the brightness and color temperature of the LED load, and to achieve fault protection by monitoring the load current, voltage and temperature in real time.
2. The circuit according to claim 1, characterized in that, The Hall sensor module includes at least two Hall sensors, which are respectively located on both sides of the sliding path of the button body. By detecting changes in the magnetic field of the magnet, the sensor outputs a pulse signal. The load adaptive control module calculates the sliding speed and displacement based on the pulse frequency.
3. The circuit according to claim 1, characterized in that, The input protection unit of the adaptive voltage regulation circuit includes a TVS diode and a varistor connected in parallel. The voltage conversion unit includes a pre-boost circuit composed of a common-mode inductor and a MOSFET, supporting a wide voltage input of 12V-60V. The LED strip identification unit identifies the voltage specification of the LED load through a resistor divider network and ADC sampling.
4. The circuit according to claim 1, characterized in that, The load adaptive control module includes: The current sampling unit collects the load current through a 0.1Ω precision resistor; Fuzzy PID control unit dynamically adjusts PWM duty cycle based on current deviation and deviation change rate; The fault handling unit cuts off the PWM output and drives the buzzer to sound an alarm when the load current exceeds 120% of the rated value or the temperature exceeds the preset threshold, and at the same time stores the fault data in the EEPROM.
5. A control method for an adaptive dimming system for a permanent magnet push-button switch as described in any one of claims 1-4, characterized in that, Includes the following steps: The permanent magnet magnetic button module receives the user's sliding operation and automatically resets itself through the magnetic attraction between the permanent magnet and the iron sheet. The Hall effect sensor module is used to detect the sliding displacement and speed of the permanent magnet magnetic button module and output the corresponding pulse electrical signal. Based on pulsed electrical signals, the load adaptive control module takes current deviation and deviation change rate as input variables, dynamically adjusts PID parameters based on a preset fuzzy inference table, outputs PWM duty cycle adjustment amount, generates PWM control signal, and adjusts the brightness and color temperature of LED load based on gamma curve. The system collects current, voltage, and temperature data of the LED load in real time. When overload, overtemperature, or abnormal voltage is detected, the output is cut off and an alarm is triggered, while the fault data is recorded.
6. The method according to claim 5, characterized in that, When outputting the corresponding pulse electrical signal, it includes: At least two Hall sensors are spaced apart on both sides of the sliding path of the button body, and output orthogonal pulse signals with a phase difference of 90° by detecting the gradient change of the magnetic field strength of the permanent magnet. The sliding direction is determined by comparing the trigger timing of the output pulses from the two Hall sensors; The pulse signals of a single Hall sensor are counted, and the total displacement is calculated by combining the sliding direction. The real-time sliding speed is calculated based on the number of pulses per unit time, and the high-speed adjustment mode is automatically switched when the sliding speed exceeds 10mm / s. Among them, the pulse signal is checked for consistency over three consecutive pulse cycles to eliminate abnormal signals caused by external magnetic field interference, and a Schmitt trigger shaping circuit is used to ensure the steepness of the signal edge.
7. The method according to claim 6, characterized in that, When performing consistency checks and shaping circuits, the following are included: A dynamic threshold range is established based on the average value of the previous multiple normal pulse cycles and the sliding speed. The pulse period data of the Hall sensors on both sides are collected synchronously. When a single Hall sensor exceeds the dynamic threshold range for multiple consecutive periods, the cross-validation mechanism is activated. For the verified abnormal cycle, a predicted cycle value is generated by the triple exponential smoothing method. After replacing the abnormal data, it is re-involved in the displacement accumulation calculation. At the same time, the abnormal flag bit is stored in the EEPROM. When the cumulative number of abnormalities exceeds the set value, a magnetic field interference alarm is triggered. A secondary screening is performed by combining the steepness of the rising edge of the pulse after Schmitt trigger shaping and the pulse width to eliminate pseudo-periodic signals caused by edge jitter. The width threshold is dynamically calibrated based on the input voltage.
8. The method according to claim 7, characterized in that, When dynamically calibrating the width threshold based on the input voltage, the following is included: The voltage conversion unit of the adaptive voltage regulation circuit has a built-in ADC module, which collects the input voltage at a preset sampling frequency and simultaneously acquires the voltage fluctuation. The input voltage is divided into three ranges: low, medium, and high. The reference threshold range for each range is preset, and the range boundaries are seamlessly switched through a hysteresis comparator. A threshold correction coefficient is established based on voltage fluctuation and sliding speed, and the reference threshold range of each interval is corrected by the threshold correction coefficient. Acquire temperature sampling data. When the ambient temperature is greater than or equal to the set value, apply a temperature compensation factor to the corrected threshold range and simultaneously correct the upper and lower limit thresholds.
9. The method according to claim 5, characterized in that, When adjusting the output PWM duty cycle, the following are included: Add the sliding speed v as a third input variable, construct a three-dimensional fuzzy inference table of current deviation-deviation change rate-sliding speed, and output the PID parameter K. p K i K d ; Based on the LED load voltage specifications identified by the LED strip recognition unit, the voltage coefficient of the PID parameters output by fuzzy inference is corrected. The fuzzy PID control unit calls multiple sets of past effective adjustment data stored in EEPROM, and the rule weights of the three-dimensional fuzzy inference table are iteratively updated through the particle swarm optimization algorithm. Replace the original 3D fuzzy inference table with the updated 3D fuzzy inference table, and store the parameter deviation rate before and after the update into EEPROM. Pause self-evolution when the deviation rate is <3% for 3 consecutive times. When |current deviation e| > 5% of rated current, K i =0 and activate integral separation protection, while K p The current is attenuated inversely proportional to the absolute value of the current deviation e. When |current deviation e|≤5% of rated current, an incomplete derivative PID structure is adopted, and the output of the derivative element is smoothed by a first-order low-pass filter. During the points recovery process, K i The rebound from 0 to the target value is exponential, and the rebound time constant is correlated with the sign of the deviation change rate ec. K is dynamically limited based on the temperature sampling value of the LED load. p K i K d The adjustment range.
10. The method according to claim 5, characterized in that, When adjusting the brightness and color temperature of an LED load based on a gamma curve, the following steps are included: The voltage specifications and number of LEDs in series of the LED load are obtained through the LED strip recognition unit. The LED photoelectric characteristic database stored in the EEPROM is called up to dynamically adjust the reference mapping coefficient of the gamma curve. Application strategy of dynamically adjusting the gamma curve by combining sliding velocity v and displacement acceleration a: When v≤3mm / s and a≤0.5mm / s²: enable 1024-point high-precision gamma lookup table and superimpose Gaussian filter to smooth PWM duty cycle transitions; When v>8mm / s or a>2mm / s²: automatically switch to the forward prediction gamma algorithm, pre-calculate the target gamma input value 0.2s later based on the current sliding trend, and compress the dynamic range of the gamma curve at the same time; Real-time compensation, including temperature compensation and current-voltage cross-calibration, is performed using multi-dimensional sampling data. The compensation result is then filtered by a second-order low-pass filter to drive the PWM output. In this process, the Weber-Fechner law correction model is introduced to dynamically allocate filter weights based on the current brightness range.
11. The method according to claim 5, characterized in that, Also includes: When you need to replace the LED load with one of different voltage specifications, perform the following reset operation: Perform the button body in a cycle of "adjusting to the maximum and then adjusting to below 80%" three times in sequence, and the interval between each step does not exceed the set value; After a successful reset, the LED load will automatically turn off, and the power will be disconnected and the current LED load will be removed within a preset time, replaced by an LED load with the target voltage specification. After power is restored, the system automatically identifies and matches the replaced LED load. If the power is not disconnected within the preset time, the currently connected LED load will be automatically re-identified.