Controller system and method for controlling an electric machine
By introducing a transistor to detect voltage and combining it with the capacitor voltage slope in the controller system, the problem of traditional controller systems being unable to identify the state of a single-pole single-throw switch is solved. This achieves accurate judgment of the switch state and protection of the lithium battery, while reducing standby current and circuit costs.
Patent Information
- Application Number
- CN202210866007.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-22
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-07-22
AI Technical Summary
Traditional controller systems struggle to accurately determine the closed or open state of a single-pole single-throw switch when a large-capacity electrolytic capacitor is connected to the back end of the switch, and they cannot identify the operating sequence of the switch, which may lead to abnormal motor operation and endanger operator safety.
By introducing a first module and a second module into the controller system, transistors Q1 and Q2 respectively detect the voltage of the motor power supply node, and the motor control unit MCU determines the switching state. Combined with the voltage slope of capacitor C1, the switching operation sequence is determined, thereby achieving accurate identification of the switching state and detection of abnormal operation.
It enables accurate judgment of switching status under the condition of large-capacity electrolytic capacitor, prevents abnormal motor operation, reduces standby current to below 10uA, protects lithium battery from over-discharge, improves system reliability and reduces circuit cost.
Smart Images

Figure CN115378304B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application belong to the field of integrated circuits, and particularly relate to a controller system and method for controlling a motor. BACKGROUND
[0002] In the field of battery-powered power tools, brushless motors gradually replace brushed motors because brushless motors have advantages of high efficiency and large starting torque compared with brushed motors.
[0003] A conventional controller system for controlling a motor includes a large number of electrolytic capacitors. When a single-pole single-throw switch is opened or closed, the electrolytic capacitors are charged, and the voltage on the electrolytic capacitors is the same as the voltage on the battery. When the single-pole single-throw switch is opened, the voltage on the electrolytic capacitors changes little because the capacitance of the electrolytic capacitors is large (usually 470 uF or more). Therefore, it is difficult for the conventional controller system to determine whether the single-pole single-throw switch is in an open or closed state according to the voltage on the electrolytic capacitors. SUMMARY
[0004] Embodiments of the present application provide a controller system and method for controlling a motor, which can correctly determine whether a single-pole single-throw switch is in a closed or open state according to the front-end voltage and the back-end voltage of the switch when the back end of the switch is connected to a large-capacity electrolytic capacitor.
[0005] In one aspect, embodiments of the present application provide a controller system for controlling a motor, comprising: a power supply module for supplying power to the motor, the power supply module being connected between a ground and a first node; a switch for controlling operation of the motor, the switch being connected between the first node and a second node; and further comprising: a first module including a first triode, the first triode being configured to be in a conducting state after a motor control unit of the controller system is in a working mode, such that the first module detects a voltage at the first node; a second module including a second triode, the second triode being configured to be in a conducting state after the motor control unit is in the working mode, such that the second module detects a voltage at the second node; and the motor control unit being configured to determine whether the switch is in a closed or open state based on the voltage at the first node and the voltage at the second node.
[0006] In another aspect, the embodiments of the present application provide a method for use in the controller system as described in the first aspect, comprising: controlling the first triode to be in a conducting state after a motor control unit of the controller system is in a working mode, so that the first module detects a voltage at the first node; controlling the second triode to be in a conducting state after the motor control unit is in the working mode, so that the second module detects a voltage at the second node; and determining, by the motor control unit, whether the switch is currently in a closed state or an open state based on the voltage at the first node and the voltage at the second node.
[0007] The controller system and the method for controlling a motor provided by the embodiments of the present application can make the first module and the second module respectively detect a front-end voltage and a back-end voltage of the switch by controlling the triodes in the first module and the second module to be in a conducting state when the back end of the single-pole single-throw switch is connected to a large-capacity electrolytic capacitor, and determine whether the switch is currently in a closed state or an open state based on the detected voltages. BRIEF DESCRIPTION OF DRAWINGS
[0008] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly introduced as follows, and other drawings can also be obtained by those of ordinary skill in the art without any creative effort on the basis of these drawings.
[0009] Figure 1 A structural schematic diagram of a controller system for controlling a motor according to an embodiment of the present application is shown;
[0010] Figure 2 A structural schematic diagram of a controller system for controlling a motor according to an embodiment of the present application is shown; Figure 1 A waveform schematic diagram of signals at corresponding nodes in the circuit shown is shown;
[0011] Figure 3 A waveform schematic diagram of signals at corresponding nodes in the circuit shown is shown; Figure 1 A waveform schematic diagram of signals related to switch action recognition in the circuit shown is shown;
[0012] Figure 4 A waveform schematic diagram of signals at corresponding nodes in the circuit shown is shown in a case of safe operation of the switch; Figure 1 A waveform schematic diagram of signals at corresponding nodes in the circuit shown is shown in a case of safe operation of the switch;
[0013] Figure 5 A waveform schematic diagram of signals at corresponding nodes in the circuit shown is shown in a case of abnormal operation of the switch; Figure 1 A waveform schematic diagram of signals at corresponding nodes in the circuit shown is shown in a case of abnormal operation of the switch;
[0014] Figure 6 A working flow of the controller system provided by the embodiments of the present application is shown; and
[0015] Figure 7The method used in the controller system provided by the embodiments of the present application is shown. DETAILED DESCRIPTION
[0016] The features and exemplary embodiments of various aspects of the present application will be described below in detail, in order to make the purposes, technical solutions and advantages of the present application more clear and apparent, the present application will be further described in detail below in combination with the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present application, and are not configured to limit the present application. For those skilled in the art, the present application can be implemented without some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.
[0017] It should be noted that, in this paper, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or equipment. Without more limitations, the elements defined by the statement "include" do not exclude the presence of other identical elements in the process, method, article or equipment including the elements.
[0018] In tools such as angle grinder, circular saw, chain saw and the like controlled by switch, first inserting battery and then closing switch can be considered as safe operation, in which case the motor can work. However, first closing switch and then inserting battery can be considered as abnormal operation, in which case the motor cannot work, because in this case the motor operation can cause harm to the operator, so it is called abnormal operation. Therefore, the embodiments of the present application provide a controller system capable of identifying the above two different operation modes.
[0019] In a lithium battery product, if the lithium battery is over-discharged, the capacity and discharge capability of the lithium battery can be irreversibly reduced, and thus the lithium battery tool needs to avoid over-discharge of the lithium battery. Specifically, after the lithium battery enters a low-voltage state, the controller system can enter a power-saving state to reduce the standby current to a controllable range, for example, the standby current can be reduced to 20uA or below. When the switch is in an open state, the controller has no connection with the lithium battery, and the standby current at this time is 0; when the switch is in a closed state, the controller system is also required to enter a standby power-saving mode. It can be seen that the controller system provided by the embodiment of the present application has the function that when the switch is in a closed state, the controller system can be in a standby power-saving mode.
[0020] The embodiment of the present application provides a controller system in a lithium battery brushless tool which can be in a standby power-saving mode and identify switch actions. Specifically, the following describes the controller system with a single-pole single-throw switch as an example, and it can be understood that this is only provided as an example and should not be interpreted as limiting. The controller system provided by the embodiment of the present application can mainly have the following three functions: (1) identifying switch actions; (2) detecting abnormal operation of the switch; (3) after the lithium battery is in an under-voltage state, the switch is closed, and the controller system enters a standby power-saving mode, wherein the standby current can be set to be less than, for example, 20uA, which will be described in detail below through specific embodiments. Compared with the prior art, the controller system provided by the embodiment of the present application includes fewer circuit devices, the working process is clear and complete, the reliability is high, has good performance and reduces the circuit cost.
[0021] In order to solve one or more of the problems in the prior art, the embodiment of the present application provides a controller system for controlling a motor. First, the controller system for controlling a motor provided by the embodiment of the present application is introduced.
[0022] Figure 1 The structure schematic diagram of the controller system for controlling a motor according to the embodiment of the present application is shown. As shown in the figure, Figure 1 The controller system 100 can include a power supply module (for example, a lithium battery pack) 110 for supplying power to the motor, a switch 120 for controlling the operation of the motor, a power supply module 130 for supplying power to the motor control unit (MCU), an MCU 140, a processing unit 150, a controller 160, an electrolytic capacitor 170, and a motor 180, etc.
[0023] Among them, the power supply module 110 can be connected between the first node BAT and the ground, and the switch 120 can be connected between the first node BAT and the second node BUS.
[0024] As an example, the controller system 100 is introduced by taking a lithium battery brushless tool controller system employing a single-pole single-throw switch as an example. It can be understood that this is provided only as an example and should not be interpreted as limiting. As shown in Figure 1 When the switch 120 is closed, the controller 160 starts to be powered on to control the electrode 180 to start working.
[0025] As an example, as shown in Figure 1 The processing unit 150 can include a first module 102, a second module 103, a third module 104, and a fourth module 105, etc. Among them, the first module 102 can include a triode Q1, the second module 103 can include a triode Q2, the third module 104 can include a triode Q4, and the fourth module 105 can include a triode Q3, etc.
[0026] In order to better understand the present application, the working principle of the controller system provided by the embodiments of the present application is described in detail below in combination with Figure 1 and Figure 2 As shown in Figure 2 , the waveforms of the signals at the corresponding nodes in the circuit shown in Figure 2 are shown, which can include the voltage at the first node BAT, the voltage at the second node BUS, the voltage at the BE level of the triode Q4, the voltage at the node DC, and the waveform of the control signal GPIO3 for controlling the turn-on and turn-off of the triode Q4, wherein the switch 120 is closed at time t1. Figure 1
[0027] As an example, the triode Q4 can be configured to be in a conductive state after the switch 120 is in a closed state, so that the third module 104 is in a working mode; the triode Q3 can be configured to be in a conductive state after the triode Q4 is in a conductive state, so that the fourth module 105 is in a working mode; the motor control unit 140 can be configured to be in a working mode after the third module 104 and the fourth module 105 are in a working mode.
[0028] Specifically, the third module 104 can further include a capacitor C3, wherein when the switch 120 is closed for the first time (corresponding to time t1 of Figure 2 , the voltage at the second node BUS rises, and through the capacitor C3 in the fourth module 105, a bias current flows through the BE level of the triode (for example, an NPN triode) Q4, so that the triode Q4 is in a conductive state, thereby making the third module 104 in a working mode.
[0029] Next, after transistor Q4 is turned on, the BE stage of transistor Q3 (e.g., a PNP transistor) in the fourth module 105 is forward biased. Current flows from the first node BAT through the BE stage of transistor Q3, and then through the CE stage of transistor Q4 to ground, that is, transistor Q3 is turned on. After transistor Q3 is turned on, the output voltage of the fourth module 105 (i.e., the voltage at node DC) is equal to the voltage at the first node BAT. In this case, the power supply module 130 used to power the MCU 140 starts to work, so that the MCU 140 starts to work.
[0030] Specifically, such as Figure 1 As shown, the third module 104 may also include resistors R5, R6, and R7. The first terminal of resistor R5 can be connected to the second node BUS, and the second terminal can be connected to the first terminal of resistor R6. The first terminal of resistor R7 can receive the control signal GPIO3, and the second terminal of resistor R6 can be connected to the second terminal of resistor R7. The second terminal of resistor R7 can also be connected to the first terminal of transistor Q4. The second terminal of transistor Q4 can be grounded, and the third terminal of transistor Q4 can be used as the output terminal of the third module 104. The first and second terminals of capacitor C3 can be connected to the first and second terminals of resistor R6, respectively. Therefore, when transistor Q4 is turned on, the third module 104 is in operating mode.
[0031] like Figure 1 As shown, the fourth module 105 may also include resistors R8 and R9. The first terminal of resistor R8 can be connected to the third terminal of transistor Q4 (i.e., the output terminal of the third module 104), the second terminal of resistor R8 can be connected to resistor R9 and the first terminal of transistor Q3, the second terminal of resistor R9 can be connected to the first node BAT and the second terminal of transistor Q3, and the third terminal of transistor Q3 can be used as the output terminal of the fourth module 105. Therefore, when transistor Q3 is turned on, the fourth module 105 can be in operating mode.
[0032] As an example, after the MCU 140 starts working, the control signal GPIO3 is set to a high level to keep transistors Q4 and Q3 in the conducting state.
[0033] As an example, transistor Q1 can be configured to be turned on after MCU 140 is in operating mode, so that the first module 102 detects the voltage at the first node BAT; transistor Q2 can be configured to be turned on after MCU 140 is in operating mode, so that the second module 103 detects the voltage at the second node BUS; and MCU 140 can be configured to determine whether the switch is currently closed or open based on the voltage at the first node BAT and the voltage at the second node BUS.
[0034] Specifically, after the MCU 140 is in the working mode, the control signals GPIO1 and GPIO2 for controlling the turn-on and turn-off of the transistors Q1 and Q2 are set high to turn on the transistors Q1 and Q2. The voltages at the first node BAT and the second node BUS are divided by the voltage dividing resistors and then collected by the analog-to-digital converters ADC1 and ADC2, respectively.
[0035] When the switch 120 is in the closed state, the voltage on the electrolytic capacitor 170 (corresponding to the voltage on the second node BUS) is equal to the voltage on the first node BAT (corresponding to the battery voltage). After the switch is opened, the voltage on the first node BAT remains unchanged, and the voltage on the electrolytic capacitor 170 decreases. The MCU 170 can periodically detect the difference between ADC1 and ADC2 to determine whether the switch is currently in the closed or open state based on the difference.
[0036] As shown in FIG. 1, the first module 102 can further include a resistor R1, a resistor R2, and an analog-to-digital converter ADC1, etc. The first end of the resistor R1 can be connected to the first node BAT, the second end can be connected to the first end of the transistor Q1, the second end of the transistor Q1 can receive the control signal GPIO1, the third end of the transistor Q1 can be grounded via the resistor R2, the third end of the transistor Q1 can be connected to the input end of the ADC1, and the output end of the ADC1 can serve as the output end of the first module 102. Figure 1 As can be seen, when the transistor Q1 is in the turn-on state, the voltage at the first node BAT is divided by the resistors R1 and R2, and then the divided voltage is analog-to-digital converted to obtain the first digital signal ADC1 representing the voltage at the first node BAT.
[0037] As shown in FIG. 1, the second module 103 can further include a resistor R3, a resistor R4, and an analog-to-digital converter ADC2, etc. The first end of the resistor R3 can be connected to the second node BUS, the second end can be connected to the first end of the transistor Q2, the second end of the transistor Q2 can receive the control signal GPIO2, the third end of the transistor Q2 can be grounded via the resistor R4, the third end of the transistor Q2 can be connected to the input end of the ADC2, and the output end of the ADC2 can serve as the output end of the first module 103.
[0038] Figure 1 As can be seen, when the transistor Q2 is in the turn-on state, the voltage at the second node BUS is divided by the resistors R3 and R4, and then the divided voltage is analog-to-digital converted to obtain the second digital signal ADC2 representing the voltage at the second node BUS.
[0039] As can be seen, when the transistor Q2 is in the turn-on state, the voltage at the second node BUS is divided by the resistors R3 and R4, and then the divided voltage is analog-to-digital converted to obtain the second digital signal ADC2 representing the voltage at the second node BUS.
[0040] For ease of description, let Δ = ADC1 - ADC2. For example... Figure 3 As shown, Figure 3 It shows Figure 1 The circuit shown illustrates the waveforms of the signals involved in identifying the switch action. At time t1, the switch is closed, ADC1 = ADC2, Δ = 0; at time t2, the switch is opened, the voltage at the second node BUS decreases, ADC1 remains unchanged, and ADC2 decreases, making ADC1 > ADC2, Δ > 0; at time t3, the switch is closed again, ADC1 remains unchanged, and ADC2 increases, making ADC1 = ADC2, Δ = 0. By observing the change in Δ, the MCU 140 can detect the closing and opening actions of the switch.
[0041] Among them, (1) the resolution of the analog-to-digital converter can be greater than or equal to 10 bits; the MCU is powered by 5V, and the difference between each ADC bit is 5mV. Considering the ratio of the voltage divider resistors (e.g., 10 times), when the voltage change at the second node BUS exceeds 50mV, the MCU140 can detect Δ>0. That is, the analog-to-digital converter can identify the fine changes in voltage at the second node BUS. (2) The main operating frequency of the MCU 140 is usually not less than 16MHz, so the Δ value can be judged periodically at the millisecond level. The MCU 140 can judge Δ periodically. By setting appropriate Δ change judgment rules, such as threshold, hysteresis, time, selection, etc., the action of the switch can be accurately judged within tens of milliseconds.
[0042] As an example, transistor Q4 can be an NPN transistor, and transistor Q3 can be a PNP transistor.
[0043] Another inventive aspect of this invention is that the circuit can detect whether the switch is being operated safely. The principle of the circuit detecting safe operation of the switch is as follows: safe operation of the switch means connecting the battery first and then closing the switch; abnormal operation means closing the switch first and then connecting the battery.
[0044] As an example, the processing unit 150 may also include a fifth module 106, wherein the fifth module 106 may include a capacitor C1, a transistor Q5, and an analog-to-digital converter ADC3, wherein the analog-to-digital converter ADC3 may be configured to: detect the slope of the voltage on the capacitor C1 during a preset period after the transistor Q5 changes from the off state to the on state; and wherein when the slope of the voltage on the capacitor C1 is negative, it is determined that the switch 120 performs normal operation; and when the slope of the voltage on the capacitor C1 is positive, it is determined that the switch 120 performs abnormal operation.
[0045] Specifically, such as Figure 4 As shown, Figure 4The waveforms of the corresponding signals in the circuit are shown in the following figure. As shown in the figure, at t1, the battery is connected, at t2, the switch is closed, at t3, the voltage on the capacitor C1 is sampled for the first time, and at t4, the voltage on the capacitor C1 is sampled for the second time. Figure 1 The waveforms of the corresponding signals in the circuit are shown in the following figure. As shown in the figure, at t1, the battery is connected, at t2, the switch is closed, at t3, the voltage on the capacitor C1 is sampled for the first time, and at t4, the voltage on the capacitor C1 is sampled for the second time.
[0046] After the battery is connected at t1, the voltage at the first node BAT changes from low to high, and the capacitor C1 is charged by the fifth module 106. After the switch 120 is closed at t2, the controller is powered on, the voltage at the node DC changes to high, and the capacitor C2 is charged at this time, so that the voltage on the capacitor C2 rises. When the voltage on the capacitor C2 rises to be greater than the turn-on voltage VGS of the MOS tube Q5, the capacitor C1 is discharged, so that the voltage on the capacitor C1 decreases. When the controller is powered on, the ADC3 can be used to sample the voltage change on the capacitor C1, and it can be detected that the voltage on the capacitor C1 is decreasing, that is, the slope is negative, as shown in the following figure. Figure 4 The waveforms of the corresponding signals in the circuit are shown in the following figure. As shown in the figure, at t1, the battery is connected, at t2, the switch is closed, at t3, the voltage on the capacitor C1 is sampled for the first time, and at t4, the voltage on the capacitor C1 is sampled for the second time.
[0047] It can be seen that after the voltage at the node DC changes from low to high, the MOS tube Q5 changes from off state to on state after a period of time. When the MOS tube Q5 changes from off state to on state after a predetermined period of time (for example, the period t3-t4), the voltage on the capacitor C1 is detected. When it is detected that the slope of the voltage on the capacitor C1 is negative, it is determined that the switch performs normal operation.
[0048] As shown in the following figure, Figure 5 As shown in the following figure, Figure 5 The waveforms of the corresponding signals in the circuit are shown in the following figure. As shown in the figure, at t1, the battery is connected, at t2, the switch is closed, at t3, the voltage on the capacitor C1 is sampled for the first time, and at t4, the voltage on the capacitor C1 is sampled for the second time. Figure 1 The waveforms of the corresponding signals in the circuit are shown in the following figure. As shown in the figure, at t1, the battery is connected, at t2, the switch is closed, at t3, the voltage on the capacitor C1 is sampled for the first time, and at t4, the voltage on the capacitor C1 is sampled for the second time.
[0049] In the abnormal operation of the switch, after the switch is closed at t1, the battery is connected at t2, the voltages at the first node BAT and the node DC both change from low to high, and the capacitor C2 is charged, so that the voltage on the capacitor C2 rises. After the voltage at the node DC changes from low to high, the MOS tube Q5 is turned on after a period of time. Before the MOS tube Q5 is turned on, the voltage on the capacitor C1 has not risen. When the voltage on the capacitor C2 rises to be greater than the turn-on voltage VGS of the MOS tube Q5, the capacitor C1 is discharged, so that the voltage on the capacitor C1 decreases.
[0050] It can be seen that after a period of time after the voltage at the node DC changes from low to high, the MOS tube Q5 changes from off to on. During the preset period (for example, the period t3-t4) after the MOS tube Q5 changes from off to on, the ADC3 samples the voltage change on the capacitor C1. When it is detected that the slope of the voltage on the capacitor C1 is positive, it is determined that the switch performs abnormal operation. In addition, from Figure 5 It can be seen that the amplitude of the voltage on the corresponding capacitor C1 is small at the first sampling (corresponding to time t3).
[0051] Figure 4 And Figure 5 It is given that the change of the voltage value on the capacitor C1 is different with the change of time under different operation modes, so that the operation mode can be judged. For example, under the normal operation of the switch, the slope of the voltage change on the capacitor C1 is negative, and under the abnormal operation of the switch, the slope of the voltage change on the capacitor C1 is positive.
[0052] As an example, the triodes Q1 to Q5 can be metal oxide semiconductor field effect transistors MOSFET or bipolar junction transistors BJT.
[0053] As an example, the fifth module 106 can further include resistors R10, R11, R12, R13, R14 and a capacitor C2. As shown, the first end of the resistor R10 is connected to the first node BAT, the second end is connected to the first end of the resistor R11, and the second end of the resistor R11 is grounded. The first end of the resistor R12 is connected to the second end of the resistor R10, and the second end is connected to the input end of the analog-to-digital converter ADC3. The output end of the analog-to-digital converter ADC3 is used as the output end of the fifth module 106. The first end and the second end of the capacitor C1 are respectively connected to the first end and the second end of the resistor R11. The first end of the resistor R13 is connected to the output end of the fourth module 105, the second end is connected to the first end of the resistor R14, and the second end of the resistor R14 is grounded. The first end and the second end of the capacitor C2 are respectively connected to the first end and the second end of the resistor R14. The first end of the triode Q5 is connected to the second end of the resistor R10, the second end is grounded, and the third end is connected to the second end of the resistor R13.
[0054] The controller system provided by the embodiment of the application can make the controller system enter the standby power saving mode after the lithium battery enters the under-voltage state, and the standby current is less than, for example, 20uA.
[0055] When the switch 120 is in the closed state, the principle of the controller system entering the standby power saving mode is as follows:
[0056] In combination with Figure 1 And Figure 2When the switch is closed, the capacitor C3 is powered, the transistor Q4 is turned on, and then the transistor Q3 is turned on, the voltage at the node DC rises, the power supply module 130 starts to work, and the MCU 140 starts to work. After the MCU 140 starts to work, the control signal GPIO3 is set to high to keep the transistors Q3 and Q4 in the on state. At the same time, the control signal GPIO1 is set to high to detect the lithium battery voltage by using the ADC1.
[0057] As an example, when the voltage at the node BAT is lower than the first preset threshold, the control signal GPIO3 is set from high to low, wherein, after the control signal GPIO3 is set to low, the transistor Q4 is turned off, after the transistor Q4 is turned off, the transistor Q3 is turned off; and after the transistor Q3 is turned off, the MCU 140 is turned off.
[0058] Specifically, the MCU 140 periodically reads the output value of the ADC1, and when it is detected that the output value is lower than the first preset threshold, it is determined that the lithium battery is in an under-voltage state, and the control signal GPIO3 is set from high to low; the voltage on the capacitor C3 remains unchanged, and then the BE voltage of the transistor Q4 is low, so that the transistor Q4 is turned off. After the transistor Q4 is turned off, the transistor Q3 in the fourth module 105 is turned off, and then the connection between the node DC and the first node BAT is disconnected. In this case, the power supply module 130 has no input voltage, so that the MCU 140 is turned off and the MCU 140 has no current consumption.
[0059] As an example, the controller system can also be configured to: after the MCU 140 is turned off, the control signal GPIO1 and the control signal GPIO2 for controlling the on and off of the transistor Q1 and the transistor Q2 are set from high to low, so that the transistor Q1 and the transistor Q2 are turned off, thereby disconnecting the first module 102 and the second module 103, and the first module 102 and the second module 103 have no current consumption.
[0060] As an example, the controller system can also be configured to: after the transistor Q3 is in the off state, the transistor Q5 is in the off state, and by configuring the resistance R11 to be greater than the second preset threshold (for example, the resistance R11 can be set to a megohm level resistance), the current flowing through the fifth module 106 is lower than the third preset threshold, for example, the current flowing through the fifth module 106 is microampere level.
[0061] As an example, the controller system can also be configured to: by configuring the resistance R6 in the third module 104 to be greater than the fourth preset threshold, the current flowing through the third module 104 is lower than the fifth preset threshold, for example, the current flowing through the third module 104 is microampere level.
[0062] As an example, the controller system can also be configured to: after the triode Q4 is in the off state, make the triode Q3 in the off state to disconnect the fourth module 105, and the fourth module 105 has no current consumption.
[0063] It can be seen that when the lithium battery is in the undervoltage state, only the fifth module 106 and the third module 104 have microampere current consumption, and other modules have no current consumption, so that the current of the whole system is reduced to below 10uA. That is, after the switch is closed and the lithium battery enters the undervoltage state, the MCU 140 can turn off the power consumption path to reduce the standby current to below 10uA.
[0064] In summary, the controller system provided by the embodiment of the application not only solves the problem that the switching action of the single-pole single-throw switch is difficult to identify, but also enables the controller to enter the standby power saving state when the switch is closed, wherein the standby current is less than 20uA, so as to prevent the lithium battery from overdischarging and thus protect the lithium battery. The above technical solution improves the reliability of the system and reduces the cost of the circuit.
[0065] Reference Figure 6 , Figure 6The working flow of the controller system provided by the embodiment of the present application is shown, including: block 602, the MCU 140 is in standby state; block 604, after the MCU 140 is powered on, the control signal GPIO1 / 2 / 3 is set to high level; block 606, the slope of the voltage change on the capacitor C1 is judged by using the output signal of the ADC3, for example, the output signal of the ADC3 is read every 10 ms, and block 608, according to the detected slope change, the order of the battery access and the switch closing is judged, that is, whether the switch is in normal operation or abnormal operation is judged, specifically, if the slope is negative, the flow proceeds to block 618, which represents that the switch is in safe operation, and then the flow proceeds to block 620, and if the slope is positive, the flow proceeds to block 610, which represents that the switch is in abnormal operation, if the switch is in abnormal operation (i.e. the slope of the voltage on the capacitor C1 is positive), the flow proceeds to block 612, whether the switch is in the closed state is detected, if the switch is always in the closed state, the flow proceeds to block 614, the delay is performed and whether the delay is ended is judged, if ended, the flow proceeds to block 616, the standby state is entered, and the control signal GPIO1 / 2 / 3 is set from high level to low level, if it is judged at block 612 that the switch is in the open state, the flow proceeds to block 620, and if it is judged at block 614 that the delay is not ended, the flow proceeds to block 620, at block 620, whether the lithium battery is in the under-voltage state is judged, if it is judged that the lithium battery is in the under-voltage state, in this case, even if the switch is closed, the flow proceeds to block 616, the standby state is entered, and the control signal GPIO1 / 2 / 3 is set from high level to low level, if it is judged at block 620 that the lithium battery is not in the under-voltage state, the flow proceeds to block 622, whether the switch is in the closed state is judged, if it is judged at block 622 that the switch is in the closed state, the flow proceeds to block 624, the motor is operated, if it is judged at block 622 that the switch is in the open state, the flow proceeds to block 614, at block 614, whether the delay is ended is judged, if ended, the flow proceeds to block 616, if not ended, the flow proceeds to block 620 (which is described above). It can be seen that, during the discharge of the lithium battery, if it is detected that the lithium battery is in the under-voltage state, the standby state is entered, and during the operation of the motor, if it is detected that the switch is opened, the standby state is entered after the delay.
[0066] In summary, the controller system provided by the embodiment of the present application can reduce the standby current to below 10uA when the switch is in the closed state; and can correctly judge whether the switch is currently closed or opened in the case that the single-pole single-throw switch rear end is accessed by a large-capacity electrolytic capacitor; and can judge the order of the switch closing and the battery access based on the slope of the voltage on the capacitor C1 (see Figure 1 ) and the like.
[0067] It should be noted that the above embodiments are provided only as examples, which should not be interpreted as limiting, and those skilled in the art can modify the controller system provided by the embodiments of the present application after reading the above content without departing from the scope and spirit of the present application, for example, the device type can be modified, for example, MOS tubes can be used instead of BJT tubes, megohm-level resistors can be used in the first module 102 and the second module 103 (see Figure 1 ), and the transistors Q1 and Q2 and their control signals GPIO1 and GPIO2 can be cancelled, and these alternative implementations can achieve the above technical effects.
[0068] It should be noted that the implementation of the first module 102 and the second module 103 as shown in Figure 1 solves the problem of leakage current existing in the battery voltage detection circuit in the conventional lithium battery system. Specifically, compared with the implementation of cancelling the transistors Q1 and Q2 and their control signals GPIO1 and GPIO2, the technical solution provided by the embodiments of the present application can control the first module 102 and the second module 103 to be in the working mode when needed, and control the first module 102 and the second module 103 to be in the off state when not needed, so that the first module 102 and the second module 103 have no current consumption, which can reduce the power consumed by the system.
[0069] In addition, referring to Figure 7 , Figure 7 , a method used in the controller system as provided by the embodiments of the present application is shown, which can include: S710, controlling a first transistor to be in a conducting state after a motor control unit of the controller system is in a working mode, so that a first module detects a voltage at a first node; S720, controlling a second transistor to be in a conducting state after the motor control unit is in the working mode, so that a second module detects a voltage at a second node; and S730, using the motor control unit to determine whether a switch is currently in a closed state or an open state based on the voltage at the first node and the voltage at the second node.
[0070] As an example, the controller system further includes a third module having a third transistor and a fourth module having a fourth transistor, and the method 700 further includes: controlling the third transistor to be in a conducting state after the switch is in the closed state, so that the third module is in the working mode; controlling the fourth transistor to be in a conducting state after the third transistor is in the conducting state, so that the fourth module is in the working mode; and using the motor control unit to be in the working mode after the third module and the fourth module are in the working mode.
[0071] As an example, the third transistor is an NPN transistor, and the fourth transistor is a PNP transistor.
[0072] As an example, the controller system further comprises a fifth module having a first capacitor, a fifth transistor, and an analog-to-digital converter, the method 700 can further comprise: detecting, by the fifth module, a slope of the voltage on the first capacitor C1 within a preset time period after the fifth transistor Q5 changes from an off state to an on state; and wherein the switch is determined to perform a normal operation when the slope of the voltage on the first capacitor is negative, and the switch is determined to perform an abnormal operation when the slope of the voltage on the first capacitor is positive.
[0073] As an example, the first transistor, the second transistor, the third transistor, the fourth transistor, and the fifth transistor are metal oxide semiconductor field effect transistors (MOSFETs) or bipolar junction transistors (BJTs).
[0074] As an example, the method 700 can further comprise: after the motor control unit is in the working mode, setting a first control signal for controlling the on and off of the third transistor to a high level to keep the third transistor and the fourth transistor in the on state; setting the first control signal from the high level to a low level when the voltage at the first node is lower than a first preset threshold, and the third transistor is turned off after the first control signal is set to the low level; the fourth transistor is turned off after the third transistor is turned off; and the motor control unit is turned off after the fourth transistor is turned off.
[0075] As an example, the method 700 can further comprise: after the motor control unit is turned off, setting a second control signal and a third control signal for controlling the on and off of the first transistor and the second transistor, respectively, from a high level to a low level to turn off the first module and the second module.
[0076] As an example, the method 700 can further comprise: after the fourth transistor is in the off state, the fifth transistor is in the off state, and the current flowing through the fifth module is lower than a third preset threshold by configuring the resistance value of the second resistor to be greater than a second preset threshold.
[0077] As an example, the method 700 can further comprise: the current flowing through the third module is lower than a fifth preset threshold by configuring the resistance value of the sixth resistor in the third module to be greater than a fourth preset threshold.
[0078] As an example, the method 700 can further comprise: after the third transistor is in the off state, the fourth transistor is in the off state to turn off the fourth module.
[0079] It can be understood that the above has been described in detail in the introduction of the controller system, because for the sake of simplifying the description, the specific details can be referred to the above controller system in the introduction of the above method, and will not be described here.
[0080] It is to be understood that the present application is not limited to the particular configurations and processes described hereinabove and shown in the drawings. For the sake of brevity and clarity, detailed descriptions of well-known methods are omitted. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and shown, and various changes, modifications and additions can be made thereto by one skilled in the art without departing from the spirit of the present application and the scope of the appended claims.
[0081] The functional blocks shown in the above described block diagrams can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of the present application are program or code segments that are used to perform the required tasks. The program or code segments can be stored in a machine readable medium or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. A "machine readable medium" includes any medium that can store or transfer information. Examples of machine readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. The code segments can be downloaded via a computer network such as the Internet, an intranet, etc.
[0082] It is also to be understood that the example embodiments mentioned in the present application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in an order different from the embodiments, or several steps can be performed simultaneously.
[0083] The above merely describes a specific implementation of the present application, and those skilled in the art can clearly understand that, for the sake of convenience and brevity of description, the specific working processes of the above described systems, modules and units can refer to the corresponding processes in the foregoing method embodiments, and will not be described here. It should be understood that the protection scope of the present application is not limited thereto, and any skilled person in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered within the protection scope of the present application.
Claims
1. A controller system for controlling an electric machine, characterized in that Comprising: a power supply module for powering the motor and a switch for controlling the operation of the motor, the power supply module being connected between a ground and a first node, the switch being connected between the first node and a second node, and further comprising: a first module comprising a first triode configured to be in a conducting state after a motor control unit of the controller system is in an active mode, such that the first module detects a voltage at the first node; a second module comprising a second triode configured to be in a conducting state after the motor control unit is in the active mode, such that the second module detects a voltage at the second node; and the motor control unit configured to determine whether the switch is currently in a closed or open state based on the voltage at the first node and the voltage at the second node; a third module comprising a third triode configured to be in a conducting state after the switch is in the closed state, such that the third module is in an active mode; a fourth module comprising a fourth triode configured to be in a conducting state after the third triode is in the conducting state, such that the fourth module is in the active mode; the motor control unit being configured to be in the active mode after the third module and the fourth module are in the active mode; a fifth module, the fifth module comprising a first capacitor, a fifth triode, an analog-to-digital converter, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor, and a second capacitor, wherein: a first end of the first resistor is connected to the first node, a second end of the first resistor is connected to a first end of the second resistor, a second end of the second resistor is grounded; a first end of the third resistor is connected to the second end of the first resistor, a second end of the third resistor is connected to a first end of the analog-to-digital converter, a second end of the analog-to-digital converter serves as an output end of the fifth module; a first end and a second end of the first capacitor are connected to the first end and the second end of the second resistor, respectively; a first end of the fourth resistor is connected to an output end of the fourth module, a second end of the fourth resistor is connected to a first end of the fifth resistor, a second end of the fifth resistor is grounded; a first end and a second end of the second capacitor are connected to the first end and the second end of the fifth resistor, respectively; a first end of the fifth triode is connected to the second end of the first resistor, a second end of the fifth triode is grounded, and a third end of the fifth triode is connected to the second end of the fourth resistor; wherein the analog-to-digital converter is configured to: sample a voltage change on the first capacitor after the power supply module is connected and the switch is closed; and wherein, when the voltage change on the first capacitor is first constant and then decreases, it is determined that the switch performs normal operation; and when the voltage change on the first capacitor is first increases and then decreases, it is determined that the switch performs abnormal operation.
2. The controller system of claim 1, wherein: the third triode is an NPN triode, and the fourth triode is a PNP transistor.
3. The controller system of claim 1, wherein, the first, second, third, fourth and fifth transistors are metal oxide semiconductor field effect transistors (MOSFETs) or bipolar junction transistors (BJTs).
4. The controller system of claim 1, wherein, the controller system is further configured to: set a first control signal for controlling the turn-on and turn-off of the third transistor to a high level after the motor control unit is in the working mode, so as to keep the third transistor and the fourth transistor in the turn-on state; set the first control signal from the high level to a low level when the voltage at the first node is lower than a first preset threshold, the third transistor is turned off after the first control signal is set to the low level; the fourth transistor is turned off after the third transistor is turned off; and the motor control unit is turned off after the fourth transistor is turned off.
5. The controller system of claim 4, wherein, the controller system is further configured to: set a second control signal and a third control signal for controlling the turn-on and turn-off of the first and second transistors respectively from the high level to the low level after the motor control unit is turned off, so as to turn off the first and second modules.
6. The controller system of claim 4, wherein, the controller system is further configured to: cause the fifth transistor to be in the turn-off state after the fourth transistor is in the turn-off state, and cause the current flowing through the fifth module to be lower than a third preset threshold by configuring the resistance of the second resistor to be greater than a second preset threshold.
7. The controller system of claim 1, wherein, the controller system is further configured to: cause the current flowing through the third module to be lower than a fifth preset threshold by configuring the resistance of a sixth resistor in the third module to be greater than a fourth preset threshold.
8. The controller system of claim 2, wherein, the controller system is further configured to: cause the fourth transistor to be in the turn-off state to turn off the fourth module after the third transistor is in the turn-off state.
9. A method for use in a controller system as claimed in any one of claims 1-8, characterized by The method comprises: controlling the first transistor to be in the turn-on state after a motor control unit of the controller system is in the working mode, so that the first module detects the voltage at the first node; controlling the second transistor to be in the turn-on state after the motor control unit is in the working mode, so that the second module detects the voltage at the second node; and using the motor control unit to determine whether the switch is in the closed or open state based on the voltage at the first node and the voltage at the second node; the controller system further comprises a third module having a third transistor and a fourth module having a fourth transistor, and the method further comprises: controlling the third transistor to be in the turn-on state after the switch is in the closed state, so that the third module is in the working mode; controlling the fourth transistor to be in the turn-on state after the third transistor is in the turn-on state, so that the fourth module is in the working mode; using the motor control unit to be in the working mode after the third and fourth modules are in the working mode; The controller system further comprises a fifth module comprising a first capacitor, a fifth triode, an analog-to-digital converter, a first resistor, a second resistor, a third resistor, a fourth resistor, a fifth resistor and a second capacitor, wherein: a first end of the first resistor is connected to the first node, a second end of the first resistor is connected to a first end of the second resistor, a second end of the second resistor is grounded; a first end of the third resistor is connected to the second end of the first resistor, a second end of the third resistor is connected to a first end of the analog-to-digital converter, a second end of the analog-to-digital converter serves as an output end of the fifth module; a first end and a second end of the first capacitor are connected to the first end and the second end of the second resistor respectively; a first end of the fourth resistor is connected to the output end of the fourth module, a second end of the fourth resistor is connected to a first end of the fifth resistor, a second end of the fifth resistor is grounded; a first end and a second end of the second capacitor are connected to the first end and the second end of the fifth resistor respectively; a first end of the fifth triode is connected to the second end of the first resistor, a second end of the fifth triode is grounded, and a third end of the fifth triode is connected to the second end of the fourth resistor; the method further comprises: sampling a voltage change on the first capacitor after the power supply module is connected and the switch is closed; and wherein, when the voltage change on the first capacitor is first kept unchanged and then decreased, it is determined that the switch performs normal operation; and when the voltage change on the first capacitor is first increased and then decreased, it is determined that the switch performs abnormal operation.
10. The method of claim 9, wherein, the third triode is an NPN triode, and the fourth triode is a PNP transistor.
11. The method of claim 9, wherein, the first triode, the second triode, the third triode, the fourth triode and the fifth triode are metal oxide semiconductor field effect transistors (MOSFETs) or bipolar junction transistors (BJTs).
12. The method of claim 9, wherein, The method further comprises: after the motor control unit is in the working mode, setting a first control signal for controlling the turn-on and turn-off of the third triode to high level, so as to keep the third triode and the fourth triode in the turn-on state; when the voltage at the first node is lower than a first preset threshold, setting the first control signal from high level to low level, after the first control signal is set to low level, the third triode is turned off; after the third triode is turned off, the fourth triode is turned off; and after the fourth triode is turned off, the motor control unit is turned off.
13. The method of claim 12, wherein, The method further comprises: after the motor control unit is turned off, setting a second control signal and a third control signal for controlling the turn-on and turn-off of the first triode and the second triode respectively from high level to low level, so as to turn off the first module and the second module.
14. The method of claim 12, wherein, The method further comprises: after the fourth triode is in the turn-off state, the fifth triode is in the turn-off state, and By configuring the resistance value of the second resistor to be greater than a second preset threshold, the current flowing through the fifth module is lower than a third preset threshold.
15. The method of claim 9, wherein, The method further includes: By configuring the resistance value of the sixth resistor in the third module to be greater than a fourth preset threshold, the current flowing through the third module is lower than a fifth preset threshold.
16. The method of claim 10, wherein, The method further includes: After the third transistor is in an off state, the fourth transistor is in an off state to disconnect the fourth module.
Citation Information
Patent Citations
Garden machine-used lithium battery charging program and battery state display circuit
CN107733019A
Circuit and method for switch action recognition, and circuit and method for abnormal power-on recognition
CN113595033A
Control module, battery pack, battery pack control configuration and electric tool system
CN201349137Y