3d printer not homing correctly

Hello, I uploaded marlin firmware to my arduino mega that uses ramps 1.4, and my printer will not home correctly. When I hit home in repetier host, the axis moves a centimeter. have to press the button repeatedly till it hits the endstop, where it bounces back as it should. Where do I fix this in the firmware? 

sort by: active | newest | oldest

You can't just upload a firmware without adjusting the parameter to your machine - this includes homing direction, endstop location and logic as well as the stepping and speeds for the motors.
Since I have no clue what version of Marlin you use I suggest you visit their Wiki or check documentation.
I hope you did write the original values of machine down somewhere....

jbaker22 (author)  Downunder35m12 days ago

https://youtu.be/Y4EuvB9iKI0

jbaker22 (author)  jbaker2210 days ago

It is homing towards the endstop. If it switch the motor polarity, it will not go to the endstop. I use M119 and all the endstop read open, then they were triggered as I triggered them. So, the arduino realizes it hit the endstop, but does not act according to that. I made sure it homes to the min direction while it is programmed to home to the Y_MIN_PLUG. Y_MIN triggers when I hold it down.

jbaker22 (author)  Downunder35m15 days ago

I edited all the settings I knew about adjusting such as thermistor values, but I couldn't find the stepper motor settings with ctrl f.

Its under movement settings.

Bear in mind Im using 400 step, 0.9 degree Nema 17's and DRV8825 drivers, with a 20 tooth GT2 belt, hence the 320 steps per X and Y... yours most likely will be different.

//=============================================================================
//============================== Movement Settings ============================
//=============================================================================
// @section motion

/**
* Default Settings
*
* These settings can be reset by M502
*
* Note that if EEPROM is enabled, saved values will override these.
*/

/**
* With this option each E stepper can have its own factors for the
* following movement settings. If fewer factors are given than the
* total number of extruders, the last value applies to the rest.
*/
//#define DISTINCT_E_FACTORS

/**
* Default Axis Steps Per Unit (steps/mm)
* Override with M92
* X, Y, Z, E0 [, E1[, E2[, E3[, E4]]]]
*/
#define DEFAULT_AXIS_STEPS_PER_UNIT { 320, 320, 1600, 378 }

jbaker22 (author)  petercd12 days ago

https://youtu.be/Y4EuvB9iKI0

I had similar grinding motors at the endstop due to limit switches on the wrong axis.

Then it was a question of reversing one direction in my firmware due to the motor going the wrong way.

// @section machine

// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false

It could be both hardware and firmware related problems.

petercd15 days ago

Usually you tell the firmware that home direction is either negative or positive.

Look for a subsection of Z Probe Options called "section homing".

This is where you define home direction.

Im using RAMPS 1.4 on my Hypercube with Marlin 1.1.5.

Naturally you'll need to have your min endstops wired up or you'll have a machine crash when it tries looking for said min endstop.

// @section homing

//#define Z_HOMING_HEIGHT 5 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case.

// Direction of endstops when homing; 1=MAX, -1=MIN
// :[-1,1]
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1
jbaker22 (author)  petercd15 days ago

I left those values at the default since it is moving in the right direction.

Try using Pronterface via usb to see if its repetier causing problems.