Wireless Bluetooth illumination control system and method based on APP

By designing a wireless Bluetooth lighting control system based on APP, the existing system's shortcomings in scalability, energy efficiency management and user experience are solved, advanced functions and adaptive dimming are realized, and a smarter and more energy-saving lighting control experience is provided.

CN120224510AInactive Publication Date: 2025-06-27SHENZHEN FUYUAN SHENG TECH CO LTD

Patent Information

Application Number
CN202510415072.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-06-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing wireless Bluetooth lighting control system has shortcomings in scalability, energy efficiency management and user experience, with limited brightness adjustment gear, complex interface, poor cross-platform compatibility, lack of dynamic environment perception capabilities, and cannot achieve adaptive dimming or energy consumption optimization.

Method used

A wireless Bluetooth lighting control system based on APP is designed, including Bluetooth module, lamp module, battery module, switch module, APP module and charging module. It adopts the architecture of protocol abstraction layer, connection management layer, data packaging layer and security authentication layer, supports brightness adjustment, color temperature control and Mesh network broadcast message format, and integrates ECDH key exchange and AES-128 encryption.

Benefits of technology

Advanced functions such as timing tasks, lighting scene switching and adaptive dimming are realized, which can automatically adjust brightness according to ambient light sensor data or user habits, achieve energy saving and comfort balance, and provide a more flexible and intelligent lighting control experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120224510A_ABST
    Figure CN120224510A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of smart home and Internet of Things, in particular to an APP-based wireless Bluetooth illumination control system and method, and the system comprises a Bluetooth module which achieves the functions of equipment discovery, pairing connection, data transmission and state monitoring; the lamp module is used for realizing a lighting function and displaying the working state and electric quantity information of the lamp; the battery module provides power supply support for the whole system, has an overvoltage protection function and ensures safe operation of the system; the switch module can manually control the working state of the lamp; the APP module is used for controlling the lamp and checking the state of the lamp through an APP so as to realize wireless control and state monitoring of the lamp; and the charging module provides a charging function for the battery module and protects the safety of the battery module. The system has the functions of task timing, light scene switching and the like, light rays are better protected from eyes when a reading mode is selected, the brightness can be automatically adjusted based on ambient light sensor data or user habits, and an intelligent illumination environment with balanced energy conservation and comfort is created.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of smart home and Internet of Things, and particularly to an APP-based wireless Bluetooth lighting control system and method. Background Art

[0002] With the rapid development of intelligent building and Internet of Things technologies, the wireless Bluetooth lighting control system has become an important direction for modern lighting upgrades due to its characteristics of no need for additional wiring and flexible deployment. In the prior art, Bluetooth control solutions based on mobile APPs have been widely applied to LED lighting control scenarios to achieve the on / off and dimming functions of lamps. Such systems usually adopt low-power Bluetooth technology, support short-distance wireless communication, and achieve grouped control, brightness adjustment, and scene presetting of multiple lights through the mobile APP interface.

[0003] Currently, with the complication of application scenarios, the prior art still has significant deficiencies in terms of scalability, energy efficiency management, and user experience. In traditional Bluetooth solutions, the brightness adjustment levels are limited, and most systems rely on brand-specific APPs, which have complex interfaces and poor cross-platform compatibility, being unfriendly to non-technical users. The solutions lack the ability to sense the dynamic environment, cannot achieve adaptive dimming or energy consumption optimization, and have relatively single functions. There is more energy consumption waste during long-term use, and electricity will be wasted continuously when users forget to turn off the lights, making it difficult to meet real-time requirements, and still having deficiencies in energy-saving intelligence. Summary of the Invention

[0004] The purpose of the present invention is to propose an APP-based wireless Bluetooth lighting control system and method to solve the problems of insufficient energy-saving and intelligent adaptation effects in the prior art.

[0005] To achieve the above purpose, the present invention adopts the following technical solutions: The APP-based wireless Bluetooth lighting control system includes the following modules:

[0006] A Bluetooth module, which realizes the functions of device discovery, pairing connection, data transmission, and status monitoring;

[0007] A lamp module, which is used to achieve the lighting function and display the working status and power information of the lamp;

[0008] A battery module, which provides power support for the entire system and has overvoltage protection function to ensure the safe operation of the system;

[0009] A switch module, which is used to manually control the working status of the lamp;

[0010] An APP module, which controls the lamp and views its status through the APP to achieve wireless control and status monitoring of the lamp;

[0011] The charging module provides a charging function for the battery module to ensure the continuous operation of the system. When the voltage of the battery module exceeds the safe range, it can automatically cut off the power supply to protect the safety of the battery module.

[0012] Furthermore, the architecture of the Bluetooth module can be divided into the following levels:

[0013] Protocol Abstraction Layer: The Protocol Abstraction Layer is located between the high-level application and the low-level hardware or protocol. By encapsulating the specific implementation details of the low-level protocol, it provides a standardized and simplified interface for the upper layer. The Protocol Abstraction Layer isolates the dependency relationships between different levels, enabling each layer to focus only on its own functions without having to care about the implementation details of other layers;

[0014] Link Management Layer: The Link Management Layer is used to implement device scan filtering, connection priority queue, and disconnection reconnection strategy. In the Bluetooth protocol stack, the Link Management Layer negotiates connection parameters, allocates resources, and processes the establishment, maintenance, and disconnection operations of connections, and uses the exponential backoff algorithm to maintain communication between devices;

[0015] Data Encapsulation Layer: Defines a lighting control instruction set based on the GATT protocol, including brightness adjustment and color temperature control, and is compatible with the Mesh network broadcast message format;

[0016] Security Authentication Layer: Integrates ECDH key exchange and AES-128 encryption.

[0017] Furthermore, the lamp module includes:

[0018] LED lamp unit, the LED lamp unit turns on and off and dims according to the control instructions received by the Bluetooth module. Pulse width modulation adjusts the average current by changing the duty cycle of the pulse signal, which is used for DC-driven light sources such as LEDs to achieve full coverage adjustment of brightness from 10% to 100%;

[0019] Warning lamp unit, the warning lamp unit changes its on and off state, color, or light intensity according to the control instructions received by the Bluetooth module or the control of the switch module;

[0020] Indicator lamp unit, including a Bluetooth indicator lamp and a power display lamp. The Bluetooth indicator lamp lights up constantly in white after Bluetooth connection. The power display lamp displays the power on the lamp body. There are 5 segments on the lamp body for the power indicator lamp, each segment representing 20% of the power. In the APP, the power is displayed in the form of a power graph, and each segment also represents 20% of the power. When the power is lower than 20%, the power indicator lamp and the power graph flash synchronously to remind the user to charge.

[0021] Furthermore, the switch module includes Button 1 and Button 2. The switch module cooperates with the lamp module to realize the manual control function of the lamp. The switch module has the following switch and dimming control functions for the lamp:

[0022] Button 1 controls the LED light unit. The LED light unit has three levels of light intensity. When pressing Button 1 for the first time, it defaults to output strong light. When pressing Button 1 for the second time, it switches to working light. When pressing Button 1 for the third time, it switches to weak light. When pressing Button 1 for the fourth time, the lamp turns off. The brightness level of the LED light unit at startup defaults to strong light;

[0023] Button 2 controls the warning light unit. Pressing Button 2 once makes the red and blue lights flash alternately.

[0024] Furthermore, the APP module and the Bluetooth module conduct data transmission through the Bluetooth communication protocol. Users can perform operations such as turning the lamp on and off and dimming through the APP. The lamp switch and warning light switch on the APP control the main lamp and warning light respectively. There is also a lamp brightness slider on the APP, which can control the brightness of the main lamp from 10% to 100%. The APP displays the percentage of battery power in real time, and when charging, the APP charging icon indicates that it is charging;

[0025] The APP module also includes advanced functions such as timing tasks and lighting scene switching. The switching time can be preset, supporting single or periodic tasks. Users can select lighting scenes such as "reading mode" and "theater mode" according to the APP. In addition to switching to a more eye - friendly lighting, the reading mode can also adaptively dim the light, which can automatically adjust the brightness based on ambient light sensor data or user habits, achieving a balance between energy conservation and comfort;

[0026] Adaptive dimming collects the ambient light intensity (unit: lux) in real time, with a sampling frequency of 1 - 10Hz. After being converted by ADC, it is transmitted to the APP. For the pre - processing of light data collection, a moving average filter is used to eliminate instantaneous noise. The formula:

[0027] L t =αL t-1 +(1 - α)L raw

[0028] where t represents time, L t refers to the current light intensity value at time t after filtering processing, L t-1 is the light intensity value at the previous moment, that is, at time point t - 1 after filtering processing, α is the smoothing coefficient, usually taking 0.8 - 0.9, and L raw represents the original light intensity value at the current moment, that is, at time point t, which is the light intensity value without filtering processing.

[0029] Further, the charging voltage of the charging module is 25.2V, the charging current is 6A, the charging time is ≤ 3 hours, the power indicator blinks when the lamp is inserted into the charger, and the intensity of the current power segment is greater while the power indicator is blinking, which is used to display the original power of the lamp in real time. When it is not fully charged, the power indicator blinks in sequence, and when it is fully charged, the power indicator shows full brightness. After the lamp is connected to the APP, the charging module can also cooperate with the APP module to display the charging status and power information on the APP in real time.

[0030] Further, the LED lamp unit has three gears: strong light, working light, and weak light. The light intensity of each gear can be set in the APP module. If there is no other operation after the three gears initially work stably for 30 minutes, the current starts to decrease. The current decreases gradually within 5 minutes, then works stably for another 30 minutes, and then the current decreases gradually within 5 minutes until the lamp goes out. If the switch is pressed again within half an hour after entering this brightness gear, the next gear brightness is based on the initial brightness. If it exceeds half an hour, the current brightness is the brightness with the same proportion of decreasing current. The STM32 single-chip microcontroller is used to execute the control current gradient algorithm. The linear current reduction formula is as follows:

[0031] I(t) = I initial -(I initial / T total )×t

[0032] Where I(t) represents the current value at the current moment, which represents the actual working current of the LED over time and directly affects the brightness. I initial represents the initial current value (i.e., the starting current at the beginning of current reduction), which is the current value corresponding to the current gear (strong light / working light / weak light) set by the user through the APP. I total represents the total time of the current reduction process, that is, the duration required to reduce the initial current to zero current. It is required to complete the current reduction within 5 minutes. Set T total = 300 seconds (5 minutes), and t represents the time elapsed since the start of current reduction, which determines which stage of the current reduction process is currently in. The current is proportional to the LED brightness, and the brightness decreases evenly during the current reduction process. The current gradient uses a timer interrupt to update the PWM duty cycle or constant current value every second.

[0033] Further, the Bluetooth module, lamp module, battery module, switch module, APP module, and charging module are interconnected to implement a wireless Bluetooth lighting control method based on the APP.

[0034] The beneficial effects brought by the technical solution provided by the present invention at least include:

[0035] The present invention is developed through a neural network algorithm, realizing advanced functions including timed tasks, lighting scene switching, etc. It can preset the switch time, support single or periodic tasks. Users can select lighting scenes such as "reading mode" and "cinema mode" according to the APP, and switch the device status with one key. In addition to switching to a more eye - protecting lighting, the reading mode can also adaptively adjust the light, automatically adjusting the brightness based on ambient light sensor data or user habits, achieving a balance between energy conservation and comfort, and creating a practical and intelligent lighting environment.

[0036] The present invention conducts preliminary training through a general sample, and each subsequent manual adjustment by the user is used as a new sample to update the model. In the reading mode, the APP obtains sensor data every 5 seconds, inputs it into the model to calculate the target brightness, adopts an incremental learning strategy, only fine - tunes the weights of the output layer, and conducts regular verification and testing. If the accuracy rate drops by more than 5%, full network retraining is triggered. In the reading mode, real - time prediction and dimming need to be achieved. The APP obtains sensor data every 5 seconds, inputs it into the model to calculate the target brightness. The sensor only wakes up the Bluetooth module when the detected light change > 5%, and the sleep current < 1 μA.

[0037] In the non - reading mode of the present invention, the gear positions of the LED lamp unit of the lamp are divided into three gears: strong light, working light, and weak light. After the three gears initially work stably for 30 minutes without other operations, the current starts to decrease. The current gradually decreases within 5 minutes, then works stably for another 30 minutes, and then the current gradually decreases within 5 minutes until the light goes out. If it exceeds half an hour, the brightness at this time is the brightness of the proportionally decreased current. Such a design can save energy during use, avoid waste, the brightness change of the light is gentle, the stimulation to the eyes is small, the interval time can be freely controlled according to needs, and the user can feel the change of the illumination intensity when performing relevant activities under the lamp, which also has a certain time reminder function for the user.

[0038] Through the control instructions received by the Bluetooth module, the user can control the main lamp according to the lamp switch on the APP, and control the warning lamp unit according to the warning lamp switch. The brightness slider of the lamp simply controls the brightness of the main lamp from 10% to 100%. The APP will display the percentage of power, and the user operation is simple. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following - described drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0040] Figure 1 It is a schematic diagram of the system composition provided by the embodiment of the present invention. Detailed Implementation Modes

[0041] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation modes, structures, features and effects of the APP-based wireless Bluetooth lighting control system and method proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0042] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this invention belongs.

[0043] The following embodiments are for illustrative purposes only and are not intended to limit the scope of the present invention.

[0044] The following specifically describes the specific solution of the APP-based wireless Bluetooth lighting control system and method provided by the present invention in conjunction with the accompanying drawings.

[0045] Embodiment

[0046] Please refer to Figure 1 which is a schematic diagram of the system composition of the APP-based wireless Bluetooth lighting control system provided by an embodiment of the present invention. In the embodiment of the present invention, an APP-based wireless Bluetooth lighting control system is provided, and the system includes:

[0047] A Bluetooth module that realizes functions such as device discovery, pairing connection, data transmission, and status monitoring.

[0048] A lamp module that can realize the lighting function and display the working status and power information of the lamp.

[0049] A battery module that provides power support for the entire system and has an overvoltage protection function to ensure the safe operation of the system.

[0050] A switch module for manually controlling the working status of the lamp, such as turning on / off, dimming, etc.

[0051] An APP module for controlling the lamp and viewing its status through the APP, realizing wireless control and status monitoring of the lamp.

[0052] A charging module that provides a charging function for the battery module to ensure the continuous operation of the system. When the voltage of the battery module exceeds the safe range, it can automatically cut off the power supply to protect the safety of the battery module.

[0053] Among them, in the Bluetooth module, the module architecture can be divided into the following levels:

[0054] Protocol Abstraction Layer. The Open Systems Interconnection model divides communication problems into multiple layers, which can isolate the dependencies between different layers. The protocol abstraction layer enables each layer to only focus on its own functions without having to care about the implementation details of other layers. Each layer realizes independent function encapsulation through the abstraction layer for Android and iOS Bluetooth APIs. Developers do not need to worry about the complexity of the underlying protocols and can complete tasks by simply calling the interfaces provided by the abstraction layer.

[0055] Link Management Layer. In the Bluetooth protocol stack, the link management layer negotiates connection parameters, allocates resources, and handles the establishment, maintenance, and disconnection operations of connections, and uses the exponential backoff algorithm to maintain communication between devices.

[0056] Data Encapsulation Layer: Defines a lighting control instruction set based on the GATT protocol, including Brightness Adjustment UUID = 0xFFA1 and Color Temperature Control UUID = 0xFFA2, and is compatible with the Mesh network broadcast message format.

[0057] Security Authentication Layer: Integrates ECDH key exchange and AES-128 encryption. ECDH is a key exchange protocol based on elliptic curve cryptography that can negotiate a shared key without sharing secrets. ECDH provides a secure key exchange mechanism, while AES-128 provides strong symmetric encryption capabilities. The combination of the two can effectively protect the security of data.

[0058] ECDH supports multiple elliptic curves and key lengths, and the security can be adjusted according to specific requirements. AES-128 can run efficiently in both hardware and software, is suitable for large-scale deployment, and complies with the security specifications above Bluetooth 4.2 to prevent instruction hijacking.

[0059] The lamp module includes:

[0060] LED Lamp Unit. The LED lamp unit turns on and off and dims according to the control instructions received by the Bluetooth module. Pulse width modulation adjusts the average current by changing the duty cycle of the pulse signal and is used for DC-driven light sources such as LEDs to achieve full coverage adjustment of brightness from 10% to 100%.

[0061] Warning Lamp Unit. The warning lamp unit adjusts the on / off, color, or light intensity according to the control instructions received by the Bluetooth module, while the switch module can only control the on / off.

[0062] Indicator Lamp Unit, including a Bluetooth indicator lamp and a power display lamp. The Bluetooth indicator lamp lights up constantly in white after Bluetooth connection, and the power display lamp displays accordingly based on the battery power information and the working status of the lamp, and the power display lamp works when any output of the lamp is on.

[0063] The power display light is located on the lamp body for power display. There are 5 segments in total, and each segment represents 20% of the power. In the APP, the power is displayed in the form of a power graph, and each segment also represents 20% of the power. When the power is lower than 20%, the power indicator light and the power graph flash to remind the user to charge, and the flashing of the lamp body is synchronized with that of the APP.

[0064] The switch module includes Button 1 and Button 2. The switch module cooperates with the lamp module to manually control the switches of the LED lamp unit and the warning lamp unit. The switch module cooperates with the Bluetooth connection module and the APP module to perform further operations such as turning the lamp on / off and dimming. The control logic of Button 1 and Button 2 is as follows:

[0065] Button 1 controls the LED lamp unit. The LED lamp unit has three gears. Pressing Button 1 for the first time defaults to outputting strong light. Pressing Button 1 for the second time switches to working light. Pressing Button 1 for the third time switches to weak light. Pressing Button 1 for the fourth time turns off the lamp. The default brightness gear of the LED lamp unit when it is turned on is strong light;

[0066] Button 2 controls the warning lamp unit. Pressing Button 2 once makes the red and blue lights flash alternately, and clicking the warning lamp again turns it off.

[0067] The APP module and the Bluetooth module perform data transmission through the Bluetooth communication protocol. The lamp switch on the APP controls the main lamp, and the warning lamp switch controls the warning lamp unit. The lamp brightness slider controls the brightness of the main lamp from 10% to 100%. The APP will display the percentage of power. When charging, the charging icon on the APP indicates that it is charging.

[0068] The APP module provides functions such as user registration, login, and multi-level permission management, supports device sharing and control permission allocation in multi-user scenarios, such as sub-permission management for family members or office places. The administrator can restrict the dimming range of ordinary users or disable the device deletion permission. Users can perform lamp on / off control, PWM dimming to adjust the brightness, and color temperature / color adjustment (RGB LED control) through the APP. The brightness / color temperature is adjusted using a slider (Seek Bar). The lamp switch on the APP controls the main lamp, and the warning lamp switch controls the warning lamp unit.

[0069] The APP module also includes advanced functions such as timed tasks and lighting scene switching. Preset the switch time, support single or periodic tasks. Users can select lighting scenes such as "Reading Mode" and "Cinema Mode" according to the APP to switch the device status with one key. In addition to switching to a more eye-friendly lighting light, the reading mode can also perform adaptive dimming, which can automatically adjust the brightness based on ambient light sensor data or user habits to achieve a balance between energy saving and comfort.

[0070] The adaptive dimming function collects the ambient light intensity in real time (unit: lux), and after ADC conversion, it is transmitted to the APP.

[0071] Preprocessing of optical data acquisition, using moving average filtering to eliminate instantaneous noise, formula:

[0072] L t = αL t-1 +(1 - α)L raw

[0073] where t represents time, L t refers to the current light intensity value at time t after filtering, L t-1 is the light intensity value at the previous moment (time point t - 1) after filtering, and α is the smoothing coefficient, usually taking 0.8 - 0.9, L raw represents the original light intensity value at the current moment (time point t), that is, the light intensity value without filtering.

[0074] Record the historical records of manual brightness adjustment by the general public at different time periods, including time, ambient light intensity, preference brightness curve, etc. Collect more than 10,000 groups of data, and divide the training set and the test set. Expand the data set through random light perturbation (±10% lux) and time shift, and train using the neural network algorithm to obtain a lighting system that can collect lighting intensity adjustment and adaptively adjust according to user habits.

[0075] The network structure design includes an input layer, a hidden layer, and an output layer, where:

[0076] The input layer has 3 nodes, the current ambient light intensity, the time coefficient, and the user preference index.

[0077] The hidden layer has a two-layer structure (6 - 8 nodes), using the Sigmoid activation function, and dynamically adjusting the slope parameter to avoid saturation.

[0078] The output layer has 1 node, the target brightness value, normalized to 0 - 1.

[0079] The algorithm improvement strategy is to dynamically adjust the learning rate according to the error change, using the following formula:

[0080] η t+1 = η t ×(1 + β·sign(ΔE))

[0081] where, η t+1 represents the learning rate at time step t + 1; η tdenotes the learning rate at time step t; β is a regulation factor used to control the amplitude of learning rate adjustment; ΔE represents the error change amount, that is, the difference between the current error and the error at the previous moment; sign(ΔE) is the sign function. If ΔE>0, indicating that the error increases, sign(ΔE) returns 1; if ΔE<0, indicating that the error decreases, sign(ΔE) returns -1; if ΔE = 0, sign(ΔE) returns 0.

[0082] Generate the initial weights using the Logistic map to enhance the global search ability and avoid falling into local minima. To further suppress weight oscillation, the following formula is used for momentum term accelerated convergence:

[0083]

[0084] where Δw ij is the update amount of the weight w ij ; α is the introduced momentum factor, usually between 0.9 - 0.95, used to control the influence of the weight update amount at the previous moment on the current update amount; is the update amount of the weight w ij at the migration moment; η is the learning rate; δ j is the error term, representing the error of the j-th neuron, and x i is the input value.

[0085] Each time the user manually adjusts, it is used as a new sample to update the model. In the reading mode, the APP obtains sensor data every 5 seconds, inputs it into the model to calculate the target brightness, adopts an incremental learning strategy, only fine-tunes the weights of the output layer, and conducts regular validation set tests. If the accuracy rate drops by more than 5%, full network retraining is triggered.

[0086] Real-time prediction and dimming need to be realized in the reading mode. The APP obtains sensor data every 5 seconds, inputs it into the model to calculate the target brightness. The sensor wakes up the Bluetooth module only when the detected light change > 5%, and the sleep current < 1 μA.

[0087] The charging voltage of the charging module is 25.2V, the charging current is 6A, and the charging time ≤ 3 hours. When the lamp is inserted into the charger, the power indicator shows the charging power situation in real time. When it is not fully charged, the power indicator flashes in sequence. When it is fully charged, the power indicator shows full brightness. After the lamp is connected to the APP, the charging module can also cooperate with the APP module to display the charging status and power information on the APP in real time.

[0088] The LED light unit has three brightness levels: high light, working light, and low light. The light intensity of each level can be set in the APP module. If there is no other operation after the three levels initially work stably for 30 minutes, the current starts to decrease. The current decreases gradually within 5 minutes, then works stably for another 30 minutes, and then the current decreases gradually within 5 minutes until the light goes out. If the switch is pressed again within half an hour after entering this brightness level, the next brightness level will be based on the initial brightness (the current starts to decrease again after re-timing for half an hour). If it exceeds half an hour, the current brightness will be at the level of the proportionally decreased current. This function is carried out in the non-reading mode. Such a design can effectively save energy and avoid waste. The brightness change of the light is gentle, with less irritation to the eyes. The interval time can be freely controlled to adapt to different scenarios. For users, it also has the function of time reminder. The hardware part uses an STM32 single-chip microcontroller, which is responsible for executing the control current gradient algorithm. The linear current reduction formula is as follows:

[0089] I(t) = I initial -(I initial / T total )×t

[0090] Where I(t) represents the current value at the current moment, which represents the actual working current of the LED over time and directly affects the brightness. I initial represents the initial current value (i.e., the starting current at the beginning of current reduction), which is the current value corresponding to the current level (high light / working light / low light) set by the user through the APP. T total represents the total time of the current reduction process, that is, the duration required to reduce the initial current to zero current. It is required to complete the current reduction within 5 minutes. Set T total = 300 seconds (5 minutes). t represents the time elapsed since the start of current reduction and determines which stage of the current reduction process it is in. The current is proportional to the LED brightness. Therefore, this formula can achieve a uniform reduction in brightness. The current gradient uses a timer interrupt (such as 1Hz) to update the PWM duty cycle or constant current value every second.

[0091] The LED supports constant current output and PWM dimming. The LED status is defined as the following status and conversion conditions:

[0092] Status 0: Standby (waiting for the APP start instruction).

[0093] Status 1: Stable operation (the current level lasts for 30 minutes).

[0094] Status 2: Current reduction stage (the current decreases linearly within 5 minutes).

[0095] Status 3: Final stability (maintain for 30 minutes after current reduction).

[0096] Status 4: Secondary current reduction to off (reduce to zero current within 5 minutes).

[0097] The state transition logic is as follows:

[0098] State 1 (30 minutes) → State 2 (flow reduction for 5 minutes) → State 3 (30 minutes) → State 4 (flow reduction to shutdown for 5 minutes).

[0099] The timer uses the TIM module of STM32 (Timer, a core peripheral for generating precise time bases, PWM signals, input captures, and output comparisons). Each state corresponds to a countdown counter in seconds to generate a precise time base.

[0100] In this way, the APP-based wireless Bluetooth lighting control method can be implemented.

[0101] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. Based on APP wireless Bluetooth lighting control system, it is characterized by: The system includes: Bluetooth module, which realizes the functions of device discovery, pairing connection, data transmission and status monitoring; Lighting module, used to realize lighting function and display working status and power information of the lighting; The battery module provides power support for the entire system and has an overvoltage protection function to ensure the safe operation of the system; Switch module, used to manually control the working state of the lamp; APP module, through which the lamps can be controlled and their status checked, to achieve wireless control and status monitoring of the lamps; The charging module provides charging function for the battery module to ensure the continuous operation of the system. When the voltage of the battery module exceeds the safe range, it can automatically cut off the power supply to protect the safety of the battery module.

2. The APP-based wireless Bluetooth lighting control system according to claim 1, characterized in that: The architecture of the Bluetooth module can be divided into the following levels: The protocol abstraction layer is located between the high-level application and the underlying hardware or protocol. It provides an interface for the upper layer by encapsulating the specific implementation details of the underlying protocol. The protocol abstraction layer isolates the dependencies between different layers so that each layer only needs to focus on its own functions without having to worry about the implementation details of other layers. Connection management layer: The connection management layer is used to implement device scanning filtering, connection priority queue, and disconnection reconnection strategy. The connection management layer negotiates connection parameters, allocates resources, and processes connection establishment, maintenance, and disconnection operations in the Bluetooth protocol stack, and uses an exponential backoff algorithm to maintain communication between devices; Data encapsulation layer: defines the lighting control instruction set based on the GATT protocol, including brightness adjustment and color temperature control, and is compatible with the Mesh network broadcast message format; Security authentication layer: integrated ECDH key exchange and AES-128 encryption.

3. The APP-based wireless Bluetooth lighting control system according to claim 1, characterized in that: The lamp module comprises: LED lamp unit, which turns on and off and dims the light according to the control instructions received by the Bluetooth module. Pulse width modulation adjusts the average current by changing the duty cycle of the pulse signal. It is used for DC-driven light sources such as LEDs to achieve full coverage adjustment of brightness from 10% to 100%; A warning light unit, wherein the warning light unit turns on and off, changes color or light intensity according to the control instruction received by the Bluetooth module or the control of the switch module; The indicator light unit includes a Bluetooth indicator light and a power display light. The Bluetooth indicator light is always on and displays a white light after the Bluetooth connection. The power display light displays the power on the lamp body. The power indicator light has 5 segments on the lamp body, each segment represents 20% of the power. The APP uses a power graph to display the power, and each segment also represents 20% of the power. When the power is lower than 20%, the power indicator light and the power graph flash synchronously to remind the user to charge.

4. The APP-based wireless Bluetooth lighting control system according to claim 1, characterized in that: The switch module includes a button 1 and a button 2. The switch module cooperates with the lamp module to realize the manual control function of the lamp. The switch module has the following switch and dimming control functions for the lamp: The button 1 controls the LED light unit. The LED light unit has three light intensity levels. The first press of the button 1 outputs strong light by default. The second press of the button 1 switches to working light. The third press of the button 1 switches to weak light. The fourth press of the button 1 turns off the light. The default brightness level of the LED light unit is strong light. The button 2 controls the warning light unit, and when the button 2 is pressed, the red and blue lights flash alternately.

5. The APP-based wireless Bluetooth lighting control system according to claim 1, characterized in that: The APP module and the Bluetooth module transmit data via the Bluetooth communication protocol. The user switches and dims the lamp through the APP. The lamp switch and warning light switch on the APP control the main light and warning light respectively. The APP also has a lamp brightness slider that can control the main light brightness from 10% to 100%. The APP displays the percentage of power in real time. When charging, the APP charging icon prompts that it is charging. The APP module also includes advanced functions such as timed tasks and lighting scene switching, preset switching time, and support for single or periodic tasks. Users can select lighting scenes such as "reading mode" and "cinema mode" according to the APP. In addition to switching to a more eye-friendly lighting light, the reading mode can also adaptively dim the light, and can automatically adjust the brightness based on ambient light sensor data or user habits to achieve a balance between energy saving and comfort. Adaptive dimming collects ambient light intensity in real time, converts it through ADC and transmits it to APP. Light data collection and preprocessing uses sliding average filtering to eliminate instantaneous noise. The formula is: L t =αL t-1 +(1-α)L raw Where t represents time, L t Refers to the light intensity value at the current time t after filtering, L t-1 is the light intensity value at the previous moment after filtering, that is, the light intensity value at time point t-1, α is the smoothing coefficient, usually 0.8-0.9, L raw Represents the original light intensity value at the current moment, that is, the time point t, that is, the light intensity value without filtering.

6. The APP-based wireless Bluetooth lighting control system according to claim 1, characterized in that: The charging voltage of the charging module is 25.2V, the charging current is 6A, and the charging time is ≤3 hours. The power indicator light flashes when the lamp is inserted into the charger. While the power indicator light is flashing, the intensity of the current power segment is greater, which is used to display the original power of the lamp in real time. When it is not full, the power indicator lights flash in sequence. When it is full, the power indicator lights are all on. After the lamp is connected to the APP, the charging module can also cooperate with the APP module to display the charging status and power information in real time on the APP.

7. The APP-based wireless Bluetooth lighting control system according to claim 1, characterized in that: The gears of the LED lamp unit are divided into three gears: strong light, working light and weak light. The light intensity of each gear can be set in the APP module. If there is no other operation after the three gears initially work stably for 30 minutes, the current will start to decrease, and the current will gradually decrease within 5 minutes. After another 30 minutes of stable work, the current will gradually decrease within 5 minutes until the light is turned off. If the switch is pressed again within half an hour of entering this brightness gear, the brightness of the next gear will be based on the initial brightness. If it exceeds half an hour, the brightness is the brightness of the current reduction in the same proportion. The STM32 single-chip microcontroller is used to execute the control current gradient algorithm. The linear current reduction formula is as follows: I(t)=I initial -(I initial / T total )×t Where I(t) represents the current value at the current moment, which indicates the actual working current of the LED over time and directly affects the brightness. initial Indicates the initial current value, that is, the starting current when the current reduction begins. It is the current value corresponding to the current gear set by the user through the APP. T total It indicates the total time of the current reduction process, that is, the time required for the current to drop from the initial current to zero current. The current reduction is required to be completed within 5 minutes. Set T total =300 seconds, t represents the time elapsed from the start of current reduction, which determines the current stage of the current reduction process. The current is proportional to the LED brightness. The brightness decreases evenly during the current reduction process. The current gradually changes using a timer interrupt to update the PWM duty cycle or constant current value every second.

8. The APP-based wireless Bluetooth lighting control method according to claim 1, characterized in that: The bluetooth module, lamp module, battery module, switch module, APP module and charging module are interconnected.

Citation Information

Patent Citations

  • Constant-voltage dimming lamp system

    CN113597055A

  • Classroom intelligent control method with human body and brightness perception

    CN116582983A

  • Intelligent night lamp

    CN212435986U

Cited By

  • Intelligent light control method and device, computer equipment and storage medium

    CN120980745A