# Stepper motor moving only to one side after reset

I come through this post, rescue a problem with my printer. It uses Arduino 2560 Mega, RAMPS 1.4, and Marlin 1.1.9, which had configured it left it working as follows: on the RAMPS the Y-axis is connected to the Z-axis pins, as it has two stepper motors on the Y-axis and the Z-axis is connected to the pins of E1.

I did all the basic and necessary configurations in the firmware and sent it to the Arduino, eliminating the previous configuration, so that I can configure the steps of the motor correctly, as they were out of calibration. Before the reset, the motors moved to both sides, positive and negative. However, when I sent the firmware to the Arduino, I can only rotate the motors on all axes only to one side.

On the printer display, I go to the option to move the axis, rotate it 10 mm and the axis moves. However when I move it backwards, it does not come back, it is stopped. This happens with all the axes after I did the reset. Is there any way to configure the rotation of the motors by the firmware in relation to pins A1, A2, B1, and B2 in the same way that the axis change on the RAMPS was configured?

I apologize for the mistakes, I speak Portuguese and I used a translator.

I executed the command M119 on the console of the Marlin IDE and the printer did nothing, it is correctly connected to the PC via the USB cable this appeared on the console screen:

x_min: TRIGGERED
y_min: TRIGGERED
z_min: open
ok

• Do you have minimum endstops enabled? Did you check state of endstops? May 17 '21 at 17:12
• Presumably, you need to home an axis before it will move in both directions.
– Mick
May 17 '21 at 18:54
• To build upon the comment of @octopus8, connect the printer to a console and send M119 and look at the output.
– 0scar
May 17 '21 at 21:14
• Yes, the endstops are active, following a tutorial that I was following on configuration, it is this configuration, leave the options of the mechanical endstop in true May 20 '21 at 11:40
• @0scar I executed the command M119 on the console of the marlin IDE and the printer did nothing, it is correctly connected to the PC via the USB cable this appeared on the console screen: x_min: TRIGGERED y_min: TRIGGERED z_min: open ok May 20 '21 at 12:02

Assuming that your M119 command has been executed for non-depressed endstop switches, it could be concluded tht the firmware is incorrectly configured.

If you execute the M119 G-code command and get TRIGGERED status values for endstops, even when the nozzle head is not pressing the endstop switches, then you have incorrectly configured the endstops in the Marlin configuration.h file.

The most common setup is to have the COM go to ground and NC to Signal, this requires the following values to be false, otherwise you need to use true.

#define X_MIN_ENDSTOP_INVERTING true// Set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true// Set to true to invert the logic of the endstop.


When an endstop is reported to be triggered while the switch is not depressed, the logic needs to be reversed. Marlin firmware will only allow movement to go away from the endstop when it is triggered, never against a triggered endstop (as this might damage the printer).

• sorry for the delay in responding, i had little time these days. Anyway, here I left it configured like this #define X_MIN_ENDSTOP_INVERTING true #define Y_MIN_ENDSTOP_INVERTING true #define Z_MIN_ENDSTOP_INVERTING true #define X_MAX_ENDSTOP_INVERTING false #define Y_MAX_ENDSTOP_INVERTING false #define Z_MAX_ENDSTOP_INVERTING false #define Z_MIN_PROBE_ENDSTOP_INVERTING false May 27 '21 at 23:47