01 and 1 for speed.01 is really slow, but strong, and 1 is really fast, but weaker - Anything below. I built 2 functions that do the same thing, but one you tell the number of degrees to rotate (negative degrees EG -90 will rotate the oppsite direction) and the other function you tell it the number of micro steps (8 per step) to turn, and again a negative number of steps will make it rotate the other way.īoth functions accept a number between. I put together some code you can use to control the stepper with your Arduino. This basically gives you a way to only supply the motor what it needs if you could be supplying too much. This particular motor is rated at 300ma maximum. You can dial down the current on the easyDriver using the small dial on the board if needed - it can limit the current from 150ma - 750ma. If you use use a higher voltage adapter than your stepper motor is rated at (this one is 12V) you could be supplying too much current, and could damage the motor. Lastly connect the 3 wires from the "gnd", "dir", and "step" of the EasyDriver to the Arduino as shown. If your stepper is different, you can ask us in the forum/discussion area how to find the 2 pairs. Connect the stepper motor as shown to the EasyDriver - The red/green are one pair, and the blue/yellow are another. Just make sure it is rated at least 750ma - A higher rating is better, and just means it wont burn out. You need some 12V source to the EasyDriver (the motor in this article is 12V) - This will be powering the stepper - Im using a 12V adapter - similar to the one in the illustration. Only a few things need to connected to use the EasyDriver to use it with your Arduino. You don't change the amount of power to the motor to control its speed - In fact, you almost never need to change the amount of power to the motor - So just give it what it needs, and keep it that way. Unlike a typical motor, steppers actually are stronger when moving slower. Microstepping allows for smoother more accurate control, but that means that your 200 step stepper, connected to the EasyDriver needs 1600 ( 200 * 8 ) steps to make a full rotation - Just take note when you wonder why telling it to step 200 steps barely rotates the motor.īecause steppers hold their position until you tell them to "step" you can easily control their speed with some great advantages. The EasyDriver does something called micro stepping, it breaks down that minimum step into smaller micro steps, in this case 8 micro steps per step. I noticed there was a very nice Portuguese article already on the topic, but it did really describe how you connect the motor or mention speed control. And you can control them relatively easily with your arduino and some Transistors - But today I wanted to do a quick article on hooking up the EasyDriver Stepper Motor Driver sold from sparkfun, the sparkfun sold stepper motor, and your Arduino. Steppers are defined in the amount of steps, or degrees that is the minimum turn the motor can make, with 200 steps, or 1.8º motors being the most common. For this article I wont get into why, or how, but unlike typical motors, steppers are able to do all of this, and hold their position when they are not moving - You pay for this by essentially powering them at full power all the time, but you get total control in return. They are perfect for automation or any time you need a motor to turn to a specific point, at a specific speed, in a specific direction. Stepper (or step) motors are really cool.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |