I need to write a program to control a stepper motor. I'm using a 28BYJ-48 stepper with an A498 micro stepper board. I want to be able to control 1) the stepper intermittently, 2) how far the stepper motor turns in degrees (distance), 3) how fast it turns that many degrees (velocity), 4) the time delay between intermittent turns (using either a preset or a variable delay input), and 5) count how many times it is activated intermittently. Are there modules that do any of these functions already?
By modules do you mean software libraries? If so the answer is no.
That motor and that driver are not compatible.
The motor is a four phase motor, Four Phase motor
The driver is for a two phase motor, Two phase motor
Which do you want to use?
Basically there is a library for driving four phase motors but you require another type of driver. A stepping motor produces only relative movement so you can't specify an absolute angle. You program an angle by sending the number of pulses required for that angle, you work that out by the angle produced by one pulse, which in your motors case is
Stepping angle: 5.625 x 1/64
So that is 5.625 degrees per step but there is a 64 to 1 reduction gear on the end of that motor.
I would suggest you get a working setup before you worry about the rest of your questions which basically amount to calculating how fast you want to send the motor pulses which gives you the speed and how many pulses which gives you the degree of relative movement.
why do you "need", class assignment?
post the code you've written
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.