[PD] motor control interfacing
fbar at footils.org
Mon May 19 12:01:16 CEST 2008
Max Neupert hat gesagt: // Max Neupert wrote:
> i want to control two motors (pan&tilt). i looked into several
> options and this seems a good start:
> together with the arduino.
> i need a very smooth movement, so steppers from floppy drives seem a
> good option.
> has anyone tried the motor shield? other suggestions?
As you want to control only two motors, a simple circuit based on a
darlington array is enough provided you use a unipolar stepper.
Darlington arrays are *very* cheap: 0.15 Euro for a ULN2004 at
Reichelt. You don't need to buy a full motor shield then, just some
wires and maybe a Zener diode for protection against induction. An
example circuit is here:
http://www.doc.ic.ac.uk/~ih/doc/stepper/control2/connect.html or with
Arduino control here:
If you use something like Firmata instead of custom motor driver code,
you should be able move the stepper by sending the appropriate
sequences to the darlington pins in turn, for example:
[1 0 1 0(
[0 1 1 0(
[0 1 0 1(
[1 0 0 1(
[unpack 0 0 0 0]
| | | |
p0 p1 p2 p3 <== to Arduino pins
Of course the sequence depends on your motor type. Drive it with a
modulo-4 accumulator/counter sent to [select 0 1 2 3] to select the
correct activation step.
Frank Barknecht _ ______footils.org__
More information about the Pd-list