Control circuit of bipolar stepping motor
Through the combination of the H-bridge circuit and the MOS tube push-pull structure, the series coil and high-configuration GPIO port are used to solve the problems of resource occupation and cost of traditional control circuits, and efficient control of bipolar stepper motors is achieved.
Patent Information
- Application Number
- CN202421546237.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2034-07-02
AI Technical Summary
Traditional bipolar stepper motor control circuits require a large number of GPIOs and expensive motor driver chips, resulting in high resource usage and cost.
Using the H-bridge circuit and MOS tube push-pull structure, the control of two bipolar stepper motors is realized through series coils and high-configuration GPIO ports, and only 3-4 GPIO ports are required.
It significantly reduces the number of GPIO requirements, reduces driving costs, and achieves efficient control of bipolar stepper motors.
Smart Images

Figure CN222981435U_ABST
Abstract
Description
Technical Field
[0001] The utility model belongs to the field of motor control, and particularly relates to a control circuit for a bipolar stepper motor, which is applicable to various scenarios of controlling a bipolar stepper motor by using an embedded system. Background Technique
[0002] Stepper motors are widely used in various electronic devices. In cameras, they can be used to control pan-tilt heads, motorized lenses, etc. Stepper motors can be generally divided into bipolar stepper motors and unipolar stepper motors. The difference between the two lies in whether the energization direction of the coil is variable. A bipolar stepper motor commonly used in cameras has two sets of coils in one motor. The H-bridge circuit is used for bidirectional energization control, and combined with the control timing of the stepper motor, forward and reverse rotations are achieved. The control circuit of the bipolar stepper motor mostly uses an integrated motor drive chip. The H-bridge circuit is integrated inside the motor drive chip, and the motor drive chip is controlled through the GPIO or bus protocol of the main chip to realize the forward and reverse rotations of the bipolar stepper motor. The software methods for the H-bridge motor drive chip to control the bipolar motor mainly include the single four-step method (1-1), the double four-step method (2-2), the eight-step method (1-2), and the micro-step method. Traditional control methods require a large number of GPIOs. One motor requires 4 GPIOs for control. Usually, a device has two motors, at least 8 GPIOs are required. Adopting a simplified design, at least 6 GPIOs are also required. At the same time, the price of the motor drive chip is relatively expensive. Content of the Utility Model
[0003] The purpose of the utility model is to provide a control circuit for a bipolar stepper motor, which can realize the control of the bipolar stepper motor only with a small number of GPIOs and switching devices, and is applicable to scenarios where the main control GPIO ability is weak and the cost control is strict.
[0004] To achieve the above purpose, the technical solution adopted by the utility model is as follows:
[0005] A control circuit for a bipolar stepper motor controls two bipolar stepper motors as a group. In a group, the two sets of coils of one bipolar stepper motor are respectively the first coil and the second coil, and the two sets of coils of the other bipolar stepper motor are respectively the third coil and the fourth coil;
[0006] In the control circuit of the bipolar stepper motor, the first coil and the second coil are connected in series. The connection end of the first coil and the second coil in the series circuit is used as the first end, the other end of the first coil is used as the second end, and the other end of the second coil is used as the third end;
[0007] One end of the third coil is connected to the second end portion, the other end of the third coil is connected to the third end portion, one end of the fourth coil is connected to the second end portion, and the other end of the fourth coil is connected to the first end portion or serves as an independent fourth end portion;
[0008] Any one of the end portions is connected to a GPIO port through a MOS transistor push-pull structure, and the GPIO port has three states: high level, low level, and high impedance state.
[0009] The following also provides several optional ways, but it is not an additional limitation to the above overall solution, but only a further supplement or preference. Without technical or logical contradictions, each optional way can be combined with the above overall solution alone, or multiple optional ways can be combined with each other.
[0010] Preferably, the MOS transistor push-pull structure includes an NMOS transistor and a PMOS transistor;
[0011] The gate of the NMOS transistor and the gate of the PMOS transistor are connected to the same GPIO port, the drain of the NMOS transistor and the drain of the PMOS transistor are connected to the same end portion, the source of the PMOS transistor is connected to the power supply, and the source of the NMOS transistor is grounded.
[0012] Preferably, the PMOS transistor is a PMOS transistor with an opening voltage greater than the difference between the power supply and the high level of the GPIO port and less than the power supply.
[0013] Preferably, the NMOS transistor is an NMOS transistor with an opening voltage less than the high level of the GPIO port. A control circuit of a bipolar stepper motor provided by the present invention combines an H-bridge circuit and a MOS transistor push-pull structure to realize the control of two bipolar stepper motors. Only 3-4 GPIO ports are required in the control circuit, which greatly reduces the requirement for the number of GPIO ports and also reduces the driving cost. Brief Description of the Drawings
[0014] Figure 1 It is a schematic structural diagram of a control circuit of a bipolar stepper motor according to Embodiment 1 of the present invention;
[0015] Figure 2 It is a schematic structural diagram of a control circuit of a bipolar stepper motor according to Embodiment 2 of the present invention. Detailed Description of the Embodiments
[0016] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0017] It should be noted that when a component is referred to as being "connected" to another component, it can be directly connected to the other component or there may also be an intermediate component; when a component is referred to as being "fixed" to another component, it can be directly fixed to the other component or there may also be an intermediate component.
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs. The terms used in the description of the present invention in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0019] Embodiment 1
[0020] This embodiment provides a control circuit for a bipolar stepper motor, which controls two bipolar stepper motors as a group. The two sets of coils of one bipolar stepper motor in a group are respectively the first coil L1 and the second coil L2, and the two sets of coils of the other bipolar stepper motor are respectively the third coil L3 and the fourth coil L4.
[0021] It should be noted that in the control circuit of this embodiment, two bipolar stepper motors are used as a group for control, but it is not limited that only two bipolar stepper motors can be controlled. Based on the control circuit of a group of bipolar stepper motors, the control circuit can be replicated and extended to control multiple groups of bipolar stepper motors.
[0022] Such as Figure 1As shown in the figure, in the control circuit for a group of bipolar stepper motors, the first coil L1 and the second coil L2 are connected in series. The connection end of the first coil L1 and the second coil L2 in the series circuit is used as the first end A, the other end of the first coil L1 is used as the second end B, and the other end of the second coil L2 is used as the third end C; one end of the third coil L3 is connected to the second end B, the other end of the third coil L3 is connected to the third end C, one end of the fourth coil L4 is connected to the second end B, and the other end of the fourth coil L4 is used as an independent fourth end D. Any one of the ends is connected to a GPIO port through a MOS transistor push-pull structure. The GPIO port is the GPIO port of the main chip (the chip for controlling the motor, and any chip with a GPIO port is acceptable. The chip model or structure is not limited in this embodiment), and has three states: H / L / Z, where H / L / Z are high level, low level, and high impedance state respectively.
[0023] The MOS transistor push-pull structure includes an NMOS transistor and a PMOS transistor; the gate of the NMOS transistor and the gate of the PMOS transistor are connected to the same GPIO port, the drain of the NMOS transistor and the drain of the PMOS transistor are connected to the same end, the source of the PMOS transistor is connected to the power supply VCC (the power supply for driving the motor), and the source of the NMOS transistor is grounded.
[0024] In this embodiment, there are a first end, a second end, a third end, and a fourth end. Therefore, there are four MOS transistor push-pull structures in this embodiment, namely the first PMOS transistor Q1 and the first NMOS transistor Q4 connected to the second end B, the second PMOS transistor Q2 and the second NMOS transistor Q5 connected to the first end A, the third PMOS transistor Q3 and the third NMOS transistor Q6 connected to the third end C, and the fourth PMOS transistor Q7 and the fourth NMOS transistor Q8 connected to the fourth end D.
[0025] And the gates of the first PMOS transistor Q1 and the first NMOS transistor Q4 are connected to the first GPIO port P1. The drains of the first PMOS transistor Q1 and the first NMOS transistor Q4 are connected to the second end B. The source of the first PMOS transistor Q1 is connected to the power supply VCC, and the source of the first NMOS transistor Q4 is grounded. The gates of the second PMOS transistor Q2 and the second NMOS transistor Q5 are connected to the second GPIO port P2. The drains of the second PMOS transistor Q2 and the second NMOS transistor Q5 are connected to the first end A. The source of the second PMOS transistor Q2 is connected to the power supply VCC, and the source of the second NMOS transistor Q5 is grounded. The gates of the third PMOS transistor Q3 and the third NMOS transistor Q6 are connected to the third GPIO port P3. The drains of the third PMOS transistor Q3 and the third NMOS transistor Q6 are connected to the third end C. The source of the third PMOS transistor Q3 is connected to the power supply VCC, and the source of the third NMOS transistor Q6 is grounded. The gates of the fourth PMOS transistor Q7 and the fourth NMOS transistor Q8 are connected to the fourth GPIO port P4. The drains of the fourth PMOS transistor Q7 and the fourth NMOS transistor Q8 are connected to the second end B. The source of the fourth PMOS transistor Q7 is connected to the power supply VCC, and the source of the fourth NMOS transistor Q8 is grounded.
[0026] Among them, Q1 / Q2 / Q3 / Q7 are selected as PMOS transistors with an on-voltage greater than the difference between the power supply VCC and the high level of the GPIO port and less than the power supply VCC, ensuring that when P1 / P2 / P3 / P4 are at high level or high impedance state, Q1 / Q2 / Q3 / Q7 are turned off, and when P1 / P2 / P3 / P4 are at low level, Q1 / Q2 / Q3 / Q7 are turned on. In addition, Q4 / Q5 / Q6 / Q8 are selected as NMOS transistors with an on-voltage less than the high level of the GPIO, ensuring that when P1 / P2 / P3 / P4 are at high level, Q4 / Q5 / Q6 / Q8 are turned on, and when P1 / P2 / P3 / P4 are at low level or high impedance state, Q4 / Q5 / Q6 / Q8 are turned off.
[0027] Based on the above structure, this embodiment combines the core idea of Charlie multiplexing and uses high configuration to turn off both switching transistors. For example, when the first GPIO port P1 is in the H state, the first PMOS transistor Q1 is turned off and the first NMOS transistor Q4 is turned on; when the first GPIO port P1 is in the L state, the first PMOS transistor Q1 is turned on and the first NMOS transistor Q4 is turned off; when the first GPIO port P1 is in the Z state, the first PMOS transistor Q1 is turned off and the first NMOS transistor Q4 is turned off; the situations of P2 / P3 / P4 are the same. Therefore, this embodiment only requires 4 GPIOs and 8 MOS transistors. Combining the algorithm idea of Charlie multiplexing and adopting the conventional single four-step control method, the control of two bipolar stepper motors can be achieved.
[0028] This embodiment provides a single-four-beat control method. At any moment, only one set of coils of a motor is energized, and the two motors do not rotate simultaneously. Therefore, the timing diagram and truth table are as shown in Table 1 (the timing diagram is on the left and the corresponding truth table is on the right).
[0029] Table 1 First Timing Diagram and Truth Table
[0030]
[0031]
[0032] Note: 1 / 2 / 3 / 4 represent the order of the four beats.
[0033] In this embodiment, 4 GPIO ports and 8 MOS transistors are used to control two bipolar stepper motors. Compared with the traditional method of using 6 or 8 GPIO ports in combination with a motor driver chip, the number of occupied GPIO ports and the control cost are significantly reduced.
[0034] Embodiment 2
[0035] This embodiment provides a control circuit for bipolar stepper motors, which controls two bipolar stepper motors as a group. For one bipolar stepper motor in a group, its two sets of coils are the first coil L1 and the second coil L2 respectively, and for the other bipolar stepper motor in the group, its two sets of coils are the third coil L3 and the fourth coil L4 respectively.
[0036] It should be noted that in the control circuit of this embodiment, two bipolar stepper motors are controlled as a group, but it is not limited to only controlling two bipolar stepper motors. Based on the control circuit for a group of bipolar stepper motors, the control circuit can be replicated and extended to control multiple groups of bipolar stepper motors.
[0037] As Figure 2 shown, in the control circuit for a group of bipolar stepper motors, the first coil L1 and the second coil L2 are connected in series. The connection end of the first coil L1 and the second coil L2 in the series circuit is used as the first end A, the other end of the first coil L1 is used as the second end B, and the other end of the second coil L2 is used as the third end C; one end of the third coil L3 is connected to the second end B, the other end of the third coil L3 is connected to the third end C, one end of the fourth coil L4 is connected to the second end B, and the other end of the fourth coil L4 is connected to the first end A. Any one of the ends is connected to a GPIO port through a MOS transistor push-pull structure. The GPIO port is the GPIO port of the main chip (the chip used to control the motor, and this chip only needs to have GPIO ports, and the chip model or structure is not limited in this embodiment), and has three states: H / L / Z, where H / L / Z are high level, low level, and high impedance state respectively.
[0038] The MOS transistor push - pull structure includes an NMOS transistor and a PMOS transistor; the gates of the NMOS transistor and the PMOS transistor are connected to the same GPIO port, the drains of the NMOS transistor and the PMOS transistor are connected to the same end, the source of the PMOS transistor is connected to the power supply VCC (the power supply for driving the motor), and the source of the NMOS transistor is grounded.
[0039] In this embodiment, there are a first end, a second end, and a third end. Therefore, there are three MOS transistor push - pull structures in this embodiment, namely the first PMOS transistor Q1 and the first NMOS transistor Q4 connected to the second end B, the second PMOS transistor Q2 and the second NMOS transistor Q5 connected to the first end A, and the third PMOS transistor Q3 and the third NMOS transistor Q6 connected to the third end C.
[0040] And the gates of the first PMOS transistor Q1 and the first NMOS transistor Q4 are connected to the first GPIO port P1, the drains of the first PMOS transistor Q1 and the first NMOS transistor Q4 are connected to the second end B, the source of the first PMOS transistor Q1 is connected to the power supply VCC, and the source of the first NMOS transistor Q4 is grounded; the gates of the second PMOS transistor Q2 and the second NMOS transistor Q5 are connected to the second GPIO port P2, the drains of the second PMOS transistor Q2 and the second NMOS transistor Q5 are connected to the first end A, the source of the second PMOS transistor Q2 is connected to the power supply VCC, and the source of the second NMOS transistor Q5 is grounded; the gates of the third PMOS transistor Q3 and the third NMOS transistor Q6 are connected to the third GPIO port P3, the drains of the third PMOS transistor Q3 and the third NMOS transistor Q6 are connected to the third end C, the source of the third PMOS transistor Q3 is connected to the power supply VCC, and the source of the third NMOS transistor Q6 is grounded.
[0041] Among them, Q1 / Q2 / Q3 are selected as PMOS transistors with an on - voltage greater than the difference between the power supply VCC and the high level of the GPIO port and less than the power supply VCC, to ensure that when P1 / P2 / P3 are at high level or high - impedance state, Q1 / Q2 / Q3 are turned off, and when P1 / P2 / P3 are at low level, Q1 / Q2 / Q3 are turned on. In addition, Q4 / Q5 / Q6 are selected as NMOS transistors with an on - voltage less than the high level of the GPIO, to ensure that when P1 / P2 / P3 are at high level, Q4 / Q5 / Q6 are turned on, and when P1 / P2 / P3 are at low level or high - impedance state, Q4 / Q5 / Q6 are turned off. Because L1 and L4 are in parallel, the current flowing through Q1 / Q2 / Q4 / Q5 is twice that of Q3 / Q6.
[0042] Based on the above structure, this embodiment combines the core idea of Charlie multiplexing and uses a high configuration to turn off both switching transistors. For example, when the first GPIO port P1 is in the H state, the first PMOS transistor Q1 is turned off and the first NMOS transistor Q4 is turned on; when the first GPIO port P1 is in the L state, the first PMOS transistor Q1 is turned on and the first NMOS transistor Q4 is turned off; when the first GPIO port P1 is in the Z state, the first PMOS transistor Q1 is turned off and the first NMOS transistor Q4 is turned off; the same applies to P2 / P3. Therefore, this embodiment only requires 3 GPIOs and 6 MOS transistors. Combining the algorithm idea of Charlie multiplexing and adopting a conventional single four-step control method can realize the control of two bipolar stepper motors.
[0043] This embodiment provides a single four-step control method. Only one set of coils of two sets of coils of one motor is energized at any moment, and the two motors do not rotate simultaneously. Therefore, the timing diagram and truth table are shown in Table 2 (the left side is the timing diagram and the right side is the corresponding truth table).
[0044] Table 2 Second Timing Diagram and Truth Table
[0045]
[0046] Note: 1 / 2 / 3 / 4 represent the order of the four steps.
[0047] In this embodiment, 3 GPIO ports and 6 MOS transistors are used to control two bipolar stepper motors. Compared with the traditional method of using 6 or 8 GPIO ports in combination with a motor driver chip, the number of occupied GPIO ports and the control cost are significantly reduced.
[0048] In this embodiment, by using Charlie multiplexing to control three states of the GPIO port, three switching states of the MOS transistor push-pull structure are realized, namely switch, off-on, and off-off. By connecting the coil heads and tails and using the high-impedance state of the GPIO port, the effect that the two sets of coils are not energized simultaneously is achieved. By combining the use of the GPIO high-impedance state and the conventional control timing, the effect that the two motors do not work simultaneously is achieved. By combining the control circuit of 3 GPIOs and 6 MOS transistors and the conventional single four-step control method, the time-sharing rotation control of two bipolar stepper motors is realized. This embodiment only takes the single four-step control method as an example for illustration, and is not limited to the fact that this embodiment can only work in combination with the single four-step control method. For example, it can also be based on conventional double four-step methods, eight-step methods, or micro-step methods, etc. Under the premise of ensuring the normal operation of two bipolar stepper motors, this embodiment does not limit the control method.
[0049] It should be noted that the MOS transistor in this application can be replaced with other switching devices that achieve the same function, enabling this application to control a bipolar stepper motor with only a small number of GPIOs and switching devices, and being applicable to scenarios where the main control GPIO has weak capabilities and cost control is strict.
[0050] In this utility model, terms such as "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity or order of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of this utility model, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise specifically and clearly defined.
[0051] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as falling within the scope described in this specification.
[0052] The above-described embodiments merely represent several implementation manners of this utility model. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the utility model. It should be noted that for those of ordinary skill in the art, without departing from the concept of this utility model, several modifications and improvements can still be made, and these all belong to the protection scope of this utility model. Therefore, the protection scope of this utility model should be subject to the appended claims.
Claims
1. A control circuit for a bipolar stepping motor, characterized in that: Two bipolar stepper motors are controlled as a group, wherein the two groups of coils of one bipolar stepper motor in the group are respectively the first coil and the second coil, and the two groups of coils of the other bipolar stepper motor are respectively the third coil and the fourth coil; In the control circuit of the bipolar stepper motor, the first coil and the second coil are connected in series, the connecting end of the first coil and the second coil in the series circuit is used as the first end, the other end of the first coil is used as the second end, and the other end of the second coil is used as the third end; One end of the third coil is connected to the second end, the other end of the third coil is connected to the third end, one end of the fourth coil is connected to the second end, the other end of the fourth coil is connected to the first end or serves as an independent fourth end; Any end is connected to a GPIO port through a MOS tube push-pull structure, and the GPIO port has three states: high level, low level and high impedance.
2. The control circuit of the bipolar stepper motor according to claim 1, characterized in that: The MOS tube push-pull structure includes an NMOS tube and a PMOS tube; The gate of the NMOS tube and the gate of the PMOS tube are connected to the same GPIO port, the drain of the NMOS tube and the drain of the PMOS tube are connected to the same end, the source of the PMOS tube is connected to the power supply, and the source of the NMOS tube is grounded.
3. The control circuit of the bipolar stepper motor according to claim 2, characterized in that: The PMOS tube is a PMOS tube whose turn-on voltage is greater than the difference between the power supply and the high level of the GPIO port and is less than the power supply.
4. The control circuit of the bipolar stepper motor according to claim 2, characterized in that: The NMOS tube is an NMOS tube whose turn-on voltage is less than the high level of the GPIO port.