consistent layer shift in both x/y using clear-path servos ?



  • good afternoon chaps I have been challenged to design/make a printer for work in under 3 weeks been going quite well but I now have a super strange issue where x and y are slanting over somehow? almost at the finish line it's just not finding much help not an awful lot of printers using servos? we are moving accurately as far as i can tell with calipers in xyze not sure if my steps per mm are just to low and its incremental loss of position below is my config.g file

    ; Drives
    M569 P0 S1 ; Drive 0 goes forwards
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S0 ; Drive 2 goes forwards
    M569 P3 S0 ; Drive 3 goes forwards
    M350 X16 Y16 Z16 E16 ; Configure microstepping with interpolation
    M92 X26.666 Y26.666 Z89.91 E804.81 ; Set steps per mm
    M566 X1500 Y1500 Z900 E1500 ; Set maximum instantaneous speed changes (mm/min)
    M203 X6000 Y6000 Z2000 E2000 ; Set maximum speeds (mm/min)
    M201 X800 Y800 Z500 E250 ; Set accelerations (mm/s^2)
    M906 X800 Y800 Z800 E800 I30 ; Set motor currents (mA) and motor idle factor in percent
    M84 S30 ; Set idle timeout

    Not sure how to upload text in the [code][code] format?

    servos are set to 1600 encoder steps per 360 deg



  • I assume you are running from the step/direct outputs. Are you running off the expansion board and doing some kind of level shifting on the step/dir signal?

    For external drivers it is also recommended to check the step pulse timings. From the ClearPath servo manual the timings are are like so:
    min step width: 1us
    direct setup time: 25ns
    direction hold time: 1us

    So you may have to add these using the M569 T parameter like so:
    M569 Pn T1:2:0.25:1

    Note that I have had to use significantly higher values than the manufacturers specify in the past. So if this doesn't work immediately try changing all the T values to 10 or something like that to see if it helps.

    Additionally the clearpath manual says the following:

    Engineer’s Note:
    5V differential outputs are not directly compatible
    with ClearPath I/O because differentia
    l drivers' guaranteed output voltage
    swing is typically not guaranteed to meet the ClearPath input minimum
    input voltage requirements.
    While differential drivers may work initia
    lly, they may fail over time as the
    environment changes, i.e. the motor heats up, components age, and so
    forth. This can result in erratic op
    eration that is difficult to debug.



  • Thanks a lot for that ! I had glanced at the datasheet but i had thought i was moving so slow it would have plenty of time to "react" i will try those values right away appreciated ! Also on a side not i have turned off interpolation will this need to be back on ?



  • also, I am using the step/dir/en from the back of the board not the expansion header just soldered ribbon to this straight to the motors inputs



  • Yes it is not the step signal frequency that is usually the problem, but instead the timings of the direction change in your case.

    Imagine we are printing and reversing direction, but the DIR signal does not flip fast enough. We could accidentally move a couple steps in the wrong direction before the motor reverses. Take this event times an entire print and a shift over time might be seen. What we are doing is guaranteeing that we will not send a step signal until the dir signal change is seen and processed.

    If you are using external drivers (like the ones integrated on the teknic motors) the interpolation will have no effect. All the interpolation is done internal to the stepper driver on the Duet.

    Since we are pulling the step/dir signal before it gets to the internal driver (I assume you are doing this), the setting will not matter.

    How do you have the motor connected to the duet board?



  • @thatbigprint Gotcha. It is likely a 3.3v signal there vs a 5V signal which the motor is expecting. Doesn't mean it won't work, but it might cause you some grief.

    Try the timing thing, if that doesn't work look into maybe level shifting the signal up to 5v or higher for the motor.



  • ; Drives
    M569 P0 S1 ; Drive 0 goes forwards
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S0 ; Drive 2 goes forwards
    M569 P3 S0 ; Drive 3 goes forwards
    M569 P0.1.2 T1:2:0.25:1
    M350 X16 Y16 Z16 E16 ; Configure microstepping with interpolation
    M92 X26.666 Y26.666 Z89.91 E804.81 ; Set steps per mm
    M566 X1500 Y1500 Z900 E1500 ; Set maximum instantaneous speed changes (mm/min)
    M203 X6000 Y6000 Z2000 E2000 ; Set maximum speeds (mm/min)
    M201 X800 Y800 Z500 E250 ; Set accelerations (mm/s^2)
    M906 X800 Y800 Z800 E800 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    this is how it should be implemented right?



  • Try this instead:
    M569 P0 S1 T1:2:0.25:1
    M569 P1 S1 T1:2:0.25:1

    and so on for whichever you are using for the axis drives.

    Also note that the duet diagram does specifically say not to use the test points for wiring external drivers. It may be a better idea to use the expansion header as detailed here: https://duet3d.dozuki.com/Wiki/Using_external_stepper_motor_drivers



  • This looks to be right for me then only xyz are servo ? and as for using test points the inputs to the servos are basically optoisolators so I had thought they are safe to go? besides this is one of my older stock boards so if it dies i will take the hit 🙂
    ; Drives
    M569 P0 S1 T1:2:0.25:1
    M569 P1 S1 T1:2:0.25:1
    M569 P2 S0 T1:2:0.25:1
    M569 P3 S0
    M350 X16 Y16 Z16 E16 ; Configure microstepping with interpolation
    M92 X26.666 Y26.666 Z89.91 E804.81 ; Set steps per mm
    M566 X1500 Y1500 Z900 E1500 ; Set maximum instantaneous speed changes (mm/min)
    M203 X6000 Y6000 Z2000 E2000 ; Set maximum speeds (mm/min)
    M201 X800 Y800 Z500 E250 ; Set accelerations (mm/s^2)
    M906 X800 Y800 Z800 E800 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout



  • I can't speak to why the test points are not recommended for use on external drivers.

    Go ahead and give it a shot see if it helps, certainly won't do worse than before. If it doesn't immediately help try increasing all the T values to 5.

    But longer term you might want to look at using the expansion pins to connect. It's simple to do properly and all the axes remap very easily to the expansion header.



  • hmm still just as bad with prev settings i will try upping to 5 as you stated



  • so we may be getting somewhere.... so my bad i did not hit save for the original setting s you suggested but we steps per mm are now messed up no big deal recalibrated those (suppose this is what we want to see ?) only thing is the probe distance "Error: Z probe was not triggered during probing move" is all kaput and the homing distances have changed but if i command 100mm it moves 100mm in all 3 axis ? surely 100mm before is 100mm now ?



  • [link text]; Configuration file for Duet 0.8.5 (firmware version 1.20 or newer)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool on Thu May 17 2018 19:23:49 GMT+0100 (BST)

    ; General preferences
    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves

    M667 S1 ; Select CoreXY mode

    ; Network
    M550 PMy printer ; Set machine name
    M552 S1 ; Enable network and acquire dynamic address via DHCP
    M586 P0 S1 ; Enable HTTP
    M586 P1 S0 ; Disable FTP
    M586 P2 S0 ; Disable Telnet

    ; Drives
    ; Drives
    M569 P0 S1 T1:2:0.25:1
    M569 P1 S1 T1:2:0.25:1
    M569 P2 S0 T1:2:0.25:1
    M569 P3 S0
    M350 X16 Y16 Z16 E16 ; Configure microstepping with interpolation
    M92 X28.366 Y28.366 Z93.82 E804.81 ; Set steps per mm
    M566 X1500 Y1500 Z900 E1500 ; Set maximum instantaneous speed changes (mm/min)
    M203 X6000 Y6000 Z2000 E2000 ; Set maximum speeds (mm/min)
    M201 X800 Y800 Z500 E250 ; Set accelerations (mm/s^2)
    M906 X800 Y800 Z800 E800 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; Axis Limits
    M208 X0 Y0 Z-5 S1 ; Set axis minima
    M208 X462 Y500 Z560 S0 ; Set axis maxima

    ; Endstops
    M574 X2 Y2 S0 ; Set active high endstops

    ; Z-Probe
    M574 Z1 S2 ; Set endstops controlled by probe
    M558 P5 H15 F220 T6000 I1 ; Set Z probe type to modulated and the dive height + speeds
    G31 P600 X-20 Y-42 Z1.3 ; Set Z probe trigger value, offset and trigger height
    M557 X15:447 Y15:485 S100 ; Define mesh grid

    ; Heaters
    M305 P0 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 0
    M143 H0 S135 ; Set temperature limit for heater 0 to 135C
    M305 P1 T100000 B4138 C0 R4700 X150 ; Set thermistor + ADC parameters for heater 1 and remap it to channel 100
    M143 H1 S280 ; Set temperature limit for heater 1 to 280C

    ; Fans
    M106 P0 S0.3 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P1 S1 I0 F500 H1 T75 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on

    ; Tools
    M563 P0 D0 H1 ; Define tool 0
    G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
    G10 P0 R0 S50 ; Set initial tool 0 active and standby temperatures to 0C

    ; Automatic power saving
    M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; Set voltage thresholds and actions to run on power loss

    ; Custom settings are not configured

    ; Miscellaneous
    M501 ; Load saved parameters from non-volatile memory
    T0 (link url)



  • and i have adjusted the dive hight



  • just checked nozzle hight where it homes with the probe and the z height is spot on but the thing wong mesh level ! still says as above error but dimensionally, in theory, it's not changed? checked 100mm and it repeats spot on also ?


  • administrators

    @thatbigprint said in consistent layer shift in both x/y using clear-path servos ?:

    also, I am using the step/dir/en from the back of the board not the expansion header just soldered ribbon to this straight to the motors inputs

    The test points are not suitable for driving external drivers, because the EN signal is actually the CS input to the on-board drivers.



  • @dc42 for the z i have skipped the enable and soldered into 5v so the z is always enabled i will probs do this to the rest in that case ?



  • Right chaps i have modded the servo enables so now they are all always fed from the 5v supply, and the prints appear to be coming out parallel now so getting there one thing I have noticed is that the model exterior is not so smooth is there a way I can up the resolution? its almost like it has a pattern on the outer surface.



  • @thatbigprint Please post a picture of the error you are seeing on the print.

    With servo motors it may be possible to up the resolution depending on the encoder resolution of the motor and available configuration settings.

    For example, my setup is like so.
    My motors have 20,000 cpr encoders (input configured to 10,000 steps/rev in motor driver config)
    I have fairly aggressive lead screws with a lead of 25mm (nut will move 25mm per complete turn of screw)
    So I just divide (10,000steps/rev)/(25mm/rev) and it comes out to 400 steps/mm.
    This gives me a theoretical resolution of 0.0025mm (assuming perfect mechanics and motor response)

    To contrast are running at 28 steps/mm which gives a max resolution of 0.04mm which is quite a bit lower. I expect your motors can do higher resolution than that but will need some configuration to achieve this.

    Look in your motor config software or manual for the encoder resolution and how far it will move for each step pulse, this is likely called Input Resolution or Electronic Gearing or something similar. I think the Teknic ones come with 800cpr or 16,000cpr encoders depending on the model. You would do well to read the data sheet for your motors as it will have all this information specific to your model.

    You may also need to tune the PID parameteres of your motor. A poorly tuned motor may have a slow response, oscillate around the setpoint, etc which can cause poor quality prints as well. Check the motor manual for how to do this or look on youtube, there are multiple PID tuning guides available.

    Hope this helps, let me know if I can explain anything in more detail.



  • @thatbigprint

    i made an attempt at using clearpaths (not on a duet, but with a mightyboard) and I was able to get it functional, but was never able to get rid of servo tuning related issues. I think the direction you should go (once you get layer shifting figured out) is to have a 2:1 reduction or greater off of the motor before your drive pulley. This should allow for sharper tuning.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.