Flashlight and control system and control method thereof
By controlling the charging and lighting of the flashlight by the MCU, the cost problem in the existing technology is solved, the system simplification and cost reduction are achieved, and the cost performance is improved.
Patent Information
- Application Number
- CN202411476720.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2024-12-13
AI Technical Summary
The existing rechargeable flashlights are costly due to the use of two dedicated chips and complex peripheral circuits.
The MCU (microcontroller unit) is used to control the charging and lighting of the flashlight. By combining processing module, charging port, multiplexed port and output port, charging detection and PWM signal output are realized, reducing the number of system components.
It effectively reduces product costs, improves cost-effectiveness, and reduces patch fees and material fees without affecting practicality.
Smart Images

Figure CN119134602A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of flashlights, and in particular relates to a flashlight and a control system and a control method thereof. Background Art
[0002] In the existing market, a flashlight is one of the most common electronic products, which can provide lighting for users. The flashlight comprises a battery-powered bulb, a focusing reflector, and a handle-type housing for hand-holding.
[0003] Most of the rechargeable flashlights currently on the market use two dedicated chips and complex peripheral circuits, one of which is a charging management chip and the other is a flashlight driver chip. The two chips are used to charge and drive the rechargeable flashlight, which makes the cost of rechargeable flashlights too high. Summary of the invention
[0004] The present invention provides a flashlight and a control system and a control method thereof, so as to realize MCU controlling charging and lighting of the flashlight, thereby solving the technical problems existing in the background technology.
[0005] The first technical solution of the present invention is as follows: A control system for a flashlight, comprising a processing module, the processing module comprising a charging port, a multiplexing port and an output port, the charging port is used to connect a charging voltage, the output port is used to output a PWM signal, and the multiplexing port is connected to a control button and a charging indicator light; When the charging port is not connected to the charging voltage, the multiplexing port is adjusted to the input mode to detect the signal of the control button, and when the processing module detects the signal of the control button, the output port outputs the PWM signal; When the charging port is connected to the charging voltage and the battery is charged, the multiplexed port is adjusted to the output mode and the charging indicator light is turned on; During the charging process, the processing module performs charging detection, and when the battery is fully charged, the charging indicator light is turned off.
[0006] Further, when the processing module is powered on, the processing module enters a dormant state, and in the dormant state, the multiplexing port is adjusted to an input mode and to a low level state; When a signal input from a control button is detected or a charging voltage is connected, the processing module enters a working state. In the working state, the multiplexing port is adjusted to an input mode and a high level state.
[0007] Furthermore, when the signal of the control button is input to the processing module, the processing module sets the status indication position in the register to 1.
[0008] When the charging port is connected to a charging voltage, the processing module sets the status indication position in the register to 0.
[0009] Further, when the processing module enters the working state, the current parameter of the state indication bit in the register is detected; When the status indication bit is 0, the processing module enters the charging mode, the output port is closed, and the multiplexing port lights up the charging indicator light; When the status indication bit is 1, the processing module enters the PWM output mode, and the output port outputs a PWM signal.
[0010] Furthermore, in the charging mode, the processing module continuously detects the status indication bit, and when it is detected that the status indication bit is 1, the processing module exits the charging mode and enters the sleep state.
[0011] Furthermore, in the PWM output mode, the processing module continuously detects the status indication bit, and when it is detected that the status indication bit is 0, the processing module exits the PWM output mode and enters the charging mode.
[0012] Furthermore, during the charging process, the processing module detects the charging indication bit of the register. When the charging indication bit is 1, it indicates that the battery is fully charged, and the multiplexing port outputs a high level to turn off the charging indicator light. When the charging indicator is 0, it means the battery is charging.
[0013] Further, the positive electrode of the charging indicator light is connected to the charging voltage, and the negative electrode of the charging indicator light is connected to the multiplexing port; When the multiplexed port is in output mode and outputs a low level, the charging indicator light is on; When the multiplexing port is in output mode and outputs a high level, the charging indicator light is off.
[0014] The second technical solution of the present invention is as follows: A method for controlling a flashlight, characterized in that it is applied to any of the above-mentioned control systems of the flashlight, characterized in that it includes: When the charging port is not connected to the charging voltage, the multiplexing port is adjusted to the input mode to detect the signal of the control button, and when the processing module detects the signal of the control button, the output port outputs the PWM signal; When the charging port is connected to the charging voltage and the battery is charged, the multiplexed port is adjusted to the output mode and the charging indicator light is turned on; During the charging process, the processing module performs charging detection, and when the battery is fully charged, the charging indicator light is turned off.
[0015] The third technical solution of the present invention is as follows: a flashlight, comprising any of the control systems of the flashlight described above.
[0016] The beneficial effects of the present invention are as follows: the present invention adopts MCU to realize the control of flashlight charging and lighting. The system of the present invention has a small number of components, which can effectively reduce the patch fee and material fee, reduce the product cost and improve the cost performance without affecting the practicality. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a structural schematic diagram of a control system of a flashlight of the present invention.
[0018] Figure 2 It is a control flow chart of the control system of the flashlight of the present invention. DETAILED DESCRIPTION
[0019] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. The described embodiment is only a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present invention.
[0020] In the first technical solution of the present invention, Figure 1 FIG. 1 is a schematic diagram of a flashlight control system according to the present invention. Figure 1 As shown, the present invention specifically includes: It includes: a processing module, the processing module includes a charging port, a multiplexing port and an output port, the charging port is used to connect the charging voltage, the output port is used to output a PWM signal, and the multiplexing port is connected to a control button and a charging indicator light.
[0021] Specifically, the processing module can use the WX25-ST6005 MCU, which has the functions of charging management and PWM output. This chip is an existing technology, so the specific structure is not described here. This type of chip has a total of 8 ports: The first port 1 is the charging port VIN end, connected to the USB charging plug, that is, the charging voltage, that is, +5V in the figure, The second port 2 is the charging current output terminal VBAT. In the figure, BAT is the positive electrode of the battery. The third port 3 is the VDD terminal of the MCU, VDD is the positive electrode of the MCU, that is, the working voltage. At the same time, a first resistor R1 is arranged between the charging current output terminal and the charging port.
[0022] The fourth port 4 is a first output terminal.
[0023] The fifth port 5 is a second output terminal.
[0024] The sixth port 6 is a multiplexed port integrating key input and full charge indication. Specifically, the multiplexed port is connected to the negative pole of the charging indicator light and one end of the third resistor, the positive pole of the charging indicator light is connected to one end of the second resistor, the other end of the second resistor is connected to the charging voltage, the other end of the third resistor is connected to one end of the control button, and the other end of the control button is connected to the working voltage.
[0025] When the multiplexing port is in output mode and outputs a low level, the charging indicator light is on; when the multiplexing port is in output mode and outputs a high level, the charging indicator light is off.
[0026] The seventh port 7 is the third output.
[0027] The eighth port 8 is a ground terminal connected to a signal ground.
[0028] It should be noted that the fourth port, the fifth port and the seventh port 7 can be divided into three outputs, or combined into one output, so that the output current of a single output is increased.
[0029] When the charging port is not connected to the charging voltage, the multiplexing port is adjusted to the input mode to detect the signal of the control button. When the processing module detects the signal of the control button, the output port outputs the PWM signal.
[0030] When the charging port is connected to the charging voltage and the battery is charged, the multiplexing port is adjusted to the output mode and the charging indicator light is turned on.
[0031] During the charging process, the processing module performs charging detection, and when the battery is fully charged, the charging indicator light is turned off.
[0032] like Figure 2 As shown, the specific control process of the present invention is as follows: When the processing module is powered on, the processing module enters a dormant state. In the dormant state, the multiplexing port is adjusted to an input mode and to a low level state.
[0033] After the system is powered on, the MCU will switch the multiplexed port to input mode and turn on the pull-down resistor, so that the port is normally in a weak low state, and then enters sleep mode. In this state, the MCU power consumption is only 0.1ua-0.4ua, greatly extending the battery life.
[0034] When a signal input from a control button is detected or a charging voltage is connected, the processing module enters a working state. In the working state, the multiplexing port is adjusted to an input mode and a high level state.
[0035] When a button is pressed or a USB charger is plugged in, the MCU's multiplexed port will change from a weak low state to a high level state. At this time, the MCU exits the sleep mode and enters the working state.
[0036] At the same time, when the signal of the control button is input to the processing module, the processing module sets the status indication position in the register to 1, and when the charging port is connected to the charging voltage, the processing module sets the status indication position in the register to 0. The status indication position is the VIN position of the 05h address register.
[0037] When the processing module enters the working state, the current parameter of the status indication bit in the register is detected. When the status indication bit is 0, the processing module enters the charging mode, the output port is closed, and the charging indicator light of the multiplexing port is lit. When the status indication bit is 1, the processing module enters the PWM output mode, and the output port outputs a PWM signal.
[0038] After the MCU enters the working state, the VIN bit of the 05h address register in the MCU is judged. If the VIN bit is set to 0, it means that there is a USB charging connection and the charging state is entered; if the VIN bit is set to 1, it means that a button is pressed and the PWM output working state is entered.
[0039] During the charging process, the processing module detects the charging indication bit of the register. When the charging indication bit is 1, it indicates that the battery is fully charged. The multiplexing port outputs a high level to turn off the charging indicator light. When the charging indication bit is 0, it indicates that the battery is being charged.
[0040] When the MCU enters the charging state, the microcontroller enters the charging detection program. At this time, the button function is shielded, and the MCU's multiplexed port switches from input mode to output mode, so that the LED_R indicator lights up, indicating that charging is in progress.
[0041] The charging indication bit is the CHRG bit of the 05h address register. The CHRG bit of the 05h address register in the MCU is detected cyclically. If the CHRG bit is set to 0, it means that the battery is being charged. If the CHRG bit is set to 1, it means that the battery is fully charged. At this time, the multiplexed port of the MCU can output a high level to turn off the LED_R indicator, indicating that the battery is fully charged.
[0042] In the charging mode, the processing module continuously detects the status indication bit, and when it is detected that the status indication bit is 1, the processing module exits the charging mode and enters the sleep state.
[0043] Whether in charging or full state, it is necessary to cyclically detect the VIN bit of the 05h address register in the MCU. If VIN is set to 1, it means that the USB charging port is unplugged, charging stops, and returns to sleep mode.
[0044] In the PWM output mode, the processing module continuously detects the state indication bit, and when it is detected that the state indication bit is 0, the processing module exits the PWM output mode and enters the charging mode.
[0045] When the MCU enters the PWM working state, the PWM working mode can be controlled by the MCU, increasing the selectivity; in this state, the VIN bit of the 05h address register in the MCU can also be detected. If the VIN bit is 0, it enters the charging state and the PWM working state is turned off.
[0046] In a second technical solution of the present invention, a flashlight control method is provided, which is applied to any of the above-mentioned flashlight control systems, and specifically includes: When the charging port is not connected to the charging voltage, the multiplexing port is adjusted to the input mode to detect the signal of the control button, and when the processing module detects the signal of the control button, the output port outputs the PWM signal; When the charging port is connected to the charging voltage and the battery is charged, the multiplexed port is adjusted to the output mode and the charging indicator light is turned on; During the charging process, the processing module performs charging detection, and when the battery is fully charged, the charging indicator light is turned off.
[0047] In a third technical solution of the present invention, a flashlight is provided, comprising any of the control systems of the flashlight described above.
[0048] The present invention adopts MCU to realize the control of charging and lighting of the flashlight. The system of the present invention has a small number of components, which can effectively reduce the patch fee and material fee, reduce the product cost and improve the cost performance without affecting the practicality.
[0049] Finally, it should be noted that the above specific implementation methods are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to examples, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.
Claims
1. A flashlight control system, It is characterized in that It includes a processing module, the processing module includes a charging port, a multiplexing port and an output port, the charging port is used to connect the charging voltage, the output port is used to output the PWM signal, and the multiplexing port is connected to the control button and the charging indicator light; When the charging port is not connected to the charging voltage, the multiplexing port is adjusted to the input mode to detect the signal of the control button, and when the processing module detects the signal of the control button, the output port outputs the PWM signal; When the charging port is connected to the charging voltage and the battery is charged, the multiplexed port is adjusted to the output mode and the charging indicator light is turned on; During the charging process, the processing module performs charging detection, and when the battery is fully charged, the charging indicator light is turned off.
2. The key control system of the flashlight as claimed in claim 1, It is characterized in that When the processing module is powered on, the processing module enters a dormant state, in which the multiplexing port is adjusted to an input mode and to a low level state; When a signal input from a control button is detected or a charging voltage is connected, the processing module enters a working state. In the working state, the multiplexing port is adjusted to an input mode and a high level state.
3. The key control system of the flashlight as claimed in claim 2, It is characterized in that When the signal of the control button is input to the processing module, the processing module sets the status indication position in the register to 1; When the charging port is connected to a charging voltage, the processing module sets the status indication position in the register to 0.
4. The key control system of the flashlight as claimed in claim 3, It is characterized in that When the processing module enters the working state, the current parameter of the state indication bit in the register is detected; When the status indication bit is 0, the processing module enters the charging mode, the output port is closed, and the multiplexing port lights up the charging indicator light; When the status indication bit is 1, the processing module enters the PWM output mode, and the output port outputs a PWM signal.
5. The key control system of the flashlight as claimed in claim 4, It is characterized in that In the charging mode, the processing module continuously detects the status indication bit, and when it is detected that the status indication bit is 1, the processing module exits the charging mode and enters the sleep state.
6. The key control system of the flashlight as claimed in claim 1, It is characterized in that In the PWM output mode, the processing module continuously detects the state indication bit, and when it is detected that the state indication bit is 0, the processing module exits the PWM output mode and enters the charging mode.
7. The key control system of the flashlight as claimed in claim 1, It is characterized in that During the charging process, the processing module detects the charging indication bit of the register. When the charging indication bit is 1, it indicates that the battery is fully charged, and the multiplexing port outputs a high level to turn off the charging indicator light. When the charging indicator is 0, it means the battery is charging.
8. The key control system of a flashlight as claimed in claim 1, It is characterized in that The positive electrode of the charging indicator light is connected to the charging voltage, and the negative electrode of the charging indicator light is connected to the multiplexing port; When the multiplexed port is in output mode and outputs a low level, the charging indicator light is on; When the multiplexing port is in output mode and outputs a high level, the charging indicator light is off.
9. A method for controlling a flashlight, It is characterized in that A control system for a flashlight according to any one of claims 1 to 8, characterized in that it comprises: When the charging port is not connected to the charging voltage, the multiplexing port is adjusted to the input mode to detect the signal of the control button, and when the processing module detects the signal of the control button, the output port outputs the PWM signal; When the charging port is connected to the charging voltage and the battery is charged, the multiplexed port is adjusted to the output mode and the charging indicator light is turned on; During the charging process, the processing module performs charging detection, and when the battery is fully charged, the charging indicator light is turned off.
10. A flashlight, It is characterized in that A control system comprising a flashlight as described in any one of claims 1-8.
