D-Bot End Stop Config for the Duet Wifi



  • Having a heck of a time getting this configured for the D-Bot. It's a stock build right off the BOM so the Y and Z end stops are on the back right top corner.

    Here's my issue homing one axis at a time.

    X homes ok. When X triggers the switch it backs off the in opposite direction a mm or two almost like a little bounce. Looks like it's operating just like it should.

    Z moves down then up about 10mm from wherever it's sitting and stops by itself. Never touches the switch.

    When Y triggers, it goes to back off like X does and it goes the wrong way pushing it further into the switch.

    Can someone possibly help me sort out my config files? Configuring this thing is a real mind bender for me.

    –---------------------------------------------------------------------------------------

    ; CoreXY sample config file for dc42 Duet firmware

    M111 S0 ; Debug off
    M550 DBot CoreXY ; Machine name (can be anything you like)
    M551 Preprap ; Machine password (used for FTP connections)
    ns)
    ;*** If you have more than one Duet on your network, they must all have different MAC addresses, so change the last digits
    M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xED ; MAC Address
    ;*** Wifi Networking
    M552 S1 ; Enable WiFi

    M555 P2 ; Set output to look like Marlin
    ;M575 P1 B57600 S1 ; Comms parameters for PanelDue

    ; Machine configuration
    M569 P0 S0 ; Drive 0 goes forwards (change to S0 to reverse it)
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S0 ; Drive 2 goes forwards
    M569 P3 S1 ; Drive 3 goes forwards
    M569 P4 S1 ; 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 I1 ; Set 16x microstepping with interpolation
    M92 X80 Y80 Z400 ; Set axis steps/mm
    M92 E418.5:418.5 ; Set extruder steps/mm
    M906 X800 Y800 Z800 E800 ; Set motor currents (mA)
    M201 X3000 Y3000 Z300 E4000 ; Accelerations (mm/s^2)
    M203 X30000 Y30000 Z500 E1500 ; Maximum speeds (mm/min)
    M566 X500 Y500 Z24 E300 ; Maximum jerk speeds mm/minute
    M208 X300 Y180 Z300 ; set axis maxima (adjust to suit your machine)
    M208 X0 Y0 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

    ; Z probe
    ;M558 P1 X0 Y0 Z1 ; Analog Z probe, also used for homing the Z axis
    ;G31 Z2.47 P500 S1 ; Set the probe height and threshold (put your own values here)
    ; The following M557 commands are not needed if you are using a bed.g file to perform bed compensation
    ;*** Adjust the XY coordinates in the following M557 commands to suit your build and the position of the Z probe
    ;M557 P0 X30 Y25 ; Four...
    ;M557 P1 X30 Y155 ; ...probe points...
    ;M557 P2 X250 Y125 ; ...for bed...
    ;M557 P3 X250 Y25 ; ...levelling
    ;M557 P4 X150 Y95 ; 5th probe point for levelling

    ; Thermistors and heaters
    ;*** You can use S and B parameters to define the parameters of the thermistors you are using
    M305 P0 T100000 B4388 R4700 H0 L0 ; Put your own H and/or L values here to set the bed thermistor ADC correction
    M305 P1 T100000 B4388 R4700 H0 L0 ; Put your own H and/or L values here to set the first nozzle thermistor ADC correction
    M305 P2 T100000 B3974 R4700 H0 L0 ; Put your own H and/or L values here to set the second nozzle thermistor ADC correction
    M301 H1 P10 I0.10 D100 T0.50 S1.0 ; PID settings for extruder 0
    M301 H2 P10 I0.10 D100 T0.50 S1.0 ; PID settings for extruder 1
    M570 S120 ; Increase to allow extra heating time if needed
    M307 H0 A142 C293.5 D5.4 B0
    M307 H1 A588.5 C242.9 D6.7 B0

    ; Fans
    M106 P1 T45 H1

    ; Tool definition
    M563 P0 D0 H1 ; Define tool 0
    G10 P0 S0 R0 ; Set tool 0 operating and standby temperatures
    ;*** If you have a dual-nozzle build, un-comment the following 3 lines
    ;M563 P1 D1 H2 ; Define tool 1
    ;G10 P1 S0 R0 ; Set tool 1 operating and standby temperatures

    ;*** If you are using axis compensation, put the figures in the following command
    M556 S78 X0 Y0 Z0 ; Axis compensation here
    T0 ; select first hot end


    ; homeall file for use with dc42 Duet firmware on CoreXY printers
    ; This file assumes the endstop switches are at the low end of each axis.
    ; Reverse the X and Y movement for high-end switches.
    ; Adjust the bed upper and lower limits in config.g (M208 commands) to get the correct homing positions

    Homeall:G91 ; relative mode
    G1 S1 X-310 F3000 ; course home X
    G1 X4 F600 ; move away from endstop
    G1 S1 X0 ; fine home X
    G1 X0 F2000
    G1 S1 Y200 F3000 ; course home Y
    G1 Y4 F600 ; move away from endstop
    G1 S1 Y10 ; fine home Y
    G1 Y0 F2000
    G1 Z5 F2000
    G1 Z-300 S1 F100
    G90
    G92 Z0.1

    ; If you are using a microswitch for Z homing, insert similar code for the Z axis here,
    ; but use lower feed rates suitable for your Z axis.

    G90 ; back to absolute mode

    ; If you homed the Z axis using an endstop switch, you can insert a G92 command here to correct the height.

    ; The following code assumes you are using a Z probe to do Z homing. Remove it if you are using a microswitch.
    ; Adjust the XY coordinates in the following to place the Z probe over a suitable spot,
    ; preferably near the centre of the bed if your Z probe supports that

    G1 X100 Y100 F2000
    G30
    ; This file leaves the head at the zprobe trigger height so that you can slip a piece of paper under it and then do G0 Z0 to check the height.
    ; If you prefer to send the printer to X0Y0Z0, un-comment the following lines
    ;G1 X0 Y0 F5000
    ;G1 Z0


    ; X axis homing file for dc42 Duet firmware
    G91
    G1 S1 X-310 F3000
    G1 X4 F600
    G1 S1 X0
    G1 X0 F2000
    G90


    ; Omerod 2 Y homing file for dc42 Duet firmware
    G91
    G1 S1 Y240 F3000 S0
    G1 Y4 F600
    G1 S1 Y10
    G1 Y0 F2000
    G90


    ; Omerod 2 Z homing file for DC42 Duet firmware

    G91
    G1 Z5 F200
    G90
    G90
    G1 Z0 F200


  • administrators

    Your M574 command specifies a low end Y axis endstop, but your homey.g and homeall.g files are written for an endstop switch at the high end of the axis.

    Your homez.g file is completely wrong.

    Perhaps you should use configtool to generate new files? Or read https://duet3d.com/wiki/Configuring_RepRapFirmware_for_a_CoreXY_printer and the page it links to.



  • Thanks for the help. Guess I'm on my own to figure it all out. I feel much better now that I have links to the documentation though, didn't see those before. I'm new to this and a little frustrated at this point, telling me to read the docs isn't much help.

    Here's a couple specific questions. 1. I don't know if my switches are normally closed or open. 2. What do you mean by are the switches on the high end or the low end? Are they taking about the top or the bottom of the printer?



  • @dklassen:

    Thanks for the help. Guess I'm on my own to figure it all out. I feel much better now that I have links to the documentation though, didn't see those before. I'm new to this and a little frustrated at this point and telling me to read the docs isn't much help at this point.

    The documentation is excellent and so is the configurator tool. Using the tool, all you have to do is answer some questions and it will generate all the files for you. For one of us to create the files you need, we'd have to ask all the same questions that the configuration tool requires (for all axes, the minima, maxima, types of switches and whether they are active high or low, etc, etc). So read the documentation and try the configuration tool, then if you are still stuck, report back and someone will help you out. It's like old the old proverb "Catch a man a fish and he will feed himself for a day, but show a man how to catch fish and he'll feed himself for life".



  • Let's start here.

    What do you mean by are the switches on the high end or the low end? Are they taking about the top or the bottom of the printer?



  • Well if we take just one axis say the X which for example has a range of movement from 0-200 if the endstop is at the 0 then it is deemed to be low end and if at 200 then it would be High end.

    Same rule follows for the other AXIS

    HTH

    p.s.

    If david was to spend his time answering in full all the Newby time Question's then he wouldn't have time for Firmware development which is why He has put a lot of time and energy into the Documentation which is very good (And is much better than you will get from any other Firmware apart from Maybe Smoothie but that is a whole different matter entirely)



  • Post a photo of your printer. That may help a lot.



  • Doug, I totally understand what you are saying. However, I imagine a lot of new comers by these boards such as myself, the docs are great but some don't yet fully understand all the terminology and how it applies. Newbies are part of the game if you are selling products, especially relatively expensive and technical products. There's nothing more a customer hates to hear when trying to get help is just read the directions.

    For example, Simplify 3D has dozens of profiles setup for all different kinds of printers just to get you started in the right direction while you are learning the software and all of it's configuration possibilities. $150. Duet Wifi $170… just read the directions?

    Again, I get it what you are saying, but...





  • Most of us are just end users like you and we were all newbies once. We are more than willing to help if we can but for that we'd need to ask you a lot of questions so it'll be quicker for everyone if you could help yourself just a little bit, by reading the documentation. The configuration tool that we mentioned has a lot of profiles, just like S3D so you may find something that will get you started.

    I clicked on the Thingiverse link you posted and one of the first things I noticed was this in big bold letters Read the build guide before ordering parts. . Did you do that?



  • I'm officially at a 100% loss of what to do next. I went through the configuration app as suggested and answered everything to the best of my ability for a CoreXY. Now it's even worse than before. X is Y and Y is X. End stops aren't behaving properly and Z motors chatter and grind like crazy. I don't know what the problem is and I literally don't have a clue where to start to fix it. I guess it just me…



  • Really? Of course I read the build guide! It's 100% box stock right off the BOM. the only thing I changed was the Duet Wifi. I've also read the Duet Wifi documentation. I guess I should apologize for not fully understanding everything in Duet's docs. I'll also apologize for my less than perfect attitude, my frustration level is high at the moment and Duet support telling me just to read the docs and figure it out on my own doesn't help.


  • administrators

    If X is Y and Y is X on a corexy then you need to adjust the M569 commands in config,.g to get X and Y moving in the right direction. If they were correct before then you can just edit those values in you new config,g.file. This is what you had before:

    M569 P0 S0 ; Drive 0 goes forwards (change to S0 to reverse it)
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S0 ; Drive 2 goes forwards
    M569 P3 S1 ; Drive 3 goes forwards
    M569 P4 S1 ; Drive 4 goes forwards

    So go into the System Files Editor in the web interface, from there edit config,g, and change the M569 commands to the above.

    The config tool can't tell you the correct M569 commands because it doesn't know which way round you wired the motors or which way your belts run.

    EDIT: I have just updated https://duet3d.com/wiki/Configuring_RepRapFirmware_for_a_CoreXY_printe to cover checking that the motors are moving in the correct directions, because I am aware that some people struggle to get them right on CoreXY printers.



  • OK. I understand your frustration - we were all newbies once. If you do what David suggested that should sort your X Y problems.

    Now, what are the issues with the end stops? Maybe I can help but I need to know what type of switch you are using for each axis. Are they simple micro-switches or something else? How are have you wired them - normally open or normally closed? As you look at the front of the machine, where do you want home to be? The usual configuration is front left but it doesn't have to be. On the same note, where have you fitted the switches for each axis? i.e left or right for X, front or back for Y and top or bottom for Z?. What are the limits of travel for each axis? Taking the X axis as an example, when the carriage is as far to the left as it can go, is the nozzle still over the build plate or is the bed some distance to the right? If so, how far? The same in the front to back direction (Y axis).

    I have a corexy and could post my homing files if you like but they will only be relevant if you use normally closed micro switches for X and Y, home to front left and use an IR probe for the Z axis. As you can see, there are an almost limitless number of permutations and lots of questions which only you know the answers to which is why it's hard for anyone to tell you what settings to use. But if you can tell me the answers to the above questions, I'll make a stab at it.



  • At a quick glance they are the makerbot switchs so make sure you have configured per the docs.

    I would set Y as a high end switch as it's at the back of the printer so it should be S2. Make sure the Y moter goes towards that switch.



  • This is how i would do it:

    And in S3D just click flip Y build plate



  • Thank you! I seem to be making some progress today. I got all three to home properly finally. Still some strange behavior though. Once I home Y it doesn't want to move after that when you bump it with the manual movement control. One day at a time I guess. At least everything is moving the correct way and actually stopping when it hits the switch.


  • administrators

    @dklassen:

    Once I home Y it doesn't want to move after that when you bump it with the manual movement control. One day at a time I guess. At least everything is moving the correct way and actually stopping when it hits the switch.

    What does the web interface (or M114) report for the Y coordinate after you home Y, and is it what you expect? Do you have your Y endstop switch at the low end (i.e. at or near Y=0) of the axis, or the high end (i.e. near Y=200 or whatever the Y dimension of the bed is)? I suspect that your M574 command is telling the firmware that the Y endstop switch is at the wrong end.


Locked
 

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