Close



Results 1 to 10 of 55

Threaded View

  1. #5
    Staff Engineer printbus's Avatar
    Join Date
    May 2014
    Location
    Highlands Ranch, Colorado USA
    Posts
    1,437
    Add printbus on Thingiverse
    INCREASING THE Z HOMING FEEDRATE
    One change that I made to my Marlin that seems to be holding up is to increase the HOMING_FEEDRATE for Z from the MakerFarm default of 50mm/min to 120mm/min. This was driven by a desire to decrease the amount of time waiting for Z to home, especially when I wasn't simultaneously waiting for the heat bed to warm up. At the 50mm/min default, a full-scale home on a 200mm printer takes 4 minutes, and a 300mm printer will take 6 minutes if they use the same rate. At the higher setting, full scale Z home should be 1 min 40 seconds on a 200mm printer and 2-1/2 minutes on a 300mm printer. One way to look at it is that this change simply brings the HOMING_FEEDRATE for Z up to the same value for Z in MakerFarm's DEFAULT_MAX_FEEDRATE (which is 2mm/sec, or 120mm/min).

    To come up with a new setting, I simply experimented with different values for the feedrate. Applying some finger pressure to one of the Z-rod couplers, I determined that Z-motor would start skipping pretty easily if I went above around 150mm/min. So, I simply backed off a bit and went with 120mm/min. Note that this is with the "run hot" style 9.5V motors, not the motors being provided in newer kits. I believe the stepper driver was set to the MakerFarm spec, but like I think clough42 also stated, I'm not sure the 9.5V motors ever put the stepper driver into a situation where the current limit setting comes into play since the high coil resistance of the 9.5V motors provide a lot of current limit all by themselves.

    FOLLOWUP COMMENT: Make sure testing is performed while driving the Z-axis upwards, where the weight of the x-carriage puts more load on the Z motors. Those that care to experiment will find you can drive the x-carriage lower a lot faster than you can upwards.

    There is a consideration that goes along with this setting. For each axis, the homing process consists of three movements. For Z, the first movement brings the nozzle down at the HOMING_FEEDRATE until the Z endstop switch activates. The second movement raises the nozzle back off the bed some distance at that same feed rate. The third movement involves moving the nozzle back down towards the bed to activating the endstop again, but at a slower rate (default is HOMING_FEEDRATE/2) presumably to improve the accuracy of the homing process. I ran my printer with a Z HOMING_FEEDRATE of 100mm/min and a proportionally higher rate for the third homing movement for months with no Z height issues observed. When I recently increased the setting to 120mm/min, I went into homeaxis() in marlin_main.cpp and changed the feed rate ratio for that third movement from /2 to /4 simply as a way to slow the movement down closer to what it was originally. The homing feed rate also factors into probe and sled movements for bed leveling. I can't speak to what effect the increase in homing feed rate would have on those actions. My personal opinion is that something like a leveling_feedrate should have been defined to use instead of using the homing feed rate so extensively.

    I saw no need to increase the HOMING_FEEDRATE for X or Y from the default of 100*60 mm/min. The same homeaxis() code is used on X, Y and Z, and I saw no harm in also slowing down the third homing movement for X and Y. They happen in a flash anyway on X and Y, and slowing down that third leg of movement is probably good for the result.

    EDIT: A non-ABL version of homeaxis() from marlin_main.cpp is shown here. Look for the feedrate = homing_feedrate[axis]/2 line and change it to /4 or whatever you want. I use the ABL baseline even though I don't have ABL. The same lines of code are still in the ABL version of marlin_main.cpp, but they're harder to find since the code is all chopped up by ifdefs related to ABL.

    Code:
    static void homeaxis(int axis) {
    #define HOMEAXIS_DO(LETTER) \
      ((LETTER##_MIN_PIN > -1 && LETTER##_HOME_DIR==-1) || (LETTER##_MAX_PIN > -1 && LETTER##_HOME_DIR==1))
      if (axis==X_AXIS ? HOMEAXIS_DO(X) :
          axis==Y_AXIS ? HOMEAXIS_DO(Y) :
          axis==Z_AXIS ? HOMEAXIS_DO(Z) :
          0) {
        current_position[axis] = 0;
        plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
        destination[axis] = 1.5 * max_length(axis) * home_dir(axis);
        feedrate = homing_feedrate[axis];
        plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
        st_synchronize();
       
        current_position[axis] = 0;
        plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
        destination[axis] = -home_retract_mm(axis) * home_dir(axis);
        plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
        st_synchronize();
       
        destination[axis] = 2*home_retract_mm(axis) * home_dir(axis);
        feedrate = homing_feedrate[axis]/2 ;   <---- EDIT HERE
        plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder);
        st_synchronize();
       
        axis_is_at_home(axis);     
        destination[axis] = current_position[axis];
        feedrate = 0.0;
        endstops_hit_on_purpose();
      }
    }
    Last edited by printbus; 06-16-2015 at 12:36 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •