Too much layer shifting

  • Hi,

    I've more and more problem since the 2 last firmware update with layer shifting, it's happen where there is no particular difficulties.
    I've considerably reduce jerk, acceleration and speed to see if it solve the problem but no.
    I've also check mechanical parts, every things seem ok. I've installed a 40*40 mm fan under the duetboard, driver are "cold" and motor can be touch without burning your finger.
    There is no blob on infill or perimeter…
    It's also happen where there is no multiple print zone on one layer.

    You can see on this print :

    I don't know if it's related to pressure advance, i've relaunch a small print where i removed it.

    Hope you can help me !

  • i forget to post M122 result :
    MaxReps: 8, StepErrors: 0, MaxWait: 1ms, Underruns: 570, 3

    My config :
    Firmware Name: RepRapFirmware for Duet WiFi
    Firmware Version: 1.15e (2016-10-02)
    WiFi Server Version: 1.02
    Web Interface Version: 1.12

    Maybe it can help.

  • administrators

    More info needed:

    • What architecture printer is it: Cartesian. CoreXY/Hbot, or Delta?
    • What direction(s) does the layer shift occur in? In particular, it it's a Cartesian printer, are the layer shifts in the X and/or Y direction; and if CoreXY, are they are 45 degrees to X and Y?
    • Do the amounts of layer shift correspond to multiples of 4 full motor steps?

    Don't overlook obvious causes:

    • If you use a print surface or glass plate that is clamped to the print bed, that plate could be slipping on the bed
    • Loose pulleys are a common cause of layer shifts

    Your underrun count is high. Are you printing from SD card?

    • CoreXY bot (

    • Shifting seem to be at 45°

    • No they are related to the model and they occurred at different height per model, when i relaunch a print the shifting appear at the same place.

    • My glass is tightening on side, could not be this.

    • Belt or pulley are not loose.

    Yes printing from SD card (the stock one)

  • administrators

    If the shifting occurs at 45deg on a CoreXY system then a single motor is losing steps. The next thing to determine is whether the amount of layer shift is a multiple of 4 full motor steps.

    I think (but I could be wrong) that in a CoreXY system, if one of the belts moves a distance L and the other doesn't move, the X and Y axes both move a distance L/2, so the diagonal movement is L * sqrt(2). If you are using GT2 belt, 20 tooth pulleys and 1.8deg motors, then 200 steps move the belt 2 * 20 mm, so 4 steps move it 4 * 2 * 20/200 = 0.8mm and will therefore move the carriage 0.566mm.

    If a motor is skipping steps then you need to either increase motor current or reduce acceleration and/or jerk. What values do you current use for these settings, and what is the rated current of the motors?

  • Thanks for your reply, my motor are 0.9° and the shifting was not constant, it's depends of the 3D model and it's between 1mm and 4 mm (like the rocket).
    I played with acceleration and jerk a lot since the beginning of the beta test time and since the 2 last update (1.15c and 1.15e) i was experiencing shifting so i decrease those two value from 7000 to 4500 in acc and 2500 to 1500 in jerk. I also decrease current in driver in case of they were heating too much, adding a fan to the duetwifi retesting and increasing current again. Decreasing also my speed from 200 to 140 mm/s, without any solve to those shifting layer…

    I remembered this morning that i had a M572 P3 S0.05 in my start Gcode, i commented this part to test like i said previously and it seem to work. In picture the two test i made, same setup in S3D (software and file was not close and no additional tune).
    The left one is shifted and has the M572 in start and the right one no.

  • And still an high underrun :
    MaxReps: 80, StepErrors: 0, MaxWait: 26ms, Underruns: 306, 0

  • I had to drop my accel and jerk down to the levels of a standard prusa to keep my layer shifting from occuring and I've been slowly upping my speed back up to around 100mm/s.

    Also running a corexy machine, C-bot

  • I'm thinking to downgrade firmware to the 1.15a or b. Did you try previous version ?

    Shifting occurred without the pressure advance function but less than with… Today i've got 2 shifiting with 5 prints launched. I'm not sure about this but it tends to shift in infill parts and small segment,
    i will try tomorrow to record a print.

    Thanks Sniffle for your post, i felt alone in this problem and i didn't relaunch this thread thinking i'm just unlucky... ; -)

  • administrators

    I still think your layer shifting problem has a mechanical cause. The only layer shift issues that I recall anyone else reporting since many months ago were associated with particular values of pressure advance. They were due to a bug in the pressure advance calculation coupled with a bug in the error handling that meant that when the first bug was triggered, unless you had Move debug enabled then no step error was recorded and a layer shift resulted. Both bugs were fixed in 1.15e. If there is another similar step generation bug that is capable of causing layer shifts, the error handling will record a step error.

    But by all means try reverting to an older firmware version to see if it makes any difference.

    Your acceleration and jerk values look high to me. Try 3000 accel and 600 jerk. Also, please can you provide your motor specifications, your steps/mm, maximum travel speed you are using, motor current you have set, and Vin supply voltage. From those I can work out whether you are losing motor torque at high speeds.

  • Hi David,

    I'm testing your board since the beginning, i like it and possibilities offers by your work.
    I'm posting this because something change in motion resulting those shifted layers and i will not post this if my hardware was not check before. I also think a small core XY like mine can handle high acceleration/jerk like i was pleased to use before this problem. As Sniffle write, dropping down the acc/jerk to a prusa architecture level for a core XY with light carriage and smooth linear rail doesn't sound right mainly when it worked well previously for the same model.

    I don't want to bother you with this, i'm testing and trying to give you feedback.
    I'm trying your setting now and will see if they solve this.
    This is my config.g :

    ; Machine configuration
    M569 P0 S1 ; Drive 0 goes forwards (change to S0 to reverse it)
    M569 P1 S0 ; Drive 1 goes forwards
    M569 P2 S1 ; Drive 2 goes forwards
    M569 P3 S1 ; Drive 3 goes forwards
    M569 P4 S0 ; Drive 4 goes forwards
    ; If you use an endstop switch for Z homing, change Z0 to Z1 in the following line, and see also M558 command later in this file
    M574 X1 Y1 Z1 S0 ; set endstop configuration (X and Y and endstops only, at low end, active high)
    M667 S1 ; set CoreXY mode
    M350 X16 Y16 Z16 E16 I111 ; Set 16x microstepping with interpolation
    M92 X160 Y160 Z800 ; Set axis steps/mm
    M92 E394:394 ; Set extruder steps/mm
    M906 X1500 Y1500 Z1200 E1500 ; Set motor currents (mA)
    M201 X4500 Y4500 Z500 E8000 ; Accelerations (mm/s^2)
    M203 X45000 Y45000 Z1500 E25000 ; Maximum speeds (mm/min)
    M566 X1500 Y1500 Z100 E2500 ; Maximum jerk speeds mm/minute
    M208 X170 Y200 Z270 ; set axis maxima (adjust to suit your machine)
    M208 X-8 Y0 Z-0.5 S1 ; set axis minima (adjust to make X=0 and Y=0 the edges of the bed)
    G21 ; Work in millimetres
    G90 ; Send absolute coordinates…
    M83 ; ...but relative extruder moves
    ;M581 E0 S1 T2

    My motors are :
    Nema17 size 42mm
    Body Length 48mm
    Rated Current: 1.68A
    Holding Torque: 0.44N.m
    400 steps per revolution
    Rated resistance phase : 1.65
    Phase inductance 4.3mH
    insulation resistance 100Mohm
    From robotdigg
    They are powered in 24V and from M122 : Supply voltage: min 23.9, current 24.0, max 24.5, under voltage events: 0, over voltage events: 0

    What does the max speed while printing ? it seem to be use when a travel is not setup in a pause macro, it's happen to me with this value and no step or shifted problem has been result with this value.

  • administrators

    Thanks for the info. One other question: what travel speed do you have configured in your slicer?

  • 300mm/s for travel speed
    145 mm/s for infill and shell 50% for outline

  • I had the same issues with the 1.15 and higher. Yesterday even tried the 1.16beta5 but still this problem exists.
    Will keep mine on 1.14 as it runs very smooth on this version.

    DC42 if you need more development info please let me know. Can make a report or something for you if you would like.
    It's not my first delta (build around 250 delta's now… ) so maybe i can help a bit.

  • Strange enough i uploaded on my testprinter 1.16beta10 and first test was ok. Not the speeds that i used to but ok in printing. Anything changed on stepper/motion part?

  • administrators

    Nothing changed in the stepper motor driver code in either 1.15 or 1.16. There was a bug fix to pressure advance in 1.15.

    Can you confirm that you are using the on-board stepper drivers?

  • IMO, layer shifting is always due to some mechanical problem - especially when it's as bad as the pics in the first post. Have you checked that the pulleys are securely fixed to the motor shaft?

  • Those shifting in first post was not due to mechanical, otherwise it will not append strictly at the same height…

    I've made few test without stepper interpolation and it seem to work better, i didn't have shifting since removing it. But this result have to be validate with real comparaison test...

  • It can be mechanical i.e. a print bed not properly secured so that it moves laterally my mini kossel does this as the bed mounts I made for FSR's are not clamps so the bed can shift it its not properly inserted, or electrical i.e. a motor skipping steps due to insufficient current, or being asked to move faster than it is able (i.e. insufficient current).

  • I am using the onboard drivers in this model. Nothing hardware related because changing the board will make it print flawless.
    Sadly i was using pressure advance and this last print i removed it.

    But i don't want to hijack this thread. So we keep it to the shifting of the topic owner.

  • @Djdemon i monitored the print and there was not mechanical, nothing move like bed shifting. It's more like the board forget few step

  • @cubexupgrade:

    @Djdemon i monitored the print and there was not mechanical, nothing move like bed shifting. It's more like the board forget few step

    But it only affects one motor, hence the 45 degree angle of shift (corexy). Loose wire? Bad motor? Can you swap the XY motors and see if the shift then happens in the other direction? Looking at all the stringing at the bottom of the model, are you sure the nozzle didn't catch on a lump of plastic which either shifted something mechanically, caused the pulley to slip, or caused the motor to skip a few steps?

    @DC42, does interpolation affect motor torque? Just wondering if there is a mechanical resistance to movement, might a motor be more likely to skip steps with interpolation enabled.

  • administrators

    Interpolation will have only a tiny effect on motor torque. Maximum torque is produced when the motor is nearly 2 full steps behind the commanded position. A few 1/256 steps either way isn't going to make much difference.

    @cubexupgrade, are the two motors of the same type and definitely running at the same current? If you are using M584 to remap drivers, you should specify the mappings for all axes and extruders, and set the motor currents afterwards.

  • @dc42 motors and current are the same. I haven't use motor mapping for this printer.

    Since i deactivate interpolation i use pressure advance function without problem even with high accl/jerk. Maybe it's just hasard.
    I do not push test because i've to print lot of stuff for works.

  • Hi all
    Was this issue ever resolved ?? Im having similar problems ( 1,5 & 1.16)
    Prusa i3 steel Cartesian . Works fine with a ramps 1.4 with TMC 2100's

    Doesn't always happen.
    Doesn't happen at the same height
    When it occurs its X and Y at the same time but not by the same amount.
    Checked all the usual suspects but as yet no real culprit to be found
    All help / input appreciatted

Log in to reply