Using shift register as stepper motor drive circuit
Source: InternetPublisher:张小哥 Keywords: Motor drive circuit Updated: 2024/08/01
The internal structure of the stepper motor is shown in Figure 1:
How can we make it rotate? There are two ways:
1. Single-phase drive: one phase one phase drive, the order of coil high level is: yellow, blue, red, orange; or: orange, red, blue, yellow. Black and white are grounded.
2. Two-phase drive: When the motor is required to output high power, it can be driven by two phases at the same time. The order of increasing the coil level is: yellow + red, blue + orange; or: orange + blue, red + yellow.
After understanding the driving method of the stepper motor, I thought of using a shift register to generate shift pulses to make the stepper motor move. The circuit is shown in Figure 2.
Figure 2 shows that the DIP switch controls 74LS194 to make Q0, Q1, Q2, and Q3 generate the two shift pulses mentioned above to control U1 (photocoupler). The photocoupler is used to isolate the power supply of the control circuit from the power supply of the motor to reduce mutual interference. Of course, it can also be replaced by a thyristor. R3~R6 are ordinary resistors of 1~10k, and 1k is used in this example. DSL is connected to Q0 to form a circular left shift, and DSR is connected to Q3 to form a circular right shift. This connection can achieve circular left and right shifts and thus achieve forward and reverse rotation.
The usage of 74LS194 is as follows:
In order for 74LS194 to work, a pulse signal is also required. The pulse signal of CLK can be generated by the time base circuit 555. The circuit is shown in Figure 3.
Adjusting R1 can change the period of the output pulse and thus change the speed of the motor. Of course, such control is not very precise. If you want to adjust it precisely, you can use a single-chip microcomputer to control it. Just connect P0, P1, P2, P3, SO, S1, MR, LCK to the IO port of the single-chip microcomputer (such as P1 port) to generate the pulse with timing.
In order to provide a sufficiently large current, a driving circuit must be added, as shown in Figure 4.
After connecting according to the above circuit diagram, you can debug. After connecting the power supply, use the DIP switch to control the operation of the motor. First, set the number. For example, for single-phase drive, you can set the preset number 0001 (that is, P3 is set to 0, P2 is set to 0, P1 is set to 0, and P0 is set to 1). Then S1 and S2 are set to 1 at the same time to send the preset number. Next, you can change the left and right shifts of the pulse by changing the state of S1 and SO, thereby changing the forward and reverse rotation of the motor. If 10 is forward rotation, 01 is reverse rotation. When there is no problem with forward and reverse rotation, you can change the speed of the motor by adjusting R1 in Figure 3. When connecting motors of different powers, you can change the +12V power supply (increase or decrease), but it is worth noting that the current should not exceed the maximum operating current of the transistor. TIPl27 is a PNP Darlington tube, which can provide a maximum current of 5A. R5, R6, R7, and R8 are common resistors, 1 to 10k, which can be adjusted by yourself. 1k is used in this example. R9, R10, R11, and R12 are high-power current-limiting resistors, with a power of 2 to 3W and a resistance of 2 to 22 ohms. 22 ohms is used in this example. D1, D2, D3, and D4 are designed to protect transistors, and can provide a discharge path for the induced potential when the power is off. I made the above circuit myself, and the effect is good. It can drive stepper motors of different models and powers, and easily achieve forward and reverse control and speed adjustment.
If you want to adjust the speed precisely, you can use a single chip microcomputer to achieve it. Just remove the 555 time base oscillation circuit and change Figure 1 to Figure 5.
The control principle is the same as above, which is to improve the accuracy, expand the adjustment range, and is relatively simple to use. The programming of this circuit is also relatively convenient, so I will not introduce it in detail here. When making the circuit, you can leave P0, P1, P2, P3, SO, S1, MR, LCK ports on the circuit board, so that it can not only be controlled by the switch, but also easily connected to the microcontroller.
- Analysis of the working principle of car garage door lights
- Model rocket launch controller circuit
- DIY an electromagnetic levitation device
- Introduction to the internal structure of the Delta winding motor
- Replace the GE LOGIQ a200 ultrasound measurement key with a self-made touch switch
- Methods for Eliminating Noise of Brushed DC Motors
- Simple three-phase motor phase loss protection circuit
- Amplitude and phase detection leakage protection device designed and manufactured using PIC16C711A
- Guanghua brand anti-theft doorbell electronic lock circuit
- Large range laser burglar alarm
- Rural fish farming control circuit
- Multi-channel patrol detection control circuit b
- Photocell trigger control circuit
- time control circuit
- 24h automatic switching capacitor control circuit
- Photoelectric output control circuit
- Photoelectric detection output control circuit
- Automatic sprinkler irrigation control circuit
- Forward and reverse control circuit of micro DC motor a
- Temperature measurement and control circuit