Posts Tagged CNC

MOSFET rDS PCB

This one came out surprisingly well, apart from the total faceplant with that resistor. With any luck, it’ll measure MOSFET on-state drain resistance over temperature for an upcoming Circuit Cellar column; it’s a honkin’ big Arduino shield, of course.

Drilled holes on the Sherline using the relocated tool height switch:

rDS Tester - drilled PCB

rDS Tester - drilled PCB

Front copper, after etching & silver plating:

rDS Tester - etched front

rDS Tester - etched front

Back copper, ditto:

rDS Tester - etched rear

rDS Tester - etched rear

I think I can epoxy the resistor kinda-sorta in the right spot without having to drill through the PCB into the traces. Maybe nobody will notice?

The traces came out fairly well, although I had to do both the top and bottom toner transfer step twice to get good adhesion. Sometimes it works, sometimes it doesn’t, and I can’t pin down any meaningful differences in the process.

And it really does have four distinct ground planes. The upper right carries 8 A PWM Peltier current, the lower right has 3 A drain current, the rectangle in the middle is the analog op-amp circuitry tied to the Analog common, and surrounding that is the usual Arduino bouncy digital ground stuff. The fact that Analog common merges with digital ground on the Arduino PCB is just the way it is…

, ,

10 Comments

Harbor Freight Bar Clamp: Handle Hole Support Plugs

Having printed up three of those handles for Show-n-Tell, I preemptively installed one in the hasn’t-failed-yet clamp, and poked the support out of another to show how it works. They’re just the cutest little buttons:

HF bar clamp handle - support plug

HF bar clamp handle - support plug

The fins are a touch under 4.5 mm end-to-end and 1 mm (2 × 0.5 mm) across, with layer thickness = 0.25 mm. The first layer fill looks a bit lackadaisical, but the bottom of the surrounding handle came out glass-solid with barely visible joints between the threads, so the settings work fine for larger objects.

HF Bar Clamp - support - solid model

HF Bar Clamp - support - solid model

The tip of each fin has a scar where the overlying perimeter thread bonded to it. Skeinforge is set to extrude the perimeter first, which would squirt that circle (well, pentagon) into mid-air… which is why this support plug lies in wait below.

, ,

1 Comment

Reversal Zits: Extruder Pressure vs. Flow vs. Acceleration

Pondering the Reversal Zittage Bestiary led me to wonder about the formal relationship between pressure and flow in a viscous fluid passing through a nozzle. I’ll cheerfully admit my never-very-puissant fluid dynamics fu has become way rusty and, this being the first time I’ve collected all this stuff in one place, there’s certainly something I’m overlooking (to put it charitably), but here goes…

Assuming that (semi-)molten plastic:

Counterargument:

The hot end contains about 20 mm of molten filament, which is 140 mm3 of 3 mm filament. During filament swaps, the filament pushes back about 2 mm = 14 mm3 without any external force, so there’s about 10% springiness in the hot end. That suggests the plastic really isn’t incompressible. Some of the springiness may come from the PTFE tube expanding against the surrounding metal tube, but the fact that the (solidified) molten zone has a larger diameter than the rest of the filament says the PTFE expansion is not very dynamic: the filament solidified at zero pressure.

Boldly assuming incompressiblity anyway, the always-right-and-never-lies Wikipedia tells us that the equations of state boil down to the Stokes Equations, herewith directly cribbed:

\boldsymbol{\nabla}p = \mu \nabla^2 \mathbf{u} + \mathbf{f}
\boldsymbol{\nabla}\cdot\mathbf{u}=0

That’s using this symbology, typographically modified to eliminate the need for embedded graphics:

  • The del operator represents the spatial gradient
  • ∇p = pressure gradient
  • u = fluid velocity
  • ∇·u = divergence of velocity (pointiness)
  • 2 u = Laplacian of velocity (sharpness of pointiness)
  • μ = dynamic viscosity
  • f = applied force

Under the breathtakingly aggressive simplifying assumption that we can model slices across the extruder’s nozzle as nearly 2D radially symmetric pipes with a teeny frustum shape, we have a mostly one-dimensional situation:

  • The first equation says that axial pressure gradient is directly proportional to the applied force, which makes sense, plus a huge term due to the nozzle shape (how abruptly the velocity gradient changes)
  • The second equation is a generalization of GladOS‘s explanation of the conservation of momentum across Portal transfers: Speedy thing goes in, speedy thing comes out. For slightly conical slices, the axial speed increases as the radial area decreases, but the overall velocity gradient comes out zero.

All the force f comes from a stepper motor ramming filament into the hot end:

  • To a good first order approximation, stepper motor torque is proportional to winding current.
  • For a given filament diameter, drive wheel diameter, and speed, a constant-current stepper applies constant force to the filament.
  • Stepper power being roughly constant for a given current, the available force varies inversely with rotational speed.

Vigorous handwaving

The low Reynolds number says the inertial forces don’t amount to squat, so everything depends on viscous flow. There’s nothing to accelerate; try accelerating a spoon through honey.

Given a desired velocity u (mostly axial, for a particular extruding speed) and a nozzle, the first equation says the required force varies linearly with the pressure gradient ∇p. The gradient runs from atmospheric pressure on one end to the molten pool on the other, with the steepest change in the narrowest part of the nozzle. This suggests a short nozzle aperture is good.

Conversely, a long smooth nozzle reduces ∇2 u by reducing abrupt velocity changes. For a given ∇p, the required force varies directly with the second (spatial) derivative of the velocity; lower velocity doesn’t mean lower force, but smoother changes (and their derivatives) certainly do.

During reversal, the extruder must produce a negative ∇p very quickly to inhale the filament and prevent drooling. Assuming ∇p has the same order of magnitude in both directions (thus, different signs), changing the fluid velocity will produce huge changes in ∇2 u.

Fluid compressibility means that, during the early part of the reversal operation, moving the filament doesn’t change the pressure by very much at all: the first equation remains pretty much constant.

Caveats

The Stokes equations are time-invariant: the velocity is a constant. So we’re looking at the steady state and making dangerous assumptions about changing conditions.

The force variation seems linear with pressure gradient around a given flow, which is comforting: at least it’s not quadratic or something even more horrible.

Given the low Reynolds number, even moderate flow variations should be roughly linear, as the velocity gradients won’t change much with changing velocity.

This explains why Reversal Zittage gets so much worse at higher speeds: the extruder operates under constant (and, at least in my TOM, low) power that can keep pace with normal extrusion, but doesn’t have an order of magnitude more force in reserve for retraction.

,

12 Comments

Skeinforge Feed Settings

As part of the general reshuffling, I’ve started running the printer with different feeds for different functions:

  • Travel = 250 mm/s (non-printing!)
  • Basic rate = Infill = 60 mm/s (SF Speed plugin → Feed Rate)
  • Perimeter = 0.33 → 20 mm/s
  • First layer Infill = 0.25 → 15 mm/s
  • First layer Perimeter = 0.15 → 9 mm/s

All of the corresponding Flow rates have the same values, which seems to be the right way to go. In Skeinforge 45, these are all collected in the Speed plugin.

The very slow first layer ensures good adhesion to the Kapton build surface, with the rebuilt HBP now maintaining a very stable 0.25 mm across the whole platform. I’ll try goosing the first layer infill to 20 mm/s and the perimeter to 15 mm/s at some point, but this is entirely tolerable; I’d rather have it Just Work than occasionally come unstuck.

The 20 mm/s perimeter reduces the Extruder Zittage problem, with the 9 mm/s Perimeter on the first layer coming out entirely zit-free. However, the sequential version of Amdahl’s Law applies here: a slow perimeter around a fast infill produces a fairly slow overall layer. Making the infill rather sparse doesn’t help, of course, but overall it’s a win.

This collection of speeds hopelessly confuses Pronterface’s estimated print time calculation; the most amazing prediction reported just under 24 hours for a fairly simple set of objects that took maybe half an hour. A recent gizmo had an estimated time of 4:34 and an actual time of 28:07, off by a factor of 6.2. If Pronterface divides the total filament length by the first speed it finds in the file, it’d be off by a factor of 6.7, so maybe that’s close to what happens under the covers.

,

Leave a Comment

Reversal Zits: Speed, Acceleration, and a Bestiary

The Skeinforge Dimension plugin subsumes the obsolete Reversal plugin’s features. At the end of each thread, if the nozzle will move more than the Minimum Travel distance (1 mm by default, which is what I’m using) to the start of the next thread, the extruder yanks Retraction Distance of filament out of the hot end at the Retraction Speed.

Some experimentation at 30 mm/s showed that 2 mm of filament would eliminate all drooling, 1.5 mm left thin threads, and 1.0 mm wasn’t nearly enough.

Similar experimentation suggested 60 mm/s as the upper limit for Retraction Speed, with the SJFW acceleration limiting parameters set for 250 mm/s2. The usual extrusion speed isn’t much faster than a crawl, so the distance required to reach a backwards 60 mm/s is:

dist = (60 mm/s)2 / (2 * 250 mm/s2) = 7.2 mm

What that means, of course, is that the extruder doesn’t have enough torque to reach the programmed speed in the required distance. Assuming SJFW uses trapezoidal limiting, it will accelerate to some maximum speed at the halfway point and decelerate to a stop at the same rate. Pegging the midpoint at 1 mm, the extruder will reach a peak speed of:

v = √(2 * 250 mm/s2 * 1 mm) = 22 mm/s

In order to hit 60 mm/s in the middle of the retraction, the extruder must accelerate at:

a = (60 mm/s)2 / (2 * 1 mm) = 1800 mm/s2

Which requires way more torque than the piddly little motor I’m using can provide.

While I could swap in that larger motor, crank the current up a bit, and goose the extruder acceleration, the current Reversal Zittage is small enough for my purposes. I’d rather expend that effort on doodling up a direct-drive extruder, but that’s on the back burner until something horrible happens to the current extruder.

One easy alternative: lower the perimeter speed sufficiently far as to reduce the pressure in the hot end enough that the current speeds can suppress the zits. Notice the difference in the pix below; what you can’t see is that the first layer has no zittage whatsoever. Of course, that means the perimeter must trundle along at maybe 10 mm/s…

Herewith, a Reversal Zittage bestiary at various perimeter speeds, with Dimension set as described above and these extrusion settings:

  • 0.25 mm layer height
  • 0.50 mm thread width
  • 60 mm/s infill
  • 250 mm/s travel

A Dishwasher Rack Protector vertical tube at 30 mm/s:

Rack protector - Reversal zits

Rack protector - Reversal zits

The tube’s interior had equivalent zits that cleaned out easily with a twist drill.

Some of the half-tube ends came out slightly angled with zits here & there, but remember that they’re 4.5 mm tall:

Rack protector - Reversal zits

The Zire 71 Protector had a lot more infill with very few perimeter joints. This corner shows a few zits at 30 mm/s:

Zire 71 protector - Reversal zits

Zire 71 protector - Reversal zits

One of the Dr. Who Cookie Cutters showed much more conspicuous zittage on the inside of a corner at 20 mm/s:

Dr Who cutter - Reversal zit - interior corner

Dr Who cutter - Reversal zit - interior corner

Than on the outside of the same corner:

Dr Who cutter - Reversal zit - Exterior corner

Dr Who cutter - Reversal zit - Exterior corner

The zits on the other cutter fell along one edge. The inside:

Dr Who cutter - Reversal zits - interior side

Dr Who cutter - Reversal zits - interior side

And the outside:

Dr Who cutter - Reversal zits - exterior side

Dr Who cutter - Reversal zits - exterior side

The Dr. Who set included flat cookie presses with patterns. Although these islands show some zittage, they’re about 1 mm tall and perhaps 5 mm long:

Dr Who cutter - Reversal zits - islands

Dr Who cutter - Reversal zits - islands

The rest of the perimeter extrusions look essentially perfect, so these really are very minor imperfections.

,

10 Comments

Zire 71 Printed Button Shield

After fixing that old plate, I just had to do this:

Zire 71 protector - solid model

Zire 71 protector - solid model

Which pretty much fills up the build platform:

Zire 71 protector - on build platform

Zire 71 protector - on build platform

And fits perfectly:

Zire 71 protector in place

Zire 71 protector in place

It’s printed with 100% infill to produce a solid plastic plate.

In retrospect, I think it’d work better if I put the notch on the bottom side with a bit of support, so that the glass-smooth surface faced the Zire. Maybe next time?

The OpenSCAD source code:

// Protector plate for Zire 71 PDA
// Ed Nisley KE4ZNU - Jan 2012

//-------
//- Extrusion parameters must match reality!
//  Print with +0 shells, 3 solid layers, 0.2 infill

ThreadThick = 0.25;
ThreadWidth = 2.0 * ThreadThick;

Protrusion = 0.1;           // make holes end cleanly

function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
function IntegerMultipleMin(Size,Unit) = Unit * floor(Size / Unit);

//-------
// Dimensions

$fn=8*4;

Length = 110;
Width = 73;
Thickness = IntegerMultiple(2.0,ThreadThick);
CornerRadius = 5.0;

NotchLength = 20;

PocketWidth = 22;
PocketLength = 12;
PocketRadius = 3.0;
PocketOffsetX = -1;
PocketOffsetY = 10;

SlotLength = 20;
SlotWidth = IntegerMultiple(8.0,ThreadWidth);
SlotDepth = IntegerMultiple(0.75,ThreadThick);

//-------

module ShowPegGrid(Space = 10.0,Size = 1.0) {

  Range = floor(50 / Space);

    for (x=[-Range:Range])
      for (y=[-Range:Range])
        translate([x*Space,y*Space,Size/2])
          %cube(Size,center=true);
}

//-------
// Outer section of plate
//  with nice rounded edges

module PlateHalf() {

  translate([0,0,Thickness/2])
    difference() {
      minkowski(convexity=3) {
        cube([(Width - SlotWidth)/2 - 2*CornerRadius,(Length - 2*CornerRadius),(Thickness - 2*Protrusion)],center=true);
        cylinder(r=CornerRadius,h=Protrusion);
      }
      translate([PocketOffsetX,PocketOffsetY - Length/2,0])
        minkowski() {
          cube([PocketWidth - 2*PocketRadius,PocketLength - 2*PocketRadius,Thickness],center=true);
          cylinder(r=PocketRadius,h=Protrusion);
        }
    }
}

//-------

ShowPegGrid();

translate([(Width - SlotWidth)/4 + SlotWidth/2,0,0])
  PlateHalf();

translate([-(Width - SlotWidth)/4 - SlotWidth/2,0,0])
  mirror([1,0,0])
    PlateHalf();

difference() {
  translate([0,0,(Thickness - SlotDepth)/2])
    cube([SlotWidth + 2*Protrusion,Length - 2*SlotLength + SlotWidth,(Thickness - SlotDepth)],center=true);
  for (Index=[-1,1])
    translate([0,(Index*(Length/2 - SlotLength + SlotWidth/2)),-Protrusion])
      cylinder(r=SlotWidth/2,h=Thickness + 2*Protrusion);
}

, ,

2 Comments

Extruder Speed Control Puzzle

The Retraction speed in the Skeinforge Dimension plugin sets the E axis speed while it’s inhaling molten filament at the end of each thread and exhaling it at the start of the next thread. For a Retraction speed of 60 mm/s = 3600 mm/min and a Retraction Distance of 2 mm, the G-Code at the very start of the Skirt thread looks like this:

G1 F3600.0
G1 E2.0

So far, so good; that, I can understand. The extruder spins at a pretty good clip, but only while moving 2 mm of filament.

The Dimension plugin doc explains the settings for its parameters, but isn’t forthcoming on the subject of what to use for the Flow rate in the Speed plugin. The Speed plugin doc doesn’t help much; it seems the Flow rate uses either PWM or mm/s, depending on something imponderable. Per that discussion, you should apparently set both Feed and Flow to the same value (in mm/s), which I have done. Given that G-Code has only one speed setting for coordinated motion, that seems reasonable.

For a Feed speed of 60 mm/s = 3600 mm/s (which may seem aggressive, but that’s what acceleration limiting enables), the G-Code at the start of the second layer looks like this:

G1 X-3.5302 Y-26.3671 Z0.5 F3600.0 E141.3026
G1 X2.7622 Y-22.7342 Z0.5 F3600.0 E141.4484
G1 X9.0546 Y-26.3671 Z0.5 F3600.0 E141.5941

However, that seems to mean the extruder rams filament into the hot end at 3600 mm/min = 60 mm/s, which simply isn’t what’s going on. The pinch wheel / gear / whatever turns at maybe 2 rev/min, which corresponds to about 60 mm/min: roughly 1/60 the speed indicated by the F3600.0 parameter.

The SJFW M201 parameter was set to E60, which should set 60 mm/min as the minimum speed. But Skeinforge doesn’t know anything about the firmware’s internal minimum (or maximum!) speed limits.

So I tried a few manual variations with the extruder heated up, feeding in commands like G1 E10 Fnn, with various nn values for the F speed, while measuring the elapsed time. If F sets the extruder speed in mm/min, then the time to extrude 10 mm of filament should vary inversely with the speed. Some results:

  • F240 → 10 s
  • F360 → 10 s
  • F400 → 11 s
  • F450 → 1 s
  • F480 → 1 s

Huh. Now that, I do not understand.

Setting M201 E120, which should double the minimum speed, produces these reasonable results:

  • F1 → 10 s
  • F2 → 7 s
  • F3 → 6 s
  • F4 → 3 s
  • F5 → stalls because the extruder can’t maintain that pace

The first line seems to indicate that extruding 10 mm of filament at 1 mm/min requires 10 seconds, which is off by a neat factor of 1/60. The ratio of the lines is more-or-less right, as long as you allow more measurement windage than seems appropriate and ignore the gross overall speed mismatch. The difference between the two sequences is not the ratio of the two M201 settings, however.

I have the extruder set to accelerate at 250 mm/s2, which implies it can reach 120 mm/min = 2 mm/s in 0.008 mm, which is basically instantly. Relevant equation: x = v2/2a.

Given the incoming filament diameter and the outgoing extrusion thread dimensions, Skeinforge knows their cross-sectional areas.  Multiplying the extrusion thread’s cross-section area by the Pythagorean XY distance for a segment gives the extrusion volume, dividing that by the filament cross-section area gives the incoming filament length, and dividing that by the Filament Packing Density fudges the answer to come out right.

From the coordinates in the first two lines of G-Code we have:

  • XY distance = 7.27 mm
  • extrusion distance = 0.15 mm

Given the corresponding extrusion settings:

  • 0.25 mm layer height and 0.50 mm width = 0.125 mm2
  • 2.89 mm filament dia = 6.56 mm2
  • FPD=0.95

The incoming distance works out to (0.125 * 7.27 / 6.56) / 0.95 = 0.15 mm, which is dead on the G-Code value. So I understand the volume part, at least.

At the Feed rate of 60 mm/s, the extruder covers the XY distance in 7.27 / 60 = 0.12 s. The extruder must consume 0.15 mm of filament in that same time, which works out to 0.15 / 0.12 = 1.2 mm/s = 72 mm/min.

Obviously, the extruder filament drive is not running at the F3600.0 value set by the G-Code, nor is it running at 1/60 that speed.

I have not the foggiest idea what’s going on in there, but … it seems to work. Equally obviously, because Skeinforge doesn’t know which firmware I’m using, all the firmware usable with Dimension behaves the same way.

One possibility: perhaps the E axis (definitely not XY and probably not Z) runs in something resembling EMC2′s inverse time mode, wherein the firmware adjusts the speed to complete the move in a fixed time. In this case, the firmware knows both the distance (given by Skeinforge in the E parameter) and the time for the XY move (found by dividing that XY Pythagorean distance by the F parameter), so it can compute the speed required to make the extruder poot out the right amount of plastic in that time, presumably while imposing (trapezoidal?) acceleration limiting along the way.

That might also account for the weird behavior with M201 E60 shown above: perhaps the firmware uses a stale time left over from the most recent XY motion to compute the speed for a move involving only the E axis. I suppose I could puzzle through the source; it’s rather daunting.

Anybody have any clues or pointers to the obvious doc I’ve overlooked?

,

6 Comments

Follow

Get every new post delivered to your Inbox.

Join 47 other followers