The setting you are looking for are in the configuration.h
I'm on a PC with no Marlin atm So here is a link to the github version (it might be the nightly/unstable version, You probably have the stable version, I'm bad with github. It's close enough for this example)
[
github.com]
Around line 736 is where you want to look. Its a bit past halfway down. It looks like this. You could also [ctrl]+F to bring up a search dialog and enter // MOVEMENT SETTINGS That should take you straight there. provided you are in config.h when you search..
#if ENABLED(Z_SAFE_HOMING)
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28).
#endif
// Homing speeds (mm/m)
#define HOMING_FEEDRATE_XY (50*60)
#define HOMING_FEEDRATE_Z (4*60)
//
// MOVEMENT SETTINGS
// @section motion
//
// default settings
#define DEFAULT_AXIS_STEPS_PER_UNIT {80,80,4000,500} // default steps per unit for Ultimaker
#define DEFAULT_MAX_FEEDRATE {300, 300, 5, 25} // (mm/sec)
#define DEFAULT_MAX_ACCELERATION {3000,3000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for Skeinforge 40+, for older versions raise them a lot.
#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 3000 // E acceleration in mm/s^2 for retracts
#define DEFAULT_TRAVEL_ACCELERATION 3000 // X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
// The speed change that does not require acceleration (i.e. the software might assume it can be done instantaneously)
#define DEFAULT_XYJERK 20.0 // (mm/sec)
#define DEFAULT_ZJERK 0.4 // (mm/sec)
#define DEFAULT_EJERK 5.0 // (mm/sec)
//=============================================================================
This line is the bigest problem
#define DEFAULT_MAX_ACCELERATION {3000,3000,100,10000}
change 100 to something much lower. 5 or less. Some people run as low as 0.5! I'm still learning how Acceleration works so can only offer limited help here. I am running 5 and thinking I may need to turn it down.
If the acceleration is too high your motors can overshoot. If you cave current adjustment (like the philps head trimpot on A4988 stepper drivers) it may pay to make sure its set right too. Too much current may also cause overshoot. I had both problems at one point!
I dial in my current using pronterface. I set Z speed to 250 and tell it to go up or down 100mm and adjust current till it starts sounding bad (low pitch) and stalling, then turn it back up till its sounding better (mid-high pitch) and not stalling. I also like to check the driver boards temp while doing this. If its over 80-100c you need a fan or heatsink, or you should lube your lead-screws.. I'm running current just over halfway and it sits around 70-80c, which is boarderline, I need a fan before summer gets here (Australia)
If you home mid print and it goes back up too far. It could be acceleration. Although I wouldn't think it would go as far as you are describing.
I'm thinking you may want to look for Z offset. There are a few places you can tell the printer to offset an axis a set distance from home before it prints anything.
There are offset setting in the printer tab of slic3r. Probably not your problem if various slicing programs do the same thing.
You can check to see if there is Z ofset in the firmware using pronterface. when you conect to the printer. check the firmware report you get after connecting. Look for the line that says:
echo:Home offset (mm)
echo:M206 X0.00 Y0.00 Z0.00 <- make sure Z is 0.00.
If Z in not 0.00 thats your problem. I just had a look and a google, and I'm not sure where in the firmware you set it..
I tried sending an M206 Z10 comand, hoping for Z to home then lift 10mm, but it just homed and stayed there. So clearly I'm in over my head at this point.
May need help from someone better with code/Marlin (not my strong point). It may be the bit just above movement setting which is normally commented out...
/ @section homing
// The center of the bed is at (X=0, Y=0)
//#define BED_CENTER_AT_0_0
// Manually set the home position. Leave these undefined for automatic settings.
// For DELTA this is the top-center of the Cartesian print volume.
//#define MANUAL_X_HOME_POS 0
//#define MANUAL_Y_HOME_POS 0
//#define MANUAL_Z_HOME_POS 0 // Distance between the nozzle to printbed after homing
// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area.
//
// With this feature enabled:
//
// - Allow Z homing only after X and Y homing AND stepper drivers still enabled.
// - If stepper drivers time out, it will need X and Y homing again before Z homing.
// - Move the Z probe (or nozzle) to a defined XY point before Z Homing when homing all axes (G28).
// - Prevent Z homing when the Z probe is outside bed area.
//#define Z_SAFE_HOMING
Google is also suggesting your Anet i3 may have auto bed levelling?? If that’s the case there are more offsets in the auto bed levelling section in config.h. Even if you don't have auto levelling, may pay to check its not turned on in firmware.
Sorry I cant offer more help. Hopefully you can get closer to identifying the problem now