Saturday, June 16, 2018

Configuring the Duet Board

Once all the wiring was done, it was time to get everything hooked up and running.  I found some things a little confusing, made a couple errors, but in the end it wasn't too difficult to switch from the SmoothieBoard to the Duet Ethernet controller.

First things first: Configure

I used the on-line configurator to generate the config files and uploaded them to the Duet board via the web interface (DWC).  I ran into a few issues with the configurator, some of which was confusing labeling and other things which were just not right.  It seems the configurator has not quite kept up with firmware advances.  More on this later...

Next up: Motion Testing

I checked the motor connections and found they were essentially the same between the two controller boards, so all I had to do was plug the motor cables into the appropriate connectors.  UMMD had both a Z=0 and Zmax endstop switches but the Duet board doesn't have maximum and minimum endstop inputs, so I used the Z=0 switch and left the Zmax switch unconnected for now.

I used NC snap action switches for all the endstops in UMMD.  Both SmoothieBoard and Duet use 3 pin connections for the end stop switches, but be careful!  On the SmoothieBoard, the NC switch connections are made between adjacent pins in the connectors and on the Duet board, the NC connections are made using the two outside pins.  After moving the wires within the endstop connectors, I plugged them in and verified operation by watching the readout on the web interface.

With motors and endstops connected, I moved the A and B motors individually to see which way the extruder carriage moved and found that I needed to reverse the direction on the B motor which was a simple change in the config.g file.

The Z axis set up was one of the confusing points in the online configurator.  I use a simple Z=0 switch to zero the bed, which is apparently not very common in machines that use the Duet boards.  In the configurator there are multiple options for "Z probe", including "none" and "switch".  I looked at switch and there were a couple offset values and a threshold value listed, which didn't seem appropriate for a simple Z=0 switch, so I figured it must be for some sort of extruder carriage mounted switch that is used to probe the bed.  So I selected "none" and kept going.

When I tried to get the Z axis working, since I had selected "none" in the Z probe section of the configurator, it assumed there was no switch, and the DWC and the touch panel both wanted me to manually zero the bed.  The problem was I couldn't get the bed to move because the Z axis had not been homed (it nicely displayed an error message to that effect).

That's what we call a "catch-22" situation.  I was trying to home the bed but I couldn't move it because it hadn't been homed.  I later found out there had been a firmware update a few days before I tried to configure that fixed that problem, but I had not updated the firmware since the update I did the day after I received the board.

So since I couldn't get it working that way, I reconfigured for Z using the "switch" option, assuming that the default 2.5mm offset was going to put the nozzle 2.5 mm above the bed after homing.  Big mistake!  2.5 mm offset meant that the nozzle was going to be 2.5 mm below the bed surface.  At some point after it was all moving I loaded a gcode file and hit go and it slammed the bed into the nozzle and then dragged the nozzle across the PEI surface, leaving a deep gouge about 100mm long before I hit the stop button.  When using the "switch" option, the offsets should be set to "0" or negative values.  I reconfigured using the "switch" option again and set the offsets to "0" and it worked fine after that.

The "switch" option is selected and offsets default to 2.5 mm, which means if you don't change the value to "0" it will drive the bed into the extruder nozzle.  I learned that the hard way.

I used the 256:1 microstepping interpolation for all the motors, and copied the accelerations and steps/mm from the Smoothieboard configuration to the Duet config.g file.  Everything worked fine, and the machine is much quieter now that it used to be.  SmoothieWare uses something called "junction deviation" instead of the "jerk" that is used in RRF, so I started with the default jerk value and will tune for acceptable performance, a trade between print speed and ringing in the print surface.

Configuring Heaters

UMMD has three heaters, one each for the extruder, bed, and chamber.  The chamber and bed heaters are both line powered and use SSRs to switch power.  The Duet board has three heater connections, all screw terminals.  There's a "bed heater" connection that uses very large screw terminals so it can switch a lot of current for a DC powered heater.  The other two heater outputs use smaller screw terminal connections, labeled E0 and E1.  This is where things start to get confusing.

When you use the online configurator, it is difficult to understand when the configurator is referring to a device, or the connection on the circuit board, and when you look at the config.g file, it gets worse.  The E0 and E1 motor and heater connections are normally used for the first and second extruders, though reassignment is possible.  Here's a breakdown of the default connections:

Physical DeviceConnections on Duet boardFirmware
first extruderE0 motor, E0 heaterT0 (tool), H1 (heater), E0 (motor)
second extruder (or chamber heater)E1 motor, E1 heaterT1 (tool), H2 (heater), E1 (motor)
bed heaterbed heaterH0

Once I had sorted all this out and mentally translated the connections on the configurator to the physical devices and the board connections, I was able to get everything working, but I ran into some problems with PID tuning and ended up on the forum looking for some help.  The configurator was inserting M301 commands in the config.g file which have been superceeded by M307 commands.  I made the recommended changes and was able to get the heaters working.  I believe they'll be updating the configurator soon.

Even more confusing than I thought- if you check the "chamber heater present" box, the first extruder heater gets assigned to the E1 screw terminals and the chamber heater gets assigned to the E0 heater terminals.  Ugh!

Along the way I tried swapping the bed and extruder heater connections, an option in the configurator.  That didn't work out for me because the Panel Due does not understand the swapped connections.  I wanted full control using the Panel Due so I swapped back to the default connections and it is all working as expected.

Finally, I was ready to make a test print!  I sliced a simple file for some Maker Faire give-aways (left hand threaded nuts and bolts, just to mess with peoples' minds), then uploaded the gcode to the Duet board and started the print.  Results were excellent and the machine was very quiet.  Here's a short video snippet:

UMMD: First test print with Duet controller from Mark Rehorst on Vimeo.

Compare the sound level in the video above, with the Duet board, to the sound level in this video, made using the SmoothieBoard:

UMMD ringing test #1 from Mark Rehorst on Vimeo.

No comments:

Post a Comment

Leave comments or a questions here and I'll try to post a response as soon as I can.