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 ?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #10532
    Anonymous
    Inactive

    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 2

    and 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 !

    #10533
    Anonymous
    Inactive

    Found 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 ?

    #10534
    Dan
    Keymaster

    The 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.

    #10581
    Anonymous
    Inactive

    Hi Sonoff – How did this work out any luck speeding things up?

    #10656
    tjhawkey
    Participant

    I 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.

    #10659
    Dan
    Keymaster

    single 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.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.