Current acquisition control method, circuit, controller and double-motor lifting table

By setting a current sampling module and a motor driving module in the dual-motor current acquisition control circuit, the currents of the first motor and the second motor flow through the same sampling point, and sampling the currents separately by controlling the level state of the PWM signal and calculating the currents of each motor, the problems of complex and high cost in the prior art are solved, and circuit simplification and cost reduction are achieved.

CN119555985APending Publication Date: 2025-03-04LOCTEK ERGONOMIC TECH CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411735810.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The existing dual-motor current acquisition solution has the problem of complex circuits and high cost.

Method used

By setting a current sampling module and a motor driving module in the current acquisition control circuit, the currents of the first motor and the second motor flow through the same sampling point, and the currents are sampled separately by controlling the level state of the PWM signal, and the currents of each motor are calculated.

Benefits of technology

It realizes that only one current sampling module can be used to sample the currents of two motors separately, simplifying circuit design and reducing hardware costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119555985A_ABST
    Figure CN119555985A_ABST
Patent Text Reader

Abstract

The invention provides a current acquisition control method and circuit, a controller and a dual-motor lifting table, and relates to the field of motor control. The method comprises the steps that control signals are output to a motor driving module to drive a first motor and a second motor to work, and the control signals comprise a first PWM signal used for controlling the first motor and a second PWM signal used for controlling the second motor; calculating the current of the first motor based on a first sampling current obtained from a current sampling module when the first PWM signal is in a high level and the second PWM signal is in a low level; and calculating the current of the second motor based on a second sampling current obtained from the current sampling module when the first PWM signal is at the low level and the second PWM signal is at the high level. Since the respective current of the two motors flows through the same sampling point of the current sampling module, the respective current of the two motors can be independently sampled by only one current sampling module, and compared with the prior art, the circuit design is simplified, and the hardware cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of motor control, and in particular to a current acquisition control method, circuit, controller and dual-motor lifting table. Background Art

[0002] Lift tables generally use a brushed DC motor as the power to drive the column up and down. The main method of driving the motor is to use a relay or MOS (Metal-Oxide-Semiconductor Field-Effect Transistor) tube to control the direction and speed of the motor.

[0003] During the operation of the lifting table, the current may change due to load changes, obstacles or motor stalls. For lifting tables equipped with dual motors, in order to accurately determine its various working states, it is necessary to accurately collect the current of the two motors. The traditional approach is to set up two current sampling circuits to sample the current of the two motors separately, but this method makes the circuit design more complicated and costly. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a current acquisition control method, circuit, controller and dual-motor lifting table to solve the problems of complex circuits and high costs in existing dual-motor current acquisition solutions.

[0005] In order to achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows:

[0006] In a first aspect, the present invention provides a current acquisition control method, which is applied to a current acquisition control circuit, wherein the current acquisition control circuit comprises a current sampling module and a motor drive module, wherein the motor drive module is used to drive a first motor and a second motor, and the current of the first motor and the current of the second motor both flow through the same sampling point of the current sampling module; the method comprises:

[0007] Output a control signal to the motor driving module to drive the first motor and the second motor to work; the control signal includes a first PWM signal and a second PWM signal, the first PWM signal is used to control the first motor, and the second PWM signal is used to control the second motor;

[0008] A first sampling current is obtained from the current sampling module when the first PWM signal is at a high level and the second PWM signal is at a low level, and the current of the first motor is calculated based on the first sampling current; a second sampling current is obtained from the current sampling module when the first PWM signal is at a low level and the second PWM signal is at a high level, and the current of the second motor is calculated based on the second sampling current.

[0009] In an optional implementation, the outputting a control signal to the motor driving module to drive the first motor and the second motor to operate includes:

[0010] According to the magnitude relationship between the count value of the timer and the preset first comparison value and the second comparison value, the level states of the output first PWM signal and the second PWM signal are controlled so that in each counting cycle of the timer, there are time periods in which the first PWM signal is at a high level and the second PWM signal is at a low level, and time periods in which the first PWM signal is at a low level and the second PWM signal is at a high level; wherein the count cycle of the timer is the time in which the timer counts up from a preset underflow value to a preset overflow value, and counts down from the overflow value to the underflow value; and the first comparison value and the second comparison value are both greater than the underflow value and less than the overflow value.

[0011] In an optional implementation, controlling the level states of the output first PWM signal and the second PWM signal according to the magnitude relationship between the count value of the timer and the preset first comparison value and the second comparison value includes:

[0012] When the count value of the timer is less than the first comparison value, a low-level first PWM signal is output; when the count value of the timer is greater than or equal to the first comparison value, a high-level first PWM signal is output;

[0013] When the count value of the timer is less than the second comparison value, a high-level second PWM signal is output; when the count value of the timer is greater than or equal to the second comparison value, a low-level second PWM signal is output.

[0014] In an optional implementation, acquiring a first sampled current from the current sampling module when the first PWM signal is at a high level and the second PWM signal is at a low level includes:

[0015] The first sampling current output by the current sampling module is acquired when the count value of the timer reaches the overflow value; wherein, when the count value of the timer reaches the overflow value, the first PWM signal is at a high level and the second PWM signal is at a low level.

[0016] In an optional implementation, acquiring a second sampled current from the current sampling module when the first PWM signal is at a low level and the second PWM signal is at a high level includes:

[0017] The second sampling current output by the current sampling module is acquired when the count value of the timer reaches the underflow value; wherein, when the count value of the timer reaches the underflow value, the first PWM signal is at a low level and the second PWM signal is at a high level.

[0018] In a second aspect, the present invention provides a controller comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the current acquisition control method described in any one of the aforementioned implementations.

[0019] In a third aspect, the present invention provides a current acquisition control circuit, comprising a controller, a current sampling module and a motor drive module, wherein the controller is electrically connected to the current sampling module and the motor drive module, respectively, and the motor drive module is used to drive a first motor and a second motor; the current of the first motor and the current of the second motor both flow through the same sampling point of the current sampling module.

[0020] In an optional embodiment, the current sampling module includes a sampling resistor and a differential amplifier unit, one end of the sampling resistor is electrically connected to the motor drive module, the other end of the sampling resistor is grounded, and the sampling resistor is the sampling point; two input ends of the differential amplifier unit are electrically connected to the two ends of the sampling resistor respectively, and the output end of the differential amplifier unit is electrically connected to the controller;

[0021] The differential amplifier unit is used to collect the voltage difference between the two ends of the sampling resistor, amplify the voltage difference and output it to the controller.

[0022] In an optional embodiment, the motor drive module includes a first speed control bridge arm, a second speed control bridge arm and a common bridge arm, one end of the first motor is electrically connected between the upper bridge arm and the lower bridge arm of the first speed control bridge arm, one end of the second motor is electrically connected between the upper bridge arm and the lower bridge arm of the second speed control bridge arm, the other end of the first motor and the other end of the second motor are both electrically connected between the upper bridge arm and the lower bridge arm of the common bridge arm; the upper bridge arms of the first speed control bridge arm, the second speed control bridge arm and the common bridge arm are each electrically connected to a power supply, and the lower bridge arms of the first speed control bridge arm, the second speed control bridge arm and the common bridge arm are each electrically connected to the current sampling module; the controller is electrically connected to the upper bridge arm and the lower bridge arm of the first speed control bridge arm, the second speed control bridge arm and the common bridge arm.

[0023] In a fourth aspect, the present invention provides a dual-motor lifting table, comprising a first motor, a second motor and the current acquisition control circuit described in any one of the aforementioned embodiments.

[0024] The current acquisition control method, circuit, controller and dual-motor lifting table provided by the embodiment of the present invention include outputting a control signal to a motor driving module to drive the first motor and the second motor to work; the control signal includes a first PWM signal and a second PWM signal, the first PWM signal is used to control the first motor, and the second PWM signal is used to control the second motor; a first sampling current is obtained from the current sampling module when the first PWM signal is at a high level and the second PWM signal is at a low level, and the current of the first motor is calculated based on the first sampling current; a second sampling current is obtained from the current sampling module when the first PWM signal is at a low level and the second PWM signal is at a high level, and the current of the second motor is calculated based on the second sampling current. Since the current of the first motor and the current of the second motor both flow through the same sampling point of the current sampling module, only one current sampling module is needed to sample the currents of the two motors separately, which simplifies the circuit design and reduces the hardware cost compared with the prior art.

[0025] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 A schematic diagram of a flow chart of a current acquisition control method provided by an embodiment of the present invention is shown;

[0028] Figure 2 A schematic diagram showing a composition of a current acquisition control circuit provided by an embodiment of the present invention is shown;

[0029] Figure 3 A first schematic diagram of a first PWM signal and a second PWM signal output by a controller is shown;

[0030] Figure 4 A second schematic diagram showing a first PWM signal and a second PWM signal output by a controller;

[0031] Figure 5 A third schematic diagram showing a first PWM signal and a second PWM signal output by a controller;

[0032] Figure 6 The schematic diagram of sampling current when CCR1>CCR2 is shown;

[0033] Figure 7 The schematic diagram of sampling current when CCR1<CCR2 is shown;

[0034] Figure 8 Shows Figure 2 A schematic diagram of the composition of the current sampling module;

[0035] Fig. 9 Shows Figure 8 A schematic diagram of a circuit structure of a differential amplifier unit;

[0036] Fig.10 Shows Figure 2 A circuit structure diagram of a motor drive module;

[0037] Fig.11 Shown in Fig.10 An example diagram of controlling the first motor and the second motor to rotate forward based on the above;

[0038] Fig.12 Shown in Fig.10 An example diagram of controlling the reverse rotation of the first motor and the second motor based on the present invention;

[0039] Fig.13 Shows Figure 2 Another circuit structure diagram of the motor drive module;

[0040] Fig.14 Shown in Fig.13 An example diagram of controlling the first motor and the second motor to rotate forward based on the above;

[0041] Fig.15 Shown in Fig.13 An example diagram of controlling the reverse rotation of the first motor and the second motor based on the present invention.

[0042] Icon: 100-current acquisition control circuit; 110-controller; 120-current sampling module; Rsen-sampling resistor; 121-differential amplifier unit; 1211-operational amplifier; R1-first input resistor; R2-second input resistor; R3-third input resistor; R4-feedback resistor; 130-motor drive module; 131-first speed control bridge arm; 132-second speed control bridge arm; 133-common bridge arm; Q1-first MOS tube; Q2-second MOS tube; Q3-third MOS tube; Q4-fourth MOS tube; Q5-fifth MOS tube; Q6-sixth MOS tube; Q7-seventh MOS tube; Q8-eighth MOS tube; 200-first motor; 300-second motor. DETAILED DESCRIPTION

[0043] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0044] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.

[0045] It should be noted that relational terms such as "first" and "second" are used only 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 these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0046] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0047] Please refer to Figure 1 , is a flow chart of a current acquisition control method provided by an embodiment of the present invention. The current acquisition control method can be applied to Figure 2 The current acquisition control circuit 100 shown. The current acquisition control circuit 100 includes a controller 110, a current sampling module 120 and a motor drive module 130. The controller 110 is electrically connected to the current sampling module 120 and the motor drive module 130 respectively. The motor drive module 130 is used to drive the first motor 200 and the second motor 300; the current of the first motor 200 and the current of the second motor 300 both flow through the same sampling point of the current sampling module 120. Among them, the controller 110 can be a microcontroller, a programmable logic controller, a single-chip microcomputer, etc., and the specific type is not limited. The current acquisition control method can be executed by the controller 110, and specifically includes the following steps:

[0048] Step S101, outputting a control signal to a motor driving module to drive the first motor and the second motor to work; the control signal includes a first PWM signal and a second PWM signal, the first PWM signal is used to control the first motor, and the second PWM signal is used to control the second motor.

[0049] In this embodiment, the controller 110 controls the speed and rotation direction of the first motor 200 and the second motor 300 by outputting a control signal to the motor driving module 130, thereby driving the first motor 200 and the second motor 300 to work. The control signal output by the controller 110 includes a first PWM signal for controlling the first motor 200 and a second PWM signal for controlling the second motor 300. The speed of the first motor 200 can be adjusted by adjusting the duty cycle of the first PWM signal; the speed of the second motor 300 can be adjusted by adjusting the duty cycle of the first PWM signal.

[0050] Step S102, obtaining a first sampling current from a current sampling module when the first PWM signal is at a high level and the second PWM signal is at a low level, and calculating the current of the first motor based on the first sampling current; obtaining a second sampling current from the current sampling module when the first PWM signal is at a low level and the second PWM signal is at a high level, and calculating the current of the second motor based on the second sampling current.

[0051] In this embodiment, when a PWM signal is used to control the motor, the state of the motor can be distinguished by the high and low level states of the PWM signal. When the PWM signal is at a high level, it can be considered that the motor is in a driving state, that is, the motor is powered and generates torque; when the PWM signal is at a low level, it can be considered that the motor is in a non-driving state, that is, the motor is powered off and does not generate new torque. Therefore, when the first PWM signal is at a high level and the second PWM signal is at a low level, it indicates that the first motor 200 is currently in a driving state and the second motor 300 is in a non-driving state; when the first PWM signal is at a low level and the second PWM signal is at a high level, it indicates that the first motor 200 is currently in a non-driving state and the second motor 300 is in a driving state.

[0052] Since the current of the first motor 200 and the current of the second motor 300 both flow through the same sampling point of the current sampling module 120, when the first PWM signal is at a high level and the second PWM signal is at a low level, only the second motor 300 is in the driving state, and the current sampling module 120 samples the current of the second motor 300 (i.e., the second sampling current); when the first PWM signal is at a low level and the second PWM signal is at a high level, only the second motor 300 is in the driving state, and the current sampling module 120 samples the current of the second motor 300 (i.e., the second sampling current). In other words, the current sampling module 120 can sample the current when only the first motor 200 is in the driving state and when only the second motor 300 is in the driving state, respectively.

[0053] In this embodiment, the controller 110 triggers ADC (Analog to Digital Conversion) sampling during the time period when the first motor 200 is in the driving state and the second motor 300 is in the non-driving state, and can obtain the first sampling current corresponding to when only the first motor 200 is in the driving state from the current sampling module 120, and then calculate the current of the first motor 200 according to the first sampling current. Similarly, the controller 110 triggers ADC sampling during the time period when the first motor 200 is in the non-driving state and the second motor 300 is in the driving state, and can obtain the second sampling current corresponding to when only the second motor 300 is in the driving state from the current sampling module 120, and then calculate the current of the second motor 300 according to the second sampling current. In this way, the currents of the first motor 200 and the second motor 300 can be collected separately and accurately through only one current sampling module 120.

[0054] It can be seen that the current acquisition control method provided by the embodiment of the present invention includes outputting a control signal to the motor drive module to drive the first motor and the second motor to work; the control signal includes a first PWM signal and a second PWM signal, the first PWM signal is used to control the first motor, and the second PWM signal is used to control the second motor; the first sampling current is obtained from the current sampling module when the first PWM signal is at a high level and the second PWM signal is at a low level, and the current of the first motor is calculated based on the first sampling current; the second sampling current is obtained from the current sampling module when the first PWM signal is at a low level and the second PWM signal is at a high level, and the current of the second motor is calculated based on the second sampling current. Since the current of the first motor and the current of the second motor both flow through the same sampling point of the current sampling module, only one current sampling module is needed to sample the currents of the two motors separately, which simplifies the circuit design and reduces the hardware cost compared with the prior art.

[0055] In one embodiment, the first PWM signal and the second PWM signal can be configured according to the register parameters related to the timer in the controller 110, so that the first motor 200 and the second motor 300 have a time period in which they are in a driving state separately within a PWM cycle. Based on this, the output of the control signal to the motor drive module in the above step S101 to drive the first motor and the second motor to work may specifically include:

[0056] According to the magnitude relationship between the count value of the timer and the preset first comparison value and the second comparison value, the level states of the output first PWM signal and the second PWM signal are controlled so that in each count cycle of the timer, there are time periods in which the first PWM signal is at a high level and the second PWM signal is at a low level, and time periods in which the first PWM signal is at a low level and the second PWM signal is at a high level; wherein the count cycle of the timer is the time in which the timer counts up from a preset underflow value to a preset overflow value, and counts down from the overflow value to the underflow value; and the first comparison value and the second comparison value are both greater than the underflow value and less than the overflow value.

[0057] In this embodiment, the first comparison value may be CCR1, the second comparison value may be CCR2, the underflow value may be 0, the overflow value may be ARR, ARR, CCR1 and CCR2 are register parameters related to the timer pre-set in the controller 110, 0<CCR1<ARR, 0<CCR2<ARR, CCR1 and CCR2 may be equal or unequal. Among them, the period of the first PWM signal and the second PWM signal may be determined by the overflow value ARR, and the timer outputting the PWM signal is in a central symmetric mode, that is, after the timer counts up from the preset underflow value 0 to the preset overflow value ARR, it counts down from the overflow value to the underflow value to complete a counting cycle.

[0058] In this embodiment, the duty cycle of the first PWM signal and the second PWM signal can be determined respectively by the first comparison value CCR1 and the second comparison value CCR2, that is, the controller 110 controls the level state of the output first PWM signal and the second PWM signal according to the magnitude relationship between the count value of the timer and CCR1 and CCR2, so that each counting cycle of the timer can have a time period when the first PWM signal is high and the second PWM signal is low, and a time period when the first PWM signal is low and the second PWM signal is high. The controller 110 triggers ADC sampling in these two time periods respectively, and can obtain the current when only the first motor 200 is in the driving state and the current when only the second motor 300 is in the driving state from the current sampling module 120, and finally calculates the current of the first motor 200 and the second motor 300.

[0059] In one implementation, the above steps control the level states of the output first PWM signal and the second PWM signal according to the magnitude relationship between the count value of the timer and the preset first comparison value and the second comparison value, and may specifically include:

[0060] When the count value of the timer is less than the first comparison value, a low-level first PWM signal is output; when the count value of the timer is greater than or equal to the first comparison value, a high-level first PWM signal is output; when the count value of the timer is less than the second comparison value, a high-level second PWM signal is output; when the count value of the timer is greater than or equal to the second comparison value, a low-level second PWM signal is output.

[0061] Taking the first comparison value as CCR1, the second comparison value as CCR2, the underflow value as 0, and the overflow value as ARR as an example, when CCR1=CCR2=ARR / 2, the controller 110 outputs Figure 3 PWM1 (first PWM signal) and PWM2 (second PWM signal) are shown in FIG. 1 ; when the count value of the timer is between 0 and ARR / 2, the output PWM1 is high level and the output PWM2 is low level; when the count value of the timer is between ARR / 2 and ARR, the output PWM1 is low level and the output PWM2 is high level. At this time, the duty cycle of PWM1 and PWM2 is 50%, and the phase difference between PWM1 and PWM2 is 180 degrees. When CCR1>CCR2, ARR / 2<CCR1<ARR and 0<CCR2<ARR / 2, the controller 110 outputs Figure 4 The duty ratios of PWM1 and PWM2 are both less than 50%, and the phase difference between PWM1 and PWM2 is 180 degrees. When CCR1<CCR2, 0<CCR1<ARR / 2 and ARR / 2<CCR2<ARR, the controller 110 outputs Figure 5 As shown in FIG. 1 , the duty ratios of PWM1 and PWM2 are both greater than 50%, and the phase difference between PWM1 and PWM2 is 180 degrees.

[0062] It should be noted that when setting the specific values ​​of CCR1 and CCR2, it is necessary to ensure that the duty cycle of the generated first PWM signal and the second PWM signal is not too large, that is, the low level time cannot be less than the sampling time of the ADC, otherwise the collected current may not be the current when only one motor is working.

[0063] In one embodiment, the ADC sampling mode can be set in the controller 110 as a timer overflow trigger, that is, an ADC sampling is triggered when the timer overflows or underflows. Based on this, the first sampling current when the first PWM signal is high and the second PWM signal is low in the above step S102 is obtained from the current sampling module, which can specifically include: obtaining the first sampling current output by the current sampling module when the count value of the timer reaches the overflow value; wherein, when the count value of the timer reaches the overflow value, the first PWM signal is high and the second PWM signal is low. The second sampling current when the first PWM signal is low and the second PWM signal is high in the above step S102 is obtained from the current sampling module, which can specifically include: obtaining the second sampling current output by the current sampling module when the count value of the timer reaches the underflow value; wherein, when the count value of the timer reaches the underflow value, the first PWM signal is low and the second PWM signal is high.

[0064] In the following, the cases of CCR1>CCR2 and CCR1<CCR2 are respectively used as examples. In the case of CCR1>CCR2, Figure 6 As shown, only when the count value of the timer is between CCR1 and ARR, PWM1 is at a high level and PWM2 is at a low level. Therefore, the time period when the timer counts up from CCR1 to ARR and the time period when the timer counts down from ARR to CCR1 are the time periods when the first motor 200 is alone in the driving state, and the current sampled by the current sampling module 120 during this time period is the first sampling current corresponding to the first motor 200; only when the count value of the timer is between 0 and CCR2, PWM1 is at a low level and PWM2 is at a high level. Therefore, the time period when the timer counts up from 0 to CCR2 and the time period when the timer counts down from CCR2 to 0 are the time periods when the second motor 300 is alone in the driving state, and the current sampled by the current sampling module 120 during this time period is the second sampling current corresponding to the second motor 300.

[0065] Similarly, when CCR1<CCR2, if Figure 7As shown, only when the count value of the timer is between CCR2 and ARR, PWM1 is at a high level and PWM2 is at a low level. Therefore, the time period when the timer counts up from CCR2 to ARR and the time period when the timer counts down from ARR to CCR2 are the time periods when the first motor 200 is alone in the driving state, and the current sampled by the current sampling module 120 during this time period is the first sampling current corresponding to the first motor 200; only when the count value of the timer is between 0 and CCR1, PWM1 is at a low level and PWM2 is at a high level. Therefore, the time period when the timer counts up from 0 to CCR1 and the time period when the timer counts down from CCR1 to 0 are the time periods when the second motor 300 is alone in the driving state, and the current sampled by the current sampling module 120 during this time period is the second sampling current corresponding to the second motor 300.

[0066] In this embodiment, when the timer counts to ARR, it overflows, and ADC sampling is triggered at this time. The sampling current obtained by the controller 110 from the current sampling module 120 is the first sampling current corresponding to the first motor 200; when the timer counts to 0, it overflows, and ADC sampling is triggered at this time. The sampling current obtained by the controller 110 from the current sampling module 120 is the second sampling current corresponding to the second motor 300. In the above manner, each sampling point is at the center of the PWM signal. At this time, the current of the motor is relatively stable and can better reflect the actual current. After the controller 110 calculates the current of the first motor 200 based on the first sampling current obtained, it multiplies it by the duty cycle of the PWM signal (PWM1) corresponding to the first motor 200 to obtain the average current of the first motor 200. Similarly, after the controller 110 calculates the current of the second motor 300 based on the second sampling current obtained, it multiplies it by the duty cycle of the PWM signal (PWM2) corresponding to the second motor 300 to obtain the average current of the second motor 300.

[0067] It should be understood that, since the ADC sampling is triggered when the timer overflows or underflows in this embodiment, in order to ensure that the currents of the first motor 200 and the second motor 300 can be sampled separately when the timer overflows or underflows, it is necessary to ensure that there is a 180-degree phase difference between the first PWM signal and the second PWM signal. In other words, if the first PWM signal and the second PWM signal use a phase difference of other angles, then at the moment of timer overflow or underflow, the current sampling module 120 may sample the superimposed current of the first motor 200 and the second motor 300, so that it is impossible to distinguish the currents of the first motor 200 and the second motor 300.

[0068] Next, the specific circuit structure of the current acquisition control circuit 100 for implementing the above-mentioned current acquisition control method is exemplified.

[0069] In one embodiment, see Figure 8 The current sampling module 120 includes a sampling resistor Rsen and a differential amplifier unit 121. One end of the sampling resistor Rsen is electrically connected to the motor driving module 130, and the other end of the sampling resistor Rsen is grounded. The sampling resistor Rsen is a sampling point of the current sampling module 120; the two input ends of the differential amplifier unit 121 are respectively electrically connected to the two ends of the sampling resistor Rsen, and the output end of the differential amplifier unit 121 is electrically connected to the controller 110.

[0070] The differential amplifier unit 121 is used to collect the voltage difference between the two ends of the sampling resistor Rsen, amplify the voltage difference and output it to the controller 110 .

[0071] In this embodiment, since the sampling resistor Rsen is the sampling point of the current sampling module 120, the current of the first motor 200 and the current of the second motor 300 will flow through the sampling resistor Rsen. The differential amplifier unit 121 collects the voltage difference across the sampling resistor Rsen and amplifies it to obtain the sampling current corresponding to the sampling point. It can be understood that when the first motor 200 and the second motor 300 are in the driving state at the same time, the current flowing through the sampling resistor Rsen is the superposition current of the first motor 200 and the second motor 300; when only the first motor 200 is in the driving state, the current flowing through the sampling resistor Rsen is the current of the first motor 200, and at this time, the controller 110 obtains the first sampling current corresponding to the first motor 200 from the differential amplifier unit 121; when only the second motor 300 is in the driving state, the current flowing through the sampling resistor Rsen is the current of the second motor 300, and at this time, the controller 110 obtains the second sampling current corresponding to the second motor 300 from the differential amplifier unit 121.

[0072] The controller 110 calculates the current flowing through the sampling resistor Rsen based on the acquired first sampling current and the resistance value of the sampling resistor Rsen, thereby obtaining the current of the first motor 200; and calculates the current flowing through the sampling resistor Rsen based on the acquired second sampling current and the resistance value of the sampling resistor Rsen, thereby obtaining the current of the second motor 300.

[0073] In one implementation, the differential amplifier unit 121 may be implemented based on an operational amplifier. Fig. 9The differential amplifier unit 121 includes an operational amplifier 1211, a first input resistor R1, a second input resistor R2, a third input resistor R3 and a feedback resistor R4. The positive input terminal of the operational amplifier 1211 is electrically connected to one end of the sampling resistor Rsen through the first input resistor R1, the negative input terminal of the operational amplifier 1211 is electrically connected to the other end of the sampling resistor Rsen through the second input resistor R2, and the output terminal of the operational amplifier 1211 is electrically connected to the controller 110; one end of the third input resistor R3 is electrically connected between the positive input terminal of the operational amplifier 1211 and the first input resistor R1, and the other end of the third input resistor R3 is grounded; the feedback resistor R4 is electrically connected between the negative input terminal and the output terminal of the operational amplifier 1211.

[0074] In one embodiment, the motor driving module 130 can be implemented by two H-bridge circuits, each of which controls one motor. Fig.10 The motor drive module 130 includes a first MOS transistor Q1, a second MOS transistor Q2, a third MOS transistor Q3, a fourth MOS transistor Q4, a fifth MOS transistor Q5, a sixth MOS transistor Q6, a seventh MOS transistor Q7 and an eighth MOS transistor Q8, and the controller 110 is electrically connected to the gates of the first MOS transistor Q1, the second MOS transistor Q2, the third MOS transistor Q3, the fourth MOS transistor Q4, the fifth MOS transistor Q5, the sixth MOS transistor Q6, the seventh MOS transistor Q7 and the eighth MOS transistor Q8. The first H-bridge circuit formed by the first MOS transistor Q1, the second MOS transistor Q2, the third MOS transistor Q3 and the fourth MOS transistor Q4 is used to control the first motor 200, and the forward and reverse rotation and speed of the first motor 200 are controlled by switching the four MOS transistors in the first H-bridge circuit; the second H-bridge circuit formed by the fifth MOS transistor Q5, the sixth MOS transistor Q6, the seventh MOS transistor Q7 and the eighth MOS transistor Q8 is used to control the second motor 300, and the forward and reverse rotation and speed of the second motor 300 are controlled by switching the four MOS transistors in the second H-bridge circuit.

[0075] It can be understood that the control signal output by the controller 110 to the motor drive module 130 includes the control signal applied by the controller 110 to the gates of the first MOS tube Q1, the second MOS tube Q2, the third MOS tube Q3, the fourth MOS tube Q4, the fifth MOS tube Q5, the sixth MOS tube Q6, the seventh MOS tube Q7 and the eighth MOS tube Q8.

[0076] like Fig.11As shown, when the first motor 200 and the second motor 300 are controlled to rotate forward, the third MOS tube Q3 and the fifth MOS tube Q5 can be controlled to be turned on, the fourth MOS tube Q4 and the sixth MOS tube Q6 can be turned off, the gate of the second MOS tube Q2 and the gate of the eighth MOS tube Q8 are respectively applied with PWM1 (first PWM signal) and PWM2 (second PWM signal), the first MOS tube Q1 and the seventh MOS tube Q7 are turned off or signals complementary to PWM1 and PWM2 are respectively applied to the gate of the first MOS tube Q1 and the gate of the seventh MOS tube Q7.

[0077] like Fig.12 As shown, when the first motor 200 and the second motor 300 are controlled to reverse, the third MOS tube Q3 and the fifth MOS tube Q5 can be controlled to be turned off, the fourth MOS tube Q4 and the sixth MOS tube Q6 can be turned on, the gate of the first MOS tube Q1 and the gate of the seventh MOS tube Q7 are respectively applied with PWM1 (first PWM signal) and PWM2 (second PWM signal), the second MOS tube Q2 and the eighth MOS tube Q8 are turned off or signals complementary to PWM1 and PWM2 are respectively applied to the gate of the second MOS tube Q2 and the gate of the eighth MOS tube Q8.

[0078] In another embodiment, in order to reduce the number of components of the motor driving module 130, the motor driving module 130 can be implemented by making the dual motors share a set of bridge arms. Fig.13 The motor driving module 130 includes a first speed control bridge arm 131, a second speed control bridge arm 132 and a common bridge arm 133. One end of the first motor 200 is electrically connected between the upper bridge arm and the lower bridge arm of the first speed control bridge arm 131, one end of the second motor 300 is electrically connected between the upper bridge arm and the lower bridge arm of the second speed control bridge arm 132, and the other end of the first motor 200 and the other end of the second motor 300 are both electrically connected between the upper bridge arm and the lower bridge arm of the common bridge arm 133; the upper bridge arms of the first speed control bridge arm 131, the second speed control bridge arm 132 and the common bridge arm 133 are all electrically connected to the power supply VBUS, and the lower bridge arms of the first speed control bridge arm 131, the second speed control bridge arm 132 and the common bridge arm 133 are all electrically connected to the current sampling module 120; the controller 110 is electrically connected to the upper bridge arm and the lower bridge arm of the first speed control bridge arm 131, the second speed control bridge arm 132 and the common bridge arm 133.

[0079] In this embodiment, the first speed control bridge arm 131 is the speed control bridge arm of the first motor 200, the second speed control bridge arm 132 is the speed control bridge arm of the second motor 300, and the common bridge arm 133 is used to control the rotation direction of the first motor 200 and the second motor 300. The upper bridge arm and the lower bridge arm of the first speed control bridge arm 131, the second speed control bridge arm 132, and the common bridge arm 133 can be implemented by MOS tubes, such as Fig.13 As shown, MOS transistor Q11 and MOS transistor Q12 are respectively the upper bridge arm and the lower bridge arm of the first speed control bridge arm 131, MOS transistor Q13 and MOS transistor Q14 are respectively the upper bridge arm and the lower bridge arm of the common bridge arm 133, and MOS transistor Q15 and MOS transistor Q16 are respectively the upper bridge arm and the lower bridge arm of the second speed control bridge arm 132.

[0080] The drains of the upper bridge arms of the first speed control bridge arm 131, the second speed control bridge arm 132, and the common bridge arm 133 are all electrically connected to the power supply VBUS, and the sources of the lower bridge arms of the first speed control bridge arm 131, the second speed control bridge arm 132, and the common bridge arm 133 are all electrically connected to the current sampling module 120. The controller 110 is electrically connected to the gates of the upper bridge arms and the gates of the lower bridge arms of the first speed control bridge arm 131, the second speed control bridge arm 132, and the common bridge arm 133, and outputs corresponding control signals to the gates of the upper bridge arms and the lower bridge arms, thereby realizing the speed and direction control of the two motors.

[0081] In this embodiment, the controller 110 can apply the first PWM signal and the second PWM signal to the gates of the lower bridge arms of the first speed control bridge arm 131 and the second speed control bridge arm 132, respectively; or apply the first PWM signal and the second PWM signal to the gates of the upper bridge arms of the first speed control bridge arm 131 and the second speed control bridge arm 132, respectively.

[0082] It can be seen that by using a common bridge arm in the motor driving module 130, only 6 MOS tubes are needed to control two motors, which effectively reduces the number of components in the motor driving module, further simplifies the circuit, and reduces the cost of electronic components.

[0083] Next, for the cases where the two motors rotate forward and reverse, Fig.13 The control method of the first speed control bridge arm 131, the second speed control bridge arm 132 and the upper bridge arm and the lower bridge arm of the common bridge arm 133 will be described.

[0084] In one embodiment, the controller 110 is used to output a conduction signal to the upper bridge arm of the common bridge arm 133, output an off signal to the lower bridge arm of the common bridge arm 133, output a first PWM signal to the lower bridge arm of the first speed control bridge arm 131, output a second PWM signal to the lower bridge arm of the second speed control bridge arm 132, output an off signal or a complementary signal corresponding to the first PWM signal to the upper bridge arm of the first speed control bridge arm 131, and output an off signal or a complementary signal corresponding to the second PWM signal to the upper bridge arm of the second speed control bridge arm 132 when controlling the first motor 200 and the second motor 300 to rotate forward. The controller 110 is also used to output a conduction signal to the lower bridge arm of the common bridge arm 133, output a shutdown signal to the upper bridge arm of the common bridge arm 133, output a first PWM signal to the upper bridge arm of the first speed control bridge arm 131, output a second PWM signal to the upper bridge arm of the second speed control bridge arm 132, output a shutdown signal or a complementary signal corresponding to the first PWM signal to the lower bridge arm of the first speed control bridge arm 131, and output a shutdown signal or a complementary signal corresponding to the second PWM signal to the lower bridge arm of the second speed control bridge arm 132 when controlling the reverse rotation of the first motor 200 and the second motor 300.

[0085] like Fig.14 As shown, when the MOS tube Q13 is turned on, the MOS tube Q14 is turned off, PWM1 (the first PWM signal) and PWM2 (the second PWM signal) are applied to the gates of the MOS tubes Q12 and Q16 respectively, and the MOS tubes Q11 and Q15 are turned off or the complementary signals of PWM1 and PWM2 are applied to the gates of the MOS tubes Q11 and Q15 respectively, the first motor 200 and the second motor 300 rotate forward, and the currents of the first motor 200 and the second motor 300 both flow through the sampling points of the current sampling module 120. The dotted line portion in the figure indicates the current direction.

[0086] like Fig.15 As shown, when the MOS tube Q13 is disconnected, the MOS tube Q14 is turned on, the gates of the MOS tubes Q11 and Q15 are respectively applied with the first PWM signal and the second PWM signal, the MOS tubes Q12 and Q16 are disconnected or the complementary signals of the first PWM signal and the second PWM signal are respectively applied to the gates of the MOS tubes Q12 and Q16, the first motor 200 and the second motor 300 are reversed, and the currents of the first motor 200 and the second motor 300 both flow through the sampling points of the current sampling module 120. The dotted line portion in the figure indicates the current direction.

[0087] Based on the same inventive concept, an embodiment of the present invention further provides a controller 110, which may include a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the above-mentioned current acquisition control method is implemented.

[0088] Based on the same inventive concept, an embodiment of the present invention further provides a dual-motor lifting table, which includes a first motor 200, a second motor 300 and the above-mentioned current acquisition control circuit 100.

[0089] In summary, the current acquisition control method, circuit, controller and dual-motor lifting table provided by the embodiments of the present invention, on the one hand, by setting the current of the first motor and the current of the second motor to flow through the same sampling point of the current sampling module, the controller obtains the first sampling current when the first PWM signal is high and the second PWM signal is low from the current sampling module, and calculates the current of the first motor based on the first sampling current; obtains the second sampling current when the first PWM signal is low and the second PWM signal is high from the current sampling module, and calculates the current of the second motor based on the second sampling current, so that only one current sampling module is needed to sample the currents of each of the two motors separately, which simplifies the circuit design and reduces the hardware cost compared with the prior art; on the other hand, by using a common bridge arm in the motor drive module, only 6 MOS tubes are needed to control the two motors, which effectively reduces the number of components of the motor drive module, further simplifies the circuit, and reduces the cost of electronic components.

[0090] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A current acquisition control method, characterized in that: Applied to a current acquisition control circuit, the current acquisition control circuit comprises a current sampling module and a motor driving module, the motor driving module is used to drive a first motor and a second motor, the current of the first motor and the current of the second motor both flow through the same sampling point of the current sampling module; The method comprises: Output a control signal to the motor driving module to drive the first motor and the second motor to work; the control signal includes a first PWM signal and a second PWM signal, the first PWM signal is used to control the first motor, and the second PWM signal is used to control the second motor; A first sampling current is obtained from the current sampling module when the first PWM signal is at a high level and the second PWM signal is at a low level, and the current of the first motor is calculated based on the first sampling current; a second sampling current is obtained from the current sampling module when the first PWM signal is at a low level and the second PWM signal is at a high level, and the current of the second motor is calculated based on the second sampling current.

2. The current acquisition control method according to claim 1, characterized in that: The outputting control signal to the motor driving module to drive the first motor and the second motor to work includes: According to the magnitude relationship between the count value of the timer and the preset first comparison value and the second comparison value, the level states of the output first PWM signal and the second PWM signal are controlled so that in each counting cycle of the timer, there are time periods in which the first PWM signal is at a high level and the second PWM signal is at a low level, and time periods in which the first PWM signal is at a low level and the second PWM signal is at a high level; wherein the count cycle of the timer is the time in which the timer counts up from a preset underflow value to a preset overflow value, and counts down from the overflow value to the underflow value; and the first comparison value and the second comparison value are both greater than the underflow value and less than the overflow value.

3. The current acquisition control method according to claim 2, characterized in that: The controlling the level states of the first PWM signal and the second PWM signal outputted according to the magnitude relationship between the count value of the timer and the preset first comparison value and the second comparison value comprises: When the count value of the timer is less than the first comparison value, a low-level first PWM signal is output; when the count value of the timer is greater than or equal to the first comparison value, a high-level first PWM signal is output; When the count value of the timer is less than the second comparison value, a high-level second PWM signal is output; when the count value of the timer is greater than or equal to the second comparison value, a low-level second PWM signal is output.

4. The current acquisition control method according to claim 2 or 3, characterized in that: The acquiring, from the current sampling module, a first sampling current when the first PWM signal is at a high level and the second PWM signal is at a low level comprises: The first sampling current output by the current sampling module is acquired when the count value of the timer reaches the overflow value; wherein, when the count value of the timer reaches the overflow value, the first PWM signal is at a high level and the second PWM signal is at a low level.

5. The current acquisition control method according to claim 2 or 3, characterized in that: The acquiring, from the current sampling module, a second sampling current when the first PWM signal is at a low level and the second PWM signal is at a high level comprises: The second sampling current output by the current sampling module is acquired when the count value of the timer reaches the underflow value; wherein, when the count value of the timer reaches the underflow value, the first PWM signal is at a low level and the second PWM signal is at a high level.

6. A controller, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the current acquisition control method according to any one of claims 1 to 5.

7. A current acquisition control circuit, characterized in that: It includes a controller, a current sampling module and a motor driving module, wherein the controller is electrically connected to the current sampling module and the motor driving module respectively, and the motor driving module is used to drive a first motor and a second motor; the current of the first motor and the current of the second motor both flow through the same sampling point of the current sampling module.

8. The current acquisition control circuit according to claim 7, characterized in that: The current sampling module includes a sampling resistor and a differential amplifier unit, one end of the sampling resistor is electrically connected to the motor drive module, the other end of the sampling resistor is grounded, and the sampling resistor is the sampling point; the two input ends of the differential amplifier unit are electrically connected to the two ends of the sampling resistor respectively, and the output end of the differential amplifier unit is electrically connected to the controller; The differential amplifier unit is used to collect the voltage difference between the two ends of the sampling resistor, amplify the voltage difference and output it to the controller.

9. The current acquisition control circuit according to claim 7, characterized in that: The motor drive module includes a first speed control bridge arm, a second speed control bridge arm and a common bridge arm, one end of the first motor is electrically connected between the upper bridge arm and the lower bridge arm of the first speed control bridge arm, one end of the second motor is electrically connected between the upper bridge arm and the lower bridge arm of the second speed control bridge arm, the other end of the first motor and the other end of the second motor are both electrically connected between the upper bridge arm and the lower bridge arm of the common bridge arm; the upper bridge arms of the first speed control bridge arm, the second speed control bridge arm and the common bridge arm are all electrically connected to a power supply, and the lower bridge arms of the first speed control bridge arm, the second speed control bridge arm and the common bridge arm are all electrically connected to the current sampling module; the controller is electrically connected to the upper bridge arm and the lower bridge arm of the first speed control bridge arm, the second speed control bridge arm and the common bridge arm.

10. A dual-motor lifting table, characterized in that: It comprises a first motor, a second motor and the current acquisition control circuit as described in any one of claims 7 to 9.