The Smell of Molten Projects in the Morning

Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.

Category: Machine Shop

Mechanical widgetry

  • M2 vs. Marlin: Speed Calculations

    Knowing the number of motor steps required to move an axis by 1 mm, the next step is to figure out how fast each axis can possibly move, given the restrictions of the Marlin firmware driving the motors.

    Dan Newman pointed out that Marlin runs with a maximum 10 kHz interrupt rate, with up to four steps issued per interrupt. The constant controlling (or at least defining) that is in Configuration_adv.h (with a comment that seems irrelevant to the M2’s setup):

    #define MAX_STEP_FREQUENCY 40000       // Max step frequency for Ultimaker (5000 pps / half step)
    

    Below the 10 kHz rate, the step interrupt occurs whenever the next step must happen, so it does not have a constant frequency. Above 10 kHz, the steps (seem to) emerge in bursts, so there’s likely a good bit of jitter that I should measure. In any event, there’s an obvious loss of resolution at high speeds, which is a problem common to all variable-frequency pulse generators that’s worse for relatively low-frequency software generators used in high-speed applications.

    In any event, these numbers show the absolute maximum possible speed for each axis:

    • X and Y axes: 450 mm/s = (40 k step/s) / (88.89 step/mm)
    • Z axis: 100 mm/s = (40 k step/s) / (400 step/mm)
    • Extruder: 94.3 mm/s = (40 k step/s) / (424.4 step/mm)

    Due to the low torque available from the Z axis motor, the actual maximum speed seems to be around 30 mm/s = 1800 mm/min. After I replace the motor, I’ll measure the actual performance and see what’s reasonable.

    One could quibble about the extruder, as the extrusion multiplier affects the final speed. The extruded thread squirts out at a pretty good clip if the motor turns at full speed:

    2350 mm/s = (1.75 mm)2 / (0.35 mm)2 * 94 mm/s

    It’s not clear the hot end can melt plastic fast enough to keep up with that pace more than momentarily, but I haven’t measured that yet.

    However, if the X and Y axes both move at 450 mm/s, then the nozzle moves at 640 mm/s = √2 * 450 mm/s relative to the platform, so the maximum extruder speed while printing will be roughly:

    26 mm/s = (640 mm/s) * (0.35 mm)2 / (1.75 mm)2

    That assumes the printed thread has the same cross-section area as the nozzle, which is roughly true for my choice of output:

    • Thread: 0.1 mm2 = 0.4 mm wide * 0.25 mm thick
    • Nozzle: 0.096 mm2 = pi * (0.35 mm)2 / 4

    If you bake the extrusion multiplier into the step/mm value, then compute the maximum speed without applying the same multiplier in slic3r, the plastic should come out of the nozzle at the same speed.

    So the speed setup looks like this:

    #define DEFAULT_MAX_FEEDRATE          {450, 450, 30, 94}    // (mm/sec)
    
  • M2 vs. Marlin: Step/mm Calculations

    After Dan Newman nudged me a bit in the comments to the Z axis calculations, I walked through the constants in Marlin’s Configuration.h file to see if they were all consistent. The earlier values sufficed to get going, but a bit of pondering suggested some tweaks.

    The motor microstepping mode determines the number of (micro)steps per motor (single)step:

    #define MICROSTEP16
    

    That single constant implies all motors must run in the same microstepping mode. Typical stepper motors have 200 full step/rev = 1.8°/step, so 1/16 microstepping means 3200 step/rev.

    However, each motor can have a different “gear” ratio that converts from motor rotation to linear distance, so you must measure or calculate the actual values.

    For the X and Y axes, the motor pulleys have 18 teeth and the belt pitch is 2 mm/tooth, so one motor revolution drives the belt:

    36 mm = 18 teeth * 2 mm/tooth
    M2 - X axis motor pulley
    M2 – X axis motor pulley

    Each revolution requires 3200 steps, so the X and Y stages move at:

    88.888 step/mm = 3200 step / 36 mm

    Makergear uses 88.88 step/mm, rather than the rounded 88.89, but the difference across 250 mm amounts to 2.5 steps, so it doesn’t matter.

    For the Z axis, the four-start leadscrew moves the stage 8 mm, so:

    400 step/mm = 3200 step / 8 mm
    M2 Z axis bearing - shimstock bushing
    M2 Z axis bearing – shimstock bushing

    The situation with the extruder drive isn’t quite so clear, because the actual filament movement depends on the effective diameter of the drive pulley’s teeth engaging the filament. Mechanically, the extruder motor runs a 5:1 gearbox, so each drive pulley rotation requires 16000 (micro)steps.

    The filament drive pulley has 22 teeth and a 12.0 mm OD = 37.7 mm circumference:

    424.4 step/mm = 16000 step / 37.7 mm
    M2 - Filament Drive Gear
    M2 – Filament Drive Gear

    That’s measured at the tooth tip. If you think of the filament as being a belt, then you’d expect it to move precisely that distance… except that the teeth dig into the filament, so the effective diameter comes out a bit smaller and the step/mm value a bit higher.

    Makergear’s default 471.5 step/mm is, indeed, larger, but the ratio of the two values seems both oddly familiar and eerily exact:

    0.900 = 424.4 / 471.5

    The “packing density” Fudge Factor (yclept extrusion multiplier by slic3r) that accounts for the difference between the drive gear OD and the actual filament motion runs around 0.9, with passionate arguments justifying more specific values. It looks like Makergear baked that number into the firmware, so the nominal slic3r extrusion multiplier should be pretty close to 1.0.

    After a few quick measurements while getting the printer running, I settled on extrusion multiplier = 0.9, so the actual step/mm value in effect for the extruder works out to:

    424.4 = (471.5 step/mm) * 0.9

    Now, that would seem to imply that the filament skates along the top of teeth, but that’s not the case:

    M2 extruder - filament embossing
    M2 extruder – filament embossing

    So, for whatever reason, the effective diameter of the drive pulley matches its actual OD. That will surely vary with a number of imponderables, including the setting for the clamp screw holding the bearing against the filament and drive pulley.

    Being that type of guy, I favor baking the actual drive pulley OD into the firmware (because I can actually measure that value), then using the extrusion multiplier to account for the difference. I’ve heard cogent arguments to the contrary, but, for my purposes, the proper value for the extruder should 424.4 step/mm, with a corresponding extrusion multiplier change to 1.00 in slic3r’s configuration.

    I wouldn’t be surprised in the least to discover:

    • I’m multiplying where I should be dividing (or the other way around)
    • There’s a squaring / rooting operation hidden somewhere in there (area vs length)
    • Another obvious blunder has tripped me up

    Selah.

  • PLA vs. PVC Purple Primer: Win!

    After that exchange, I dabbed some Oatey PVC Purple Primer/Cleaner on two PLA slabs:

    PLA test coupon - PVC Purple Primer
    PLA test coupon – PVC Purple Primer

    The active ingredient involved in PLA bonding is tetrahydrofuran, which makes up anywhere from 10 to 40% of the primer (the MSDS gives a broad range). The primer immediately marred the PLA surface, which is exactly what you want in a solvent adhesive.

    After an overnight clamping, I couldn’t pull or peel that joint apart: the two slabs had become one. That’s unlike the paint stripper test that didn’t bond well at all. Good enough for me.

    Obviously, you’d prefer Clear Primer for natural PLA, but Purple Primer is what I had on hand.

    Given that this stuff has no solid content, I think it’s more suitable as a PLA adhesive that the thicker PVC Cement. However, clear cement would be less likely to run along the thread seams and ruin the surface finish outside the joint than water-thin primer.

    Tradeoffs, tradeoffs… but now I can build things from PLA subassemblies!

  • MTD Snowthrower: Transmission Repair

    During the next-to-last snowfall, the gearshift on our MTD snowthrower jammed in high gear, but the wheels turned much more slowly than usual. Slightly before the last snowfall, I removed the cover over the transmission and discovered what went wrong:

    MTD Snowthrower - transmission failure
    MTD Snowthrower – transmission failure

    That rubber wheel should be resting on the circular transmission plate, but somehow it slid off the far right edge. The spring-loaded clutch cable then pulled the plate upward, so that the side of the wheel drove the edge of the plate. Ouch.

    The plate rotates on a bearing around a post on the folded red steel support structure underneath it, which pivots on a rod across the transmission housing behind everything that’s visible here. That rod used to protrude through the housing, but it had slipped inside and moved the plate to the left enough to let the wheel fall off. Some awkward maneuvering got it back through the hole, which made the real problem obvious:

    MTD Snowthrower - missing hitch pin clip
    MTD Snowthrower – missing hitch pin clip

    There’s supposed to be a cotter pin or hitch pin clip through that hole, with a washer matching the obvious wear marks:

    MTD Snowthrower - replacement cotter pin
    MTD Snowthrower – replacement cotter pin

    That’s actually a spacing shim from a collection that I’ve used rather infrequently over the years, but it’s exactly the right thickness to make the answer come out right.

    A few weeks later, we found the missing washer on the driveway at about the point where I first noticed the transmission wasn’t working. It’s in the box of parts, waiting for the new cotter pin to wear out.

  • Belkin F6C1500 UPS Battery Wiring Arrangement

    Given the length of the battery wires inside a Belkin F6C1500 UPS, you might think any arrangement will work. Not so. The wires from the guts of the UPS must exit to the batteries exactly like this:

    F6C1500 Battery wires from UPS
    F6C1500 Battery wires from UPS

    There’s a black wire tucked under the red wire, both of which must exit though the angled slot and run toward the front of the battery compartment.

    Seen from the front, the red wire connects the positive terminal of the lower (left) battery to the negative terminal of the top (right) battery and the black wire connects the negative terminal of the lower battery to the UPS circuitry:

    F6C1500 Battery interconnect wires
    F6C1500 Battery interconnect wires

    Trust me on this: there is no other arrangement of those wires that will simultaneously connect everything properly and fit within the case.

    As for disassembly, the small tab on the left end of the case holds the front panel in place. Press that inward with a flat screwdriver, then slide the cover toward the tab. Four locking slots along the sides will disengage and you can then lift the panel off.

    With that out of the way, there’s a screw hidden under the BELKIN label in the middle of the removable cover:

    Belkin F6C1500 UPS Cover Screw Locations
    Belkin F6C1500 UPS Cover Screw Locations
  • PLA vs. Methylene Chloride: Joint Peel Strength

    The only commonly available PLA adhesive seems to be methylene chloride, which is common only because it’s part of really nasty paint stripper that actually works; I suspect you can’t buy the pure stuff anywhere.

    Anyhow, I picked a pair of flat line width test plates from the PLA scrap pile, dabbed paint stripper on each, and clamped them together overnight:

    PLA test coupon - clamping
    PLA test coupon – clamping

    Unlike acetone on ABS, paint stripper doesn’t actually combine the parts into a single fused unit; I could peel the two plates apart with some effort:

    PLA test coupon - paint stripper adhesion
    PLA test coupon – paint stripper adhesion

    That picture shows the results of two glue-and-peel tests, with much the same result along the top and bottom edges. Some solvent damage appears as a thin white line around the edge of the glued joint, but with some care that wouldn’t be too bad.

    I think paint stripper makes an acceptable adhesive for PLA, at least for joints that aren’t subject to peeling loads. You must design an interlocking mechanical joint, perhaps filled with epoxy, to withstand peeling loads, which isn’t nearly as good as the ABS option of just fusing the parts together.

  • Makergear M2: Radial Engine Cylinder Head

    After some chiding by Jetguy, here’s a cylinder head from the MBI radial engine:

    Radial engine cylinder head - top - plug oblique
    Radial engine cylinder head – top – plug oblique

    The side fins came out nicely, but the top fins had a few misplaced threads (far side to the left of the valve):

    Radial engine cylinder head - intake
    Radial engine cylinder head – intake

    The view from the other port:

    Radial engine cylinder head - exhaust
    Radial engine cylinder head – exhaust

    Seen directly from the spark plug side, you can barely make out the impossibly thin fin section arching over the plug hole:

    Radial engine cylinder head - plug side
    Radial engine cylinder head – plug side

    The cylinder side looks OK:

    Radial engine cylinder head - bottom
    Radial engine cylinder head – bottom

    I built it standing on one of the ports with the fins vertical, as shown above, which is probably the only way to do it without soluble support material. If I were doing it for real with non-soluble support, I’d be tempted build it flat on the cylinder side with support under the piston head and thin support blocks inside the side fins. It’d look about the same, but with better finish on the top fins.

    All in all, I’d say it looks pretty good.

    The Slic3r header:

    ; generated by Slic3r 0.9.10-dev on 2013-04-20 at 20:24:18
    
    ; layer_height = 0.20
    ; perimeters = 1
    ; top_solid_layers = 3
    ; bottom_solid_layers = 3
    ; fill_density = 0.1
    ; perimeter_speed = 60
    ; infill_speed = 80
    ; travel_speed = 200
    ; nozzle_diameter = 0.35
    ; filament_diameter = 1.73
    ; extrusion_multiplier = 0.9
    ; perimeters extrusion width = 0.52mm
    ; infill extrusion width = 0.52mm
    ; solid infill extrusion width = 0.52mm
    ; top infill extrusion width = 0.52mm
    

    The STL file came direct from Thingiverse, riddled with the reversed normals and holes common to solid models generated by Sketchup, but a pass through NetFabb’s cleanup made it printable. The original STL positioned it far, far out on the X axis, so if you don’t see it right away, rummage around a bit.