Control device

By designing a control device, using the control unit to detect the status of the switch module and the gear position of the tool switch, the problem of IO interface resource occupation in the prior art is solved, and the effect of saving the processor IO interface is achieved.

CN223123379UActive Publication Date: 2025-07-18JIANGSU DARTEK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202422410114.5
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-07-18
Estimated Expiration
2034-09-30

AI Technical Summary

Technical Problem

In the prior art, tool switches need to configure three IO interfaces to realize the status detection of the switch module, speed regulation signal acquisition and processor power supply control, occupying the processor's IO interface resources.

Method used

A control device is designed, by setting a control unit, using the signal at an output terminal to simultaneously detect the opening and closing state of the switch module and the gear position of the tool switch, saving the IO interface of the processor.

Benefits of technology

It realizes the simultaneously detecting the status of the switch module and the gear of the tool switch through an IO interface, saving the number of IO interfaces of the processor and reducing the cost of the processor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN223123379U_ABST
    Figure CN223123379U_ABST
Patent Text Reader

Abstract

The utility model discloses a control device which comprises a first input end, a second input end, a control unit, an output end and a processor. The first input end is connected to the switch module to receive and transmit a switch signal to the control unit, the second input end is connected to the speed regulation module to receive and transmit a speed regulation signal to the control unit, the output end is connected with the processor, and the control unit responds to the switch signal and outputs a first control signal through the output end; the control unit responds to the speed regulation signal and outputs a second control signal through the output end. According to the control device, the control unit is arranged, the on-off state of the switch module and the gear of the tool switch can be detected at the same time through the signal output by one output end, and the processor can achieve the functions of quitting a sleep mode, self-locking a power supply, entering the sleep mode in a delayed mode and obtaining the gear of the switch only by being provided with two IO interfaces. And IO interfaces of the processor are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model belongs to the technical field of integrated circuits, and specifically relates to a control device. Background Art

[0002] Figure 1 As shown in a circuit diagram of a tool switch, when the tool switch is pressed, the switch module K1 is closed, and pins 5 and 6 are conducted. Continuing to press the tool switch will gradually increase the switch gear from the 0th gear, increasing the resistance between pin 2 and pin 7.

[0003] In the prior art, the tool switch combines the functions of power supply control and speed control of the processor. Pin 6 of the tool switch is connected to the ground voltage, and pin 5 is connected to the peripheral circuit of the processor. The peripheral circuit of the processor generates a switch signal representing the on / off state of the switch module K1 and outputs the switch signal to the processor. When the tool switch is pressed, the switch module K1 is closed, and at this time, the peripheral circuit of the processor powers on the processor. At the same time, the processor also generates a self-locking signal to lock the peripheral circuit so that the processor can continue to be powered even when the switch module K1 is disconnected.

[0004] Pin 1 and pin 2 of the tool switch are respectively connected to the power supply voltage and the ground voltage. Pin 7 of the tool switch generates a speed control signal and outputs it to the processor. The processor can obtain the gear information of the tool switch through the speed control signal.

[0005] For the above solution, the processor needs to configure three IO interfaces, which are respectively used to obtain the switch signal, obtain the speed control signal, and generate the self-locking signal, so as to realize the functions of controlling the power supply of the processor through the switch module K1, the processor controlling the power supply self-locking, detecting the state of the switch module K1, and obtaining the switch gear, occupying the IO interface resources of the processor.

[0006] The information disclosed in this background art section is only intended to increase the understanding of the overall background of the present application, and should not be regarded as an admission or any form of suggestion that this information constitutes the prior art already known to those of ordinary skill in the art. Summary of the Utility Model

[0007] The purpose of the present application is to provide a control device, which can save the interfaces of the processor.

[0008] In order to achieve the above purpose, the technical solution provided by a specific embodiment of the present application is as follows:

[0009] A control device for a tool switch, the tool switch including a speed regulation module and a switch module, the speed regulation module being configured to output a speed regulation signal, and the switch module being configured to output a switch signal; the control device including a first input terminal, a second input terminal, a control unit, an output terminal, and a processor; the first input terminal being connected to the switch module to receive and transmit the switch signal to the control unit, the second input terminal being connected to the speed regulation module to receive and transmit the speed regulation signal to the control unit, the output terminal being connected to the processor, the control unit responding to the switch signal and outputting a first control signal through the output terminal, and the control unit responding to the speed regulation signal and outputting a second control signal through the output terminal.

[0010] In one or more embodiments of the present application, the speed regulation module is connected to a first voltage, and the speed regulation module is configured to generate a speed regulation signal based on the first voltage. A first end of the switch module is connected to a second voltage, and a second end of the switch module is configured to output a switch signal based on its own closing and the second voltage.

[0011] In one or more embodiments of the present application, the control unit includes a switch unit and an output unit. The switch unit is connected to the first input terminal to receive the switch signal, the switch unit is connected to the second input terminal, a first end of the switch unit and the output unit is connected to the output terminal, a second end of the output unit is connected to a ground voltage, and the switch unit is configured to control the on / off between the first end of the output unit and the output terminal and the second input terminal based on the switch signal.

[0012] In one or more embodiments of the present application, the switch unit includes a first transistor and a first voltage dividing unit. A first end of the first transistor is connected to the first end of the output unit and the output terminal, a second end of the first transistor is connected to the second input terminal, the first voltage dividing unit is connected to the first input terminal to receive the switch signal and divide the switch signal to generate a first divided voltage signal, and a control end of the first transistor is connected to the first voltage dividing unit to receive the first divided voltage signal.

[0013] In one or more embodiments of the present application, the switch unit further includes a first resistor, a first end of the first resistor being connected to the second input terminal and a second end of the first resistor being connected to the second end of the first transistor; and / or the switch unit further includes a first filtering unit, the first filtering unit being connected to the control end of the first transistor; and / or the switch unit further includes a second filtering unit, the second filtering unit being connected to the first end of the first transistor; the output unit includes a second resistor, a first end of the second resistor being connected to the switch unit and a second end of the second resistor being connected to the ground voltage.

[0014] In one or more embodiments of the present application, the control device further includes a power supply control module. The power supply control module is connected to the switch module, the processor, and the second voltage. The power supply control module is turned on based on the control of the switch signal and outputs a power supply voltage for turning on the processor based on the second voltage. The power supply control module is further configured to achieve self-locking based on the control of the third control signal generated when the processor is turned on to continuously supply the power supply voltage to the processor.

[0015] In one or more embodiments of the present application, the power supply control module includes a first power supply control unit and a second power supply control unit. The first power supply control unit is connected to the switch module and the processor. The first power supply control unit is configured to be turned on based on the control of the switch signal or the third control signal to generate a fourth control signal. The second power supply control unit is connected to the first power supply control unit, the second voltage, and the processor. The second power supply control unit is configured to be turned on based on the control of the fourth control signal and output a power supply voltage based on the second voltage.

[0016] In one or more embodiments of the present application, the first power supply control unit includes a second transistor, a third resistor, and a fourth resistor. The control terminal of the second transistor is connected to the switch module and the processor. The control terminal of the second transistor is configured to receive the switch signal or the third control signal. The first terminal of the second transistor is connected to the ground voltage. The second terminal of the second transistor is connected to the first terminal of the third resistor. The second terminal of the third resistor and the first terminal of the fourth resistor are connected to the second power supply control unit to generate a fourth control signal. The second terminal of the fourth resistor is connected to the second voltage.

[0017] In one or more embodiments of the present application, the first power supply control unit further includes a third filtering unit. The third filtering unit is connected to the control terminal of the second transistor and the switch module to filter the switch signal; and / or the first power supply control unit further includes a first diode. The anode of the first diode is connected to the switch module to receive the switch signal. The cathode of the first diode is connected to the control terminal of the second transistor; and / or the first power supply control unit further includes a second diode. The anode of the second diode is connected to the processor to receive the third control signal. The cathode of the second diode is connected to the control terminal of the second transistor; and / or the first power supply control unit further includes a second voltage dividing unit. The second voltage dividing unit is connected to the switch module and the processor. The second voltage dividing unit is configured to divide the switch signal or the third control signal to generate a second divided voltage signal. The control terminal of the second transistor is connected to the second voltage dividing unit to receive the second divided voltage signal.

[0018] In one or more embodiments of the present application, the second power supply control unit includes a third transistor. A first end of the third transistor is connected to a second voltage, a second end of the third transistor is connected to a processor to output a power supply voltage, and a control end of the third transistor is connected to a first power supply control unit to receive a fourth control signal; or the second power supply control unit includes a third transistor and a fifth resistor. A first end of the third transistor is connected to a second voltage, a control end of the third transistor is connected to a first power supply control unit to receive a fourth control signal, a second end of the third transistor is connected to a first end of the fifth resistor, and a second end of the fifth resistor is connected to a processor to output a power supply voltage; or the second power supply control unit includes a third transistor and a third diode. A first end of the third transistor is connected to a second voltage, a control end of the third transistor is connected to a first power supply control unit to receive a fourth control signal, a second end of the third transistor is connected to an anode of the third diode, and a cathode of the third diode is connected to a processor to output a power supply voltage; or the second power supply control unit includes a third transistor, a fifth resistor, and a third diode. A first end of the third transistor is connected to a second voltage, a control end of the third transistor is connected to a first power supply control unit to receive a fourth control signal, a second end of the third transistor is connected to a first end of the fifth resistor, a second end of the fifth resistor is connected to an anode of the third diode, and a cathode of the third diode is connected to a processor to output a power supply voltage.

[0019] Compared with the prior art, by providing a control unit, the control device of the present application can detect the opening and closing state of the switch module and the gear position of the tool switch simultaneously through the signal output from one output end, saving the IO interface of the processor. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0021] Figure 1 It is a circuit diagram of a tool switch in the prior art.

[0022] Figure 2 It is a circuit diagram of a control device in an embodiment of the present application.

[0023] Figure 3 It is a circuit diagram of a processor in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0024] To enable those skilled in the art to better understand the technical solutions in this application, the following will clearly and completely describe the technical solutions in the embodiments of this application in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.

[0025] "Coupled", "connected", or "linked" in the specification includes both direct connection and indirect connection. Indirect connection is a connection through an intermediate medium, such as a connection through an electrical conduction medium, which may have parasitic inductance or parasitic capacitance; indirect connection may also include a connection through other active or passive devices on the basis of achieving the same or similar functional purposes, such as a connection through a circuit or component such as a switch, a follower circuit, etc. Additionally, in the invention, words such as "first", "second", etc. are mainly used to distinguish one technical feature from another technical feature, and do not necessarily require or imply that there is a certain actual relationship, quantity, or order between these technical features.

[0026] In the detailed description of the specification, reference is made to the accompanying drawings that form a part of it, where the same reference numerals always represent the same components, and where the exemplary embodiments can be implemented are shown. It should be understood that other embodiments can be utilized without departing from the scope of the present disclosure, and structural or logical changes can be made. Therefore, the following detailed description should not be regarded as limiting.

[0027] The various operations in the specification can be described as a plurality of discrete actions or operations in the order that is most helpful for understanding the claimed subject matter. However, the described order should not be construed as implying that these operations must be order-related. Specifically, these operations may not be performed in the order presented. The described operations can be performed in an order different from the described embodiments. Various additional operations can be performed in additional embodiments and / or the described operations can be omitted.

[0028] For the purposes of this disclosure, the phrase "A and / or B" means (A), (B), or (A and B). For the purposes of this disclosure, the phrase "A, B, and / or C" means (A), (B), (C), (A and B), (A and C), (B and C), or (A, B, and C).

[0029] Various components and devices can be referred to or shown in the singular form herein (e.g., "MOS transistor", "transistor", "switch", etc.), but this is only for convenience of discussion, and any element referred to in the singular form can include multiple such elements according to the teachings herein.

[0030] The specification describes the use of the phrases "in one embodiment", "in other embodiments", or "in some embodiments", which may each refer to one or more of the same or different embodiments. In addition, the terms "comprising", "including", "having", etc. used with respect to the embodiments of the present disclosure are synonymous.

[0031] In combination with Figure 1 、 Figure 2 and Figure 3 As shown, the control device in one embodiment of the present application is used for a tool switch. The control device includes a first input terminal A, a second input terminal B, an output terminal O, a control unit 10, a power supply control module 20, and a processor U1.

[0032] Among them, the tool switch includes a speed regulation module and a switch module K1. The speed regulation module is used to output a speed regulation signal, and the switch module K1 is used to output a switch signal.

[0033] In combination with Figure 1 and Figure 2 As shown, the speed regulation module is connected to a first voltage. The speed regulation module is used to generate a speed regulation signal based on the first voltage. The first end of the switch module K1 is connected to a second voltage B+, and the second end of the switch module K1 is used to output a switch signal based on its own closing and the second voltage B+.

[0034] In one embodiment, the speed regulation module may include a variable resistor R0 and a sliding contact. The tool switch has pins (1 to 7). The first end of the variable resistor R0 may be connected to pin 1 of the tool switch, the second end of the variable resistor R0 may be connected to pin 2 of the tool switch, and the sliding contact may be connected to pin 7 of the tool switch. The first end of the switch module K1 may be connected to pin 5 of the tool switch, and the second end of the switch module K1 may be connected to pin 6 of the tool switch.

[0035] When the tool switch is pressed for the first time, the switch module K1 closes, and pin 5 and pin 6 of the tool switch are conducted. When the tool switch is continuously pressed, as the gear of the tool switch increases, the sliding contact moves from the second end of the variable resistor R0 to the first end of the variable resistor R0, and the resistance value between pin 2 and pin 7 of the tool switch gradually increases corresponding to the gear of the tool switch. Of course, it can be understood that in other embodiments, when the tool switch is continuously pressed, as the gear of the tool switch increases, the sliding contact can also move from the first end of the variable resistor R0 to the second end of the variable resistor R0, and the resistance value can also gradually decrease, and as long as the software is adjusted accordingly.

[0036] In one embodiment, the tool switch can be connected to the control device through the connector J1, the seventh resistor R7, and the sixth resistor R6. Among them, pin 1 of the tool switch can be connected to pin 1 of the connector J1, pin 2 of the tool switch can be connected to pin 2 of the connector J1, pin 5 of the tool switch can be connected to pin 5 of the connector J1, pin 6 of the tool switch can be connected to pin 6 of the connector J1, and pin 7 of the tool switch can be connected to pin 7 of the connector J1.

[0037] Pin 1 of the connector J1 can be connected to the first end of the sixth resistor R6, the second end of the sixth resistor R6 can be connected to the ground voltage GND, and pin 2 of the connector J1 can be connected to the first voltage. In this embodiment, the first voltage is 5V. A speed regulation signal corresponding to the first voltage and the gear position of the tool switch is generated on the sliding contact (pin 7 of the connector J1). The sixth resistor R6 is used to be connected in series with the adjustable resistor R0 for voltage division, so as to limit the magnitude of the speed regulation signal value.

[0038] Pin 5 of the connector J1 can be connected to the first end of the seventh resistor R7, the second end of the seventh resistor R7 can be connected to the second voltage B+, and the seventh resistor R7 plays a current limiting role. When the switch module K1 is closed, the second end of the switch module K1 (pin 6 of the connector J1) outputs a switch signal.

[0039] In other embodiments, the sixth resistor R6 and / or the seventh resistor R7 may not be provided either.

[0040] Such as Figure 2 and Figure 3 As shown, the first input terminal A can be connected to pin 6 of the connector J1 to receive and transfer the switch signal to the control unit 10, the second input terminal B can be connected to pin 7 of the connector J1 to receive and transfer the speed regulation signal to the control unit 10, the output terminal O can be connected to pin 15 of the processor U1, the control unit 10 responds to the switch signal and outputs a first control signal through the output terminal O, and the control unit 10 responds to the speed regulation signal and outputs a second control signal through the output terminal O.

[0041] The power supply control module 20 can be connected to pin 6 of the connector J1, pin 1 of the processor U1, pin 16 of the processor U1, pin 27 of the processor U1, and the second voltage B+. The power supply control module 20 is turned on based on the control of the switch signal and outputs a power supply voltage VCC for turning on the processor U1 based on the second voltage B+. The power supply control module 20 is also used to achieve self-locking based on the control of the third control signal Power_control generated when the processor U1 is turned on to continuously supply the power supply voltage VCC to the processor U1.

[0042] Specifically, the control unit 10 includes a switching unit and an output unit. The switching unit is connected to the first input terminal A to receive a switching signal, and the switching unit is connected to the second input terminal B. The first end of the switching unit and the output unit is connected to the output terminal O, and the second end of the output unit is connected to the ground voltage. The switching unit is configured to control the connection and disconnection between the first end of the output unit and the output terminal O and the second input terminal B based on the switching signal.

[0043] In one embodiment, the switching unit may include a first transistor Q1, a first voltage dividing unit, a first resistor R1, a first filtering unit, and a second filtering unit.

[0044] The first end of the first resistor R1 may be connected to the second input terminal B, and the second end of the first resistor R1 may be connected to the second end of the first transistor Q1. The first voltage dividing unit may be connected to the first input terminal A to divide the switching signal to generate a first divided voltage signal. The control terminal of the first transistor Q1 may be connected to the first voltage dividing unit to receive the first divided voltage signal. The first end of the first transistor Q1 may be connected to the first end of the output unit and the second filtering unit. The first filtering unit may be connected to the control terminal of the first transistor Q1, and the first filtering unit is configured to filter the first divided voltage signal. The second filtering unit may be connected to the output terminal O, and the second filtering unit is configured to filter the first control signal and the second control signal and output them through the output terminal O.

[0045] Specifically, the output unit includes a second resistor R2. The first end of the second resistor R2 is connected to the first end of the first transistor Q1, and the second end of the second resistor R2 is connected to the ground voltage GND.

[0046] The first voltage dividing unit includes an eighth resistor R8 and a ninth resistor R9. The first end of the eighth resistor R8 may be connected to pin 6 of the connector J1. The second end of the eighth resistor R8 and the first end of the ninth resistor R9 are connected to the control terminal of the first transistor Q1 to generate a first divided voltage signal, and the second end of the ninth resistor R9 is connected to the ground voltage GND.

[0047] The first filtering unit includes a first capacitor C1. The first end of the first capacitor C1 is connected to the control terminal of the first transistor Q1, and the second end of the first capacitor C1 is connected to the ground voltage GND.

[0048] The second filtering unit includes a tenth resistor R10 and a second capacitor C2. The first end of the tenth resistor R10 is connected to the first end of the first transistor Q1. The second end of the tenth resistor R10 and the first end of the second capacitor C2 are connected to the output terminal O, and the second end of the second capacitor C2 is connected to the ground voltage GND.

[0049] In other embodiments, one or more of the first resistor R1, the first filtering unit, and the second filtering unit may not be provided.

[0050] As Figure 2 and Figure 3 shown, the power supply control module 20 includes a first power supply control unit 21 and a second power supply control unit 22. The first power supply control unit 21 can be connected to pin 6 of the connector J1 and pin 1 of the processor U1. The first power supply control unit 21 is used to be turned on based on the control of a switch signal or a third control signal Power_control to generate a fourth control signal. The second power supply control unit 22 can be connected to the first power supply control unit 21, the second voltage B+, pin 16 of the processor U1, and pin 27 of the processor U1. The second power supply control unit 22 is used to be turned on based on the control of the fourth control signal and output a power supply voltage VCC based on the second voltage B+.

[0051] In one embodiment, the first power supply control unit 21 can include a second transistor Q2, a third resistor R3, a fourth resistor R4, a third filtering unit, a first diode D1, a second diode D2, and a second voltage dividing unit.

[0052] Among them, the third filtering unit can be connected to pin 6 of the connector J1 and the anode of the first diode D1. The third filtering unit is used to filter the switch signal and deliver the filtered switch signal to the anode of the first diode D1. The anode of the second diode D2 can be connected to pin 1 of the processor U1 to receive the third control signal Power_control. The cathodes of the first diode D1 and the second diode D2 can be connected to the second voltage dividing unit. The second voltage dividing unit is used to divide the voltage of the switch signal or the third control signal Power_control to generate a second divided voltage signal. The first diode D1 and the second diode D2 are used to prevent current backflow.

[0053] The control end of the second transistor Q2 can be connected to the second voltage dividing unit to receive the second divided voltage signal. The first end of the second transistor Q2 is connected to the ground voltage GND. The second end of the second transistor Q2 is connected to the first end of the third resistor R3. The second end of the third resistor R3 and the first end of the fourth resistor R4 are connected to the second power supply control unit 22 to generate a fourth control signal. The second end of the fourth resistor R4 is connected to the second voltage B+.

[0054] Specifically, the third filtering unit includes an eleventh resistor R11 and a third capacitor C3. The first end of the eleventh resistor R11 and the first end of the third capacitor C3 can be connected to pin 6 of the connector J1. The second end of the eleventh resistor R11 and the second end of the third capacitor C3 can be connected to the anode of the first diode D1.

[0055] The second voltage dividing unit includes a twelfth resistor R12 and a thirteenth resistor R13. The first end of the twelfth resistor R12 can be connected to the cathodes of the first diode D1 and the second diode D2. The second end of the twelfth resistor R12 and the first end of the thirteenth resistor R13 are connected to the control end of the second transistor Q2 to generate a second voltage dividing signal, and the second end of the thirteenth resistor R13 is connected to the ground voltage GND.

[0056] In other embodiments, one or more of the third filtering unit, the first diode D1, the second diode D2, and the second voltage dividing unit may not be provided.

[0057] In one embodiment, the second power supply control unit 22 may include a third transistor Q3, a fifth resistor R5, and a third diode D3.

[0058] The first end of the third transistor Q3 is connected to the second voltage B+. The control end of the third transistor Q3 is connected to the second end of the third resistor R3 and the first end of the fourth resistor R4 to receive a fourth control signal. The second end of the third transistor Q3 may be connected to the first end of the fifth resistor R5. The second end of the fifth resistor R5 may be connected to the anode of the third diode D3. The cathode of the third diode D3 may be connected to pin 16 and pin 27 of the processor U1 to output a power supply voltage VCC.

[0059] The fifth resistor R5 is used to limit the current magnitude, and the third diode D3 is used to prevent current backflow. In other embodiments, the fifth resistor R5 and / or the third diode D3 may not be provided.

[0060] In one embodiment, the first transistor Q1 and the second transistor Q2 are NMOS transistors, and the third transistor Q3 is a PMOS transistor. The first ends of the first transistor Q1, the second transistor Q2, and the third transistor Q3 are source electrodes. The second ends of the first transistor Q1, the second transistor Q2, and the third transistor Q3 are drain electrodes. The control ends of the first transistor Q1, the second transistor Q2, and the third transistor Q3 are gate electrodes. In other embodiments, the first transistor Q1 and the second transistor Q2 may also be PMOS transistors or other devices, and the third transistor Q3 may also be an NMOS transistor or other devices. Then, the connection manners of the respective transistors are adjusted adaptively.

[0061] During the actual working process, when the tool switch is not pressed, the switch module K1 is disconnected, no switch signal is output, the first transistor Q1 is turned off, and the state of the first control signal is disconnected. At the same time, the second transistor Q2 is also turned off, the third control signal is pulled high to a high level by the fourth resistor R4, the third transistor Q3 is turned off, no power supply voltage VCC is output, and the processor U1 does not get power supply and is in a sleep mode.

[0062] When the tool switch is pressed, a high-level switch signal is output at pin 6 of the connector J1, turning on the first transistor Q1. The state of the first control signal becomes conducting, and at the same time, the second control signal is output at the first end of the first transistor. The second transistor Q2 is also turned on by the switch signal and pulls down the fourth control signal, thereby turning on the third transistor Q3 and outputting the supply voltage VCC. Then, the processor U1 is turned on and generates the third control signal Power_control. The third control signal Power_control keeps the second transistor Q2 in the on state. Even when the switch module K1 is disconnected and there is no switch signal, the second transistor Q2 and the third transistor Q3 can achieve self-locking, so as to continuously supply power to the processor U1.

[0063] After the processor U1 is turned on, it receives and processes the second control signal. The magnitude of the second control signal is approximately the voltage value obtained by dividing the speed control signal by the first resistor R1 and the second resistor R2. By detecting the voltage value of the second control signal, the processor U1 can infer the speed control signal and further obtain the gear position of the tool switch, so as to perform other related control operations.

[0064] When the tool switch is continuously pressed until the switch module K1 is disconnected, the first transistor Q1 is turned off, and the state of the first control signal changes to off. After a preset time, the processor U1 stops outputting the third control signal Power_control, turns off the second transistor Q2 and the third transistor Q3, does not output the supply voltage VCC, and the processor U1 is powered off and returns to the sleep mode again.

[0065] In the above process, the processor U1 can receive and process the first control signal and the second control signal through an IO interface at the same time, and thus can know the state of the switch module K1 and the gear position of the tool switch. The processor U1 only needs to configure 2 IO interfaces, namely pin 15 for receiving the first control signal and the second control signal and pin 1 for outputting the third control signal, to realize the functions of controlling the power supply of the processor U1 through the switch module K1, the processor U1 controlling the power supply self-locking, detecting the state of the switch module K1, and obtaining the gear position of the tool switch, saving the number of IO interfaces of the processor U1 and being beneficial to saving the processor cost.

[0066] For those skilled in the art, it is obvious that the present application is not limited to the details of the above exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or basic characteristics of the present application. Therefore, in any aspect, the embodiments should be regarded as exemplary and non-limiting. The scope of the present application is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present application. Any reference signs in the claims should not be regarded as limiting the claimed rights.

[0067] In addition, it should be understood that although this specification is described according to embodiments, not every embodiment only contains an independent technical solution. This narrative way of the specification is only for clarity. Those skilled in the art should regard the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A control device for a tool switch, the tool switch including a speed regulation module and a switch module, characterized in that, The speed regulation module is used to output a speed regulation signal, and the switching module is used to output a switching signal; The control device includes a first input terminal, a second input terminal, a control unit, an output terminal and a processor; the first input terminal is connected to the switching module to receive and transfer the switching signal to the control unit, the second input terminal is connected to the speed regulation module to receive and transfer the speed regulation signal to the control unit, the output terminal is connected to the processor, the control unit responds to the switching signal and outputs a first control signal through the output terminal, and the control unit responds to the speed regulation signal and outputs a second control signal through the output terminal.

2. The control device according to claim 1, characterized in that, The speed regulation module is connected to a first voltage, and the speed regulation module is used to generate a speed regulation signal based on the first voltage. The first end of the switching module is connected to a second voltage, and the second end of the switching module is used to output a switching signal based on its own closing and the second voltage.

3. The control device according to claim 1, wherein The control unit includes a switching unit and an output unit. The switching unit is connected to the first input terminal to receive the switching signal. The switching unit is connected to the second input terminal. The first ends of the switching unit and the output unit are connected to the output terminal. The second end of the output unit is connected to the ground voltage. The switching unit is used to control the on / off between the first end of the output unit and the output terminal and the second input terminal based on the switching signal.

4. The control device according to claim 3, characterized in that, The switching unit includes a first transistor and a first voltage dividing unit. The first end of the first transistor is connected to the first end of the output unit and the output terminal. The second end of the first transistor is connected to the second input terminal. The first voltage dividing unit is connected to the first input terminal to receive the switching signal and divide the switching signal to generate a first divided voltage signal. The control end of the first transistor is connected to the first voltage dividing unit to receive the first divided voltage signal.

5. The control device according to claim 4, wherein The switching unit further includes a first resistor. The first end of the first resistor is connected to the second input terminal, and the second end of the first resistor is connected to the second end of the first transistor; and / or The switching unit further includes a first filtering unit. The first filtering unit is connected to the control end of the first transistor; and / or The switching unit further includes a second filtering unit. The second filtering unit is connected to the first end of the first transistor; The output unit includes a second resistor. The first end of the second resistor is connected to the switching unit, and the second end of the second resistor is connected to the ground voltage.

6. The control device according to claim 1, characterized in that The control device further includes a power supply control module. The power supply control module is connected to the switching module, the processor and the second voltage. The power supply control module is turned on based on the control of the switching signal and outputs a power supply voltage for starting the processor based on the second voltage; The power supply control module is further used to achieve self-locking based on the control of a third control signal generated when the processor is started to continuously supply the power supply voltage to the processor.

7. The control device according to claim 6, characterized in that, The power supply control module includes a first power supply control unit and a second power supply control unit. The first power supply control unit is connected to the switch module and the processor. The first power supply control unit is used to be turned on based on the control of the switch signal or the third control signal to generate a fourth control signal. The second power supply control unit is connected to the first power supply control unit, the second voltage, and the processor. The second power supply control unit is used to be turned on based on the control of the fourth control signal and output a power supply voltage based on the second voltage.

8. The control device according to claim 7, characterized in that, The first power supply control unit includes a second transistor, a third resistor, and a fourth resistor. The control terminal of the second transistor is connected to the switch module and the processor. The control terminal of the second transistor is used to receive the switch signal or the third control signal. The first terminal of the second transistor is connected to the ground voltage. The second terminal of the second transistor is connected to the first terminal of the third resistor. The second terminal of the third resistor and the first terminal of the fourth resistor are connected to the second power supply control unit to generate a fourth control signal. The second terminal of the fourth resistor is connected to the second voltage.

9. The control device according to claim 8, characterized in that, The first power supply control unit further includes a third filtering unit. The third filtering unit is connected to the control terminal of the second transistor and the switch module to filter the switch signal; and / or The first power supply control unit further includes a first diode. The anode of the first diode is connected to the switch module to receive the switch signal. The cathode of the first diode is connected to the control terminal of the second transistor; and / or The first power supply control unit further includes a second diode. The anode of the second diode is connected to the processor to receive the third control signal. The cathode of the second diode is connected to the control terminal of the second transistor; and / or The first power supply control unit further includes a second voltage dividing unit. The second voltage dividing unit is connected to the switch module and the processor. The second voltage dividing unit is used to divide the switch signal or the third control signal to generate a second divided voltage signal. The control terminal of the second transistor is connected to the second voltage dividing unit to receive the second divided voltage signal.

10. The control device according to claim 7, characterized in that, The second power supply control unit includes a third transistor. The first terminal of the third transistor is connected to the second voltage. The second terminal of the third transistor is connected to the processor to output the power supply voltage. The control terminal of the third transistor is connected to the first power supply control unit to receive the fourth control signal; Or The second power supply control unit includes a third transistor and a fifth resistor. The first terminal of the third transistor is connected to the second voltage. The control terminal of the third transistor is connected to the first power supply control unit to receive the fourth control signal. The second terminal of the third transistor is connected to the first terminal of the fifth resistor. The second terminal of the fifth resistor is connected to the processor to output the power supply voltage; Or The second power supply control unit includes a third transistor and a third diode. The first terminal of the third transistor is connected to the second voltage. The control terminal of the third transistor is connected to the first power supply control unit to receive the fourth control signal. The second terminal of the third transistor is connected to the anode of the third diode. The cathode of the third diode is connected to the processor to output the power supply voltage; Or The second power supply control unit includes a third transistor, a fifth resistor, and a third diode. A first end of the third transistor is connected to a second voltage. A control end of the third transistor is connected to the first power supply control unit to receive a fourth control signal. A second end of the third transistor is connected to a first end of the fifth resistor. A second end of the fifth resistor is connected to an anode of the third diode. A cathode of the third diode is connected to the processor to output a power supply voltage.