Custom bot with NEMA 17 steppers : how to inscrease micro steps ?
Shop › Forum › Makelangelo Polargraph Art Robot › Custom bot with NEMA 17 steppers : how to inscrease micro steps ?
- This topic has 5 replies, 4 voices, and was last updated 8 years, 3 months ago by Dan.
-
AuthorPosts
-
2016-08-17 at 09:07 #10532AnonymousInactive
Hi Dan,
I have a custom draw bot with Arduino UNO + adafruit motorshield V2 + 2x NEMA 17 stepper motors.
I downloaded Firmware V1.4.0 and changed it a little bit :
//#define MOTHERBOARD 1 // Adafruit Motor Shield 1
#define MOTHERBOARD 2 // Adafruit Motor Shield 2and in line 54 (NEMA 17 are 200 steps per turn):
#define STEPPER_STEPS_PER_TURN (200.0)I uploaded successfully this firmware on my arduino board.
I downloaded Makelangelo software V7.7.1 and it launches successfully.
However when drawing a basic zigzag picture, my motors make a high-pitch noise and the movement is VERY SLOW. Like tiny steps.
I launched the Adafruit “stepper test” as explained here. Motor turns correclty, but while :
Serial.println("Single coil steps"); myMotor->step(100, FORWARD, SINGLE); myMotor->step(100, BACKWARD, SINGLE);
works fine,
Serial.println("Microstep steps"); myMotor->step(50, FORWARD, MICROSTEP); myMotor->step(50, BACKWARD, MICROSTEP);
leads to the same high-pitch noise than using Makelangelo software ! I concluded that makelangelo software uses “too small” microsteps, leading to high pitch noise and slow movement.
What should I modify in Makelangelo firmware ?
Thanks a lot !
2016-08-17 at 09:40 #10533AnonymousInactiveFound these lines in Firmware :
#if MOTHERBOARD == 2 #define M1_ONESTEP(x) m1->onestep(x,MICROSTEP) #define M2_ONESTEP(x) m2->onestep(x,MICROSTEP) #endif
Should I change to :
#if MOTHERBOARD == 2 #define M1_ONESTEP(x) m1->onestep(x,INTERLEAVE) #define M2_ONESTEP(x) m2->onestep(x,INTERLEAVE) #endif
or will it have unexpected behaviour ?
2016-08-17 at 14:09 #10534DanKeymasterThe AMS2 uses 1/16th microstepping, the maximum. If you feel it is too much you’re welcome to change to SINGLE or INTERLEAVE, which should increase the step size for faster drawing at lower precision.
I can’t guarantee that either one will work with the changes I made to AFMotorDrawbot. I only officially support the kit we make and sell. I may have made optimizations that only work with MICROSTEPPING.
2016-08-22 at 09:38 #10581AnonymousInactiveHi Sonoff – How did this work out any luck speeding things up?
2016-08-27 at 16:28 #10656tjhawkeyParticipantI just tried this change and it’s pretty clear that I don’t fully understand what’s happening.
I expected the gondola to move faster (of course), and maybe try to draw twice as large.
The faster is true, but the larger seems like much larger if I put in “interleave” or “single” in the firmware.
Even asking for a 100 mm move, moves the gondola beyond the range of my servo umbilical.
I will retest with a 10 mm move and see if I can understand the scaling.I’m also going to buy bigger pulleys (currently using 20 T). That’s a clean way to get more speed (again with some assumed loss of accuracy). Right now, I can draw on 450 mm x 600 mm paper really well with the microstepping, but it takes several hours to do a portrait.
2016-08-27 at 17:30 #10659DanKeymastersingle moves one full step instead of 16 microsteps. If you change to single you also have to change
#define MICROSTEPPING_MULTIPLIER (16.0)
to 1.
for half, 2.
for interleave, iirc that’s 1/8 stepping so the value should be 8. -
AuthorPosts
- You must be logged in to reply to this topic.