Hello, i jut bought a bipolar stepper motor and was wondering how to program it, but first how to wire it either with a driver or an hbridge.
What is the resistance of the motor windings and the rated current or rated voltage?
You need a stepper motor driver board that is suitable for your motor. An example is the Pololu A4988 with lots of advice on the Pololu web page. However that particular driver may not suit your motor.
Do not bother with h-bridge driver boards that are intended for regular DC motors.
...R
Thank you, I found a board that works with my motor but I still dont know how to code for it.
If you can't program it, how do you know that the board works for your motor?
I looked up which driver works for motor I have, could someone please help me with the programming.
You will need to find a library that corresponds to your motor driver board, assuming there is one. This page (http://www.intorobotics.com/tutorials-and-resources-to-control-stepper-motor-with-arduino-board/) has a lot of links to different motor driver boards/shields so if yours is there see if you can find a link to a suitable library to use.
If there happens to be no library you will have to delve into the data sheet for your driver board and determine how to interface with it and write the code to do so.
Thank you very much, its turns out I can control a stepper motor quite easily with a hbridge.
isaac868:
Thank you very much, its turns out I can control a stepper motor quite easily with a hbridge.
See Reply #2
A h-bridge does not allow you to drive a stepper motor with high voltages because the h-bridge doesn't have the smarts to limit the current. If you only use the voltage that equates to the max allowable current for the motor you will discover that it won't run very fast because the inductance of the coils prevents it reaching its max current as it moves faster. The proper stepper motor drivers can drive a nominally 5v motor with 30v or more. For example the A4988 driver has a potentiometer that you adjust to set the max current to match the motor.
...R
Which motor are you using?
I found this interesting http://arduino-info.wikispaces.com/SmallSteppers and I have another post for code that works with a particuar motor, try [Solved] Example stepper sketches and 28BYJ-48 motor with ULN2003 Board - #5 by RMurphy195 - Motors, Mechanics, Power and CNC - Arduino Forum or searching for "Example stepper sketches and 28BYJ-48 motor with ULN2003 Board".