# Specific 3D Printers, Scanners, & Hardware > RepRap Format Printer Forum >  Printer performing 'jerk' moves randomly mid print

## DBFIU

So I finally got the printer to work with the new marlin becdac firmware.

I noticed, that during the print, at pretty periodic intervals, the machine head will move to one of its new locations and right before it gets to that new location, it stops right before and then POPS into the location. The print head ends up landing where it needs to, but instead of decelerating in a linear fashion, it decelerates and then seems to just perform a jerk move to attain its new position. This only started happening with the new firmware. 

My print speed is around 120mm/s and accelerations are 1100. It was able to handle this just fine with the old firmware.

It doesnt do it every single layer, and sometimes it does not do it for a while and then does it a couple times periodically and stops. I feel like maybe it could be too high an acceleration, but if that were the case, it would be doing it non stop. So accel is fine, in fact I used to run 1500 with no problems. 

The funny thing is, it does the same exact thing during a G28 right when the head moves to the bed center to begin the z home, it will move to center and in the middle of the motion just POP and continue. These pops are not mechanical, nothing is binding. 

What could this be?


Forgot to add, the only thing that changed was the firmware.

Thank you

----------


## Roxy

I would set the max speeds and the acceleration and jerk lower.   Remember...  This code base was tuned for a MakerFarm printer.  You have similar hardware but things are going to have to be tweaked.   You can do this however you want, but I would probably cut all of these in half and see if it makes things better.   Or...  You could just cut the XYJERK down and see how much that helps...



```
#define DEFAULT_MAX_FEEDRATE          {500, 500, 5, 40}    // (mm/sec)    
#define DEFAULT_MAX_ACCELERATION      {9000,7000,100,700}    // X, Y, Z, E maximum start speed for accelerated moves. 
#define DEFAULT_ACCELERATION          3000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION  700   // X, Y, Z and E max acceleration in mm/s^2 for retracts

#define DEFAULT_XYJERK                20.0    // (mm/sec)
#define DEFAULT_ZJERK                 0.4     // (mm/sec)
#define DEFAULT_EJERK                 4.0    // (mm/sec)
```

If that fixes the problem...  Start bumping up the values until you don't like what you are seeing.

----------


## DBFIU

Ok cool, thanks Roxy.

 I already brought my jerk down to 10 and accels down to 1100 which is still on the low side. Not sure how much lower I want to go before my prints start to take forever. I will try that though, thank you.

----------


## DBFIU

Ok I lowered my accels and it did nothing. 

I dont know if it is software or not, because I uploaded the same software on to another identical machine of mine and it doesnt jerk during a g28

So weird.

----------


## Roxy

> Ok I lowered my accels and it did nothing. 
> 
> I dont know if it is software or not, because I uploaded the same software on to another identical machine of mine and it doesnt jerk during a g28
> 
> So weird.


Yeah...  It's one of 'those' things...   I would probably lower every thing until it goes away.  And then raise things one at a time and see if I could isolate it.  It is going to take some playing around to figure it out.

----------


## DBFIU

Dang!!

Ok well, I just ran the new firmware on my other machine and it does it too. I am thinking of different reasons for this, and it seems hard to isolate in theory. 

*The jerk that occurs, is mid print during a long travel and at the very end of the travel move*. It doesnt happen all the time, it happens maybe every few minutes with larger time intervals gaps in between. 

It 'seems' and sounds like the stepper is skipping but it isn't. If there was a skip, I would be able to tell by looking at the layers being shifted pretty bad. After closer visual inspection of the ocurrance, I can say that the motor STOPS or attempts to stop during a move, but then starts back up and goes to its location which ends up being just a few mm away during these circumstances. 

Almost as if something is telling the motor, stop before you get there, then pick up again that last little short distance. It happens so fast, I had to watch it over and over 100 times before I figured out the moves. 

What scares me is the stopping and starting, it sounds almost like a bang or loud click. The motors are really getting pissed off when this happens. As a result of this motion, the X motor did skip yesterday one time, but only after 100's of times of performing this crazy move. The inertia was just too much for that one time and I noticed the skip when the layers didnt line up on the X axis.


Up until now I have done the following.
The accels were lowered but that didnt change anything.
I reduced my XY jerk setting from 20 to 5 and that didnt help. 
Brought my travel move speeds down as well.

not sure what this could be, totally puzzled.

----------


## Roxy

The machines originally had Marlin running on them, right?   How close to the original settings are you?  I realize you had to change a few things to get the Auto Bed Leveling going, but it might be best to keep everything else very close to the same.   If you want to post the current Configuration.h file and the one it came with before Auto Bed Leveling, I'll run them through a difference program and see if I can spot anything.

----------


## DBFIU

Yes the machines had marlin since day one.

the settings in config.h are identical to the old values; I manually edited them of course, like accels, offsets, servo angles etc... All of those values are copied over into the new marlin firmware I downloaded.


I will try to figure it out and monitor it for the next few days before I go ahead and get you the files to debug. It might be something so stupid and I will be embarrassed :P

----------


## Roxy

And really...   It is worth running both of the Configuration.h files through a Visual Diff program.   It is easy to miss something!

----------


## DBFIU

> And really...   It is worth running both of the Configuration.h files through a Visual Diff program.   It is easy to miss something!



What is a visual diff program and how do I get one?

----------


## Roxy

This program is very helpful on this kind of thing.  I think you can "Try it Today" and see what you think.  If you like what it does, there are similar programs that do the same thing for free:

http://www.prestosoft.com/edp_examdiffpro.asp?flm=1

----------


## printbus

This could have nothing to do with configuration settings.  

If USB is being used to print, make sure the host computer isn't doing much of anything else during a print, especially if it is an older/slower machine.  The command buffer in Marlin isn't very deep, and the printer could simply be running out of things to do while it waits for new gcode data to be received and interpreted.  

I'd also scrub through all the mechanics, looking closely for anything that could be momentarily catching or binding.  Move everything manually through the entire travel range and make sure things move smoothly.  Remove belts etc from motors and repeat the testing if nothing is felt. Perhaps something like a bearing is bad and occasionally catches, torque builds up and then the movement breaks free...

----------


## DBFIU

> This could have nothing to do with configuration settings.  
> 
> If USB is being used to print, make sure the host computer isn't doing much of anything else during a print, especially if it is an older/slower machine.  The command buffer in Marlin isn't very deep, and the printer could simply be running out of things to do while it waits for new gcode data to be received and interpreted.  
> 
> I'd also scrub through all the mechanics, looking closely for anything that could be momentarily catching or binding.  Move everything manually through the entire travel range and make sure things move smoothly.  Remove belts etc from motors and repeat the testing if nothing is felt. Perhaps something like a bearing is bad and occasionally catches, torque builds up and then the movement breaks free...



Prints from SD card. 

The motion occurs at different height intervals whenever it chooses. If it was a mechanical snag, it would repeat in certain positions and be somewhat predictable. 

I checked all the points that I thought caused a snag, everything moves smooth. The snag looks to be motor controlled. The steppers spin and then momentarily and abruptly just stop for milliseconds, and then continue to the very last segment of motion, which is ends up being a few millimeters of travel. It always happens at that last leg of travel.

I will try to look for more mechanical snags, but I couldnt find any on either machine.

----------


## DBFIU

I uploaded the same firmware to my 3rd machine, and it does the exact same thing. It performs the jerk movement right before the G28 on the way to travelling to its center home position. Then it will do it seldomly after that. 

It has to be software. I will try to think more about it. I did not use the comparison program yet to look at the .zip firmware vs my firmware after I touched it.

----------


## Roxy

How about you take a quick video of the jerk motion and put it up on YouTube for us to look at.   It might be something very simple, but we kind of need to see what it is doing.

----------


## DBFIU

ok, i will do that, thank you Roxy.

----------


## DBFIU

I just took the video. Let me know what you think.

----------


## Roxy

I can hear it.   I can just barely see it.    I'll see what I can find in the G28 code....

----------

