Fan lamp control method with memory function and fan lamp
By using a control method with memory function in the fan light, the working status is recorded and saved in real time, the problem of frequent adjustments in the existing technology is solved, and the effect of quickly adapting to the needs of use scenarios and improving user experience is achieved.
Patent Information
- Application Number
- CN202411683517.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-11
AI Technical Summary
The existing fan lights lack intelligent memory functions. Users need to adjust from scratch each time they use them, and cannot quickly switch to the previous usage state, resulting in poor user experience.
A fan lamp control method with memory function is adopted to record the working status of the fans and lamps in real time, and adapt to the diverse usage scenario needs according to the time of the received driving instructions. The method includes obtaining the latest working state, waiting for the driver instruction, and when receiving the instruction, it determines whether the next instruction is received within the preset time. If it is not received, it stops and saves the current state. If it is received within the preset time, it updates the status sequence and executes a new instruction.
It realizes that the fan light can be directly restored to the saved working state after it is stopped, without multiple cycles, which improves the flexibility of use and user experience, and reduces cumbersome operations.
Smart Images

Figure CN119594045A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of fans, and in particular to a fan lamp control method and a fan lamp with a memory function. Background Art
[0002] The fan lamp includes a fan body for supplying air and a light source. It is usually a combination of a ceiling fan and a lamp and is fixed on the ceiling of the room. It not only brings a cooling effect, but also has functions such as lighting and decoration.
[0003] Currently, in the existing technology, lamp dimming, color adjustment and fan speed regulation usually use a fixed cycle mode. Users need to perform multiple cycles to achieve the desired state. The operation is cumbersome and there is no function to remember the last set state. During the operation, if the user wants to turn off the device, it is often necessary to operate it multiple times in succession, and it is easy to miss the closing position and enter the cycle again.
[0004] With regard to the problems of the above-mentioned prior art, it can be seen that the prior art lacks intelligent memory function. The user needs to adjust from the beginning every time using it, and cannot quickly return to the previous usage state, and cannot quickly switch the fan's working mode according to actual scene requirements, resulting in a poor user experience. Summary of the invention
[0005] The first purpose of this application is to provide a fan light control method with a memory function, which can record the latest working status of the fan light and adaptively adjust the working status of the fan light according to the reception time of the drive instruction to meet the needs of various usage scenarios.
[0006] In the first aspect, the present application provides a fan light control method with a memory function, which adopts the following technical solution: A fan lamp control method with a memory function, comprising: Get the latest working status of fans and lamps, and wait for driving instructions from control devices; When a driving instruction is received, it is determined whether the next driving instruction is received within a preset time. If the next driving instruction is not received within the preset time, A1 is executed. If the next driving instruction is received within the preset time, A2 is executed. A1. After updating and recording the current working state, execute the action instruction, which includes a stop instruction and an execution instruction. The stop instruction is to automatically stop the fan and / or lamp corresponding to the previous drive instruction, and the execution instruction is to make the fan and / or lamp execute to a certain working state; A2. Update and record the latest working status of the driving instruction, and use the working status as the first flag of the execution state sequence, generate a new state sequence according to the preset update sequence rule, and execute the driving instruction according to the new state sequence.
[0007] By adopting the above-mentioned technical scheme, the working status of the fan and / or lamp is recorded in real time to save the latest working status of the fan and lamp. When the fan and lamp can stop working separately, it can adapt to various usage scenario requirements according to the receiving time of the driving instruction. Not only when the driving instruction is not received within the preset time, the fan lamp can be directly restored to the saved working state after being turned on again after stopping, and the required working state can be achieved without multiple cycles. It can quickly adapt to the current usage scenario requirements, avoid cumbersome operations as much as possible, or keep the fan lamp in a certain working state, thereby improving the flexibility of the fan lamp. When the latest driving instruction is received within the preset time, the fan and / or lamp can be driven in a new state sequence.
[0008] In a preferred example, the present application can be further configured as follows: the working state includes the fan speed state, the driving instruction includes the fan speed adjustment instruction and the fan off instruction, and A2 includes: A speed adjustment sequence is set according to the order of fan speed from low speed to high speed, and the first flag position of the speed adjustment sequence is the lowest speed gear; If the driving instruction is a fan speed regulation instruction, the speed gear corresponding to the fan speed state of the latest fan speed regulation instruction is set as the first flag bit, the speed regulation sequence is updated in the order from low speed to high speed according to the fan speed state of the first flag bit, and the fan driving instruction is executed according to the new speed regulation sequence; If the driving instruction is a fan off instruction, the speed gear corresponding to the current fan speed state is set to the first flag, the speed adjustment sequence is updated from low speed to high speed according to the fan speed state of the first flag, and the fan is turned off.
[0009] By adopting the above technical solution, when switching the speed regulation of the fan, the speed gear corresponding to the fan speed state of the latest fan speed regulation instruction is used as the first flag to update the speed regulation sequence. When turning off the fan, the speed gear corresponding to the current fan speed state is used as the first flag. When the fan is started, it can start working from the first flag of the new speed regulation sequence, thereby realizing a quick switch to the last speed gear suitable for the current usage scenario.
[0010] In a preferred example, the present application can be further configured as follows: the speed gear corresponding to the fan speed state of the next fan speed adjustment instruction is used as the first flag, the speed adjustment sequence is updated in the order of the fan speed from low speed to high speed, and the step of executing the fan drive instruction according to the new speed adjustment sequence includes: If the number of times the fan speed adjustment instruction is received exceeds the allowed number, the fan speed state is set to the highest speed gear.
[0011] By adopting the above technical solution, in order to avoid speed regulation confusion caused by frequent operations within the preset time as much as possible, when the number of times the fan speed regulation instructions are received exceeds the allowed number, the fan speed state is automatically locked to the highest speed gear, so that the fan speed can be effectively controlled.
[0012] In a preferred example, the present application can be further configured as follows: the working state includes the brightness state of the lamp, the driving instruction includes a lamp dimming instruction and a lamp off instruction, and A2 includes: Set a dimming sequence for the lamp, wherein the first flag of the dimming sequence is a medium brightness gear, and the medium brightness gear is a gear with a medium brightness value among the brightness gears; If the driving instruction is a lamp dimming instruction, the brightness gear corresponding to the lamp brightness state of the latest lamp dimming instruction is set to the first flag, the dimming sequence is updated in the order from low to high according to the lamp brightness state of the first flag, and the lamp dimming instruction is executed according to the new dimming sequence; If the driving instruction is a lamp off instruction, the brightness level corresponding to the current lamp brightness state is set to the first flag, the dimming sequence is updated in order from low to high according to the lamp brightness state of the first flag, and the lamp is turned off.
[0013] By adopting the above technical solution, the initial dimming sequence can make the lamp at a medium brightness level that can adapt to most scenes at the beginning, and the user can make more precise brightness adjustments based on the dimming sequence; when switching the brightness of the lamp, the brightness level corresponding to the corresponding lamp brightness state is used as the first flag to update the dimming sequence; when turning off the lamp, the brightness level corresponding to the current lamp brightness state is used as the first flag, and the lamp can quickly switch to the last lamp brightness state suitable for the current usage scenario when it is started, realizing fast dimming, without the user having to adjust the brightness from the initial dimming sequence every time, thereby improving the user's operating experience.
[0014] In a preferred example, the present application can be further configured as follows: the working state includes the color temperature state of the lamp, the driving instruction includes the lamp color adjustment instruction and the lamp off instruction, and A2 includes: Set a color adjustment sequence for the lamp, wherein the first flag bit of the color adjustment sequence is the first color temperature, the second flag bit is the mixed color temperature of the first color temperature and the second color temperature, and the third flag bit is the second color temperature; If the driving instruction is a lamp color adjustment instruction, the color temperature level corresponding to the lamp color temperature state of the latest light color adjustment instruction is set as the first flag, the color adjustment sequence is updated, and the lamp color adjustment instruction is executed according to the new color adjustment sequence; If the driving instruction is a lamp off instruction, the current lamp brightness state is set to the first flag bit, the color adjustment sequence is updated according to the first flag bit, and the lamp is turned off.
[0015] By adopting the above technical solution, the initial color adjustment sequence enables the user to adjust the color temperature of the lamp, and the light displayed after the first color temperature transitions to a mixed color temperature of the first color temperature and the second color temperature, so that the user can adapt to the second color temperature displayed next in advance; when switching the color temperature of the lamp, the color temperature gear corresponding to the corresponding lamp color temperature state is used as the first flag bit to update the color adjustment sequence; when turning off the lamp, the color temperature gear corresponding to the current lamp color temperature state is used as the first flag bit, and the lamp can quickly switch to the last lamp color temperature state suitable for the current usage scenario when starting, reducing the tedious operation of the user having to adjust the color temperature from scratch every time, thereby improving the user's operating experience.
[0016] In a preferred example, the present application can be further configured as follows: the step of obtaining the working status of the fan and the lamp after the update record and waiting for the driving instruction of the control device includes: Receive the latest drive instructions from the pull-cord switch, wall switch or remote control switch. Each control device can independently control and issue drive instructions, and multiple control devices can cross-control and jointly issue drive instructions; Obtaining the current working status of the fan and the lamp, and displaying the working status of the fan and the lamp on a display system of the fan lamp; The working status of the fan and the lamp is reported to the user terminal and the remote controller.
[0017] By adopting the above-mentioned technical scheme, the fan light can receive the latest driving instructions from different control devices, and different control devices can control the fan light individually or jointly, thereby enhancing the flexibility of the control device in operating the fan light and the user's operation convenience; the current working status of the fan and the lamp is displayed on the display system of the fan light, and the working status is reported to the remote user terminal and remote control, thereby realizing more intuitive monitoring of the working status of the fan light and improving the user's convenience.
[0018] In a second aspect, the present application provides a fan lamp with a memory function, which adopts the following technical solution: A fan lamp with a memory function, comprising: MCU main control chip, the MCU main control chip adopts the fan light control method with memory function to receive the driving instruction from the control device to realize the control of the fan light; The motor drive module is connected to the MCU main control chip and is used to adjust the fan speed according to the fan speed adjustment instruction; The lamp driving module is connected to the MCU main control chip and is used to dim and adjust the color of the lamp according to the lamp dimming instruction and the lamp color adjustment instruction.
[0019] By adopting the above technical solution, after receiving the driving instructions of the control device, the MCU main control chip can not only control the motor drive module fan to adjust the speed according to the updated execution status sequence, and the lamp drive module to dim and adjust the color of the lamp, but also reduce invalid cycle operations, and quickly change or restore to the last working state of the fan lamp to quickly adapt to the current usage scenario requirements.
[0020] The present application further provides: the fan light control drive instruction is sent through a pull-wire switch control circuit, the pull-wire switch control circuit includes a pull-wire terminal of the pull-wire switch, the output end of the pull-wire terminal is respectively connected to the pins of the MCU main control chip for controlling the forward and reverse rotation of the fan, controlling the lamps, and controlling the gear position, an ESD tube is connected between the output end of the pull-wire terminal and the pin connected to the MCU main control chip, the negative pole of the ESD tube is connected in parallel with the output end of the pull-wire terminal, and the positive pole of the ESD tube is grounded.
[0021] By adopting the above technical solution, the pin setting of the ESD tube connected to the MCU main control chip can effectively discharge static high voltage, protect electronic equipment and the MCU main control chip from damage by electrostatic discharge, and ensure the stability and reliability of the equipment.
[0022] In a third aspect, the present application provides an electronic device, which adopts the following technical solution: An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned fan light control method with memory function are implemented.
[0023] In a fourth aspect, the present application provides a computer storage medium, the following technical solution: A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned fan light control method with a memory function are implemented.
[0024] In summary, this application has the following beneficial technical effects: The fan light in the present application can update and record the latest working status, and when no driving instruction is received within the preset time, it can stop the operation of the fan and / or lamp corresponding to the previous driving instruction. When restarting, the user does not need to readjust to the state before stopping working, so as to quickly adapt to the current and long-term usage scenario requirements, reduce tedious operations, or maintain the current working state to execute other working states; and when the driving instruction is received within the preset time, it can work according to the updated state sequence, thereby improving the diversity of the control device's control of the fan light and meeting the user's needs for convenient operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 This is a flow chart of a fan light control method with a memory function in one embodiment of the present application.
[0026] Figure 2 It is a sub-step flow chart of step A2 in one embodiment of the present application.
[0027] Figure 3 It is a sub-step flow chart of step A21 in one embodiment of the present application.
[0028] Figure 4 It is a sub-step flow chart of step A2 in another embodiment of the present application.
[0029] Figure 5 This is a sub-step flow chart of step A2 in yet another embodiment of the present application.
[0030] Figure 6 It is a sub-step flow chart of step S1 in one embodiment of the present application.
[0031] Figure 7 This is a schematic diagram of an MCU main control chip circuit of a fan lamp with a memory function according to one embodiment of the present application.
[0032] Figure 8 The present invention is a schematic diagram of a motor drive module circuit of a fan lamp with a memory function according to one embodiment of the present invention.
[0033] Fig. 9 This is a schematic diagram of a pull cord switch control circuit of a fan light with a memory function according to one embodiment of the present application.
[0034] Fig.10 It is a principle block diagram of an electronic device in one embodiment of the present application. DETAILED DESCRIPTION
[0035] The following is combined with Figure 1-10 This application is described in further detail.
[0036] refer to Figure 1, a fan light control method with memory function, specifically comprising: A fan lamp control method with a memory function, comprising: S1. Get the latest working status of fans and lamps, and wait for driving instructions from control devices.
[0037] The fan and the lamp in the fan lamp operate independently, and the control device adjusts the fan and the lamp separately to avoid conflicts in the functions of the control device. Specifically, when the fan lamp is powered on, the fan and the lamp can stop working separately, that is, they are controlled separately by the control device.
[0038] S2. When a driving instruction is received, determine whether the next driving instruction is received within a preset time. If the next driving instruction is not received within the preset time, execute A1. If the next driving instruction is received within the preset time, execute A2.
[0039] In this embodiment, the preset time is set to 5 seconds. When a driving instruction is received, the MCU main control chip of the fan light determines whether the next driving instruction is received within 5 seconds. If it is received, it is considered that the control device has switched to the next working state; if the MCU main control chip of the fan light does not receive the next driving instruction within 5 seconds, it is considered that the device corresponding to the previous driving instruction sent by the control device will not switch to the next working state.
[0040] A1. After updating and recording the current working status, execute the action instruction. The action instruction includes a stop instruction and an execution instruction. The stop instruction is to automatically stop the operation of the fan and / or lamp corresponding to the previous drive instruction, and the execution instruction is to make the fan and / or lamp execute to a certain working state.
[0041] Among them, since the fan lamp has both cooling and lighting functions, it is usually mostly set indoors. The indoor environment has a smaller degree of environmental change than the outdoor environment, so the fan lamp usually remains in a fixed working state when working. Therefore, when the fan lamp is not powered off as a whole, and the action instruction received by the fan and / or lamp is a stop instruction, the fan and / or lamp stop working, and update and record the latest working state of the fan and / or lamp as the common state of the fan lamp, so that the user can switch to the common working state as soon as the fan and / or lamp is turned on. Specifically, before the device corresponding to the last drive instruction sent by the control device stops working, the MCU main control chip of the fan lamp first saves the working state of the fan and / or lamp, and then stops the work of the fan and / or lamp corresponding to the last drive instruction, so that when the fan and / or lamp are turned on again after the stop instruction is executed, the MCU main control chip can quickly switch the fan and / or lamp to the updated working state according to the last working state saved, thereby reducing the user's operation of adjusting the fan and / or lamp.
[0042] When the action instruction is an execution instruction, the fan and / or the lamp is executed to a certain working state, including driving the fan to a certain gear for speed adjustment, and / or driving the lamp to a certain brightness for dimming or a certain color temperature for color adjustment.
[0043] A2. Update and record the latest working status of the driving instruction, and use the working status as the first flag of the execution state sequence. According to the preset update sequence rules, generate a new state sequence, and execute the driving instruction according to the new state sequence.
[0044] In this embodiment, the receiving time of the driving instruction is adapted to the needs of various usage scenarios. When powered on, the MCU main control chip of the fan lamp records the working status of the fan and / or lamp in real time, so as to achieve the purpose of saving the latest working status in time before the fan and / or lamp updates the record.
[0045] When no driving instruction is received within the preset time, the fan and / or lamp corresponding to the previous driving instruction will stop working, and the fan and / or lamp will reach the state before stopping working when it is turned on again, so as to quickly adapt to the current usage scenario requirements and effectively avoid tedious operations.
[0046] Alternatively, when no driving instruction is received within a preset time, the fan and / or the lamp is executed to a certain working state, such as driving the fan to a certain gear for speed adjustment, and / or driving the lamp to a certain brightness for dimming or a certain color temperature for color adjustment.
[0047] When the MCU main control chip of the fan lamp receives the next driving instruction within the preset time, the fan and / or the lamp can execute the working state corresponding to the current latest driving instruction.
[0048] Furthermore, the state sequence is a preset initial state sequence when the fan light is powered on for the first time after a power outage. During the power-on period, each time the fan and / or lamp is stopped and then turned on, the working state after the update record will be used as the first flag of the execution state sequence, that is, once the fan and / or lamp is enabled, the working state of the first flag in the state sequence will be entered first. When the fan light is powered off as a whole, the state sequence is cleared and restored to the initial state. When the fan light directly executes the driving instruction, the first flag in the new state sequence is executed.
[0049] refer to Figure 2 Further, in one embodiment, the working state includes a fan speed state, the driving instruction includes a fan speed adjustment instruction and a fan off instruction, and step A2 is refined into the following sub-steps: A20. Set the speed adjustment sequence according to the order of fan speed from low speed to high speed. The first flag of the speed adjustment sequence is the lowest speed gear.
[0050] In this embodiment, when the fan light is turned on for the first time, if the fan speed is set to 1st gear, 2nd gear, 3rd gear, 4th gear, and 5th gear from low speed to high speed, the speed adjustment sequence is 1st gear, 2nd gear, 3rd gear, 4th gear, and 5th gear, among which the lowest speed gear is 1st gear, which is the first flag position of the speed adjustment sequence.
[0051] A21. If the driving instruction is a fan speed control instruction, the speed gear corresponding to the fan speed state of the latest fan speed control instruction is set to the first flag, and the speed control sequence is updated from low speed to high speed according to the fan speed state of the first flag, and the fan driving instruction is executed according to the new speed control sequence.
[0052] Among them, if the speed gear of the fan speed state of the current fan speed control instruction is gear 3, when the control device sends the next fan speed control instruction, the fan speed state is set to gear 4, and when the control device sends the next fan speed control instruction, the fan speed state is set to gear 5, and so on.
[0053] A22. If the driving instruction is a fan-off instruction, the speed gear corresponding to the current fan speed state is set to the first flag, and the speed adjustment sequence is updated from low speed to high speed according to the fan speed state of the first flag, and the fan is turned off.
[0054] Among them, if when the fan is turned off, the fan speed state corresponding to the fan speed adjustment command is gear 3, and the fan light is not powered off as a whole, the fan is turned off by receiving the fan off command, and when it is re-enabled, the fan speed state is immediately set to gear 3. At this time, the speed adjustment sequence is gear 3, gear 4, gear 5, gear 1, gear 2, among which the first flag is gear 3, so as to achieve the purpose of quickly switching to the last speed gear suitable for the current usage scenario, without the user having to adjust the fan speed from the beginning every time, thereby improving the user's operating experience.
[0055] Moreover, when the fan light is powered off as a whole, the fan speed state will be reset to the initial speed regulation sequence, such as the speed regulation sequence from 3rd gear, 4th gear, 5th gear, 1st gear, 2nd gear will be reset to 1st gear, 2nd gear, 3rd gear, 4th gear, 5th gear.
[0056] In addition, reference Figure 3 Further, in one embodiment, step A21 is further divided into the following sub-steps: A210: If the number of times the fan speed adjustment command is received exceeds the allowed number, the fan speed state is set to the highest speed gear.
[0057] In this embodiment, the preset time is set to 5 seconds, and the allowed number of times is 5. Within 5 seconds, when the number of times the control device issues the fan speed adjustment instruction exceeds 5 times, the fan speed state is set to the highest speed gear, so as to avoid the situation where the fan speed adjustment instruction is confused due to frequent operation of the control device within the preset time, thereby increasing the failure rate of the fan motor. Therefore, when the number of times the fan speed adjustment instruction is received exceeds the allowed number of times, the fan speed state is automatically locked to the highest speed gear, so that the fan speed is effectively controlled.
[0058] In addition, reference Figure 4 Further, in one embodiment, the working state includes the brightness state of the lamp, the driving instruction includes the lamp dimming instruction and the lamp off instruction, and step A2 is refined into the following sub-steps: A23. Set the dimming sequence of the lamp. The first flag position of the dimming sequence is the medium brightness gear, and the medium brightness gear is the gear with the middle brightness value among the brightness gears.
[0059] In this embodiment, when the fan light is turned on for the first time, if the brightness of the lamp is set from low to high to level 1, level 2, level 3, level 4, and level 5, the initial dimming sequence is level 3, level 4, level 5, level 1, and level 2, wherein the medium brightness level is level 3, which is the first indicator of the dimming sequence, levels 4 and 5 are high brightness levels, and levels 1 and 2 are low brightness levels. Since lamps working at low brightness levels provide insufficient light in dark environments, lamps working at high brightness levels consume more energy than lamps working at medium and low brightness levels. Therefore, when a user uses the lamp for the first time, the initial dimming sequence is to start from the medium brightness level 3, at which time the brightness of the lamp is in the middle of the brightness range, which can adapt to most usage scenarios. In the scenario where lamps are used, lighting is generally required. Therefore, after the medium brightness gear, several high brightness gears with increasing brightness are set in sequence, so that users can gradually increase the brightness of the lamp according to usage needs based on the medium brightness gear; after 5 gears, when the control device sends the next lamp dimming command again, the lamp brightness state is adjusted to 1 gear.
[0060] A24. Use the brightness level corresponding to the lamp brightness state of the next lamp dimming instruction as the first flag, update the dimming sequence in order of lamp brightness from low to high, and execute the lamp dimming instruction according to the new dimming sequence.
[0061] Among them, if the lamp brightness state is level 5 before the record is updated, when the control device sends the next lamp dimming instruction, the lamp brightness state is set to level 1, and when the control device sends the next lamp dimming instruction, the lamp brightness state is set to level 2, and so on.
[0062] A25. If the driving instruction is a lamp off instruction, the brightness level corresponding to the current lamp brightness state is set to the first flag, the dimming sequence is updated in order from low to high according to the lamp brightness state of the first flag, and the lamp is turned off.
[0063] In this embodiment, if the lamp brightness state of the current lamp dimming instruction is level 5, and the lamp is turned off by receiving the lamp off instruction and then re-enabled, the lamp brightness state is immediately set to level 5. At this time, the dimming sequence is level 5, level 1, level 2, level 3, and level 4, among which the first flag is level 5, thereby achieving the purpose of quickly switching to the last lamp brightness state suitable for the current usage scenario, without the user having to adjust the brightness from the initial dimming sequence every time, thereby improving the user's operating experience.
[0064] Moreover, when the fan lamp loses power as a whole, the brightness state of the lamp will be reset to the initial dimming sequence, such as updating the dimming sequence from 5 levels, 1 level, 2 levels, 3 levels, 4 levels to 3 levels, 4 levels, 5 levels, 1 level, 2 levels.
[0065] In addition, reference Figure 5 Further, in one embodiment, the working state includes the color temperature state of the lamp, the driving instruction includes the color adjustment instruction of the lamp, and step A2 is refined into the following sub-steps: A26. Set the color adjustment sequence of the lamp. The first flag of the color adjustment sequence is the first color temperature, the second flag is the mixed color temperature of the first color temperature and the second color temperature, and the third flag is the second color temperature.
[0066] In this embodiment, the first color temperature of the lamp is set to yellow, the second color temperature is set to white, and the mixed color temperature is yellow-white light. When the fan light is turned on for the first time, the initial color adjustment sequence is yellow, yellow-white, and white, wherein the first color temperature of yellow is the first flag of the color adjustment sequence. The second flag of the set initial color adjustment sequence is the mixed color temperature, which enables the user to adjust the color temperature of the lamp, and the color of the light displayed after the first color temperature can be switched between the first color temperature and the second color temperature, so that the user can adapt to the second color temperature displayed next in advance.
[0067] A27. If the driving instruction is a lamp color adjustment instruction, the color temperature level corresponding to the lamp color temperature state of the latest light color adjustment instruction is set as the first flag, the color adjustment sequence is updated, and the lamp color adjustment instruction is executed according to the new color adjustment sequence.
[0068] Among them, if the lamp color temperature state before the record is updated is yellow-white, when the control device sends the next lamp color adjustment instruction, the lamp color temperature state is set to white, and when the control device sends the next lamp color adjustment instruction, the lamp color temperature state is set to yellow.
[0069] A28. If the driving instruction is a lamp off instruction, the current lamp brightness state is set to the first flag, the color adjustment sequence is updated according to the first flag, and the lamp is turned off.
[0070] In this embodiment, the lamp records the color temperature status of the lamp in real time. If the color temperature status of the lamp before the record is updated is yellow-white, and the fan lamp as a whole is not powered off, the lamp is turned off by receiving a lamp off command, and then when it is re-enabled, the color temperature status of the lamp is immediately set to yellow-white, and the color adjustment sequence is updated to yellow-white, white, and yellow, among which the first flag bit is yellow-white, thereby achieving the purpose of quickly switching to the last color temperature status of the lamp suitable for the current usage scenario. The user does not need to adjust the color temperature from scratch, which reduces tedious operations and improves the user's operating experience.
[0071] In addition, reference Figure 6 Further, in one embodiment, step S1 is refined into the following sub-steps: S10, receiving the latest driving instruction from the pull-cord switch, the wall-controlled switch or the remote control switch. Each control device can independently control and issue the driving instruction, and multiple control devices can cross-control and jointly issue the driving instruction.
[0072] S11, obtaining the current working status of the fan and the lamp, and displaying the working status of the fan and the lamp on the display system of the fan lamp.
[0073] S12: reporting the working status of the fan and the lamp to the user terminal and the remote controller.
[0074] Among them, the control equipment includes a pull-cord switch, a wall-controlled switch, and a remote control switch. After the pull-cord switch is operated, the pull-cord switch signal is sent to the pull-cord switch signal detection circuit, and the high and low levels of the pull-cord switch signal are decoded by the MCU main control chip of the fan light to obtain the driving instruction from the pull-cord switch signal.
[0075] After the wall control switch is operated, the wall control switch signal is sent to the wall control switch signal detection circuit. According to the optocoupler detection signal and square wave signal, it is decoded by the MCU main control chip of the fan light to obtain the driving instruction from the wall control switch signal.
[0076] After the remote control switch is operated, the MCU main control chip in the remote controller to which the remote control switch belongs sends a switching instruction to the wireless transmission module. The wireless transmission module transmits a wireless signal to the MCU main control chip of the fan lamp, and the MCU main control chip of the fan lamp obtains the driving instruction from the remote control switch. According to the fan and / or lamp driving instructions, the MCU main control chip sends the fan driving signal to the motor driving module to control the fan; and sends the lamp driving signal to the lamp driving module to control the lamp.
[0077] In this embodiment, when the MCU main control chip receives a driving instruction from any control device, it executes the latest instruction and updates the working status of the fan light. Different control devices can control the fan light individually or jointly. The logic is clear and there is no mutual interference, thereby enhancing the flexibility of the control device in operating the fan light and the user's convenience of operation.
[0078] In addition, the current working status of the fan and lamp is displayed on the display system of the fan lamp, and the working status is reported to the remote user terminal and remote control. The user can monitor the working status of the fan lamp more intuitively and operate the control device more accurately to control the fan lamp.
[0079] In addition, the MCU main control chip of the fan light can report the current working status of the fan light to the mobile phone APP through Bluetooth, 2.4G and other control modules, and the mobile phone APP can display the working status of the fan light. At the same time, the MCU main control chip of the fan light can be connected to the wireless router through the WIFI module to achieve communication with the cloud server, and the cloud server uploads the working status reported by the MCU main control chip of the fan light to the mobile phone APP. Users can also control the working status of the fan light through the mobile phone APP.
[0080] In another embodiment, the fan lamp is provided with a temperature sensor at the back of the air outlet to obtain the temperature of the working environment of the fan lamp; and a light sensor is provided at the back of the light emitting lamp to obtain the brightness of the working environment of the fan lamp. The MCU main control chip can obtain the temperature and brightness of the current working environment of the fan lamp after the control device issues a driving instruction each time, and associate the working status of the fan and the lamp with the recorded working status, and report it to the control device.
[0081] The control device is provided with a function setting module for recording the working status of fans and lamps. And the function setting module can also determine whether the temperature and brightness of the working environment of the fan lamp have changed beyond the preset range of change based on the environmental conditions when the fan lamp is turned on. If exceeded, after the control device issues a drive instruction to switch the working status of the fan lamp, it prompts the user whether to set a fixed working status according to the current working environment conditions, and the user can confirm to save the current working status of the fan and lamp. At the same time, based on the current working status of the fan and lamp, the function setting module generates a function module setting fixed under the current working environment conditions of the fan lamp.
[0082] When the next use scenario is the set fan light working environment, the user can directly operate and send the drive instructions of the working status of the fan and lamp in this environment saved in the function setting module, and the fan light will directly switch to the working state corresponding to the drive instruction to quickly adapt to the working environment. At the same time, the fan light updates the state sequence of the fan and lamp, and sets the working state corresponding to the drive instruction to the first flag.
[0083] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0084] refer to Figures 7 to 9 In one embodiment, a fan light with a memory function is provided, comprising: MCU main control chip, MCU main control chip adopts a fan light control method with memory function to receive the driving instructions from the control device to realize the control of the fan light. After receiving the driving instructions from the control device, the MCU main control chip controls the motor drive module and the light drive module according to the updated execution state sequence.
[0085] The motor drive module is connected to the MCU main control chip and is used to adjust the fan speed according to the fan speed adjustment instruction.
[0086] The lamp driving module is connected to the MCU main control chip and is used to dim and adjust the color of the lamp according to the lamp dimming instruction and the lamp color adjustment instruction.
[0087] The fan light with memory function can reduce invalid cycle operations and quickly change or restore to the last working state of the fan light to quickly adapt to the current usage scenario requirements.
[0088] Furthermore, the fan light control drive instruction is sent through the pull-cord switch control circuit, which includes a pull-cord switch pull-wire terminal, the output end of which is respectively connected to the pins of the MCU main control chip for controlling the fan forward and reverse rotation, controlling the lamp, and controlling the gear position, and an ESD tube is connected between the output end of the pull-cord terminal and the pin connected to the MCU main control chip, the negative pole of the ESD tube is connected in parallel with the output end of the pull-cord terminal, and the positive pole of the ESD tube is grounded. When the user operates the pull-cord switch and the wall control switch, there is high voltage electricity and static high voltage or sparks, which may cause the MCU main control chip or other electronic components to be broken down, seriously affecting the safety and service life of the fan light. Therefore, some ESD tubes are added to the circuit as protection measures to ensure that the safety of the circuit is effectively improved without affecting the transmission of the control signal.
[0089] In another embodiment, the pull-cord input signal in the pull-cord switch control circuit and the signal output to the MCU main control chip are isolated by a photoelectric coupler. The photoelectric coupler uses an electric-optical-electrical conversion method, and the electrical signal transmission has a unidirectional characteristic, thereby realizing isolated signal transmission and avoiding the interference of high voltage electricity on the control signal as much as possible. Therefore, it has good anti-electromagnetic interference ability and electrical insulation ability, and plays a certain protective role for the MCU main control chip.
[0090] In addition, a transformer is provided in the circuit to convert the high voltage signal into a low voltage signal to protect the MCU main control chip and other sensitive components in the subsequent circuit.
[0091] In one embodiment, an electronic device is provided, where the electronic device is a user terminal. Fig. 9, the electronic device includes a processor, a memory, a network interface and a database connected through a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store a detection data table. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a fan light control method with a memory function is implemented.
[0092] In one embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: S1. Get the latest working status of fans and lamps, and wait for driving instructions from control devices.
[0093] S2. When a driving instruction is received, determine whether the next driving instruction is received within a preset time. If the next driving instruction is not received within the preset time, execute A1. If the next driving instruction is received within the preset time, execute A2.
[0094] A1. After updating and recording the current working status, execute the action instruction. The action instruction includes a stop instruction and an execution instruction. The stop instruction is to automatically stop the operation of the fan and / or lamp corresponding to the previous drive instruction, and the execution instruction is to make the fan and / or lamp execute to a certain working state.
[0095] A2. Update and record the latest working status of the driving instruction, and use the working status as the first flag of the execution state sequence. According to the preset update sequence rules, generate a new state sequence, and execute the driving instruction according to the new state sequence.
[0096] In one embodiment, the working state includes a fan speed state, the driving instruction includes a fan speed adjustment instruction and a fan off instruction, and the sub-steps of step A2 include: A20. Set the speed adjustment sequence according to the order of fan speed from low speed to high speed. The first flag of the speed adjustment sequence is the lowest speed gear.
[0097] A21. If the driving instruction is a fan speed control instruction, the speed gear corresponding to the fan speed state of the latest fan speed control instruction is set to the first flag, and the speed control sequence is updated from low speed to high speed according to the fan speed state of the first flag, and the fan driving instruction is executed according to the new speed control sequence.
[0098] A22. If the driving instruction is a fan-off instruction, the speed gear corresponding to the current fan speed state is set to the first flag, and the speed adjustment sequence is updated from low speed to high speed according to the fan speed state of the first flag, and the fan is turned off. Among them, if the fan speed state corresponding to the fan speed adjustment instruction is 3rd gear when the fan is turned off, and the fan light is not powered off as a whole, the fan is turned off by receiving the fan-off instruction, and when it is re-enabled, the fan speed state is immediately set to 3rd gear. At this time, the speed adjustment sequence is 3rd gear, 4th gear, 5th gear, 1st gear, and 2nd gear, among which the first flag is 3rd gear, so as to achieve the purpose of quickly switching to the last speed gear suitable for the current usage scenario, without the user having to adjust the fan speed from the beginning every time, thereby improving the user's operating experience.
[0099] In one embodiment, the sub-steps of step A21 include: A210: If the number of times the fan speed adjustment command is received exceeds the allowed number, the fan speed state is set to the highest speed gear.
[0100] In one embodiment, the working state includes the brightness state of the lamp and the lamp off instruction, the driving instruction includes the lamp dimming instruction, and the detailed steps of step A2 include: A23. Set the dimming sequence of the lamp. The first flag position of the dimming sequence is the medium brightness gear, and the medium brightness gear is the gear with the middle brightness value among the brightness gears.
[0101] A24. Use the brightness level corresponding to the lamp brightness state of the next lamp dimming instruction as the first flag, update the dimming sequence in order of lamp brightness from low to high, and execute the lamp dimming instruction according to the new dimming sequence.
[0102] A25. If the driving instruction is a lamp off instruction, the brightness level corresponding to the current lamp brightness state is set to the first flag, the dimming sequence is updated in order from low to high according to the lamp brightness state of the first flag, and the lamp is turned off.
[0103] In one embodiment, the working state includes the color temperature state of the lamp, the driving instruction includes the color adjustment instruction of the lamp, and the sub-steps of step A2 include: A26. Set the color adjustment sequence of the lamp. The first flag of the color adjustment sequence is the first color temperature, the second flag is the mixed color temperature of the first color temperature and the second color temperature, and the third flag is the second color temperature.
[0104] A27. If the driving instruction is a lamp color adjustment instruction, the color temperature level corresponding to the lamp color temperature state of the latest light color adjustment instruction is set as the first flag, the color adjustment sequence is updated, and the lamp color adjustment instruction is executed according to the new color adjustment sequence.
[0105] A28. If the driving instruction is a lamp off instruction, the current lamp brightness state is set to the first flag, the color adjustment sequence is updated according to the first flag, and the lamp is turned off.
[0106] In one embodiment, the sub-steps of step S1 include: S10, receiving the latest driving instruction from the pull-cord switch, the wall-controlled switch or the remote control switch. Each control device can independently control and issue the driving instruction, and multiple control devices can cross-control and jointly issue the driving instruction.
[0107] S11, obtaining the current working status of the fan and the lamp, and displaying the working status of the fan and the lamp on the display system of the fan lamp.
[0108] S12: reporting the working status of the fan and the lamp to the user terminal and the remote controller.
[0109] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0110] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
Claims
1. A fan light control method with memory function, characterized in that: include: Get the latest working status of fans and lamps, and wait for driving instructions from control devices; When a driving instruction is received, it is determined whether the next driving instruction is received within a preset time. If the next driving instruction is not received within the preset time, A1 is executed. If the next driving instruction is received within the preset time, A2 is executed. A1. After updating and recording the current working state, execute the action instruction, which includes a stop instruction and an execution instruction. The stop instruction is to automatically stop the fan and / or lamp corresponding to the previous drive instruction, and the execution instruction is to make the fan and / or lamp execute to a certain working state; A2. Update and record the latest working status of the driving instruction, and use the working status as the first flag of the execution state sequence, generate a new state sequence according to the preset update sequence rule, and execute the driving instruction according to the new state sequence.
2. The method according to claim 1, characterized in that The working state includes the fan speed state, the driving instruction includes a fan speed adjustment instruction and a fan shutdown instruction, and A2 includes: A speed adjustment sequence is set according to the order of fan speed from low speed to high speed, and the first flag position of the speed adjustment sequence is the lowest speed gear; If the driving instruction is a fan speed regulation instruction, the speed gear corresponding to the fan speed state of the latest fan speed regulation instruction is set as the first flag bit, the speed regulation sequence is updated in the order from low speed to high speed according to the fan speed state of the first flag bit, and the fan driving instruction is executed according to the new speed regulation sequence; If the driving instruction is a fan off instruction, the speed gear corresponding to the current fan speed state is set to the first flag, the speed adjustment sequence is updated from low speed to high speed according to the fan speed state of the first flag, and the fan is turned off.
3. The method according to claim 2, characterized in that The step of using the speed gear corresponding to the fan speed state of the next fan speed adjustment instruction as the first flag, updating the speed adjustment sequence in the order of the fan speed from low speed to high speed, and executing the fan drive instruction according to the new speed adjustment sequence includes: If the number of times the fan speed adjustment instruction is received exceeds the allowed number, the fan speed state is set to the highest speed gear.
4. The method according to claim 1, characterized in that: The working state includes the brightness state of the lamp, the driving instruction includes a lamp dimming instruction and a lamp shut-off instruction, and A2 includes: Set a dimming sequence for the lamp, wherein the first flag of the dimming sequence is a medium brightness gear, and the medium brightness gear is a gear with a medium brightness value among the brightness gears; If the driving instruction is a lamp dimming instruction, the brightness gear corresponding to the lamp brightness state of the latest lamp dimming instruction is set to the first flag, the dimming sequence is updated in the order from low to high according to the lamp brightness state of the first flag, and the lamp dimming instruction is executed according to the new dimming sequence; If the driving instruction is a lamp off instruction, the brightness level corresponding to the current lamp brightness state is set to the first flag, the dimming sequence is updated in order from low to high according to the lamp brightness state of the first flag, and the lamp is turned off.
5. The method according to claim 1, characterized in that The working state includes the color temperature state of the lamp, the driving instruction includes the lamp color adjustment instruction and the lamp shut-down instruction, and A2 includes: Set a color adjustment sequence for the lamp, wherein the first flag bit of the color adjustment sequence is the first color temperature, the second flag bit is the mixed color temperature of the first color temperature and the second color temperature, and the third flag bit is the second color temperature; If the driving instruction is a lamp color adjustment instruction, the color temperature level corresponding to the lamp color temperature state of the latest light color adjustment instruction is set as the first flag, the color adjustment sequence is updated, and the lamp color adjustment instruction is executed according to the new color adjustment sequence; If the driving instruction is a lamp off instruction, the current lamp brightness state is set to the first flag bit, the color adjustment sequence is updated according to the first flag bit, and the lamp is turned off.
6. The method according to claim 1, characterized in that The step of obtaining the working status of the fan and the lamp after the update record and waiting for the driving instruction of the control device includes: Receive the latest drive instructions from the pull-cord switch, wall switch or remote control switch. Each control device can independently control and issue drive instructions, and multiple control devices can cross-control and jointly issue drive instructions; Obtaining the current working status of the fan and the lamp, and displaying the working status of the fan and the lamp on a display system of the fan lamp; The working status of the fan and the lamp is reported to the user terminal and the remote controller.
7. A fan light with a memory function, characterized in that: include: MCU main control chip, the MCU main control chip adopts the method described in any one of claims 1 to 6 to receive the driving instruction from the control device to realize the control of the fan light; The motor drive module is connected to the MCU main control chip and is used to adjust the fan speed according to the fan speed adjustment instruction; The lamp driving module is connected to the MCU main control chip and is used to dim and adjust the color of the lamp according to the lamp dimming instruction and the lamp color adjustment instruction.
8. The fan light with memory function according to claim 7, characterized in that: The fan light control drive instruction is sent through a pull-wire switch control circuit, which includes a pull-wire terminal of a pull-wire switch, and the output end of the pull-wire terminal is respectively connected to the pins in the MCU main control chip that control the forward and reverse rotation of the fan, control the lamps, and control the gear position. An ESD tube is connected between the output end of the pull-wire terminal and the pin connected to the MCU main control chip, the negative pole of the ESD tube is connected in parallel with the output end of the pull-wire terminal, and the positive pole of the ESD tube is grounded.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program which can be loaded by the processor and executes a fan light control method with a memory function as claimed in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and executes a fan light control method with a memory function as claimed in any one of claims 1 to 6.