Hi, i’m trying to control a bipolar stepper motor with Basic Atom and the A1 Hbridge from Acroname(attached is the pinout for that)
I used the “Stepper” but the motor only vibrates and doesn’t actually step/
How would i control the Torque,single step, half step of the motor?
is there any sample code i could use?
Things can’t be “attached” to posts like they would be to emails.
They must be embedded, using the buttons above the post box editor.
::scratches head::
I’m afraid that I have no experience with steppers.
But, I had previously thought that steppers needed a special stepper controller.
For all I know, though, you’re approach may be perfectly normal.
Come to think of it, I think Topher was selling steppers on this forum.
Perhaps he’ll be able to help.
Basics: A bipolar stepper drive requires two full h-bridges, one for each phase. Typicaly the windings are labeled A and B for the first phase and C and D for the second. A and B outputs are inverted with respect to each other, as are C and D. For a full step sequence, A leads or lags C by 90 degrees depending on if you are rotating clockwise or counter-clockwise. There are fairly standard half and quarter step algorythms, or you buy a microstepping controller which controls the current in each phase using an approximated sine / cosine wave. This gives much smoother operation because a full “step” is divided into many smaller steps.
Less basic: Now I say approximated sin / cosine because advanced algorythms can take torque compensation into consideration or even read the back-emf of the winding to “tune” the operation even better. Most stepper motors experience a resonance problem when full stepped, typically somewhere in the region (sometimes at more than 1 frequency) from 25 to 250 or so Hz. Long winded to fully explain but it has to do with harmonics of the steping frequency and mechanical resonance frequencies within the motor. This is where the ability to use half or even quarter stepping becomes important unless you can just avoid operating in that step range altogether. When being half stepped only one motor phase is active half of the time so you get a net torque loss in those regions where you are half stepping to avoid resonance problems. The solution is to add torque compensation by driving that 1 active phase at a higher current. Unfortunately I forget the ratio but I am sure you will find it when you reasearch half step torque compensation techniques on google. 
Perhaps in lieu of the un-attached data sheet you could just supply a part number or link to where the data sheet is available.
Oh, by the way, you usually need to ramp a stepper motor up. Frequently there will be some minimum step rate you can start at but it is really dependent on your entire system. If you did not ramp it and your sequences are coming out correctly then odds are good that is why it is sitting there vibrating.
i managed to make it work, so thanks for all the help guys.