# Confusing stepper motor behavior

I am trying to control stepper motors for a 3D printer with a RAMPS 1.4 shield connected to an Arduino Mega 2560. I have uploaded Marlin firmware to the board and am currently using Pronterface to test the board's components.

At first, the stepper motors would not move at all when commanded. They would just slightly twitch and them hum, but not rotate. Then, I checked the wiring connections and ensured they were correct, but the problem persisted. Then, I measured the Vref of the stepper drivers, which was 0.79 Volts.

Based on my stepper motors, NEMA 17, the maximum Vref I calculated was 1.36 Volts. After adjusting the potentiometer screw the maximum amount, Vref is 1.19 Volts. Now, the motors WILL rotate when given the 0.1 and 1 command in Pronterface, but return to the twitch and whine behavior when given the 10 or 100 command. What is the cause of this?

• Please give us your calculations. There is a lot that you seem to be missing. e.g. the potentiometer doesn't adjust the voltage... – user77232 Feb 10 at 15:57
• I used the equation Vref = I_max * 8 * R_sense. For my stepper, I_max is 1.7 A, and on the driver, R_sense is 0.1 Ohms. – Ethan Guidry Feb 10 at 20:23
• I_max is 1.7 A at what voltage? – user77232 Feb 10 at 22:09
• Please iclude these details to question. As well as configured speed and acceleration settings (e.g. output of M503, btw. do you use Marlin?). Does the problem persist when you lower the max speed ? – octopus8 Feb 10 at 22:15
• To user77232, I_max is 1.7A at 12V. To octopus8, I've attached a picture of my Marlin configuration.h file that shows the movement settings I've configured. I'll admit I'm a rookie where all this is concerned, so I'm not exactly sure of what I'm doing with these settings. Thank you! – Ethan Guidry Feb 12 at 15:17

The described behaviour could happen if, e.g. X_STEP_PIN, X_DIR_PIN and X_ENABLE_PIN are not correctly mapped. I guess you will find them in pins_RAMPS_144.h. Make sure the correct file is used.