Current sampling circuit and motor driver
By introducing a multi-channel switch circuit into the current sampling circuit, the multiplexing of ADC sampling ports is realized, which solves the problem of insufficient ADC sampling ports in multi-axis drives and improves sampling efficiency and accuracy.
Patent Information
- Application Number
- CN202323614144.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2033-12-28
AI Technical Summary
As the number of multi-axis drives increases, the number of motor phase current sampling phases increases, resulting in insufficient ADC sampling ports to meet the needs of high-axis multi-axis drives.
Design a current sampling circuit. By introducing a multi-channel switch circuit between the signal acquisition unit and the A/D conversion sampling port, the line between the signal acquisition unit and the ADC sampling port is connected, allowing one ADC sampling port to receive multiple channels. The signal of the signal acquisition unit realizes the multiplexing of the sampling port.
It effectively solves the problem of insufficient sampling ports of multi-channel current sampling circuits, improves the utilization of ADC sampling ports, reduces the occupation of MCU ADC ports, and is suitable for efficient current sampling of multi-axis drives.
Smart Images

Figure CN221926478U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of drivers, in particular to a current sampling circuit and a motor driver. Background Art
[0002] In automation control equipment, multi-axis drivers can drive and control multiple motors at the same time. Compared with traditional single-axis drivers, they have more advantages in terms of cost and volume. Therefore, multi-axis drivers are more and more widely used in the market, and various driver manufacturers are more inclined to develop multi-axis driver products. However, with the increase in the number of driver axes, the number of motor phase current sampling phases also increases significantly. Taking a two-phase four-wire stepper motor as an example, in dual-resistance phase current sampling, each axis needs to sample two-phase current, and each phase current requires an ADC (Analog-to-Digital Converter) sampling port. Therefore, with the increase in the number of axes, the phase current that needs to be sampled increases exponentially, and the required ADC sampling ports also increase exponentially. However, the ADC sampling ports of an MCU are limited, which can meet the sampling needs of multi-axis drivers with fewer axes, but cannot meet the needs of multi-axis drivers with more axes.
[0003] Therefore, how to solve the problem of insufficient sampling ports in multi-channel current sampling circuits is an urgent problem to be solved. Utility Model Content
[0004] In view of the deficiencies of the above-mentioned related technologies, the purpose of the present application is to provide a current sampling circuit and a motor driver, aiming to solve the problem of insufficient sampling ports of multi-channel current sampling circuits.
[0005] A current sampling circuit, comprising: at least two signal acquisition units, a multi-way switch circuit and an A / D conversion sampling port connected to the signal acquisition units in sequence;
[0006] The signal acquisition unit is used to collect the A-phase, B-phase or C-phase current of the inverter circuit;
[0007] The input end of the multi-way switch circuit is connected to each of the signal acquisition units, and the output end is connected to the A / D conversion sampling port. The multi-way switch circuit is used to output the sampling signals of each of the signal acquisition units to the A / D conversion sampling port in sequence according to the control signal.
[0008] The above-mentioned current sampling circuit has a multi-way switch circuit connected between at least two signal acquisition units and the A / D conversion sampling port. The multi-way switch circuit allows one A / D conversion sampling port to receive signals from multiple signal acquisition units by respectively connecting the lines between each signal acquisition unit and the A / D conversion sampling port, thereby realizing the multiplexing of the A / D conversion sampling port, thereby solving the problem of insufficient sampling ports in the multi-way current sampling circuit.
[0009] Optionally, the signal acquisition unit includes a sampling resistor connected in series to a lower bridge arm of the inverter circuit.
[0010] Optionally, a microprocessor is also included, and the microprocessor includes the A / D conversion sampling port and a control signal output terminal.
[0011] Optionally, the multi-way switch circuit includes a multi-way analog switch chip, and the multi-way analog switch chip includes at least two signal input terminals, a signal output terminal and a control terminal;
[0012] The signal input end is connected to the signal acquisition unit, the signal output end is connected to the A / D conversion sampling port, and the control end is connected to the control signal output end.
[0013] Optionally, the method further includes a first filtering unit disposed between the signal acquisition unit and the signal input end.
[0014] Optionally, the method further includes a second filtering unit and a voltage clamping unit arranged between the signal output terminal and the A / D conversion sampling port.
[0015] Optionally, a third filtering unit is further included which is arranged between the control end and the control signal output end.
[0016] Based on the same inventive concept, the present application also provides a motor driver, comprising: an inverter circuit and any current sampling circuit provided in the present application.
[0017] Optionally, at least two inverter circuits are included, and each inverter circuit is connected to the current sampling circuit respectively.
[0018] Optionally, at least two inverter circuits and current sampling circuits corresponding to the inverter circuits are included, and the output end of each current sampling circuit is connected to the same microprocessor. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A schematic diagram of the principle structure of a current sampling circuit provided by an embodiment of the utility model;
[0020] Figure 2A schematic diagram of a multi-way switch circuit provided by an embodiment of the utility model;
[0021] Figure 3 A schematic diagram of the structure of a two-phase inverter circuit and a three-phase inverter circuit in a current sampling circuit provided by an embodiment of the utility model;
[0022] Figure 4 A schematic diagram of a 16-way input and 1-way output multi-way switch circuit provided by another optional embodiment of the utility model;
[0023] Figure 5 A schematic diagram of a circuit structure of a driver provided in yet another optional embodiment of the utility model;
[0024] Figure 6 A schematic diagram of the circuit structure of another driver provided in yet another optional embodiment of the utility model;
[0025] Figure 7 A schematic diagram of the circuit structure of another driver provided in yet another optional embodiment of the utility model. DETAILED DESCRIPTION
[0026] In order to facilitate the understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present application are given in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thoroughly and comprehensively understood.
[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0028] For existing multi-axis motor drivers, as the number of axes increases, the motor phase currents that need to be sampled increase exponentially, and the number of ADC sampling ports required also increases exponentially. However, the ADC sampling ports of an MCU are limited, which can meet the sampling needs of multi-axis drivers with fewer axes, but cannot meet the needs of multi-axis drivers with more axes. Therefore, how to solve the problem of insufficient sampling ports of multi-channel signal acquisition units is an urgent problem to be solved.
[0029] Based on this, the present application hopes to provide a solution that can solve the above-mentioned technical problems, the details of which will be described in the subsequent embodiments.
[0030] The present application provides a current sampling circuit, comprising: at least two signal acquisition units, a multi-way switch circuit and an A / D conversion sampling port connected in sequence to the signal acquisition units;
[0031] The signal acquisition unit is used to collect the A-phase, B-phase or C-phase current of the inverter circuit;
[0032] The input end of the multi-way switch circuit is connected to each of the signal acquisition units, and the output end is connected to the A / D conversion sampling port. The multi-way switch circuit is used to output the sampling signals of each of the signal acquisition units to the A / D conversion sampling port in sequence according to the control signal.
[0033] See also Figure 1 , Figure 1 The schematic diagram of the principle structure of a current sampling circuit provided in this embodiment includes: a signal acquisition unit A101 and a signal acquisition unit B102, a multi-way switch circuit 200 and an A / D conversion sampling port 300, wherein one end of the multi-way switch circuit 200 is connected to the signal acquisition unit A101 and the signal acquisition unit B102, and the other end is connected to the A / D conversion sampling port 300, and the multi-way switch circuit 200 respectively connects the lines between the signal acquisition unit A101 and the signal acquisition unit B102 and the A / D conversion sampling port 300 to output the sampling signals of the signal acquisition unit A and the signal acquisition unit B to the A / D conversion sampling port respectively, so as to realize the cyclic sampling of the multi-way sampling signals.
[0034] See also Figure 2 , Figure 2 A schematic diagram of a multi-way switch circuit provided in this embodiment is applied to a current sampling circuit for respectively sampling currents of phases A and B of a two-phase motor. Figure 2 In the embodiment, an analog switch is used to realize a ADC sampling port to perform cyclic sampling of multiple phase currents. A and B are the sampling signal inputs of the two-phase currents respectively. S is the switch control signal of the analog switch. When S is at a low level, switch B1 is closed to sample the current of phase A; when S is at a high level, switch B2 is closed to sample the current of phase B. AB / ADC is an ADC sampling port shared by the currents of phases A and B. For a two-phase stepper motor, the use of this solution can reduce the number of ADC sampling ports by half in the case of dual-resistance sampling. In this embodiment, current sampling is performed by connecting a sampling resistor in series to the lower bridge arms of phases A and B of the inverter driver. In the specific operation, no software reconstruction is required. It is only necessary to judge the sector position and determine the bridge arm that needs to be sampled. The acquisition accuracy is high, the development is simple, and the effect is good.
[0035] In another optional embodiment, the signal acquisition unit includes a sampling resistor connected in series to the lower bridge arm of the inverter circuit.
[0036] It can be understood that the current sampling circuit provided in this embodiment can be used for current sampling of a two-phase inverter circuit, and can also be used for current sampling of a three-phase inverter circuit. Figure 3 , Figure 3 3-1 is the structure of a two-phase inverter circuit, where R A and R B is the corresponding sampling resistor. Figure 3 3-2 is the structure of the three-phase inverter circuit, and the three-resistance sampling method is used to sample the current of phase A, phase B, and phase C respectively, where R A , R B and R C For the corresponding sampling resistor, in this embodiment, for the three-phase inverter circuit, a dual-resistance sampling method can also be adopted. In this embodiment, at least a dual-resistance current sampling method is adopted for the two-phase inverter circuit or the three-phase inverter circuit, ensuring the sampling accuracy and stability.
[0037] In another optional embodiment, the current sampling circuit further includes a microprocessor, and the microprocessor includes the A / D conversion sampling port and a control signal output terminal.
[0038] In another optional embodiment, the multi-way switch circuit includes a multi-way analog switch chip, and the multi-way analog switch chip includes at least two signal input terminals, a signal output terminal and a control terminal;
[0039] The signal input end is connected to the signal acquisition unit, the signal output end is connected to the A / D conversion sampling port, and the control end is connected to the control signal output end.
[0040] See also Figure 2 , Figure 2 The multi-channel analog switch chip U in the figure is a relatively common single-pole double-throw (SPDT) analog switch IC, whose B1 pin and B2 pin are two signal input terminals, A pin is a signal output terminal, S pin is a control terminal, B1 pin and B2 pin are connected to the A channel signal acquisition unit and the B channel signal acquisition unit respectively, A pin is connected to the A / D conversion sampling port, and S pin is connected to the S control signal terminal.
[0041] In another optional embodiment, the current sampling circuit further includes a first filtering unit disposed between the signal acquisition unit and the signal input end.
[0042] See also Figure 2 , Figure 2 The signal acquisition unit A is connected to the multi-channel analog switch chip U, wherein the resistor and capacitor between the signal acquisition unit A and the multi-channel analog switch chip U and the ground terminal are the corresponding first filtering units, which play the role of filtering the collection current of the signal acquisition unit A. The first filtering unit corresponding to the signal acquisition unit B is the same as above.
[0043] In another optional embodiment, the current sampling circuit further includes a second filtering unit and a voltage clamping unit arranged between the signal output terminal and the A / D conversion sampling port.
[0044] See also Figure 2 The A end of the multi-channel analog switch chip U is the signal output end, the resistor and capacitor from the A end to AB / ADC and the ground end are the corresponding second filtering unit, and the two diodes and the ground end are the voltage clamping unit. The second filtering unit is used to filter the sampling current input to the A / D conversion sampling port, and the voltage clamping unit is used to clamp the voltage of the sampling current input to the A / D conversion sampling port to meet the voltage requirements of the A / D conversion sampling port.
[0045] In another optional embodiment, the current sampling circuit further includes a third filtering unit disposed between the control terminal and the control signal output terminal.
[0046] See also Figure 2 The S end of the multi-channel analog switch chip U is the control end, and the resistor and capacitor between the control signal output end of the microprocessor and the control end of the multi-channel analog switch chip U and the ground end are the corresponding third filtering unit, which plays a role in filtering the current of the control signal.
[0047] The solution of the present application uses an analog switch as a multi-way switch, which can realize the cyclic sampling of multiple analog quantities by one ADC sampling port. It only needs to control the cyclic sampling time, and the number of analog quantities can be increased on the basis of ensuring effective sampling, which greatly improves the utilization rate of the ADC sampling port. At the same time, the control signal of the analog switch can directly use the PWM signal output port of the MCU (Microcontroller Unit), making full use of the chip function and facilitating development.
[0048] This embodiment provides a current sampling circuit, which has a multi-way switch circuit connected between at least two signal acquisition units and an A / D conversion sampling port. The multi-way switch circuit connects the lines between each signal acquisition unit and the A / D conversion sampling port respectively, so that one A / D conversion sampling port can receive signals from multiple signal acquisition units, thereby realizing the multiplexing of the A / D conversion sampling port and solving the problem of insufficient sampling ports of multiple signal acquisition units.
[0049] Another embodiment of the utility model
[0050] It can be understood that the number of signal acquisition units of the current sampling circuit provided by the embodiment of the utility model can be increased or decreased according to actual needs. An embodiment of a current sampling circuit with 16 inputs and 1 output is provided below, which is as follows:
[0051] See also Figure 4 , Figure 4 A schematic diagram of a 16-input and 1-output multi-way switch circuit provided in this embodiment. Figure 4 The digital control analog switch is used in the device. The device is a 1-16 bidirectional switch device, that is, 16 inputs (outputs) and 1 output (input). The high and low level combination of S0-S3 is used to control the on and off of the Ii terminal and the COM terminal. E is the enable terminal. When E=1, the device is not enabled. Only when E=0, the device is enabled. That is, when E=0, different high and low levels are input to S0, S1, S2 and S3 respectively to realize the conduction of different switch channels. For example: when S0=0, S1=0, S2=0 and S3=0, switch channel 0 is turned on; when S0=1, S1=0, S2=0 and S3=0, switch channel 1 is turned on; when S0=0, S1=1, S2=0 and S3=0, switch channel 2 is turned on; ...; when S0=1, S1=0, S2=1 and S3=0, switch channel 13 is turned on; when S0=0, S1=1, S2=1 and S3=1, switch channel 14 is turned on; when S0=1, S1=1, S2=1 and S3=1, switch channel 15 is turned on.
[0052] This device can realize an ADC sampling port to sample up to 16 sampling currents, which greatly reduces the occupancy rate of the ADC sampling port. The ADC port samples the sampling currents of each channel in turn and ensures that each sampling lasts for a period of time. However, as the number of samples increases, the interval between two samples of the same phase current will be too long, and the sampling efficiency will decrease. Therefore, it is also very important to reasonably set the number of signal acquisition units, and the more the better is not necessarily true.
[0053] Another embodiment of the utility model
[0054] Yet another embodiment of the present embodiment provides a motor driver, which includes an inverter circuit and the above-mentioned current sampling circuit provided in the embodiment of the present utility model.
[0055] See also Figure 5 , Figure 5A schematic diagram of the circuit structure of a driver provided in this embodiment, which includes a two-phase inverter circuit and a current sampling circuit provided in an embodiment of the utility model, wherein the current sampling circuit includes: a signal acquisition unit, a multi-way switch circuit and an A / D conversion sampling port, wherein the multi-way switch circuit is an analog switch, the A / D conversion sampling port is an ADC interface, the ADC interface is one of the pins of the MCU, and the MCU also sends a control signal to the analog switch to control the switching frequency of the analog switch.
[0056] In yet another optional embodiment, the motor driver includes at least two of the inverter circuits, and each of the inverter circuits is connected to the current sampling circuit respectively.
[0057] When a multi-axis motor driver is used, the number of inverter circuits in the motor driver also needs to be increased according to the number of axes. Therefore, when it is a multi-axis motor driver, the motor driver includes at least two inverter circuits, and each inverter circuit is connected to the current sampling circuit. In this case, multiple inverter circuits can share the same current sampling circuit. Figure 6 As shown, Figure 6 The motor driver includes an inverter circuit A and an inverter circuit B. The inverter circuit A and the inverter circuit B drive corresponding motors respectively. At this time, the inverter circuit A and the inverter circuit B share the same current sampling circuit.
[0058] In another optional embodiment, the motor driver includes at least two of the inverter circuits and current sampling circuits corresponding one to each of the inverter circuits, and the output end of each of the current sampling circuits is connected to the same microprocessor.
[0059] See also Figure 7 , Figure 7 The motor driver includes two circuits, an inverter circuit A and an inverter circuit B. Inverter circuit A and inverter circuit B drive corresponding motors respectively. Inverter circuit A corresponds to current sampling circuit A, and inverter circuit B corresponds to current sampling circuit B. At this time, multiple inverter circuits each have their own corresponding current sampling circuit, and each current sampling circuit is then connected to the microprocessor MCU respectively.
[0060] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A current sampling circuit, characterized in that: include: At least two signal acquisition units, a multi-way switch circuit and an A / D conversion sampling port connected in sequence to the signal acquisition units; The signal acquisition unit is used to collect the A-phase, B-phase or C-phase current of the inverter circuit; The input end of the multi-way switch circuit is connected to each of the signal acquisition units, and the output end is connected to the A / D conversion sampling port. The multi-way switch circuit is used to output the sampling signals of each of the signal acquisition units to the A / D conversion sampling port in sequence according to the control signal.
2. The current sampling circuit according to claim 1, characterized in that: The signal acquisition unit includes a sampling resistor connected in series to the lower bridge arm of the inverter circuit.
3. The current sampling circuit according to claim 1, characterized in that: It also includes a microprocessor, which includes the A / D conversion sampling port and a control signal output terminal.
4. The current sampling circuit according to claim 3, characterized in that: The multi-way switch circuit includes a multi-way analog switch chip, and the multi-way analog switch chip includes at least two signal input terminals, a signal output terminal and a control terminal; The signal input end is connected to the signal acquisition unit, the signal output end is connected to the A / D conversion sampling port, and the control end is connected to the control signal output end.
5. The current sampling circuit according to claim 4, characterized in that: It also includes a first filtering unit arranged between the signal acquisition unit and the signal input end.
6. The current sampling circuit according to claim 4, characterized in that: It also includes a second filtering unit and a voltage clamping unit which are arranged between the signal output end and the A / D conversion sampling port.
7. The current sampling circuit according to claim 4, characterized in that: It also includes a third filtering unit arranged between the control end and the control signal output end.
8. A motor driver, characterized in that: include: An inverter circuit and a current sampling circuit as described in any one of claims 1 to 7.
9. The motor driver according to claim 8, characterized in that: It comprises at least two inverter circuits, and each inverter circuit is connected to the current sampling circuit respectively.
10. The motor driver according to claim 8, characterized in that: It comprises at least two inverter circuits and current sampling circuits corresponding to the inverter circuits one by one, and the output end of each current sampling circuit is connected to the same microprocessor.
