Sorry, I dont have one of those.
Cheers.
>
> Thanks
>
> Onur
--
Mike McCauley mi...@open.com.au
Open System Consultants Pty. Ltd
9 Bulbul Place Currumbin Waters QLD 4223 Australia http://www.open.com.au
Phone +61 7 5598-7474 Fax +61 7 5598-7070
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP,
DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS, NetWare etc.
You may want to try looking at this page I wrote: http://schmalzhaus.com/EasyDriver/Examples/EasyDriverExamples.html
The last couple examples show code that works with Step and Direction driver chips (which the A4988 is) and AccelStepper. Note that while I illustrate an EasyDriver as the driver board, you could just as well replace that with a Big Easy Driver board (based on the A4988) or Polou’s A4988 driver board, or your own A4988 circuit.
The trick is in the initial stepper object creation, to use the 1 pin driver mode, and specify the step and direction pins in the object creation.
Let us know if this doesn’t make sense-
*Brian
What Orlando means is that you need to set up AccelStepper in the 'stepper
driver' mode. This means it will control 2 output pins, one for direction and
one for step.
You will need to construct your AccelStepper something like this:
AccelStepper stepper(1, 10, 11);
the 1 means 'stepper driver' mode
10 is the pin to be used to step
101 is the pin to be used to direction
If you need to controil some other pins of the stepper driver, you will have
to do that yourself.
Cheers.
Onur,
I’m sorry that you can’t get the Easy Driver or Big Easy Driver in Turkey! The Pololu 4988 is _very_ similar to the Big Easy Driver – better in some ways, worse in others, but basically the same.
So for your missing step problem – are you finding that the shaft of the stepper motor is moving on its own when you disable the driver?
Stepper motors do NOT hold their position if you turn off the drivers. When you use ENABLE or SLEEP, it disables the drivers. So the motor will ‘freewheel’ and not hold its position anymore.
One solution to this is to add enough mechanical friction in your system so that even if the stepper motor is free to spin, your output won’t move on its own. Using a worm gear is one way to do this quite well.
The other thing that could be happening is that the microstep state machine is losing its state when you disable the driver. What happens when you use ENABLE to disable the driver is that, when you start back up again, the driver chip will always return to “full” step. In other words, if you were on microstep 7 of 16 when you disabled, when you re-enable, it will snap to either microstep 1 or microstep 16 (no way to tell which one) which are the ‘full’ step positions.
The only way to avoid this is to make sure that you only stop on ‘full’ step positions. So only move in multiple of 16 steps (if you’re using 16 microstep mode). That way you’ll always start and end on ‘full’ step positions and won’t lose microsteps when you re-enable the driver.
*Brian
From: accels...@googlegroups.com [mailto:accels...@googlegroups.com] On Behalf Of onur olce
Sent: Thursday, February 23, 2012 6:52 AM
To: accels...@googlegroups.com
Subject: Re: AccelStepper and Pololu A4988
Hi,