Control circuit of unipolar stepping motor

By parallel control of the coil of a unipolar stepper motor, a small number of GPIO ports and switching devices are used to solve the problem of high GPIO ports and cost in the traditional method, and efficient and low-cost motor control is achieved.

CN223052954UActive Publication Date: 2025-07-01CETHIK GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202421546245.X
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2025-07-01
Estimated Expiration
2034-07-02

AI Technical Summary

Technical Problem

The traditional unipolar stepper motor control method requires a large number of GPIO ports and expensive motor drive chips, resulting in high costs.

Method used

The coil parallel mode of two unipolar stepper motors is used to control the two motors through a small number of GPIO ports and switching devices, and the motor forward and reverse rotation are achieved using the parallel and cross-energy order of the coils.

Benefits of technology

It significantly reduces the number of GPIO ports, reduces the driving cost, and achieves efficient control of unipolar stepper motors without affecting the normal operation of the motor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN223052954U_ABST
    Figure CN223052954U_ABST
Patent Text Reader

Abstract

The utility model belongs to the field of motor control, and discloses a control circuit of a unipolar stepping motor. Center taps of four coils are connected with a power supply; the forward part of the first coil is connected with the forward part of the third coil in parallel, and the other parallel end is connected with the first GPIO port; the negative part of the first coil is connected with the positive part of the fourth coil in parallel, and the other parallel end is connected with the second GPIO port; the positive part of the second coil is connected in parallel with the negative part of the third coil, and the other end of the parallel connection is connected with a third GPIO port; the negative part of the second coil is connected in parallel with the negative part of the fourth coil, and the other end of the parallel connection is connected with a fourth GPIO port; the first GPIO port, the second GPIO port, the third GPIO port and the fourth GPIO port are GPIO ports which are partially the same or completely different. According to the utility model, the number requirement of GPIOs is greatly reduced, and the driving cost is also reduced at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The utility model belongs to the field of motor control, and particularly relates to a control circuit for a unipolar stepper motor, which is applicable to various scenarios of controlling a unipolar stepper motor by using an embedded system. Background Technique

[0002] Stepper motors are widely used in various electronic devices and can be used to control pan-tilt heads, electric lenses, etc. on cameras. Stepper motors can be generally divided into bipolar stepper motors and unipolar stepper motors. The difference between the two lies in whether the current direction of the coil is variable. A unipolar stepper motor commonly used in cameras has two sets of coils, and the center taps of the two sets of coils are connected to the power supply or ground. Therefore, only low level or high level can be applied to both ends of the coil for unidirectional control, and the coil current direction is fixed. Thus, it is called a unipolar stepper motor. By controlling the timing sequence, the forward and reverse rotations of the motor are realized. In circuit control, Darlington tubes and multi-channel motor driver chips are mostly used. The Darlington tube scheme is particularly widely used in civil scenarios. 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. Even with a simplified design, at least 6 GPIOs are required. At the same time, the price of the motor driver chip is relatively expensive. Content of the Utility Model

[0003] The purpose of the utility model is to provide a control circuit for a unipolar stepper motor, which can realize the control of the unipolar stepper motor only with a small number of GPIO ports 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 unipolar stepper motor controls two unipolar stepper motors as a group. In a group, the two sets of coils of one unipolar stepper motor are respectively the first coil and the second coil, and the two sets of coils of the other unipolar stepper motor are respectively the third coil and the fourth coil;

[0006] In the control circuit of the unipolar stepper motor, the center taps of the first coil, the second coil, the third coil and the fourth coil are connected to the power supply;

[0007] The forward part of the first coil is connected in parallel with the forward part of the third coil. One end of the parallel connection is the center tap end, and the other end is used as the first parallel end. The first parallel end is connected to the first GPIO port;

[0008] The negative part of the first coil is connected in parallel with the positive part of the fourth coil. One end of the parallel connection is the center tap end, and the other end serves as the second parallel connection end. The second parallel connection end is connected to the second GPIO port;

[0009] The positive part of the second coil is connected in parallel with the negative part of the third coil. One end of the parallel connection is the center tap end, and the other end serves as the third parallel connection end. The third parallel connection end is connected to the third GPIO port;

[0010] The negative part of the second coil is connected in parallel with the negative part of the fourth coil. One end of the parallel connection is the center tap end, and the other end serves as the fourth parallel connection end. The fourth parallel connection end is connected to the fourth GPIO port;

[0011] The first GPIO port, the second GPIO port, the third GPIO port, and the fourth GPIO port are partially the same or completely different GPIO ports.

[0012] The following also provides several optional ways, but it is not an additional limitation to the above overall solution. It is only a further supplement or preference. On the premise of no technical or logical contradiction, each optional way can be combined with the above overall solution alone, or multiple optional ways can be combined with each other.

[0013] Preferably, when the first GPIO port, the second GPIO port, the third GPIO port, and the fourth GPIO port are completely different GPIO ports, the control circuit of the unipolar stepper motor further includes four power NMOS transistors;

[0014] Among the four parallel connection ends of the first parallel connection end, the second parallel connection end, the third parallel connection end, and the fourth parallel connection end, each parallel connection end is connected to the drain of a power NMOS transistor, and the source of the power NMOS transistor is grounded. The gate of the power NMOS transistor is connected to the GPIO port corresponding to the parallel connection end.

[0015] Preferably, when the first GPIO port, the second GPIO port, the third GPIO port, and the fourth GPIO port are partially the same GPIO ports, the control circuit of the unipolar stepper motor further includes four power NMOS transistors, a signal NMOS transistor, and two resistors, and the first GPIO port and the third GPIO port are the same GPIO port, or the second GPIO port and the fourth GPIO port are the same GPIO port;

[0016] Among the two parallel connection ends that are not connected to the same GPIO port, each parallel connection end is connected to the drain of a power NMOS transistor, and the source of the power NMOS transistor is grounded. The gate of the power NMOS transistor is connected to the GPIO port corresponding to the parallel connection end;

[0017] Among the two parallel terminals connected to the same GPIO port, one parallel terminal is connected to the drain of a power NMOS transistor, and the source of the power NMOS transistor is grounded. The gate of the power NMOS transistor is connected to the corresponding GPIO port of the parallel terminal; the other parallel terminal is connected to the drain of a power NMOS transistor, and the source of the power NMOS transistor is grounded. The gate of the power NMOS transistor is connected to the drain of a signal NMOS transistor. The drain of the signal NMOS transistor is connected to the power supply through a resistor. The source of the signal NMOS transistor is grounded. The gate of the signal NMOS transistor is connected to the corresponding GPIO port of the parallel terminal, and the gate of the signal NMOS transistor is connected to the power supply through another resistor.

[0018] Preferably, when the first GPIO port, the second GPIO port, the third GPIO port, and the fourth GPIO port are partially the same GPIO ports, the control circuit of the unipolar stepper motor further includes four power NMOS transistors, two signal NMOS transistors, and four resistors, and the first GPIO port and the third GPIO port are the same GPIO port, and the second GPIO port and the fourth GPIO port are the same GPIO port;

[0019] Among the two parallel terminals connected to the same GPIO port, one parallel terminal is connected to the drain of a power NMOS transistor, and the source of the power NMOS transistor is grounded. The gate of the power NMOS transistor is connected to the corresponding GPIO port of the parallel terminal; the other parallel terminal is connected to the drain of a power NMOS transistor, and the source of the power NMOS transistor is grounded. The gate of the power NMOS transistor is connected to the drain of a signal NMOS transistor. The drain of the signal NMOS transistor is connected to the power supply through a resistor. The source of the signal NMOS transistor is grounded. The gate of the signal NMOS transistor is connected to the corresponding GPIO port of the parallel terminal, and the gate of the signal NMOS transistor is connected to the power supply through another resistor.

[0020] The control circuit of a unipolar stepper motor provided by the present utility model adopts the method of randomly connecting the coils between two motors in parallel, realizing the control of two motors by using 2-4 GPIOs, greatly reducing the requirement for the number of GPIOs, and at the same time reducing the driving cost. Description of the Drawings

[0021] Figure 1 It is the coil structure diagram of one of the unipolar stepper motors in a group of unipolar stepper motors of the present utility model;

[0022] Figure 2 It is the coil structure diagram of another unipolar stepper motor in a group of unipolar stepper motors of the present utility model;

[0023] Figure 3This is a schematic diagram of the control circuit structure of a unipolar stepper motor for a group of unipolar stepper motors according to the present utility model;

[0024] Figure 4 For the present utility model Figure 3 Schematic diagram of the circuit structure when the 4 GPIO ports in are completely different GPIO ports;

[0025] Figure 5 For the present utility model Figure 3 Schematic diagram of the circuit structure when the first GPIO port and the third GPIO port among the 4 GPIO ports are the same GPIO port;

[0026] Figure 6 For the present utility model Figure 3 Schematic diagram of the circuit structure when the second GPIO port and the fourth GPIO port among the 4 GPIO ports are the same GPIO port;

[0027] Figure 7 For the present utility model Figure 3 Schematic diagram of the circuit structure when the first GPIO port and the third GPIO port among the 4 GPIO ports are the same GPIO port, and the second GPIO port and the fourth GPIO port are the same GPIO port. Detailed implementation manners

[0028] Next, the technical solutions in the embodiments of the present utility model will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present utility model. Obviously, the described embodiments are only a part of the embodiments of the present utility model, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present utility model without creative efforts shall fall within the protection scope of the present utility model.

[0029] 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.

[0030] 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 utility model belongs. The terms used in the description of the present utility model herein are only for the purpose of describing specific embodiments and are not intended to limit the present utility model.

[0031] Embodiment 1

[0032] This embodiment provides a control circuit for a unipolar stepper motor, which controls two unipolar stepper motors as a group. As Figure 1 - Figure 2 shown, for one unipolar stepper motor in a group, the two sets of coils are the first coil L1 and the second coil L2 respectively, and for the other unipolar stepper motor, the two sets of coils are the third coil L3 and the fourth coil L4 respectively. And the coil is divided into positive and negative parts at the center tap, namely the positive part L1+ of the first coil, the negative part L1- of the first coil, the positive part L2+ of the second coil, the negative part L2- of the second coil, the positive part L3+ of the third coil, the negative part L3- of the third coil, the positive part L4+ of the fourth coil, and the negative part L4- of the fourth coil. + / - divides the coil L into two parts, and represents different current directions of the coil after a certain positive direction is specified.

[0033] It should be noted that in the control circuit of this embodiment, two unipolar stepper motors are controlled as a group, but it is not limited to only controlling two unipolar stepper motors. Based on the control circuit of a group of unipolar stepper motors, the control circuit can be replicated and extended to control multiple groups of unipolar stepper motors.

[0034] As Figure 3 shown, in the control circuit for a group of unipolar stepper motors, the center taps of the first coil L1, the second coil L2, the third coil L3, and the fourth coil L4 are connected to the power supply VCC.

[0035] The positive part L1+ of the first coil is connected in parallel with the positive part L3+ of the third coil. One end of the parallel connection is the center tap end, and the other end is used as the first parallel end A, and the first parallel end A is connected to the first GPIO port P1.

[0036] The negative part L1- of the first coil is connected in parallel with the positive part L4+ of the fourth coil. One end of the parallel connection is the center tap end, and the other end is used as the second parallel end B, and the second parallel end B is connected to the second GPIO port P2.

[0037] The positive part L2+ of the second coil is connected in parallel with the negative part L3- of the third coil. One end of the parallel connection is the center tap end, and the other end is used as the third parallel end C, and the third parallel end C is connected to the third GPIO port P3.

[0038] The negative part L2- of the second coil is connected in parallel with the negative part L4- of the fourth coil. One end of the parallel connection is the center tap end, and the other end is used as the fourth parallel end D, and the fourth parallel end D is connected to the fourth GPIO port P4.

[0039] The first GPIO port P1, the second GPIO port P2, the third GPIO port P3, and the fourth GPIO port P4 are partially identical or completely different GPIO ports. Moreover, the first GPIO port P1, the second GPIO port P2, the third GPIO port P3, and the fourth GPIO port P4 are the GPIO ports of the main chip (the chip for controlling the motor, and it is sufficient that the chip has GPIO ports; the chip model or structure is not restricted in this embodiment), and have three states: H / L / Z, where H / L / Z represent high level, low level, and high impedance state respectively.

[0040] Based on the above circuit connections, it can be seen that this application can control two unipolar stepper motors with a maximum of 4 GPIO ports. Compared with the traditional method using 6 or 8 GPIO ports, the number of occupied GPIO ports is significantly reduced.

[0041] Embodiment 2

[0042] Based on the coil connection method of Embodiment 1, in this embodiment, the first GPIO port P1, the second GPIO port P2, the third GPIO port P3, and the fourth GPIO port P4 are designed to be completely different GPIO ports. As Figure 4 shown, the control circuit of the unipolar stepper motor in this embodiment further includes four power NMOS transistors, and the power NMOS transistors are those with an on-voltage less than the GPIO high level.

[0043] Among the four parallel terminals, namely the first parallel terminal A, the second parallel terminal B, the third parallel terminal C, and the fourth parallel terminal D, each parallel terminal is connected to the drain of a power NMOS transistor, and the source of the power NMOS transistor is grounded, and the gate of the power NMOS transistor is connected to the GPIO port corresponding to the parallel terminal.

[0044] Specifically, the first parallel terminal A is connected to the drain of the first power NMOS transistor Q1, the source of the first power NMOS transistor Q1 is grounded, and the gate of the first power NMOS transistor Q1 is connected to the first GPIO port P1.

[0045] The second parallel terminal B is connected to the drain of the second power NMOS transistor Q2, the source of the second power NMOS transistor Q2 is grounded, and the gate of the second power NMOS transistor Q2 is connected to the second GPIO port P2.

[0046] The third parallel terminal C is connected to the drain of the third power NMOS transistor Q3, the source of the third power NMOS transistor Q3 is grounded, and the gate of the third power NMOS transistor Q3 is connected to the third GPIO port P3.

[0047] The fourth parallel terminal D is connected to the drain of the fourth power NMOS transistor Q4. The source of the fourth power NMOS transistor Q4 is grounded, and the gate of the fourth power NMOS transistor Q4 is connected to the fourth GPIO port P4.

[0048] The control circuit of this embodiment is based on single four-step control. Only one set of coils of the two sets of coils of a motor is energized at any moment, and the two motors do not rotate simultaneously. According to this control idea, the timing diagram and truth table are shown in Table 1. (The left side is the timing diagram, and the right side is the corresponding truth table.)

[0049] Table 1 First Timing Truth Table

[0050]

[0051] Note: 1 / 2 / 3 / 4 represents the order of the four steps. When the coils cross, the motor cannot rotate normally. Because the motor rotation requires different coils to be alternately energized. After the coils cross, two consecutive steps are for the same set of coils to conduct opposite currents before and after, so the motor will not rotate but only vibrate slightly, which does not affect the actual use (suitable for scenarios with low precision requirements).

[0052] In this embodiment, 4 GPIO ports and 4 power NMOS transistors are used to control two unipolar 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.

[0053] Embodiment 3

[0054] Based on the coil connection method of Embodiment 1, in this embodiment, the first GPIO port, the second GPIO port, the third GPIO port, and the fourth GPIO port are designed as partially identical GPIO ports. It can be that the first GPIO port and the third GPIO port are the same GPIO port, or the second GPIO port and the fourth GPIO port are the same GPIO port. At this time, the control circuit of the unipolar stepper motor further includes four power NMOS transistors, a signal NMOS transistor, and two resistors. The power NMOS transistor is a power NMOS transistor with an on-voltage less than the GPIO high level, and the signal NMOS transistor is a signal NMOS transistor with an on-voltage less than the GPIO high level.

[0055] Among the two parallel terminals that are not connected to the same GPIO port, each parallel terminal is connected to the drain of a power NMOS transistor, and the source of the power NMOS transistor is grounded. The gate of the power NMOS transistor is connected to the GPIO port corresponding to the parallel terminal.

[0056] Among the two parallel terminals connected to the same GPIO port, one of the parallel terminals is connected to the drain of a power NMOS transistor, and the source of the power NMOS transistor is grounded, and the gate of the power NMOS transistor is connected to the corresponding GPIO port of the parallel terminal; the other parallel terminal is connected to the drain of a power NMOS transistor, and the source of the power NMOS transistor is grounded, and the gate of the power NMOS transistor is connected to the drain of a signal NMOS transistor. The drain of the signal NMOS transistor is connected to the power supply through a resistor, the source of the signal NMOS transistor is grounded, the gate of the signal NMOS transistor is connected to the corresponding GPIO port of the parallel terminal, and the gate of the signal NMOS transistor is connected to the power supply through another resistor.

[0057] Specifically, as Figure 5 shown, when the first GPIO port P1 and the third GPIO port P3 are the same GPIO port (at this time, the third GPIO port P3 is connected to the first GPIO port P1), the control circuit of the unipolar stepper motor further includes a first power NMOS transistor Q1, a second power NMOS transistor Q2, a third power NMOS transistor Q3, a fourth power NMOS transistor Q4, a fifth signal NMOS transistor Q5, a resistor R1, and a resistor R3.

[0058] And the first parallel terminal A is connected to the drain of the first power NMOS transistor Q1, the source of the first power NMOS transistor Q1 is grounded, and the gate of the first power NMOS transistor Q1 is connected to the first GPIO port P1.

[0059] The second parallel terminal B is connected to the drain of the second power NMOS transistor Q2, the source of the second power NMOS transistor Q2 is grounded, and the gate of the second power NMOS transistor Q2 is connected to the second GPIO port P2.

[0060] The third parallel terminal C is connected to the drain of the third power NMOS transistor Q3, the source of the third power NMOS transistor Q3 is grounded, the gate of the third power NMOS transistor Q3 is connected to the drain of the fifth signal NMOS transistor Q5, the drain of the fifth signal NMOS transistor Q5 is connected to the power supply VCC through the resistor R1, the source of the fifth signal NMOS transistor Q5 is grounded, the gate of the fifth signal NMOS transistor Q5 is connected to the third GPIO port P3 (i.e., the first GPIO port P1), and the gate of the fifth signal NMOS transistor Q5 is connected to the power supply VCC through the resistor R3.

[0061] The fourth parallel terminal D is connected to the drain of the fourth power NMOS transistor Q4, the source of the fourth power NMOS transistor Q4 is grounded, and the gate of the fourth power NMOS transistor Q4 is connected to the fourth GPIO port P4.

[0062] The control circuit of this embodiment is based on single four-step control. At any moment, only one of the two sets of coils of a motor is energized, and the two motors do not rotate simultaneously. According to this control idea, the timing diagram and truth table shown in Table 2 are formulated. (The timing diagram is on the left and the corresponding truth table is on the right.)

[0063] Table 2 Second Timing Truth Diagram

[0064]

[0065] Note: 1 / 2 / 3 / 4 represent the order of the four steps. When the coils cross, the motor cannot rotate normally. Because the motor rotation requires different coils to be alternately energized. After the coils cross, two consecutive steps are the same set of coils conducting opposite currents before and after, so the motor will not rotate but only vibrate slightly, which does not affect the actual use (applicable to scenarios with low precision requirements).

[0066] It should be noted that Figure 5 the third GPIO port is connected to the first GPIO port as an example for illustration. In other embodiments, when the first GPIO port is connected to the third GPIO port, the circuit structures corresponding to the first GPIO port and the third GPIO port in Figure 5 are swapped, and details will not be elaborated here.

[0067] In this embodiment, 3 GPIO ports and 5 power NMOS transistors are used to control two unipolar 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.

[0068] In addition, as shown in Figure 6 , when the second GPIO port and the fourth GPIO port are the same GPIO port (at this time, the fourth GPIO port P4 is connected to the second GPIO port P2), the control circuit of the unipolar stepper motor further includes a first power NMOS transistor Q1, a second power NMOS transistor Q2, a third power NMOS transistor Q3, a fourth power NMOS transistor Q4, a sixth signal NMOS transistor Q6, a resistor R2, and a resistor R4.

[0069] The first parallel terminal A is connected to the drain of the first power NMOS transistor Q1. The source of the first power NMOS transistor Q1 is grounded, and the gate of the first power NMOS transistor Q1 is connected to the first GPIO port P1.

[0070] The second parallel terminal B is connected to the drain of the second power NMOS transistor Q2. The source of the second power NMOS transistor Q2 is grounded, and the gate of the second power NMOS transistor Q2 is connected to the second GPIO port P2.

[0071] The third parallel terminal C is connected to the drain of the third power NMOS transistor Q3. The source of the third power NMOS transistor Q3 is grounded, and the gate of the third power NMOS transistor Q3 is connected to the third GPIO port P3.

[0072] The fourth parallel terminal D is connected to the drain of the fourth power NMOS transistor Q4. The source of the fourth power NMOS transistor Q4 is grounded. The gate of the fourth power NMOS transistor Q4 is connected to the drain of the sixth signal NMOS transistor Q6. The drain of the sixth signal NMOS transistor Q6 is connected to the power supply VCC through a resistor R2. The source of the sixth signal NMOS transistor Q6 is grounded. The gate of the sixth signal NMOS transistor Q6 is connected to the fourth GPIO port P4 (i.e., the second GPIO port P2), and the gate of the sixth signal NMOS transistor Q6 is connected to the power supply VCC through a resistor R4.

[0073] The control circuit of this embodiment is based on single four-step control. Only one set of coils of two sets of coils of a motor is energized at any moment, and the two motors do not rotate simultaneously. According to this control idea, the timing diagram and truth table shown in Table 3 are formulated. (The timing diagram is on the left and the corresponding truth table is on the right.)

[0074] Table 3 Third Timing Truth Diagram

[0075]

[0076] Note: 1 / 2 / 3 / 4 represents the order of the four steps. When the coils cross, the motor cannot rotate normally. Because the motor rotation requires different coils to be energized alternately. After the coils cross, two consecutive steps are the same set of coils passing opposite currents before and after, so the motor will not rotate but only vibrate slightly, which does not affect the actual use (suitable for scenarios with low precision requirements).

[0077] It should be noted that Figure 6 the connection of the fourth GPIO port to the second GPIO port is taken as an example for illustration. In other embodiments, when the second GPIO port is connected to the fourth GPIO port, the circuit structures corresponding to the second GPIO port and the fourth GPIO port in Figure 5 are exchanged, and details will not be elaborated here.

[0078] In this embodiment, 3 GPIO ports and 5 power NMOS transistors are used to control two unipolar 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.

[0079] Embodiment 4

[0080] Based on the coil connection method of Embodiment 1, in this embodiment, the first GPIO port, the second GPIO port, the third GPIO port, and the fourth GPIO port are designed as partially identical GPIO ports, where the first GPIO port and the third GPIO port are the same GPIO port, and the second GPIO port and the fourth GPIO port are the same GPIO port. At this time, the control circuit of the unipolar stepper motor further includes four power NMOS transistors, two signal NMOS transistors, and four resistors. The power NMOS transistors are power NMOS transistors with an on-voltage less than the GPIO high level, and the signal NMOS transistors are signal NMOS transistors with an on-voltage less than the GPIO high level.

[0081] Among the two parallel ends connected to the same GPIO port, one parallel end is connected to the drain of a power NMOS transistor, and the source of the power NMOS transistor is grounded, and the gate of the power NMOS transistor is connected to the corresponding GPIO port of the parallel end; the other parallel end is connected to the drain of a power NMOS transistor, and the source of the power NMOS transistor is grounded, and the gate of the power NMOS transistor is connected to the drain of the signal NMOS transistor. The drain of the signal NMOS transistor is connected to the power supply through a resistor, the source of the signal NMOS transistor is grounded, the gate of the signal NMOS transistor is connected to the corresponding GPIO port of the parallel end, and the gate of the signal NMOS transistor is connected to the power supply through another resistor.

[0082] Specifically, as Figure 7 shown, when the first GPIO port P1 and the third GPIO port P3 are the same GPIO port (at this time, the third GPIO port P3 is connected to the first GPIO port P1), and the second GPIO port and the fourth GPIO port are the same GPIO port (at this time, the fourth GPIO port P4 is connected to the second GPIO port P2), the control circuit of the unipolar stepper motor further includes a first power NMOS transistor Q1, a second power NMOS transistor Q2, a third power NMOS transistor Q3, a fourth power NMOS transistor Q4, a fifth signal NMOS transistor Q5, a sixth signal NMOS transistor Q6, a resistor R1, a resistor R2, a resistor R3, and a resistor R4.

[0083] The first parallel end A is connected to the drain of the first power NMOS transistor Q1. The source of the first power NMOS transistor Q1 is grounded, and the gate of the first power NMOS transistor Q1 is connected to the first GPIO port P1.

[0084] The second parallel end B is connected to the drain of the second power NMOS transistor Q2. The source of the second power NMOS transistor Q2 is grounded, and the gate of the second power NMOS transistor Q2 is connected to the second GPIO port P2.

[0085] The third parallel terminal C is connected to the drain of the third power NMOS transistor Q3. The source of the third power NMOS transistor Q3 is grounded. The gate of the third power NMOS transistor Q3 is connected to the drain of the fifth NMOS transistor. The drain of the fifth NMOS transistor is connected to the power supply VCC through the resistor R1. The source of the fifth signal NMOS transistor Q5 is grounded. The gate of the fifth signal NMOS transistor Q5 is connected to the third GPIO port P3 (i.e., the first GPIO port P1). The gate of the fifth signal NMOS transistor Q5 is connected to the power supply VCC through the resistor R3.

[0086] The fourth parallel terminal D is connected to the drain of the fourth power NMOS transistor Q4. The source of the fourth power NMOS transistor Q4 is grounded. The gate of the fourth power NMOS transistor Q4 is connected to the drain of the sixth signal NMOS transistor Q6. The drain of the sixth signal NMOS transistor Q6 is connected to the power supply VCC through the resistor R2. The source of the sixth signal NMOS transistor Q6 is grounded. The gate of the sixth signal NMOS transistor Q6 is connected to the fourth GPIO port P4 (i.e., the second GPIO port P2). The gate of the sixth signal NMOS transistor Q6 is connected to the power supply VCC through the resistor R4.

[0087] In this embodiment, only 2 GPIO ports and 6 MOS transistors are required. Combining the algorithm idea of Charlie multiplexing and adopting a single four-step control method, the control of two unipolar stepper motors can be realized. For example, when the first GPIO port P1 is at H, the first power NMOS transistor Q1 is turned on, the fifth signal NMOS transistor Q5 is turned on, and the third power NMOS transistor Q3 is turned off; when the first GPIO port P1 is at L, the first power NMOS transistor Q1 is turned off, the fifth signal NMOS transistor Q5 is turned off, and the third power NMOS transistor Q3 is turned on; when the first GPIO port P1 is at Z, the first power NMOS transistor Q1 is turned off, the fifth signal NMOS transistor Q5 is turned on, and the third power NMOS transistor Q3 is turned off; the situation of the second GPIO port P2 is the same. (The core idea of Charlie multiplexing is to use the high-impedance state to turn off both switching transistors.)

[0088] The control circuit of this embodiment is based on single four-step control. 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. According to this control idea, the timing diagram and truth table shown in Table 4 are formulated. (The timing diagram is on the left and the corresponding truth table is on the right.)

[0089] Table 4 Third Timing Truth Diagram

[0090]

[0091]

[0092] Note: 1 / 2 / 3 / 4 represents the order of four beats. When the coils are crossed, the motor cannot rotate normally. Because the motor rotation requires different coils to be energized alternately, after the coils are crossed, the two consecutive beats are the same group of coils with opposite currents, so the motor will not rotate, but will only vibrate slightly, which does not affect the actual use (suitable for scenes with low precision requirements).

[0093] This embodiment uses Charlie multiplexing to control the three states of the GPIO port to achieve three switch states for the two groups of coils, namely, switch, close and close. The two groups of coils are not energized at the same time by connecting the coils end to end and using the GPIO high impedance state. The two motors are not working at the same time by combining the crossover between coils and the use of the GPIO high impedance state and the control timing. The time-sharing rotation control of two unipolar stepping motors is achieved through the control circuit of 2 GPIOs and 6 MOS tubes.

[0094] It should be noted that the MOS tube in this application can be replaced with other switching devices that achieve the same function, so that this application only requires a small number of GPIOs and switching devices to achieve the control of a unipolar stepper motor, which is suitable for scenarios where the master GPIO capability is weak and cost control is strict.

[0095] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, 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, they should be considered to be within the scope of this specification.

[0096] The above-mentioned embodiments only express several implementation methods of the utility model, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the utility model. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the utility model, which all belong to the protection scope of the utility model. Therefore, the protection scope of the utility model shall be based on the attached claims.

Claims

1. A control circuit for a unipolar stepping motor, characterized in that: Two unipolar stepper motors are controlled as a group, wherein the two groups of coils of one unipolar stepper motor in the group are respectively the first coil and the second coil, and the two groups of coils of the other unipolar stepper motor are respectively the third coil and the fourth coil; In the control circuit of the unipolar stepping motor, the center taps of the first coil, the second coil, the third coil and the fourth coil are connected to a power source; The forward part of the first coil is connected in parallel with the forward part of the third coil, one end of the parallel connection is a center tap end, and the other end is a first parallel end, and the first parallel end is connected to the first GPIO port; The negative part of the first coil is connected in parallel with the positive part of the fourth coil, one end of the parallel connection is a center tap end, and the other end is a second parallel connection end, and the second parallel connection end is connected to the second GPIO port; The positive part of the second coil is connected in parallel with the negative part of the third coil, one end of the parallel connection is a center tap end, and the other end is a third parallel end, and the third parallel end is connected to the third GPIO port; The negative part of the second coil is connected in parallel with the negative part of the fourth coil, one end of the parallel connection is a center tap end, and the other end is used as a fourth parallel end, and the fourth parallel end is connected to the fourth GPIO port; The first GPIO port, the second GPIO port, the third GPIO port and the fourth GPIO port are partially the same or completely different GPIO ports.

2. The control circuit of the unipolar stepping motor according to claim 1, characterized in that: When the first GPIO port, the second GPIO port, the third GPIO port and the fourth GPIO port are completely different GPIO ports, the control circuit of the unipolar stepping motor further includes four power NMOS tubes; Among the four parallel ends, namely the first parallel end, the second parallel end, the third parallel end and the fourth parallel end, each parallel end is connected to the drain of a power NMOS tube, and the source of the power NMOS tube is grounded, and the gate of the power NMOS tube is connected to the GPIO port corresponding to the parallel end.

3. The control circuit of the unipolar stepping motor according to claim 1, characterized in that: When the first GPIO port, the second GPIO port, the third GPIO port and the fourth GPIO port are partially identical GPIO ports, the control circuit of the unipolar stepping motor further includes four power NMOS tubes, one signal NMOS tube and two resistors, and the first GPIO port and the third GPIO port are the same GPIO port, or the second GPIO port and the fourth GPIO port are the same GPIO port; Of the two parallel ends that are not connected to the same GPIO port, each parallel end is connected to the drain of a power NMOS tube, and the source of the power NMOS tube is grounded, and the gate of the power NMOS tube is connected to the GPIO port corresponding to the parallel end; Of the two parallel ends connected to the same GPIO port, one of the parallel ends is connected to the drain of a power NMOS tube, the source of the power NMOS tube is grounded, and the gate of the power NMOS tube is connected to the GPIO port corresponding to the parallel end; the other parallel end is connected to the drain of a power NMOS tube, the source of the power NMOS tube is grounded, the gate of the power NMOS tube is connected to the drain of the signal NMOS tube, the drain of the signal NMOS tube is connected to the power supply through a resistor, the source of the signal NMOS tube is grounded, the gate of the signal NMOS tube is connected to the GPIO port corresponding to the parallel end, and the gate of the signal NMOS tube is connected to the power supply through another resistor.

4. The control circuit of the unipolar stepping motor according to claim 1, characterized in that: When the first GPIO port, the second GPIO port, the third GPIO port and the fourth GPIO port are partially identical GPIO ports, the control circuit of the unipolar stepper motor further includes four power NMOS tubes, two signal NMOS tubes and four resistors, and the first GPIO port and the third GPIO port are the same GPIO port, and the second GPIO port and the fourth GPIO port are the same GPIO port; Of the two parallel ends connected to the same GPIO port, one of the parallel ends is connected to the drain of a power NMOS tube, the source of the power NMOS tube is grounded, and the gate of the power NMOS tube is connected to the GPIO port corresponding to the parallel end; the other parallel end is connected to the drain of a power NMOS tube, the source of the power NMOS tube is grounded, the gate of the power NMOS tube is connected to the drain of the signal NMOS tube, the drain of the signal NMOS tube is connected to the power supply through a resistor, the source of the signal NMOS tube is grounded, the gate of the signal NMOS tube is connected to the GPIO port corresponding to the parallel end, and the gate of the signal NMOS tube is connected to the power supply through another resistor.