Multiple load self-locking control circuit and control method thereof
By using a three-pin two-speed self-locking switch to detect the pin status of the MCU module, the problems of increasing MCU pin position and high material cost are solved, and effective control and cost reduction of multiple sets of loads are achieved.
Patent Information
- Application Number
- CN201911314251.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-19
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2039-12-19
AI Technical Summary
In the prior art, multiple sets of load self-locking key control methods lead to an increase in MCU pin position, high material cost, and complex welding wire connections, which increases production costs.
A three-pin two-speed self-locking switch is used as a control trigger switch. By detecting its selected pin state, it switches the working mode of the load module, reduces the pin position used by the MCU module, and reduces material and production costs.
It realizes effective control of multiple sets of loads, reduces the pin usage of MCU modules, reduces material and production costs, and simplifies the wire connection requirements.
Smart Images

Figure CN110989452B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of control circuits, and in particular to a multi-group load self-locking control circuit and a control method thereof. Background Art
[0002] When a product needs to be controlled by a self-locking button and there are multiple groups of loads and multiple modes, in most cases, a self-locking button with a corresponding number of gears will be used for detection. The gear status is determined by detecting the pin position of the self-locking button. However, this method has many disadvantages: 1. The number of button gears is large, the number of pins increases, and the material cost increases; 2. The MCU needs to use the corresponding pins for detection. When the number of gears is large, the more pins need to be used. When the MCU pin usage is high, the MCU package often needs to be increased, thereby increasing the material cost pressure; 3. For products that need to separate the switch and the main control board, the two need to be connected with welding wires. When the number of gears is large, the more welding wires need to be connected, the material cost increases, and the requirements for the placement of product welding wires are higher. Summary of the invention
[0003] The purpose of the present invention is to solve at least one of the technical problems existing in the prior art, and to provide a self-locking control circuit for multiple groups of loads and a control method thereof. A three-pin two-speed self-locking switch is used as a control trigger switch to control multiple groups of loads, thereby reducing the number of pins used by the MCU module and reducing material costs and production costs.
[0004] A multi-group load self-locking control circuit according to an embodiment of the first aspect of the present invention includes:
[0005] A power supply module, comprising an external power input terminal, a first diode, a DC battery and a power supply terminal, wherein the external power input terminal is connected to the positive electrode of the first diode, the positive electrode of the DC battery and the negative electrode of the first diode are connected to the power supply terminal, and the negative electrode of the DC battery is grounded;
[0006] An RC filtering module, comprising a fourth resistor and a fourth capacitor, wherein the power supply end is connected to one end of the fourth resistor, the other end of the fourth resistor is connected to one end of the fourth capacitor, and the other end of the fourth capacitor is grounded;
[0007] The MCU module is provided with a plurality of PWM signal output terminals, and the connection point of the fourth resistor and the fourth capacitor is connected to the power supply terminal of the MCU module;
[0008] A load module, wherein the number of the load modules is consistent with the number of the PWM signal output terminals, the power supply terminal is connected to the positive electrode of the load module through a fifth resistor, the negative electrode of the load module is grounded, and a plurality of the PWM signal output terminals are respectively connected to the control terminals of a plurality of the load modules;
[0009] The three-pin two-speed self-locking switch comprises a common pin, a first selection pin and a second selection pin, wherein the common pin is grounded, and the first selection pin and the second selection pin are connected to the MCU module.
[0010] A multi-group load self-locking control circuit according to an embodiment of the first aspect of the present invention has at least the following beneficial effects: a power supply module is used to provide electrical energy, including two power sources, an external power input terminal and a DC battery; an RC filter module is used to provide a stable voltage to an MCU module; a first selection pin and a second selection pin of a three-pin two-speed self-locking switch are respectively connected to the MCU module; the MCU module can determine whether the three-pin two-speed self-locking switch is pressed by detecting the states of the first selection pin and the second selection pin, thereby switching the working mode of the load module; a three-pin two-speed self-locking switch is used as a control trigger switch to control multiple groups of loads, thereby reducing the pins used by the MCU module and reducing material costs and production costs.
[0011] According to some embodiments of the present invention, the load module includes an electrical load, a switching tube, a first resistor and a second resistor, the power supply end is connected to the positive electrode of the electrical load through a fifth resistor, the negative electrode of the electrical load is connected to a switch pin of the switching tube, and the other switch pin of the switching tube is grounded, the PWM signal output end is connected to one end of the first resistor, and the other end of the first resistor is respectively connected to the control pin of the switching tube and one end of the second resistor, and the other end of the second resistor is grounded.
[0012] According to some embodiments of the present invention, an external power detection module is further included, the external power detection module includes a seventh resistor and an eighth resistor, the external power input terminal is connected to one end of the seventh resistor, the other end of the seventh resistor is connected to one end of the eighth resistor, the other end of the eighth resistor is grounded, and the connection point between the seventh resistor and the eighth resistor is connected to the MCU module. The seventh resistor and the eighth resistor divide the voltage of the external power input terminal and transmit it to the MCU module, so as to detect whether there is external power input.
[0013] According to some embodiments of the present invention, an over-discharge protection detection module is further included, the over-discharge protection detection module includes a third resistor and a sixth resistor, the MCU module is also provided with a battery voltage terminal and a battery over-discharge protection terminal, the battery voltage terminal is connected to one end of the third resistor, the other end of the third resistor is respectively connected to the battery over-discharge protection terminal and one end of the sixth resistor, and the other end of the sixth resistor is grounded. The over-discharge protection detection module divides the battery voltage terminal by the third resistor and the sixth resistor to determine whether the DC battery drops to the over-discharge protection voltage. When the over-discharge protection voltage is reached, all loads of the product can be turned off to enter the off state.
[0014] According to some embodiments of the present invention, the switch tube is a MOS tube.
[0015] A multi-group load self-locking control method according to an embodiment of the second aspect of the present invention is applied to a multi-group load self-locking control circuit according to an embodiment of the first aspect of the present invention, comprising the following steps:
[0016] Several control modes for controlling the operation of the load module are set in the MCU module;
[0017] The MCU module detects the input states of the first selection pin and the second selection pin. When the common pin of the three-pin two-speed self-locking switch is connected to the first selection pin, the input state of the first selection pin is low and the input state of the second selection pin is high; when the common pin of the three-pin two-speed self-locking switch is connected to the second selection pin, the input state of the second selection pin is low and the input state of the first selection pin is high;
[0018] Save the current input status of the first selection pin and the second selection pin;
[0019] The MCU module continuously detects the input state of the first selection pin or the second selection pin. If the input state of the first selection pin or the second selection pin changes, the MCU module switches from the current control mode to the next control mode and updates the input state of the first selection pin and the second selection pin.
[0020] According to a multi-group load self-locking control method of an embodiment of the present invention, the self-locking button selection is a three-pin two-speed self-locking switch, one of which is a common pin, and the other two pins are a first selection pin and a second selection pin. When the three-pin two-speed self-locking switch is pressed, the first selection pin and the second selection pin are alternately connected to the common pin, that is, if the first selection pin is connected to the common pin and the second selection pin is disconnected from the common pin, after pressing the three-pin two-speed self-locking switch, the second selection pin will be connected to the common pin, and the first selection pin will be disconnected from the common pin. For the product, there will be multiple groups of loads and multiple gear modes. During the working process, the MCU module will first set the two pins corresponding to the first selection pin and the second selection pin as pull-up resistors, and set them to input detection mode at the same time. Before judging whether the three-pin two-gear self-locking switch is pressed, it will first judge the input status of the first selection pin and the second selection pin. If one of the pins is at a low level, it means that the key is recorded as turning on the pin, and then the input status of the other pin is judged. If it is still at a high level, it means that the three-pin two-gear self-locking switch has not been pressed. When it changes to a low level, it means that the three-pin two-gear self-locking switch has been pressed. At the same time, the MCU module receives the command and changes the product mode to the next mode. At the same time, re-record the key as the latest pin to turn on, and so on, so that the product can work normally and control multiple groups of loads and multiple gear modes. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The present invention is further described below in conjunction with the accompanying drawings and embodiments;
[0022] Figure 1 A schematic diagram of a multi-group load self-locking control circuit provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0023] This section will describe in detail the specific embodiments of the present invention. The preferred embodiments of the present invention are shown in the accompanying drawings. The purpose of the accompanying drawings is to supplement the description of the text part of the specification with graphics, so that people can intuitively and vividly understand each technical feature and the overall technical solution of the present invention, but it cannot be understood as a limitation on the scope of protection of the present invention.
[0024] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0025] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0026] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0027] Reference Figure 1 , a multi-group load self-locking control circuit according to an embodiment of the present invention comprises:
[0028] The power supply module 100 comprises an external power input terminal VCC, a first diode D1, a DC battery BT and a power supply terminal DY, wherein the external power input terminal VCC is connected to the positive electrode of the first diode D1, the positive electrode of the DC battery BT and the negative electrode of the first diode D1 are connected to the power supply terminal DY, and the negative electrode of the DC battery BT is grounded;
[0029] The RC filter module 200 includes a fourth resistor R4 and a fourth capacitor C4, the power supply terminal DY is connected to one end of the fourth resistor R4, the other end of the fourth resistor R4 is connected to one end of the fourth capacitor C4, and the other end of the fourth capacitor C4 is grounded;
[0030] The MCU module 300 is provided with a plurality of PWM signal output terminals, and the connection point of the fourth resistor R4 and the fourth capacitor C4 is connected to the power supply terminal of the MCU module 300;
[0031] Load modules 400, the number of the load modules 400 is consistent with the number of the PWM signal output terminals, the power supply terminal DY is connected to the positive electrode of the load module 400 through the fifth resistor R5, the negative electrode of the load module 400 is grounded, and the plurality of PWM signal output terminals are respectively connected to the control terminals of the plurality of load modules 400;
[0032] The three-pin two-speed self-locking switch SW includes a common pin, a first selection pin SW1 and a second selection pin SW2 . The common pin is grounded, and the first selection pin SW1 and the second selection pin SW2 are connected to the MCU module 300 .
[0033] According to a multi-group load self-locking control circuit of an embodiment of the first aspect of the present invention, a power supply module 100 is used to provide electric energy, including two power sources, an external power input terminal VCC and a DC battery BT, an RC filter module 200 is used to provide a stable voltage to an MCU module 300, and a first selection pin SW1 and a second selection pin SW2 of a three-pin two-speed self-locking switch SW are respectively connected to the MCU module 300. The MCU module 300 can determine whether the three-pin two-speed self-locking switch SW is pressed by detecting the states of the first selection pin SW1 and the second selection pin SW2, thereby switching the working mode of the load module 400. A three-pin two-speed self-locking switch is used as a control trigger switch to control multiple groups of loads, reduce the pins used by the MCU module, and reduce material costs and production costs.
[0034] Reference Figure 1 In some embodiments of the present invention, the load module 400 includes an electrical load FZ, a switch tube Q, a first resistor R1 and a second resistor R2, the power supply terminal DY is connected to the positive electrode of the electrical load FZ through the fifth resistor R5, the negative electrode of the electrical load FZ is connected to a switch pin of the switch tube Q, the other switch pin of the switch tube Q is grounded, the PWM signal output terminal is connected to one end of the first resistor R1, the other end of the first resistor R1 is respectively connected to the control pin of the switch tube Q and one end of the second resistor R2, and the other end of the second resistor R2 is grounded.
[0035] Reference Figure 1 In some embodiments of the present invention, an external power detection module 500 is further included, and the external power detection module 500 includes a seventh resistor R7 and an eighth resistor R8, the external power input terminal VCC is connected to one end of the seventh resistor R7, the other end of the seventh resistor R7 is connected to one end of the eighth resistor R8, the other end of the eighth resistor R8 is grounded, and the connection point between the seventh resistor R7 and the eighth resistor R8 is connected to the MCU module 300. The seventh resistor R7 and the eighth resistor R8 divide the voltage of the external power input terminal VCC and transmit it to the MCU module 300, so as to detect whether there is external power input.
[0036] Reference Figure 1In some embodiments of the present invention, an over-discharge protection detection module 600 is also included. The over-discharge protection detection module 600 includes a third resistor R3 and a sixth resistor R6. The MCU module 300 is also provided with a battery voltage terminal Vc and a battery over-discharge protection terminal FB. The battery voltage terminal Vc is connected to one end of the third resistor R3, and the other end of the third resistor R3 is respectively connected to the battery over-discharge protection terminal FB and one end of the sixth resistor R6, and the other end of the sixth resistor R6 is grounded. The over-discharge protection detection module 600 divides the battery voltage terminal Vc by the third resistor R3 and the sixth resistor R6 to determine whether the DC battery BT drops to the over-discharge protection voltage. When the over-discharge protection voltage is reached, all loads of the product can be turned off to enter the off state.
[0037] Reference Figure 1 In some embodiments of the present invention, the switch tube Q is a MOS tube.
[0038] A multi-group load self-locking control method according to an embodiment of the second aspect of the present invention is applied to a multi-group load self-locking control circuit according to an embodiment of the first aspect of the present invention, comprising the following steps:
[0039] Several control modes for controlling the operation of the load module 400 are set in the MCU module 300;
[0040] The MCU module 300 detects the input states of the first selection pin SW1 and the second selection pin SW2. When the common pin of the three-pin two-speed self-locking switch SW is connected to the first selection pin SW1, the input state of the first selection pin SW1 is low, and the input state of the second selection pin SW2 is high; when the common pin of the three-pin two-speed self-locking switch SW is connected to the second selection pin SW2, the input state of the second selection pin SW2 is low, and the input state of the first selection pin SW1 is high;
[0041] Save the current input status of the first selection pin SW1 and the second selection pin SW2;
[0042] The MCU module 300 continuously detects the input state of the first selection pin SW1 or the second selection pin SW2. If the input state of the first selection pin SW1 or the second selection pin SW2 changes, the MCU module 300 switches from the current control mode to the next control mode and updates the input state of the first selection pin SW1 and the second selection pin SW2.
[0043] According to a multi-group load self-locking control method of an embodiment of the present invention, the self-locking button selection is a three-pin two-speed self-locking switch, one of which is a common pin, and the other two pins are a first selection pin SW1 and a second selection pin SW2. When the three-pin two-speed self-locking switch is pressed, the first selection pin SW1 and the second selection pin SW2 are alternately connected to the common pin, that is, if the first selection pin SW1 is connected to the common pin, that is, the second selection pin SW2 is disconnected from the common pin, after pressing the three-pin two-speed self-locking switch, the second selection pin SW2 will be connected to the common pin, and the first selection pin SW1 will be disconnected from the common pin. For the product, there will be multiple groups of loads and multiple gear modes. During the working process, the MCU module 300 will first set the two pins corresponding to the first selection pin SW1 and the second selection pin SW2 as pull-up resistors, and set them to input detection mode at the same time. Before judging whether the three-pin two-gear self-locking switch is pressed, the input state of the first selection pin SW1 and the second selection pin SW2 will be judged first. If one of the pins is at a low level, the key is recorded as turning on the pin, and then the input state of the other pin is judged. If it is still at a high level, the three-pin two-gear self-locking switch has not been pressed. When it changes to a low level, the three-pin two-gear self-locking switch has been pressed. At the same time, the MCU module 300 receives a command to change the mode of the product to the next mode. At the same time, the key is re-recorded as the latest pin to turn on. At the same time, the product can work normally and perform multiple groups of loads and multiple gear modes.
[0044] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in the technical field without departing from the purpose of the present invention.
Claims
1. A multi-group load self-locking control circuit, characterized in that: include: A power supply module (100), comprising an external power input terminal (VCC), a first diode (D1), a direct current battery (BT) and a power supply terminal (DY), wherein the external power input terminal (VCC) is connected to the positive electrode of the first diode (D1), the positive electrode of the direct current battery (BT) and the negative electrode of the first diode (D1) are connected to the power supply terminal (DY), and the negative electrode of the direct current battery (BT) is grounded; An RC filter module (200) comprises a fourth resistor (R4) and a fourth capacitor (C4), wherein the power supply end (DY) is connected to one end of the fourth resistor (R4), the other end of the fourth resistor (R4) is connected to one end of the fourth capacitor (C4), and the other end of the fourth capacitor (C4) is grounded; The MCU module (300) is provided with a plurality of PWM signal output terminals, and the connection point of the fourth resistor (R4) and the fourth capacitor (C4) is connected to the power supply terminal of the MCU module (300); A load module (400), the number of the load modules (400) being consistent with the number of the PWM signal output terminals, the power supply terminal (DY) being connected to the positive electrode of the load module (400) via a fifth resistor (R5), the negative electrode of the load module (400) being grounded, and a plurality of the PWM signal output terminals being respectively connected to a plurality of control terminals of the load modules (400); A three-pin two-speed self-locking switch (SW), comprising a common pin, a first selection pin (SW1) and a second selection pin (SW2), the common pin being grounded, and the first selection pin (SW1) and the second selection pin (SW2) being connected to the MCU module (300); in: The load module (400) comprises an electrical load (FZ), a switch tube (Q), a first resistor (R1) and a second resistor (R2); the power supply end (DY) is connected to the positive electrode of the electrical load (FZ) via a fifth resistor (R5); the negative electrode of the electrical load (FZ) is connected to a switch pin of the switch tube (Q); the other switch pin of the switch tube (Q) is grounded; the PWM signal output end is connected to one end of the first resistor (R1); the other end of the first resistor (R1) is respectively connected to the control pin of the switch tube (Q) and one end of the second resistor (R2); the other end of the second resistor (R2) is grounded; It also includes an external power supply detection module (500), the external power supply detection module (500) includes a seventh resistor (R7) and an eighth resistor (R8), the external power supply input terminal (VCC) is connected to one end of the seventh resistor (R7), the other end of the seventh resistor (R7) is connected to one end of the eighth resistor (R8), the other end of the eighth resistor (R8) is grounded, and the connection point between the seventh resistor (R7) and the eighth resistor (R8) is connected to the MCU module (300).
2. A multi-group load self-locking control circuit according to claim 1, characterized in that: It also includes an over-discharge protection detection module (600), the over-discharge protection detection module (600) including a third resistor (R3) and a sixth resistor (R6), the MCU module (300) is also provided with a battery voltage terminal (Vc) and a battery over-discharge protection terminal (FB), the battery voltage terminal (Vc) is connected to one end of the third resistor (R3), the other end of the third resistor (R3) is respectively connected to the battery over-discharge protection terminal (FB) and one end of the sixth resistor (R6), and the other end of the sixth resistor (R6) is grounded.
3. A multi-group load self-locking control circuit according to claim 1, characterized in that: The switching tube (Q) is a MOS tube.
4. A method for self-locking control of multiple groups of loads, applied to a self-locking control circuit of multiple groups of loads as claimed in any one of claims 1 to 3, characterized in that: The following steps are involved: A plurality of control modes for controlling the operation of the load module (400) are set in the MCU module (300); The MCU module (300) detects the input states of the first selection pin (SW1) and the second selection pin (SW2); when the common pin of the three-pin two-speed self-locking switch (SW) is connected to the first selection pin (SW1), the input state of the first selection pin (SW1) is low, and the input state of the second selection pin (SW2) is high; when the common pin of the three-pin two-speed self-locking switch (SW) is connected to the second selection pin (SW2), the input state of the second selection pin (SW2) is low, and the input state of the first selection pin (SW1) is high; Save the current input status of the first selection pin (SW1) and the second selection pin (SW2); The MCU module (300) continuously detects the input state of the first selection pin (SW1) or the second selection pin (SW2); if the input state of the first selection pin (SW1) or the second selection pin (SW2) changes, the MCU module (300) switches from the current control mode to the next control mode, and updates the input state of the first selection pin (SW1) and the second selection pin (SW2).