Welcome! Log In Create A New Profile

Advanced

Marlin not driving stepper motors properly

Posted by TrevDog 
Marlin not driving stepper motors properly
March 02, 2019 08:30AM
I am constructing a 3D printer using mostly leftover Ultimaker 2+ hardware. The electronics that run my printer consists of an Arduino mega 2560 and a ramps 1.4 board. I am using a 10A, 24V power supply so the Arduino is powered separately from the ramps board. I configured the marlin firmware for my printer's specifications and uploaded to the Arduino but it fails to move the stepper motors when it is commanded to. When I press the auto homing button the Z axis moves down an inch or two (and doesn't actually home) but the other axes just remain stationary and make noises. When I took the belts out I found that the steppers did spin on command, so I figure it must be some sort of torque problem. I got frustrated working with marlin so I tried uploading the ramps 1.4 test code that I attached. Using the test code all of the steppers were driven properly and clearly had enough torque to move the extruder. There must be some sort of software problem in my Marlin firmware but I can't seem to figure out what it is, any suggestions would be appreciated.
Attachments:
open | download - Test_Code.ino (3.2 KB)
Re: Marlin not driving stepper motors properly
March 02, 2019 09:25AM
Its nearly always endstops (when the test code works)

send you printer a M119 command

any that report triggered, you can't move in that direction.

basically get your endstop working first

Make sure to set your end stops as min or max correctly or things get really confusing.

Also you cant move E till the hot end is hot, (unless you disable that feature)

The next possibility is you haven't set the current limits on the stepper drivers. This depend on what stepper drivers you have.

Edited 3 time(s). Last edit at 03/02/2019 09:44AM by Dust.
Re: Marlin not driving stepper motors properly
March 02, 2019 09:37AM
I have been having some trouble with the endstops actually but that doesn't seem to stop the motors from moving. They do register correctly when they are bumped but the z axis sometimes continues to go down after it has hit the endstop. The xy steppers also seem to be spinning without restriction just not with enough torque to move the extruder. I know my endstops are set properly as maxes and mins, what else could I do to troubleshoot the endstops?

I am also a relative beginner and I am unsure how to send my printer an M119 command

Edited 1 time(s). Last edit at 03/02/2019 09:39AM by TrevDog.
Re: Marlin not driving stepper motors properly
March 02, 2019 09:45AM
Just because the light turns on with an endstop does not mean the controller is reading it correctly. You have to ask the controller what it is seeing with M119

get yourself the control program printrun/pronterface [www.pronterface.com]

On the bottom right is a area you can enter raw gcode commands. then you just hit send to send it to your controller.
This is after you have connected to your controller.

Edited 3 time(s). Last edit at 03/02/2019 09:50AM by Dust.
Re: Marlin not driving stepper motors properly
March 02, 2019 10:05AM
Okay when I sent the M119 command it returned x and y opened and it says that the Z is triggered
Re: Marlin not driving stepper motors properly
March 02, 2019 09:29PM
so time to start checking things

firstly make sure all end stops are not actually being triggered (manually move the head away )

Then send a M119
It should say all open.

then manually test each endstop by manually activating each one (hold the switch down with your finger, or interrupt if optical etc) then send a M119 that axis should now report triggered
Check each one.

If any are reversed and say open when triggered and vise versa then simply invert them in firmware
ie find the appropriate line in Configuration.h
eg #define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.

If any don't work... you have to work out why... unplugged, plugged into wrong port etc...

Edited 1 time(s). Last edit at 03/02/2019 09:30PM by Dust.
Re: Marlin not driving stepper motors properly
March 04, 2019 12:49PM
I have totally worked out the end stops. They all respond properly to M119 commands and the z axis has been reliably homing itself. Now the only problem appears to be the xy steppers traversing substantial distances. Using printrun the steppers are responding to commands. The x and y will move the print head but only in very small increments. If I input a command to move more than a centimeter at a time the steppers seize and make a high pitched noise. I took the belts off and submitted the commands just to make sure it wasn't caused by friction in the system.
Re: Marlin not driving stepper motors properly
March 04, 2019 07:19PM
check you max feed rates

For a small move, due to acceleration, it wont get to the max feed rates. but long moves it does
Re: Marlin not driving stepper motors properly
March 04, 2019 11:41PM
Other common issues are not installing micro stepping jumpers (under each stepper driver modules)
And not adjusting the current limiting potentiometers on your stepper drivers to suit your stepper motors.
Re: Marlin not driving stepper motors properly
March 05, 2019 09:49AM
I checked my max feedrates and they are both at 500 so that should not be an issue

I did adjust the potentiometers on my stepper drivers but I am wondering If I did it correctly. In the specifications my motors are listed as 1.7 amps/phase. On several websites I found that that meant my actual max current should be around 2.1 amps so that is around what I have tuned the drivers to.

Is it possible that it's a problem with the acceleration or jerk settings? I have left both at the default and I'm wondering if they should be changed
Re: Marlin not driving stepper motors properly
April 29, 2019 01:08PM
Hi There,

i am wondering if my printer does not suffer the same issue. We lack torque on Y axis, and it seems considerably slower than the regular alfaise firmware. We have to constrain speeds down to 60mm /s printing, and even with that, we get sometimes skipped Y steps.... Did you found anything?
Sorry, only registered users may post in this forum.

Click here to login