Trav,
You are correct, it should be _exactly_ 1600 steps/mm. If you have to do more steps to get to 1mm, then it means you are probably missing steps somewhere (meaning the UNO told the BED to take a step, and the stepper motor didn’t actually move forward by 1 step, but probably jumped back.) This can be caused by a number of things. The first of which is an incorrectly set current adjustment pot.
Here’s what I’d do. Set up a test that will allow you to run some nice number of mm (say 100 – should be 160000 steps). Then run the motor nice and slow (say 100 steps/second) to make sure that speed isn’t causing the issue. Run it back and forth along the 100mm a couple time, and see if you get exactly 100mm of travel each time. If not, try adjusting the current adjust pot slightly one way or the other (SparkFun sometimes changes the pot on the board, so you can’t trust the silk screen’s arrow for MAX direction), then run the test again. If you get it working, then start running faster. You’ll find a set of current and speed that cause you to miss steps – back off from that by some margin.
Make sense? You should be able to achieve exactly 1mm=1600 steps by tuning it this way.
*Brian
Brian Schmalz
// Principal Embedded Systems Engineer |
product development services
Logic PD
T //
612.436.5134
NOTICE: Important disclaimers and limitations apply to this email.
Please see this web page for our disclaimers and limitations:
--
You received this message because you are subscribed to the Google Groups "accelstepper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
accelstepper...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Trav,
In that case, if it’s repeatable, it would seem like the motor is in fact stepping exactly 1600 steps, but something else is wrong. Could the lead screw not be exactly 200 steps/mm? Is there any way? I’ve never heard of a lead screw being off like that. Are you sure it’s not backlash? Could you change your measurement so that you travel in one direction to distance zero, then reverse direction and travel to distance 1mm and start your 10mm measurement, then take 16000 steps, (you would then be at 11mm from zero) and repeat the measurement? (I.e. both start and end measurements are coming from the same direction – without a reverse in between – thus eliminating backlash as a source of error)
*Brian
--
#include <AccelStepper.h>
AccelStepper stepper1(1, 4, 7);
int pos1 = 1600;
void setup()
{ stepper1.setMaxSpeed(100);
stepper1.setAcceleration(100);
}
void loop()
{if (stepper1.distanceToGo() == 0)
{delay(3000);
pos1 = -pos1;
stepper1.moveTo(pos1);
}
stepper1.run();
Trav,
On first pass, I don’t see anything that you’re doing wrong. Looks like you’ve taken everything into account quite well.
One way to see if you really are missing steps somewhere would be to put an indicator on the shaft of the stepper motor, then execute exactly one revolution (1600 steps), and make sure that the indicator lines up exactly where it was when you started. You can check this (one rev at a time) across the whole distance you want to move. Either the indicator will be off (indicating lost steps) or it will be dead on, indicating no lost steps.
That’s the next test I’d do. Make sure that the problem really is lost steps.
If you can confirm that the motor is losing steps every revolution, then the BED is either not getting exactly 1600 rising edges on the step input, or it is getting those pulses but it’s not taking every step.
Another thing to try, if possible, is to use a higher voltage power supply, like 24V. If the BED is having trouble making individual micro-steps, raising the input voltage gives you more room to create the microsteps.
I don’t think that the power supply going to the Arduino should make much difference at all – if it’s spitting out 0V to 5V pulses (Which it seems it is) then you should be fine there.
*Brian
Brian Schmalz
// Principal Embedded Systems Engineer |
product development services
Logic PD
T //
612.436.5134
NOTICE: Important disclaimers and limitations apply to this email.
Please see this web page for our disclaimers and limitations:
http://logicpd.com/email-disclaimer/
Trav,
I’m _super_ glad you got to the bottom of it – at least you know exactly what the problem was. Total bummer that it took so long though.
Glad to hear it wasn’t a problem with the driver or library. J
*Brian
From: accels...@googlegroups.com [mailto:accels...@googlegroups.com]
On Behalf Of trav
Sent: Sunday, February 17, 2013 9:59 AM
To: accels...@googlegroups.com
Subject: [accelstepper] Re: Steps per mm troubles
and the winner is..... "the gauge is crap!"
--