Trying to set up Duet WiFi in very small increments.



  • just got my Duet WiFi and very excited to get started. I will go through the docs to set it up, but I have a couple questions that I have not found in the docs.

    Is it safe to test by connecting one motor at a time to learn how to set it up?

    I assume that this board is like other driver boards that insist I don’t plug or unplug anything while under power. Is that correct?

    Thanks?



  • Yes you can test one motor at a time.

    And yes, you should power off the board to unplug anything. Better safe than sorry.

    Welcome to the forum.



  • The power off to change motors: this is a global recommendation that should be followed for all builds and all electronics.

    That said, these drivers have protection that can prevent damage in the case of accidental motor disconnect. The developers have tried this and failed to destroy the chip - https://duet3d.dozuki.com/Wiki/How_to_destroy_your_Duet_WiFi_or_Duet_Ethernet (Section "Methods that might work, or only impact some functions of your Duet", number 2). This should be seen as a safety feature only, that may save you money.

    The reason for the recommendation is simple:

    • Motors are Inductive Loads (compared to heaters, which are resistive) - they create a magnetic field around them, which stores energy.
    • When the motor stops receiving power, the inverse happens - the stored energy of the magnetic field collapses and generates an electrical spike (inductors store current, like a capacitor stores voltage; that amount of current can create huge voltage spikes - on YT videos I have seen, spikes was measured at up to 10 times the original voltage, lasting only a fraction of a second, but long enough for permanent damage to delicate electronics).
    • All stepper driver chips have diodes (fly-back diodes, which simply runs the spike through the motor) which helps dissipate this spike before it reaches the delicate electronics - this is why we don't blow a driver every time we switch the machines off.
    • With the driver partially disconnected (in the moments one tries to disconnect it), these flyback diodes are unable to send the spike through the motor, and therefore can't dissipate it effectively.


  • Thank you. So far, I’ve been able to get the WiFi working and the x, y and z motors connected, but as of yet, no motion. I have the motors and duet on the bench for testing, there are no home switches and I suspect that is the problem. Would the motors not lock if power is on even if not moving? They don’t. Lot to learn, I guess.



  • The axis won't move without being in a homed state.

    To force a homed state you can send G92 x0 y0 z0

    You could also add M564 H0 to your config.g to allow movement withough being homed all the time.



  • @phaedrux : I am really not clear on what's going on. I edited the config.g file and saved it and reset the board. Went back in and my changes are there, but I see no evidence that they took. I tried to setup a static IP and also added the line you suggested above (M564 H0). It still seems to be using the IP assigned to it from DHCP, and I still can't get any movement from the motors.

    This is probably a no-no, but didn't see a way to attach. Here is the config.g contents.

    ; Configuration file for testing TMC2660 stepper drivers on Duet Ethernet and Wifi with V1.20 firmware


    FOR TESTING ONLY! USE https://configurator.reprapfirmware.org/ to generate configuration files for your printer!


    ; Communication and general
    M111 S0 ; Debug off
    M550 PDuetTest ; Machine name and Netbios name (can be anything you like)
    M551 Preprap ; Machine password (used for FTP)
    M564 H0 ; allow motion when not in "home state"

    *** Ethernet networking: The following lines are used for factory testing - PLEASE REMOVE THEM
    *** I modified, to setup a static IP
    ;M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xED ; MAC Address
    M552 P192.168.0.230 ; IP address
    M554 P192.168.0.1 ; Gateway
    M553 P255.255.255.0 ; Netmask

    ;*** Networking
    M552 S1 ; Turn network on

    M555 P2 ; Set output to look like Marlin
    G21 ; Work in millimetres
    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves

    ; Disable Fan 1 thermostatic mode
    M106 P1 H-1

    ; Axis and motor configuration
    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
    M569 P4 S1 ; Drive 4 goes forwards
    M574 X2 Y2 Z2 S1 ; set endstop configuration (all endstops at high end, active high)
    ;*** The homed height is deliberately set too high in the following - you will adjust it during calibration
    M665 R105.6 L215.0 B85 H250 ; set delta radius, diagonal rod length, printable radius and homed height
    M666 X0 Y0 Z0 ; put your endstop adjustments here, or let auto calibration find them
    M350 X16 Y16 Z16 E16:16 I1 ; Set 16x microstepping with interpolation
    M92 X80 Y80 Z80 ; Set axis steps/mm
    M906 X1000 Y1000 Z1000 E800 I60 ; Set motor currents (mA) and increase idle current to 60%
    M201 X1000 Y1000 Z1000 E1000 ; Accelerations (mm/s^2)
    M203 X20000 Y20000 Z20000 E3600 ; Maximum speeds (mm/min)
    M566 X1200 Y1200 Z1200 E1200 ; Maximum instant speed changes mm/minute

    ; Thermistors
    M305 P0 T100000 B3950 R4700 H30 L0 ; Put your own H and/or L values here to set the bed thermistor ADC correction
    M305 P1 T100000 B3974 R4700 H30 L0 ; Put your own H and/or L values here to set first nozzle thermistor ADC correction
    M305 P2 T100000 B3974 R4700 H30 L0 ; Put your own H and/or L values here to set 2nd nozzle thermistor ADC correction

    M570 S180 ; Hot end may be a little slow to heat up so allow it 180 seconds

    ; Adjustments for dummy heaters on test rig
    M307 H0 A250 C140 D5.5 B1
    M307 H1 A250 C140 D5.5 B0
    M307 H2 A250 C140 D5.5 B0

    ; Fans
    M106 P1 S-1 ; disable thermostatic mode for fan 1

    ; Tool definitions
    M563 P0 D0 H1 ; Define tool 0
    G10 P0 S0 R0 ; Set tool 0 operating and standby temperatures
    ;*** If you have a single-nozzle build, comment the next 2 lines
    M563 P1 D1 H2 ; Define tool 1
    G10 P1 S0 R0 ; Set tool 1 operating and standby temperatures
    M92 E80:80 ; Set extruder steps per mm

    ; Z probe and compensation definition
    ;*** If you have a switch instead of an IR probe, change P1 to P4 in the following M558 command.
    M558 P5 F100 T6000 X0 Y0 Z0 H3 ; Z probe is a Smart Effector and is not used for homing any axes R0.4 not used. Reduced F300 to 100
    G31 P100 X0 Y0 Z-0.25 ; Set the zprobe height and threshold for Smart Effector

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

    M208 S1 Z-0.2 ; set minimum Z

    T0 ; select first hot end
    ; M117 Use https://configurator.reprapfirmware.org/ to set up your printer config



  • Posting your config here is perfectly fine.

    The best way to set a static IP is to use the router to set a DHCP reservation for the duet rather than get the duet to force a static IP.

    What are you sending to test the motors?


  • administrators

    1. Can you confirm that you have applied 12V or 24V power to the VIN terminals, and the blue LED on the Duet is lit?

    2. Send M122 from the web interface and check that it reports that the VIN voltage is in the range 11V to 25V.

    3. To test the motors by themselves, first send G91 to put the firmware in relative motion mode. Then send G1 commands with the S2 parameter. For example, G1 S2 X10 should move the X motor by an amount that gives 10mm of axis movement. G1 S2 X-10 will do the same but in the opposite direction.

    HTH David



  • @phaedrux said in Trying to set up Duet WiFi in very small increments.:

    Posting your config here is perfectly fine.

    The best way to set a static IP is to use the router to set a DHCP reservation for the duet rather than get the duet to force a static IP.

    What are you sending to test the motors?

    I have internet access through Spectrum. I found that the default password for my router would not work. I talked to Spectrum and they changed it to the default but it changed back the first time the router was reset, and now they insist they don't allow their customers to manage the router. Sucks. I will try again though.

    I was not trying to move the motors through G code, but rather through the HTML interface. I will try what DC42 suggested with G code as soon as I get back to my lab.

    Thanks!



  • @dc42 said in Trying to set up Duet WiFi in very small increments.:

    1. Can you confirm that you have applied 12V or 24V power to the VIN terminals, and the blue LED on the Duet is lit?

    2. Send M122 from the web interface and check that it reports that the VIN voltage is in the range 11V to 25V.

    3. To test the motors by themselves, first send G91 to put the firmware in relative motion mode. Then send G1 commands with the S2 parameter. For example, G1 S2 X10 should move the X motor by an amount that gives 10mm of axis movement. G1 S2 X-10 will do the same but in the opposite direction.

    HTH David

    M122, the machine status and my multimeter agree on 24.1 volts.

    G1 S2 X10 worked. The rotation is slow. Can you tell me how to bump the speed up? I will be using lead screws throughout so I need to understand the limits of torque vs speed on this machine with these motors.

    My Gcode skills are practically none existant and I need to do something about that. Can you recommend a good tutorial or other source to sharpen these skills.

    This pretty much tells me that I can make the motors work (to some degree) and that's what I needed to get myself started. Thank you very much.



  • Here's your gcode bible. I suggest having it open in a tab at all times.

    https://duet3d.dozuki.com/Wiki/GCode

    You can specify the feedrate with the F parameter for G1 moves. Your max speed limit set in config.g is likely more than enough (333mm/s) for travel moves.

    For lead screw based movement you may want lower acceleration and jerk values. Perhaps @SupraGuy has some suggestions there as I believe he has a fully leadscrew based printer as well.



  • @crchisholm said in Trying to set up Duet WiFi in very small increments.:

    The best way to set a static IP is to use the router to set a DHCP reservation for the duet rather than get the duet to force a static IP.

    Hmmm. I got the mac address of the Duet from an IP scanner, went into my router (uBee) and entered a new static lease pointing to that mac address and entered the IP I want to use. Had no effect. Still pulling the DHCP ip.

    There's nothing in the setup or config that I need to tell it to use the static IP? I already have an entry in the config.g (above)

    I also sent an email to uBee support, but I'm not holding my breath until they respond.



  • On DuetWifi M552, M553 and M554 have no effect, they are for DuetEthernet. For Duet Wifi use M587 with parameter I(,J,K).



  • @crchisholm said in Trying to set up Duet WiFi in very small increments.:

    G1 S2 X10 worked. The rotation is slow. Can you tell me how to bump the speed up? I will be using lead screws throughout so I need to understand the limits of torque vs speed on this machine with these motors.

    It depends on the screws that you're using. I'm using T8*8 screws, but I'm not trying for really high speed. I've set a max feedrate of 120mm/s (7200mm/min) in my config.g, and most printing is done at 75mm/s or less. (I think that I've configured bridging in slic3r to 80mm/s)

    Acceleration is at 650mm/s^2 on the X axis, 400mm/s^2 on the Y axis, because the Y axis is heavier, and jerk is set to 900mm/min, and I don't see any problems with curves or circles, though I am seeing some visible ringing on the Y axis, so I may reduce Y jerk to see if that takes care of it. I believe that I could bump up my acceleration values somewhat, but the current settings seem to produce a reasonable trade-off between speed and quality.

    @crchisholm said in Trying to set up Duet WiFi in very small increments.:

    > M201 X1000 Y1000 Z1000 E1000			; Accelerations (mm/s^2)
    > M203 X20000 Y20000 Z20000 E3600			; Maximum speeds (mm/min)
    > M566 X1200 Y1200 Z1200 E1200			; Maximum instant speed changes mm/minute
    

    On mine, that looks like this:

    M566 X900 Y900 Z12 E120          ; Set maximum instantaneous speed changes (mm/min)
    M203 X7200 Y7200 Z780 E1200      ; Set maximum speeds (mm/min)
    M201 X650 Y400 Z20 E450          ; Set accelerations (mm/s^2)
    

    My values are a lot more modest, and though it's not the fastest printer in the world, I'm quite satisfied with its speed and ability.



  • Thank you Supraguy! I too am not really that concerned with speed, but would like to get to an optimal point between speed and functionality/quality. I am after quality. My belt driven printers have not been where I would like them to be.

    At present, I am still working on the physical structure of the printer and at the same time trying to get a handle on the Duet WiFi controller.

    What type printer is yours...cartesian, delta, etc? Are you using Nema 17s? Z- probe? 12 or 24v? Me: nema17, 24v, just now starting on my end stop, so the z-probe is a future decision.



  • My printer is a Cartesian. It's self-designed. I won't say that there aren't shortcomings tot he design, but I did learn a lot from building a couple printers before this, and I too came to the decision that the belt driven ones had shortcomings that I wanted to see if I could do better. As of the prints that I did last night (New gantry pieces) I think I might have what I want.

    I did some playing with acceleration and jerk settings (after some troubleshooting with baby-stepping) to get good results, but I forgot to take photos of the results. It finished about 5:30 AM this morning.

    For PETG, I'm using honeycomb infill, which is definitely slower, but I find its much more reliable and consistent with PETG than the standard rectilinear at lower infill percentages, but it's also slower, particularly with lowered acceleration and jerk settings, since the print head is constantly changing directions.

    I am quite happy with the results that I have so far, though there is of course some room for improvement. My next target is to look at retraction settings, and probably pressure advance.



  • Well, your a good bit in front of me. I got the frame worked out and have the X,Y and Z screws mounted, but a lot of small stuff still to hash out. I am tring to figure out the best place to put the X and Y stops and trying to figure out if I want to jump into a z-probe. If I do, I suspect I will start with a TL Touch. I haven't bought the hot end yet. Probably a E3d Titan. At this pace, I don't anticipate melting any plastic for a while yet. Got the printer for that though.



  • I managed to break my extruder carriage last night, and had to print a new one. I filmed printing a layer. This is set in Slic3r with perimeters printing at 45mm/s, infill at 55mm/s, so it's a little slow, but I get next to no ringing at these speeds, so it's suitable for parts that need a good fit for things, in this case the LM8UU bearings that need to be sandwiched inside. You can see that the accel/jerk values slow down the honeycomb infill a little.

    https://www.youtube.com/watch?v=qPBlJEIhc5o

    Please ignore the terrible noises coming from the X movement, it's because I broke the nut mount on the carriage, and it's zip-tied in place, which puts some weird stresses on the anti-backlash nut, but this morning I woke up to a fairly nice new carriage on the print bed, so I should be able to install that tonight, and have a nice quiet printer again.

    That's one thing that I notice, is that my leadscrew printer is MUCH quieter than the MBot printer is, or what I remember my I3 to have been. The screws don't make the same noise as the belts do when running at the same speed settings on each.



  • @supraguy I watched your videos. What extruder are you using?
    I may have gone overkill on some of my construction, but for me, building is the best part, so I don't mind over-doing.

    Yours is the first time I've seen a DIY Lead Screw machine working. Very encouraging. Is this running PETG? I ordered a kilo to experiment with on my belt machine, but then it occurred to me I might be making a mistake. I go back and forth between ABS and PLA sometime with no real issue. I just reverse extrude to backout the material when the extruder is cold and everything comes out clean. I understand that PETG tends to stick to metal more than the others. Do you think I am going to find myself with a problem getting the PETG out of the extruder clean to go back to PLA or whatever?

    My plan is to use 1.75 PETG on the new machine and continue to use 3mm PLA and ABS on the belt machine. One thing is certain about my plans though....the always change mid stream.



  • @crchisholm I switch between PLA and PET-G all the time. You won't have any issues purging PLA with PET-G.

    When switching over I set my temp at 230C. No problems at all.


 

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