I need help with setting up the endstops on my ramps 1.4 with marlin

I need help with setting up the endstops on my ramps 1.4 with marlin firmware. When i connect my mechanical endstops, my display shows a blank screen and/or the motors won’t turn. I tried inverting the logic in the marlin code but it didn’t help. Also the pullups made no difference…

My Z only goes down, not up. My Y goes only one way (sometimes) and my X won’t move at all.
My mechanical endstops are normally closed and active open.

Please help me out! I have no clue what to do… there are so many variables that can influence the endstops…

Usually mechanical endstops are normally open, check this first. Then there is a special g-code command to check endstops, have a look at the reference at reprap wiki.

You can also push endstops by hand to check if their logic is inverted or they are functioning at all. Also check the wiring, three pins on ramps are power, signal and ground, you only need two for mechanical endstops.

I think it is m119 if my memory serves…

Are you 100% sure you have connected your endstops to the correct pins? You must only connect to Signal and Ground, not to Vcc, which is for ‘active’ endstops only. Take a super clear photo of the endstop connections on the RAMPS board if you are not sure. Connecting to Vcc can cause damage so check this before you do anything else.

To eliminate the endstops trouble, i’ve switched them for opto-endstops. Now every axis works exept the X axis. No movement at all.

All endstops are working great now.

Try swapping the stepper driver from Y to X. Does the problem move with it? Also, are you moving the axes with jog controls? You might need to home first, with a G28.

Make sure you plug driver right side or you’ll burn both driver and mega board. Ramps most likely survive.

I have home’d all axis now but the x axis still won’t move. I allready swichted drivers and switched x with y. The motor and deiver are fine.

I also checked to see if the sleep or enable pin had a bug. That isn’t the case either.

@Mano_Biletsky_Open_M you can also swap x with y programmatically (just edit ramps/mega pin assignment in the marlin firmware). If y axis won’t move then you have electrical problem, if x axis won’t move then it’s software problem.

@1111110 ​ i tried that and the Y still moves but the X won’t. I measured the traces and they are all connected. The motor works when i attach it to another channel like the Y stepper driver so the motor is ok too. It is just not powered…

So it looks like logic problem. Check hotbed size in configuration.h, check if endstop logic isn’t inverted, check homing direction, power it up, check endstop status, zero current x position, try to home x axis.

Does the motor hold position when powered up?

Did I understand correctly that x axis isn’t moving on y axis pins when swapped?

Indeed. With swapped pins the physical x axis is still not working. The Y axis (software x) is moving.

When not moving the x axis is not held in place. While the other axis are…

@1111110 This is a very good point. If the motor holds position then it will likely be something in the endstop logic preventing movement. @Mano_Biletsky_Open_M ​ can you post your configuration.h to pastebin or similar?

@Mano_Biletsky_Open_M ​ sorry, I didn’t see your latest post before I asked the question.

It would still be interesting seeing your configuration.h file. If you’ve ruled out the motor, driver, and driver socket then I’m not sure what else could cause the motor not to energise. Maybe the Config will provide more clues…

If software x is moving on y pins then it’s electrical bug. Do you have power on driver pins? Check if you have +12 volts and ground from psu and +5 volts logical power. You can also connect leds with 100kOhms resistors to logical enable, direction and step pins to see if they blink while you command the stepper to move. It also could be a broken connector between ramps and arduino, or burned arduino pins.

@Mano_Biletsky_Open_M what is the outcome? Did you fix the issue?