Easy Driver
Examples
Sample code and projects to get your stepper
running!
Description:
Lots
of folks buyEasyDriversorBigEasyDriversand
then get them to work just fine in their project. But some don't,
and so I thought it would be a good idea to write down some simple
instructions for getting your Easy Driver working as quickly and
easily as possible.
All
of these examples are going to be done with my Easy Driver and Big
Easy Driver stepper motor driver boards driving several different
random stepper motors I have lying around the lab. I will be
generating the step and direction pulses with
anArduino
UNOand
achipKIT
UNO32,
although all of these examples should work with any Arduino or
Arduino clone or Arduino compatible (like all chipKIT
boards).
And
don't forget to read Dan Thompson's
excellentEasy
Driver tutorial blog postif
you want to read more up on this stuff. Some great questions
answered in the comments on that blog post.
Note1:
All examples will work equally well with Easy Drivers or Big Easy
Drivers.
Note2:
All examples will work on Arduino as well as chipKIT boards (and
some will run much better on chipKIT because of the PIC32
speed)
Note3:
All examples show a barrel jack for power input - you need to
supply power to the EasyDrivers somehow, but it doesn't need to be
a barrel jack. You should have a power supply that can output some
voltage between 5V and 30V, at 1 Amp or more.
Example 1:
Basic Arduino setup
This
is the most basic example you can have with an Arduino, an Easy
Driver, and a stepper motor. Connect the motor's four wires to the
Easy Driver (note the proper coil connections), connect a power
supply of 12V is to the Power In pins, and connect the Arduino's
GND, pin 8 and pin 9 to the Easy Driver.