Duet WiFi Cartesian X Axis Mirror Image Issue

  • Issue:
    -All prints come out as mirror image on the X axis (maybe on Y axis too, but X is obvious)
    -First discovered when X/Y/Z calibration cube printed a mirror image of the letter "Z" on top of the cube
    -The only successful strategy has been to invert the x-axis using Cura mirror functionality, but this is not an acceptable permanent solution

    There was no such issue when I upgraded to the previous Printrboard G2 controller using the same hardware and electronics, however the firmware was all done by Printrbot and I only had to learn a little starting and ending g-code. I initially thought it would be a simple tweak. With no success at solving it after expending many hours over several days over the last few weeks, I'm broken and looking for legitimate suggestions from others with experience. Many posts I've read started out sounding like precisely the same issue, only to take a different twist or end up being for a different printer configuration like core x/y. Reading those posts made me aware of the importance of communicating clearly, especially as it pertains to the orientation of the printer from my perspective. Therefore, please pardon if I have gone a little overboard below listing out information up front about the printer and troubleshooting already attempted.

    Printrbot Play 1505 Configuration:

    • -Cartesian
      -X/Y upgraded to 200x200 via Matrix Precision EX-105 upgrade for the Play
      -Controller: Currently Duet WiFi (previously Printrboard G2 that was an upgrade from OEM Printrboard Rev F5)
      -Drive configuration: X0 Y1 Z2 E3 (default for Duet WiFi)
      -Stepper Motors: X/Y = Kysan 1124090, Z = StepperOnline 17HS19-2004S1, E = Printrbot OEM 42HJB440-23A
      -Endstops: X/Y = mechanical endstop at min, Z = probe (PNP NO inductive sensor) at min
      -Z probe: Printrbot OEM PNP NO inductive sensor 6-36v DC 300mA, connected to IN, GND and 3.3V pins (wiki probe type 2.7, except 12V power with voltage divider not necessary because probe works fine on 3.3V Z probe pin)

    Orientation & Homing:

    • -X moves left-to-right (gantry movement) with homing at min (endstop on far left)
      -Y moves front-to-back (bed movement) with homing at min (endstop at rear and facing away is triggered by back edge of bed moving toward you)
      -X/Y home from a top down perspective (i.e. looking down at the bed while facing the front of the printer) is X0/Y0. In other words, homing is at the top (or back)
      left corner of the bed, like reading a book starting from top left edge.
      -Z moves bottom-to-top (gantry movement on Z lead screw) with homing at min (inductive sensor mounted alongside hotend triggered by aluminum bed)
      -Homing currently works smoothly, as configured

    Hardware troubleshooting/solutions attempted:

    • -Flipped endstop plug connections around each way for X/Y
      -Flipped stepper motor plug connections around each way for X/Y/Z
      -Rearranged pin order of stepper motor plug (i.e. repinned) per coil pair for X/Y/Z motors (tried various combinations but cant't say I tried them all)
      -Swapped X & Y motor connections (physically & related M584 drive remapping in firmware), leaving endstops in place since those could not be remapped in firmware
      -Printed with Z probe disconnected, physically and disabled in firmware, in order to rule out under-powered Z probe as cause of strange behavior (had to home Z manually using G92 Z0 to define height where Z=0 with probe touching bed)

    Firmware troubleshooting/solutions attempted:

    • -Swapped X & Y stepper motors via M584 drive remapping in conjunction with physical drive connection, as noted above in hardware troubleshooting
      -Printed with Z probe disabled as noted above in hardware troubleshooting, commenting out M551 and G31 in config.g and G30 in homeall.g
      -M569 axis direction changed various times as needed for X/Y/Z trial and error
      -M569 polarity (Rnnn) changed to 1 = active high for X axis (desperation attempt)
      -Set printer type as CoreXY (desperation attempt)

    Slicer software troubleshooting/solutions attempted:

    • -Used 2 slicers, Cura v2.6 and Slic3r v1.2.9, with 2 stl files to rule out slicer or stl file as source of problem; issue repeated for each combination
      -Inverted stl file on x-axis using Cura mirror functionality; worked but not a desirable or acceptable permanent solution

    Current Config.g and Homeall.g firmware configuration files provided below for reference:

    ; Prologue and Communications
    M111 S0 ; Debugging off
    M550 PDuet WiFi Printrbot Play EX-105 ; Set machine name
    M552 S1 ; Enable network
    M586 P0 S1 ; Enable HTTP
    M586 P1 S0 ; Disable FTP
    M586 P2 S0 ; Disable Telnet
    M555 P2 ; Set firmware compatibility to look like Marlin

    ; Movement
    G21 ; Work in millimetres
    G90 ; Send absolute coordinates…
    M82 ; ...and absolute extruder moves
    ;M584 X1 Y0 Z2 E3; Uncomment to swap x & y drives
    M569 P0 S1 ; Drive 0 goes forwards
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S1 ; Drive 2 goes forwards
    M569 P3 S1 ; Drive 3 goes forwards
    M350 X16 Y16 Z16 E16 I1 ; Configure 16x microstepping with interpolation to 256x
    M906 X800 Y1000 Z800 E800 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout for drives
    M201 X800 Y800 Z15 E1000 ; Set accelerations (mm/s^2)
    M203 X15000 Y15000 Z200 E3600 ; Set maximum speeds (mm/min)
    M566 X600 Y600 Z30 E20 ; Set maximum instantaneous speed changes (mm/min)
    M208 X200 Y200 Z130 S0 ; Set axis maxima
    M208 X0 Y0 Z0 S1 ; Set axis minima and low homing switch positions (adjust to make X=0 and Y=0 the edges of the bed)
    M92 X80 Y80 Z400 ; Set axis steps per mm
    M92 E127 ; Set extruder steps per mm

    ; Endstops and Z probe
    M574 X1 Y1 Z0 S1 ; Define active high microswitches
    ;M574 Z0 S0; Define active low microswitches
    M558 P5 X0 Y0 Z1 H5 I0 F200 T5000 R0 ; Set Z probe type (5 = PNP output normally-open inductive or capacitive sensor), axes for which it is used for homing (Z only), dive height 5mm, invert (0 = do not), probe speed 200mm/min, travel speed 5000mm/min and no recovery
    G31 P100 X5 Y0 Z0.1 ; Set Z probe trigger threshold value, offsets and trigger height (nozzle height above bed at which Z probe output > threshold value)
    M557 X15:185 Y15:185 S20 ; Define probing grid for mesh bed compensation

    ; Heaters and thermistors
    M143 S260 ; Set maximum heater temperature to 260C
    M140 H-1 ; Disable heated bed
    M305 P1 T100000 B4138 C0 R4700 ; Set thermistor + ADC parameters for heater 1

    ; Tools
    M563 P0 D0 H1 F0 ; Define tool 0 (uses extruder drive 0, heater 1 and fan 0)
    G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
    G10 P0 S0 R0 ; Set initial tool 0 active and standby temperatures to 0C

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

    ; Epilogue
    ;M556 S100 X0 Y0 Z0 ; Uncomment to put axis compensation to compensate in the firmware for the X, Y and Z axes not being exactly at right angles
    ;M912 P0 S0 ; Uncomment to put CPU temperature sensor correction here
    ;M501 ; Uncomment to run config-override.g
    ;T0 ; Uncomment to select the first tool head

    ; Custom settings are not configured

    G91 ; relative mode
    G1 Z5 F200 ; raise head 5mm
    G1 X-205 Y-205 F3000 S1 ; move up to 205mm in the -X and -Y directions until the homing switches are triggered
    G1 X5 Y5 F600 ; move slowly 5mm in +X and +Y directions
    G1 X-10 Y-10 S1 ; move up to 10mm in the -X and -Y directions until the homing switches are triggered
    G90 ; back to absolute mode
    G1 X100 Y100 F3000 ; put head over the centre of the bed, or wherever you want to probe
    G30 ; lower head, stop when probe triggered and set Z to trigger height

  • It's looking like my mind was locked into an incorrect, or perhaps just different, concept of Y axis max and min. After finding a thread stating Y min was the front edge of the bed when facing the printer, I reversed the direction of the Y motor, changed the endstop from min to max and changed the homey.g and homeall.g files then, voila, the Z printed in the correct orientation. There's still a little skepticism in me after going down so many empty rabbit trails. Hopefully a few good prints will remove any remaining doubts and free my mind to tackle installing the Reprap Champion silicon bed heater that toasted my G2 board.


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