Sunday, 24 July 2011

Y Axis works!

Thought I'd kick things off this evening by connecting up the Y-axis motor and writing a short sketch to drive the stepper back and forth a few times - simple right? Wrong.

Connecting the stepper was easy enough, writing the sketch was easy enough - but would the motor move - oh, no... not a chance. So, having traced pin assignments, double-checked code, read through the Sprinter firmware, several tutorials on adruino/stepper combos, fiddling with Pololu driver current and finally rebuilding the connector for the motor, I finally found the issue.

*drum roll*

The Pololu enable pins are inverted - low to enable, not high! In my haste to write that little sketch, I missed that little fact and have summarily wasted the rest of the evening - smeg. On the up side, I found this little tutorial on assembling servo connectors:

Which helped a great deal, as it turns out my first attempt was a criminal bodge compared to how it should be done - I'm sure I used to know how to do this stuff, but apparently it's been too long.

Having got the enable pin the right way round, everything works perfectly. I even took a few minutes to make the sketch accelerate the motor at the beginning/end of each move just for kicks... makes the motor sing a little tune as it moves :)

Now I'm knackered, so must sleep and will have to wait another day to get the rest of axes wired :(

PS - will youtube a video tomorrow and post the sketch in case anyone else might find it useful

No comments:

Post a Comment