I have my microstep driver set to 1600 pulses per rev. I'm driving a stepper motor and using the command moveTo(distance). What I have noticed is that it seems to take 6400 steps to complete a revolution as opposed to 1600? Do I have a hardware problem or is there a good explanation for this?
What stepper? What driver? Post links to their data sheets, please.
Can you show a photo of the microstep setting device (switches, jumpers, ... )?
Post your test code. Please post the test code. Read the forum guidelines to see how to properly post code and some good information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.
// Define a stepper and the pins it will use AccelStepper stepper(2,7,6);
int i;
const int buttonPin = 2; int val = HIGH; int old_val = HIGH; int buttonstate = HIGH; unsigned long previousMillis; int stepone = 25600; // four revs at 6400 pulses (microstep driver setting at 1600)
Okay so that solved my speed issues (mode switched from 2 to 1), and revolution issues except I'm getting 2.5 extra laps (desired 16, getting about 18.5). My moveTo numbers checkout, but positive moveTo distance outputs CCW and negative moveTo distance outputs CW. So I switched the sign to all my moveTo distances. Now just have to figure out where those extra 2.5 laps are coming from on CCW direction.