Showing posts with label Panel Due 7i. Show all posts
Showing posts with label Panel Due 7i. Show all posts

Saturday, August 18, 2018

UMMD: What Would I Change, What Would Stay the Same


It's been a bit over a year since I "finished" building UMMD.  Some people at the makerspace and in online forums have asked me what I would do differently if I were to build another, so that's what I'll cover in this post.

The XY stage:

The XY stage performs well, but a few things are less than ideal.

I designed the XY stage with the motors outside the enclosure so they wouldn't overheat when printing ABS at 45-50C inside the enclosure.  After using the printer for about a year, I find that the motors only get a little warm (aluminum motor mounts screwed to aluminum plates helps!), so I think they'd be fine inside the enclosure.  That would simplify the front door of the enclosure and allow a single door, held on with magnetic strips to be used.

The extruder carriage design leaves a lot to be desired.  I did not adequately account for the nozzle offset from the center-line of the extruder so I had to shift the bed to one side to make the entire surface printable.  The carriage is a little longer (vertically) than I'd like it to be, too.  In the original design, I simply mounted the extruder motor, extruder, and hot-end at the end of a piece of cut up tubing.  The puts the weight well below the X axis bearing block and so you can imagine it swinging around like a pendulum.

Original long extruder carriage design.  The heavy extruder/motor hang like a pendulum and probably swing like one, too.

I have redesigned the extruder carriage and have already put the new design into the machine.  The new design moves the motor and extruder immediately above the X axis bearing block and only the hot-end is down below, so there isn't nearly as much mass swinging back and forth like a pendulum.  The new design is sort of a very short Bowden type- there's an 80 mm tube between the extruder and the hot-end.

New extruder carriage design.  This is made of two aluminum parts- a short piece of rectangular tube where the belt clamps are mounted, and a flat plate onto which the extruder and hot-end are mounted.
The new design leaves lot of room to add a print cooling duct and blower, if I decide it needs it (I rarely print PLA).  The nozzle is now centered, which allowed me to shift the bed and support structure back to the center of the frame, where it belongs.

If I were redesigning the XY stage, I'd probably allow myself a little more room for the extruder carriage- they always take more space than you plan for.

This is the new extruder carriage, just after mounting it and running its first test print.  I'll dress up the wires a little bit when I've decided on the final configuration.  The extruder is a cheap Chinese made aluminum Titan.  It has proved less than great and will be replaced by the E3D Titan that it replaced.
Print quality has improved a little with the new arrangement.  I don't see much difference looking at the prints with my eyes, but under a microscope they look a little better.  Moving most of the weight closer to the X axis bearing block and using a very rigid 4.75 mm thick aluminum plate to mount the hot-end has improved rigidity and reduced ringing a little.

On a complete do-over, I might flip the brackets that hold the bed support on the Z axis over, which would lift the bed higher when it's at the top of the Z axis, allowing the extruder carriage to be shortened by at least 40 mm.

When I designed UMMD, my main goals with regard to floor space were that the machine would easily fit through standard width doorways without having to take anything apart, and would fit into the back of a Prius, both of which were met.  The XY stage design determines the footprint of the machine.  As built, it doesn't make very efficient use of floor space.  For the 300 x 300 mm printable bed area, the machine is about 610 mm wide and 530 mm deep (not counting the XY stage motors protruding from the front).  Of course, that includes the enclosure, so it isn't quite as bad as it seems, but with some additional design effort it might be possible to reduce the required floor space.

Some people have commented that using square aluminum tubing to hold the pulleys for the XY stage is a problem for them because they don't have access to a milling machine.  I used a mill to cut away some of the metal because it was available at the makerspace, but it's not necessary to mill the aluminum tubing.  Straight cuts made with a hacksaw are sufficient to make the pulley mounts and the motor mounts.  No accurate cutting is required, though drilling is best done using a drill press or mill to ensure that the holes on the top and bottom of the tubes line up vertically.

The Z axis:

The Z axis has been working very well, and since the original design was done I have done some experiments and made a few changes.  It originally used 3mm pitch HTD-3M belts with 36 tooth pulleys that made for awful full-step Z axis resolution of 18 um (55.55555 full steps/mm).  I have since changed to 60 tooth, 2mm pitch GT2 pulleys and belts and now the full step motion is 20 um (50 full steps/mm).  I also changed the design of the upper pulley plates by milling anti rotation features into them and going to a single bolt holding each of them to the printer's frame.  Finally, I put twists in the belts so that the smooth sides of the belts ride on the smooth pulley surface (it doesn't seem to have affected performance either way, so I may change it back).

The one issue with the upper pulleys is that the hole locations for the mounting bolt and the pulley's shoulder screw have to be very accurately drilled to keep the belts parallel to the Z axis guide rails.  That takes some very careful measurement and modeling of the Z axis components.  If the pulley could be moved horizontally (maybe mount it on the horizontal frame member above the top of the Z axis frame member) it would be easy to ensure parallel alignment of the belts without having to drill accurately.  That would create another problem- how do you tension the belts???

New upper pulley plate held in place with a single carriage bolt.



The Z axis belt clamps are held in place with 4 screws.  The way the belt clamps are designed, the screws have to be accessed from the outside of the Z axis, which is OK if the side panels of the printer are removable, but the panels fit into the t-slots in the frame and are not easily removed.  I would (and may) redesign the belt clamps with the screws on the inside so I no longer have to use a cumbersome right-angled, ratcheting screw driver to remove the screws.


The easiest way to remove the belt clamps is to use a right angled screw driver because the side panels are not easily removable.  I like the side panel material and the way it is mounted, and it should be pretty easy to redesign the belt clamps for easier removal by turning the screws around so the heads are toward the inside.




The heater fan blows warm air against the Z motor- not good.  I added a make-shift heat deflector from a piece of sheet metal, but it needs to be more securely mounted.  I also need to add a wire screen to cover the whole heater assembly- the black and orange wires on the front of the heater bar carry 117VAC.  Debris from the printer and failed prints can fall off the back of the bed and land on the heater bar where they might melt or worse.



The heater needs to be covered to prevent debris falling off the back of the bed from landing on the heater bar, and the wire connections need to be covered to prevent electric shocks.  I still need to add a TCO to protect against SSR failure, and a permanent heat shield needs to be added to the Z motor.

I may add some sort of cover to the Z axis drive pulleys to prevent print debris from landing on them and getting caught between the belt and pulley.  I have never seen anything getting caught in there, but I'm sure it's just a matter of time until something does.

The Z=0 switch currently uses a snap action microswitch.  I think an optical interruptor type switch will be a higher precision way to go, so I'll be redesigning the cam/lever mechanism for an opto switch in the near future.  The cam/lever mechanism works extremely well, making small adjustments to the Z=0 position very easy.

As I said above, I might consider flipping the bed support brackets on the Z axis bearing blocks over so the bed will ride 40 mm higher than it does now.  That would allow me to shorten the extruder carriage.  I didn't do that originally because I was concerned about the possibility of bed vibrations getting amplified by the longer lever between bed surface and the centers of the bearing blocks.

Electronics:

I started with a SmoothieBoard a RRD Graphical LCD panel.  The installation was the least attractive thing about the printer.  The photo below is the best one I have of the top of the printer taken during the installation of the electronics in the original configuration.  The LCD panel was eventually mounted on the front of the plastic basket that is holding the rest of the electronics.  You can see why I wanted to redo the electronics installation:


Original electronics mostly installed.  Ugly, but functional - not up to the high standard of beauty set by the rest of the printer.



Other things kept coming up and the electronics was working, so the redo kept getting pushed out to later and later dates.

If you've been following this blog, you know I was recently provided with a Duet Ethernet controller and 7" Panel Due touchscreen interface by Tony Lock at Think3DPrint3D (thanks!).  That was all the excuse I needed to get to work on rewiring everything.

New electronics installed and working.  I added a custom splash screen (shown).  It sure looks better than the original configuration!  I set the Panel Due and power switch back from the front so that both would be protected from damage during transport.  Unfortunately, that makes the uSD card slot in the Panel Due inaccessible.

It performs very well, and has some great features that are lacking in the SmoothieBoard, but I am still adjusting to the change in work flow that has resulted from the change over.

I am used to putting gcode on SD cards and plugging them into a stand-alone printer and printing. The Panel Due has a uSD card slot, but it's located on the bottom edge of the panel, and in my installation, it's inaccessible.  That means I have to send gcode files to the uSD card on the controller board via a network connected computer.  Of course, I can preload the uSD card with a bunch of stuff to print, but I will still have to have a computer there to tweak things or slice other files.  I'm looking into the possibility of adding an SD card slot, independent of the Panel Due, to the front panel of the printer.

Other than the change to my work flow, the Duet board has been great!  The Panel Due and web interface (for that network connected computer) are much better than anything available for the SmoothieBoard.  Configuration is a little more difficult than SmoothieBoard, mostly because the documentation isn't as complete or well organized, but help is readily available via the online forums and I have no doubt the documentation and its organization will improve with time.

I can't say that I've seen any print quality improvements I'd attribute to the electronics, and don't necessarily expect to, but the machine is much quieter with the 256:1 interpolated microstepping drivers on the Duet board, and that alone may be reason enough to make the change.

There is a manual bed leveling assistant built into the firmware that makes accurately leveling the bed very quick and easy.  I wrote a blog post on that here.  I also set the firmware to put the printer's origin at the printable center of the bed which makes configuring slicers to use this printer much easier.

The top and bottom of the electronics enclosure are made from 1/4" thick foamed PVC.  That material provides some thermal insulation, is light weight, but a little soft and flexible.  I had already reinforced the bottom piece with aluminum tubing, so it was plenty rigid, but I needed to support the top piece to prevent sagging, so I printed a cone through which the filament feeds into the printer from the spool holder that sits on top of the printer.  The cone supports the top cover and prevents sagging.  I used pieces of the dual layer PC to make side, front and rear panel pieces, and printed pillars with slots to fit.  I used bright green PETG to print the pillars and then set up the splash screen on the Panel Due with bright green text to match.

Extruder/Hotend:

I like the Titan extruder and V6 hot-end, but they have some issues (see here and here) that I was able to address by switching to cheaper, Chinese sourced parts.  Specifically, I installed an aluminum version of the Titan (after modifying it), and an XCR3D Hexagon knock-off hot-end.  The hot-end seems to be holding up well, but the initially silent cooling fan that came with it is no longer silent after operating inside the 45C enclosure for a few hours.  The original Titan extruder is going back into the machine because of some problems with the aluminum Titan.  I've heard that Bondtech makes some pretty reliable extruders.  I may give one of those a try.

The Frame and Enclosure:

The one thing I would definitely change is the size of the casters on the front wheels.  I occasionally have to take the machine up and down stairs and the skate wheels are a little too small for that.

Now that the electronics are mounted and enclosed in a more cosmetic manner, I will add some printed bumpers to the back of the frame so that when I slide the printer, laying on its back, into my car, the electronics enclosure won't get damaged.

The dual layer PC I used for most of the enclosure panels has a lot of advantages.  It is very light weight, very tough, thermally insulating, and produces nice optical effects.  The disadvantages are that it doesn't help with printer frame rigidity and installing it in the slots in the frame can make servicing the machine a little troublesome.  I have noticed that the machine shakes a bit when I have acceleration and print speed turned up high.  It might be better to use rigid side panels that bolt to the frame so they can help stiffen it.

The big, lower front door is held on with magnetic tape that has been holding up well.  The adhesive will eventually let go of the printer's frame and/or the 1/8" thick polycarbonate door.  When that happens, I'll apply some contact cement and reattach the magnetic tape and the problem will be permanently solved.


More Changes to the Z axis

4/30/19  I made more changes to the Z axis.  The original belt clamps failed so I redesigned them to fold the belts back onto themselves.  I also switched from steel to glass core belt and took out the twists that didn't do anything but make the belts ride hard on the pulley flanges.

I made it easy to release the Z axis belt clamps without resorting to a right angle screwdriver.


One of my PTFE leveling screw blocks failed so I redesigned them and they are now much better than the originals. 

I raised the bed about 50mm and shortened the extruder carriage by about 60 mm.


Wednesday, July 4, 2018

UMMD: A Better Way to Set Up the Origin and RepRapFirmware Manual Bed Leveling Assist

Setting Up the Printer's Origin


In a previous post I explained how to set up the endstops and origin of a 3D printer.  In the method I outlined, slic3r is easy to set up, but Cura required some custom gcode to get prints dropped on the center of the bed.  It turn out that it's easier to set up the slicers to drop prints on the center of the bed if the printer's origin is at the printable center of the bed.

This post describes how I put UMMD's origin at the printable center of the bed with the new Duet Ethernet controller board, and how you can do the same for your printer.

First, you have to know the dimensions of the printable area of your printer's bed.  It may sound strange, but some machines can't print on the entire bed surface.  So, move your printer through it's motion limits and watch the nozzle relative to the bed.  If it is unable to print on part of the bed, mark a line (or lines) on the bed where the nozzle can't go any further.  Now mark the center point of the printable area of the bed (you can find the center by drawing diagonals between opposite corners of the printable area).

Next, move the extruder to the "home" position (where the X and Y end stop switches are both triggered). Use a ruler to measure the distance from the printable center of the bed to the nozzle in X and Y and write the numbers down.  Now move the extruder carriage to the diagonally opposite corner of the motion limits and measure again, and write down the numbers.

Make a sketch of the top view of the printer, showing the limits of nozzle travel and the outline of the printable area within those limits, like this one that I made for UMMD:
Top view of UMMD's XY stage.  The outer rectangle represents the limits of XY motion of the extruder nozzle.  The  printable area of the bed is a 300x300 mm square that fits within those limits.  The leveling screws are shown for reference (we'll use those later).  The home position is in the right rear corner of the machine because that's where the end stop switches are located.

The origin is set to the dead center of the bed's printable area.  Notice that the bed is not centered within the range of motion.  That's OK.

In the Duet config.g file, the following statements define the origin as the center of the bed's printable area:

M208 X-151 Y-185 Z0 S1 ;  sets the minimum values for all axes
M208 X150 Y153 Z680 S0  ; sets the maximum values for all axes

With the Duet (RepRapFirmware), the fact that the upper right corner is the home position is a function of where the endstop switches are positioned on the X and Y axes and the motor rotation directions.  In SmoothieWare, there are explicit statements that the X and Y axis home to max or min, and then the ordinate values to assign to each.

Now mark the coordinates of the corners of the printable area of the bed:
When you set up Cura you tell it the dimensions of the printable area of the bed (in this case, 300x300 mm), and check the "origin at center" box:

Cura custom machine setup.  There's no need to make changes to the start gcode to position the origin.
Plater view in Cura, origin at center of bed.

When you set up Slic3r, you enter the dimensions of the printable area of the bed and then enter offsets that put the origin at the center:

Slic3r bed set-up.  You enter dimensions of the printable bed area and offset values that put the origin at the center of that printable area.



And this is what you see in the Plater view- origin at center- it matches the diagram perfectly.




Why is this better?  Besides the easier setup in the slicers, it makes the gcode a little more portable between different printers, assuming they use origin at center.  Of course, you still need other things to be right for gcode to be moved from one machine to another.  You won't be able to use gcode for a 300x400x200mm print in a machine with print capacity that's 200x200x200, for example.

Manual Bed Leveling Assistant


The Duet has been working fine for a few weeks now and I am still exploring some of the options in the firmware.  One of the really great ones for people with printers like UMMD that have flat, stable beds that don't require frequent releveling, is called the "manual bed leveling assistant".  The assistant "probes" (actually, you do the "probing" with a piece of paper placed under the extruder nozzle) the bed at a few locations then does a least-squares fit and tells you how much to adjust each leveling screw up or down to minimize leveling error .  It's a quick process that works extremely well.  In order to use it, you'll need to add the coordinates and pitch of the leveling screws in a config file statement, so start by adding the coordinates to the diagram we drew above by measuring the distance from the bed center to each of the screws:

Leveling screw coordinates added.  These coordinates will be used in the M671 statement in the config.g file.


There's going to be some gcode presented below.  You can find definitions of all the gcode supported by RepRapFirmware at this site.

You'll also need to select probing points, at least one for each leveling screw.  If you have 3 leveling screws, you might choose to use just 3 probing points.  You must use at least as many probing points as there are leveling screws, so if you have 4 screws, you need at least 4 probing points.  I chose to use five points, one near each corner of the bed and one at the center:
Probing point coordinates added.  P0-P4 designators are used in G30 statements in the bed.g file.

The config.g file has to contain a few specific lines to enable use of the manual bed leveling assistant.  First, there's and M667 statement that tells the firmware the architecture of the printer you're setting up (coreXY, delta, etc.).  Then you need a couple statements that set up the origin of the printer because everything to come will depend on the coordinates.  You need an M558 statement to tell the assistant how the probing is to be done, and an M671 statement to tell the assistant where the leveling screws are located.  In the M671 statement, list the screw coordinates reference first, then pitch, then roll.  UMMD's config.g file will contain:

M667  S1  ;  set coreXY architecture
.
.
.
M208 X-151 Y-185 Z0 S1 ;  set minimum travel limits (front left corner) for X, Y, and Z
M208 X150 Y153 Z680 S0;  set maximum travel limits for X, Y, and Z
.
.
.
M558 P0 F180 H5 T6000  ; no probe, probe at 180mm/min, start 5 mm above the bed, travel between probing points at 6000 mm/min
.
.
.
M671 X-161:161:0 Y0:0:-161 P0.7  ; defines leveling screw locations and thread pitch

Finally, you need to have a bed.g file that specifies the coordinates of the probing points.:

bed.g file:

G28 ;  home
G30 P0 X-140 Y-140 Z-99999  ; first probe point coordinates
G30 P1 X140 Y-140 Z-99999  ; second probe point coordinates
G30 P2 X140 Y140 Z-99999  ; third probe point coordinates
G30 P3 X-140 Y140 Z-99999  ; fourth probe point coordinates
G30 P4 X0 Y0 Z-99999 S3  ; fifth probe point coordinates, 3 leveling screws

Once all this stuff is in place, you can start the manual bed leveling assistant from the Panel Due by first preheating the bed and nozzle to print temperatures, homing all the axes, then touching the wavy looking icon under "P0" on the right side of the control screen.

Heat up the bed and nozzle, home all axes, then touch the sine wave looking icon on the right side to start the manual bed leveling assistant. Note: I did not heat the bed and nozzle for this photo...
Then you'll see a screen like this for each of the probing points:

The manual leveling assistant at work.  The nozzle will start at the height set by the H parameter in the M558 statement in the config.g file, in UMMD, that will be 5 mm above the bed.
Put a piece of paper between the bed and the nozzle and lower the nozzle using the buttons on the screen until the nozzle just grabs the paper.  After the last point has been probed, the assistant stops. and you go back to the ordinary control screen.  What happened?!!

Fear not!  Switch to the console screen and you will see a message telling you how far off the leveling is at each leveling screw, and how much to rotate it to correct the error:

The message at the bottom tells you the result of the manual leveling assist process.  The first leveling screw is considered the reference and the error and correction are always zero there.  
The example above shows that there is no error or adjustment required at the reference screw (it will always show that, and that's why you put the reference screw coordinates first in the M671 statement on config.g), the bed is low by 20 um at the pitch adjust screw, and the bed is low by 60 um at the roll adjust screw.  Since I told it the pitch of the screws are 0.7mm (the P parameter in the M671 statement in config.g), the bed Pitch adjust screw needs to be turned 0.03 of one rotation (that's not much!) in the direction that raises the bed to correct the leveling error, and the bed Roll adjust screw needs to be turned 0.08 of one turn in the direction that raises the bed to correct the leveling error.

You twist the leveling screws by the stated amounts to bring the bed into "level" (true meaning is parallel to the XY plane of the printer defined by the X and Y guide rails).  If you are full-on OCD or just borderline like me, you repeat the process as many times as it takes to satisfy you that the bed is as level as it can possibly be.

Finally, it's a good idea to readjust the Z=0 position after you're satisfied that the bed is level.

You can find info on using the manual bed leveling assistant here, and definitions of all the gcode that RepRapFirmware supports here.




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.

UMMD: Migrating from SmoothieBoard to Duet Ethernet, Part 3

Electronics Enclosure

The Duet board and Panel Due have updated firmware, the Duet is mostly configured, it talks via a direct ethernet connection to my netbook computer, so it's time to install the Duet and Panel Due into my printer.

The cover of the printer is designed so it keeps the slots in the upper front of the machine open so I can slide the top front cover in and out of them.  That means the Panel Due has to provide the same clearance, and means I can't put switches or jacks on the front panel unless I set them back to provide clearance for that cover.

The existing electronics are screwed to the top of the printer and covered with a clear plastic basket - ugly!  I decided to mount the Panel Due standing vertically at the front of the machine and designed a mount/bezel for it, then made standoffs of equal height to support a new top cover.

I decided to use more of the 8mm thick dual layer PC for the walls of the enclosure, so I designed the standoffs with 8mm wide slots to hold the PC.

Side panels of the electronics enclosure use the same 8 mm dual layer PC as the printer enclosure.  The power switch and LCD screen are set back to protect them during transport and prevent them from scratching the upper front cover of the printer.
Once the standoffs were made, I started rearranging the electronics.  I decided to keep all the electronics on top of the machine- there's plenty of room up there, and that would minimize the number of cables running up and down the machine's frame.

The switch immediately above the main power switch is used to turn the lights on and off in the printer.  The other switch is there for future assignment.  The fan is a 120mm 220V unit that runs very quietly on 117V.  The cone in the center is there to support the center of the board (also foamed PVC) that will cover the top of the enclosure.  There are 3 fuses on the rear panel- one each for the bed and chamber heaters which are both line powered, and an extra for future expansion.
The Duet board will go where the SmoothieBoard is, minimizing additional wiring that has to be done.  I added a panel mount network extension jack to the back/side of the machine (if I put it on the front panel, I wouldn't be able to slide the top-front cover in and out of the frame with the cable plugged in).

Wiring


A few weeks ago, fellow Milwaukee Makerspace member and all-around cool guy that you should know, Jim Rawson, showed me some connectors that he was going to use for making bus-type connections to power supplies for a model train layout he is working on.  The things he showed me were Wago 221 type "lever nuts".  They are intended to be substitutes for twist-on wire nuts used in electrical boxes, but they make great substitutes for screw terminal blocks.  They have nice levers that flip up to open the connector, then snap back down to make a solid electrical connection with either stranded or solid wire.  They're good for 24 to 12 gauge, solid or stranded wire and can handle at least 20A at 300V.  The only tool you need with them is a wire stripper.  These things hold on tightly- I tried pulling a wire out while the lever was down and couldn't do it.  I don't think I'll ever use screw terminal strips again.

The WAGOs are high quality German made parts with a bunch of safety certifications.  The 5 position WAGOs cost about $1 each, but you can buy no-cert Chinese knock-offs for much less, if you don't mind taking a gamble.

Wago 221-415 in a printed holder.  All you have to do is strip 11 mm of insulation off the wire, insert the end into the hole, and snap the lever down.

Yes, these things are pretty small.

After designing and printing the WAGO holders I realized that they can probably just be hot-melt glued to the baseboard of the enclosure.  I tested it and it seems to work fine.  Oh well.  To a hammer, everything looks like a nail!  If you want to print some of the WAGO mounts:

The STL file for the Wago lever nut holder is here.

The Fusion360 CAD file is here.

Power wiring diagram - most of this junk is there to enable lots of white and UV LED lighting.  The connections at A and B are for the bed heater, and connections at C and D are for the chamber heater.  There are WAGOs at A and C that I neglected to include in the diagram.  The LEDs connected at the SW GND WAGO are the white LEDs that light up the build chamber.  SWA and SWB are a single DPDT, center-off toggle switch.

I laid out the wires for the AC power first, since those are the least likely to require any changes in the future.

Lighting


There were two, 24V white LED strips in the top of the enclosure, and two 12V white LED bars on either side of the front opening of the printer.  Since I had the whole top off the machine I decided to add two more of the 24V LED strips to the top cover.

The 12V white LEDs are powered by a DC-DC converter and since the 12V may be useful for other things, I decided to power that converter all the time and have a 12V source readily available for future use.  The UV LEDs are powered by another DC-DC converter that outputs about 19V to power the LEDs.  19V is not very useful for anything else, so the light switch on the front panel switches the ground on the input side of the DC-DC converter that powers the UV LEDs.

Connections


I wanted to be able to remove the entire electronics enclosure from the printer, so I thought about how to make that as easy as possible.  The connections to the controller board are all connectorized, so they're easy to deal with.  I labeled all the plugs that go into the board with their functions so it will be easy to plug them back in.  But there are a few things that will need connectors to make it easy to remove and reconnect everything.

Connections to the bed and enclosure heaters are needed, as well as connections to the LED light bars at the front of the enclosure.  Each of the heater connections involves only two wires, so I went with Anderson Power Pole connectors for those.  Since there are multiple connections needed for the LED bars, and I might want to add more lighting in the future, I decided to put some extra WAGOs in the electronics enclosure on top of the machine.  The extra connections available on the WAGOs will be useful to add fans, lighting, etc., in the future.


Top view of the printer.  I know, not too pretty...  The connections to the Duet board come up from the bottom of the enclosure to the left of the board.  In the upper left corner the connections for the bed and chamber heaters come up to WAGOs.  On the lower left the wires for the LEDs located on either side of the front of the machine come up to WAGOs.  There's a 220VAC fan in the UL corner that is powered via 117VAC, so it turns slowly and quietly.  It is positioned to blow air over the Duet board to ensure that it stays cool.  There's a vent in the UR corner to allow air flow when the top cover is in place.



24V supply and 24-12V DC-DC converter.  There are 24V, GND and 12V WAGO's to make current and future connections.



Duet board, 24V-19V DC-DC converter to run UV LEDs, 19V, 24V, 12V, and switched GND WAGOs for current and future connections.


Network connector (left), power input panel (center), bed heater SSR (orange), and line, neutral, and GND WAGOs for current and future connections.   The GND WAGO, upper right will have a connection to the printer's frame.  There is a spare fuse holder for future use, and plenty of room above the network connector to add switches, or whatever.


Next up:  Tweaking the firmware

Monday, April 23, 2018

UMMD: Migrating from SmoothieBoard to Duet Ethernet, Part 2

Configuration

Part of the conversion from SmoothieBoard to Duet involves deciding what has to connect to what and then configuring the board appropriately.

This table lists which items in UMMD will connect to which I/Os on the Duet board:

UMMD Duet connection Note
A motor Drive 0 part of XY stage
B motor Drive 1 part of XY stage
Z motor Drive 2 Rino motor
extruder motor Drive 3
X endstop X stop switch located at Xmax
Y endstop Y stop switch located at Ymax
Z min endstop Z stop Z=0 switch
Z max endstop E1 stop
bed thermistor Thermistor 0
hotend thermistor Thermistor E0
chamber thermistor Thermistor E1
bed heater Heated Bed drives SSR
extruder heater E0 heater
chamber heater E1 heater drives SSR
extruder cooling fan Fan 0 will leave off until hotend temperature reaches 45C
print cooling fan Fan 1 PWM
chamber heater fan Fan 2 not sure about this

The Duet board wiring diagram is located here.

The Zmax switch located at the bottom of UMMD's Z axis prevents the high torque drive from trying to move the bed lower than the bottom of the axis, which might cause some damage to the belts or pulleys.  I'm not sure how I'm going to handle that yet.

The line powered 500W chamber heater has a fan to prevent the temperature of the heater bar from getting too high and to circulate the warm air inside the chamber.  Right now the fan is driven by the signal that drives the SSR switching power to the heater, which uses PWM under PID control.  It might be better to operate the 24V fan at some constant, but <100% duty cycle (not trying to create a tempest, just stir the air in the enclosure a bit), whenever the heater is in use as opposed to switching the fan on and off with the heater bar.

UMMD uses a 24V, 200W, fanless power supply, and has two dc-dc converters that power white and UV LEDs.  Those LEDs are switched manually with a DPDT switch.  There is currently a fan that blows air over the SmoothieBoard and the power supply to keep things cool.  None of that will affect the configuration of the Duet board.

I have two options for the print cooling fan- the small squirrel cage blower that mounts on the extruder carriage and the remote CPAP blower that is powered by its own driver board under PWM drive from the controller.  Whichever I settle on will use one of the PWM fan outputs.

Electronics Considerations


UMMD has electronics mounted on the top of the enclosure, at eye level, so I don't have to bend over when working on the machine.  Most of the wiring has to connect to the XY stage on the printer, so putting the controller on top keeps most of the wires shorter.  With the Duet conversion, I may move the 117VAC fuses and distribution, 24V power supply, and bed heater SSR to the bottom of the printer.  That will considerably reduce clutter on the top of the machine.  The power supply and SSR are pretty reliable so I shouldn't have to do a lot of work involving those.

The biggest problem is deciding how to mount the LCD panel.  The easiest thing is to just stand it upright on the top front of the printer and be done with it.  That would be reasonably safe when transporting the printer, but doesn't address the problem of curious fingers messing with it at events like Maker Faires.  The Panel Due doesn't currently support a PIN for access (though I posted a request for it on the forum), so covering it is the best way to control access.

Panel Due details are located here, but more up-to-date info appears to be here.

Getting It Talking On the Network and Update Firmware


It took a bit of searching (the web site has a lot if info, but isn't optimally organized), but I found out how to get the Duet board onto my network so I could take a look at the web control interface and configure it for UMMD's hardware.  Here is the procedure.

I powered the board using a USB cable and connected the network cable and followed the procedure, but couldn't get the web interface to show up in my browser because there was another device on my network that had the same IP address that the Duet was reporting.

My Duet board was configured with an IP address of 192.168.1.14 (in the config.g file on the Duet uSD card), and that happened to already be assigned to a device on my network.  Once I figured out what was going on I edited the config.g file and set the assignment to 0.0.0.0 so that my router would assign an unused IP address.

After that the web control was accessible through my browser.

Next step- update firmware and web server.  I downloaded the firmware (DuetEthernetFirmware.bin) and the web server (DuetWebControl.zip)here, and then installed them, firmware first, then the web server, via the web control page in my browser.  Both updated with no trouble at all to versions 1.21

Configuring

The first thing you see after connecting to the web control is that the firmware wants you to configure your printer.  I went to the configurator and did that based on the contents of the table, above.  There were a few things I had to guess at, such as motor rotation directions, so we'll see when I actually hook the printer to the board what I actually end up with.

Connecting Panel Due 7i and Updating Its Firmware


I took out the supplied 4 wire serial cable and hooked the LCD panel to the Duet board, then connected the USB cable to the Duet board to power things up and the Panel Due worked fine without any messing around.  The setup screen indicated that the firmware was version 1.17, and I checked the website here and found that there is a newer version of the firmware available.

I updated the firmware and added a custom splash screen.  You have to gather things in different places, but if I could do it, you can too.

Get latest firmware here
Get instructions for flashing the firmware via USB here
Get Bossa (used to flash the new firmware)here

Adding a Splash Screen (optional)


Create an 800x480 x 24 bit per pixel bmp file in whatever graphics program you like.
Get the compression program here
Follow procedure at bottom of page here to compress the splashscreen file and append it to the firmware file.

Finally, burn the new firmware using Bossa.  I found the GUI for Bossa worked fine on my Win 10 machine with a QHD display.

Custom Splash Screen for Panel Due from Mark Rehorst on Vimeo.


Local Connection via Network Cable


A day or two after all the above was done, I realized that when I go to Maker Faires and other public venues, there isn't usually a wired network to connect to.  Also, there are no wired ethernet drops in my basement workshop or the garage.  In planning the new electronics enclosure for the Duet and Panel Due, I couldn't come up with an easy means of accessing the uSD cards in either device- the Duet will be too deeply buried in the enclosure with too many cables in the way, and the position of the uSD card slot on the bottom edge of Panel Due makes it a little difficult for me to access on my machine, so I need to be able to connect a computer directly to the Duet board to do things like change the machine's configuration and upload gcode files to print.

The Duet board has both USB and ethernet connections.  In order to use the USB port for anything other than powering the board while testing, you need the driver files which you get here.  Grab the file called "DuetWindowsDriverFiles.zip".  Install in your Windows PC and I assume you're good to go.  I'm not a huge fan of USB connections, so I prefer to use the ethernet connection, even if file transfer is a bit slower.

I did a little digging and it turns out getting a computer to talk directly to another device over a network port (no routers or switches) is pretty easy to do.  I'm no networking expert, so if I can figure it out, so can you.  I started with a search at the Duet forums, and followed along.  I am using an Acer netbook computer (there's still plenty of life left in old computers!) running Linux Mint.

The first thing I did was to edit the config.g file on the Duet's uSD card.  I commented out the line that said "M552 P0.0.0.0 S1" which enable networking and tells it to get an IP address via DHCP, and replaced it with "M552 P192.168.1.3 S1" which forces it to use IP address 192.168.1.3.

I put the uSD card back into the Duet board and connected it to the netbook via a short ethernet cable, powered up the Duet board with a USB cable, and powered on the netbook.  Some older computers require a crossover cable to swap Tx and Rx connections to allow them to do this sort of thing, but my 2007 era netbook is new enough that it automatically switches, so a regular network cable worked just fine.

In the netbook I went into the network configuration and set up a new wired connection using address 192.168.1.2, netmask 255.255.255.0, and gateway 192.168.1.1, DNS servers 1.1.1.1, search domains nameserver, 1.1.1.1.  The DNS server stuff shouldn't matter, but I had to enter something because the network manager wouldn't let me save the connection without putting some values in there.

So now both the Duet board and the computer are in the same subnet and assigned sequential addresses.  I verified the connection by opening a terminal and entering "sudo nmap -sn 192.168.1.0/24" and it indicated that there was a connection to the Duet board at 192.168.1.3.  Then I opened a web browser and entered 192.168.1.3 and it brought up the Duet Web Control pages.

I tried uploading a 30 MB gcode file from the computer to the Duet board and it ran at about 500-600 kB/s.  It took about a minute- not super fast, but fast enough.


Next up: Electronics enclosure