X-1 motor does not change direction

Hey all,

I’m having an issue where the X-1 motor always rotates in the same direction regardless of the command sent. My current theory is that the X1 port on the RAMPS board is fault.

Below are my troubleshooting steps.


This is very similar to what was discussed in this thread. Basically, I’m looking for confirmation that I have a faulty RAMPS board.


Make absolutely sure that your RAMPS shield is firmly pressed into the Arduino, that all pins are correctly connected and not bent or misaligned. If this seems to be the case, detach the shield, make sure the pins and receivers are clean and re-attach the shield firmly. The shield connection can be delicate so make sure all the pins are plugged in all the way on the Arduino.

All have been checked. No bent pins, all are clean. The RAMPS shield is accurately, fully, and firmly, seated into the Arduino.

Sorry for the delay. Unfortunately my robotics habit keeps getting interrupted by family and work habits.

Here are my latest efforts:

I bought new motor drive cables to create a test rig. I physically remove the x1 and y motors from the CNC rig, took the electronics and power supply inside. Upon hooking up the test rig, I confirmed that both motors work as they should (bi-directional control, proper stepping) when connected to the Y, Z, and X1 ports. I can confirm that whichever motor is connected X2 port will only move in one direction.

I then measured the voltage levels on all of the “Direction” pin of the stepper driver. The X1, Y, and Z motor drivers all have a resting state of ~ 0.12V and upon activation, rise to ~0.52V. The X2 motor driver however has a resting state of ~1.2V and upon activation rises to ~1.7V.

I’m starting to be strongly convinced that I have a suspect RAMPS shield board as this problem occurred during earlier testing regardless of which motor driver was connected to the X2 port. I’ll confirm by switching the motor drivers at my next opportunity.

Tonight I confirmed that swapping motor drivers had no impact.

I then removed the RAMPS board and tested the activation/deactivation of the MEGA pins. I found that Pin A1/55 assigned to the X1 motor direction did indeed toggle between 0 and 5 volts as expect. I then checked Pin D28/28 assigned to E0 (X2) motor direction: it stayed at 0V regardless of the command.

The pinout mappings I used were those in the code (Arduino Pinout Header File), a 3rd party MEGA Manufacturer Board pinout diagram, and wiki on the RAMPS board RAMPS to MEGA Pin mapping

@roryaronson I think I have a bad MEGA 2560 board. I see no physical signs of damage so I’m at a loss here. Do you guys have a policy for replacing 3rd party faulty parts included in your kits?

Hey fellas,

I have an update. I decided to buy a new arduino board and fully test out my theory (It also gives me the ability to horse around with the firmware without impacting the farmbot’s operation). I was right: the Arduino had a bad pin! So I locked everything into place, gave it one last test…and the problem came back. On the exact same pin. I the exact same way (the E0 direction pin floated around 1 volt when deactivated and would move to around 1.3 volts when activated) I was floored. After a few beers, another software project, and a good night’s rest, I tried a hunch: I backed the RAMPS shield out of the socket about 1cm. It worked! My guess is that the RAMPS shield pins ar either irregularly shaped, or the RAMPS shield has some defect that is allowing bleedover to a refernce voltage (perhaps a 1.8V line?) when pushed all of the way into its socket on the Arduino.

The moral / rule of thumb: sometimes fully seating the RAMPS shield can cause issues.

I am definitely looking forward to the Farmduino board, and the changes that it’s bringing. @roryaronson is correct in that these boards are meant for the Great Indoors and thus are not ruggedized. In a former life, I designed avionics hardware and software: the ruggedization process we had to do was brutal and expensive, but worth it. I can already tell that the 1.2v electronics will have a very short lifespan out in the environment.

Thanks @mdingena for all of the troubleshooting help.

1 Like