Stepper motors are controlled by pulse signals. They are generally used to generate a certain frequency pulse (the pulse frequency is used to control the speed), and the signal is isolated and amplified (to reach the voltage of the drive motor) to drive and control the stepper motor.
The single-chip + fully integrated stepper motor driver chip can be used for the whole application, which is relatively simple and convenient to control. It can be combined with an ordinary 51 MCU like AT89C2051 or STC12C1052 + THB7128 or THB6064. The MCU determines the number of pulses to be output according to the input, and the stepping motor drives the chip to convert into a power signal to drive the stepping motor. Because it is a pulse to go one step, the number of pulses output should also take into account the problem of the number of subdivisions. The program of fixed rotation steps and angles is still relatively easy to edit. Like a 1.8-degree stepper motor, when it is subdivided, it takes 400 pulses to make one turn, 200 pulses for a half turn, only 100 pulses for 90 degrees, and so on.
Regarding the program, fix an appropriate frequency, the button triggers the start timer, then inverts an IO port for pulse output in the timer interrupt, and then puts an accumulated variable to calculate, counts the number of pulses, and reverses the output twice. The pulse, in the main program, sets a required number of pulses as a condition to control the opening and closing of the timer, and then the loop wait condition satisfies the demand.
The problem to be aware of is that if you want to integrate control, drive, and stepper motors, it is more troublesome, small motors are good, and large motor interference is a problem.
16L Agriculture Drone,Farm Fumigation Drone,Agricultural Sprayer Uav,Agriculture Drone
Xuzhou Jitian Intelligent Equipment Co. Ltd , https://www.jitianintelligent.com