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.

Tag: Improvements

Making the world a better place, one piece at a time

  • CNC 3018-Pro: DRV8825 Drivers at the Edge of Madness

    Having previously concluded running the CNC 3018-Pro steppers from 12 V would let the DRV8825 chips provide better current control in Fast Decay mode at reasonable speeds, I wondered what effect a 24 V supply would have at absurdly high speeds with the driver in 1:8 microstep mode to reduce the IRQ rate.

    So, in what follows, the DRV8825 chip runs in 1:8 microstep mode with Fast Decay current control. You must apply some hardware hackage to the CAMTool V 3.3 board on the CNC 3018-Pro to use those modes.

    In all the scope pix, horizontal sync comes from the DRV8825 Home pulse in the top trace, with the current in the two windings of the X axis motor in the lower traces at 1 A/div. Because only the X axis is moving, the actual axis speed matches the programmed feed rate.

    Homework: figure out the equivalent two-axis-moving speed.

    The 12 V motor supply works well at 140 mm/min, with Fast Decay mode producing clean microstep current levels and transitions:

    3018 X - Fast - 12V - 140mm-min 1A-div
    3018 X – Fast – 12V – 140mm-min 1A-div

    The sine waves deteriorate into triangles around 1400 mm/min, suggesting this is about as fast as you’d want to go with a 12 V supply:

    3018 X - Fast - 12V - 1400mm-min 1A-div
    3018 X – Fast – 12V – 1400mm-min 1A-div

    Although the axis can reach 3000 mm/min, it’s obviously running well beyond its limits:

    3018 X - Fast - 12V - 3000mm-min 1A-div
    3018 X – Fast – 12V – 3000mm-min 1A-div

    The back EMF fights the 12 V supply to a standstill during most of the waveform, leaving only brief 500 mA peaks, so there’s no torque worth mentioning and terrible position control.

    Increasing the supply to 24 V, still with 1:8 microstepping and Fast Decay …

    At a nose-pickin’ slow 14 mm/min, Fast Decay mode looks rough, albeit with no missteps:

    3018 X - Fast - 24V - 14mm-min 1A-div
    3018 X – Fast – 24V – 14mm-min 1A-div

    At 140 mm/min, things look about the same:

    3018 X - Fast - 24V - 140mm-min 1A-div
    3018 X – Fast – 24V – 140mm-min 1A-div

    For completeness, a detailed look at the PWM current control waveforms at 140 mm/min:

    3018 X - Fast detail - 24V - 140mm-min 1A-div
    3018 X – Fast detail – 24V – 140mm-min 1A-div

    The dead-flat microstep in the middle trace happens when the current should be zero, which is comforting.

    At 1400 mm/min, where the 12 V waveforms look triangular, the 24 V supply has enough mojo to control the current, with increasing roughness and slight undershoots after the zero crossings:

    3018 X - Fast - 24V - 1400mm-min 1A-div
    3018 X – Fast – 24V – 1400mm-min 1A-div

    At 2000 mm/min, the DRV8825 is obviously starting to have trouble regulating the current against the increasing back EMF:

    3018 X - Fast - 24V - 2000mm-min 1A-div
    3018 X – Fast – 24V – 2000mm-min 1A-div

    At 2500 mm/min, the back EMF is taking control away from the DRV8825:

    3018 X - Fast - 24V - 2500mm-min 1A-div
    3018 X – Fast – 24V – 2500mm-min 1A-div

    The waveforms take on a distinct triangularity at 2700 mm/min:

    3018 X - Fast - 24V - 2700mm-min 1A-div
    3018 X – Fast – 24V – 2700mm-min 1A-div

    They’re fully triangular at 3000 mm/min:

    3018 X - Fast - 24V - 3000mm-min 1A-div
    3018 X – Fast – 24V – 3000mm-min 1A-div

    In round numbers, you’d expect twice the voltage to give you twice the speed for a given amount of triangularity, because the current rate-of-change varies directly with the net voltage. I love it when stuff works out!

    At that pace, the X axis carrier traverses the 300 mm gantry in 6 s, which is downright peppy compared to the default settings.

    Bottom lines: the CNC 3018-Pro arrives with a 24 V supply that’s too high for the DRV8825 drivers in Mixed Decay mode and the CAMTool V3.3 board’s hardwired 1:32 microstep mode limits the maximum axis speed. Correcting those gives you 3000 mm/min rapids with good-looking current waveforms.

    I’m reasonably sure engraving plastic and metal disks at 3000 mm/min is a Bad Idea™, but having some headroom seems desirable.

  • Mailbox Door Rebuild

    The flanges around the door of our giant mailbox rusted through, leaving the door to bend along the embossed (debossed? Whatever) lines across the front. Eventually, the bend got bad enough to keep the door from latching closed, but reviews of the current crop of mailboxes suggest they’re even more prone to rusting after even fewer years.

    Well, I can fix that:

    Mailbox door rebuild - installed
    Mailbox door rebuild – installed

    Because the bottom third of the door, basically everything around and below that horizontal ridge, had corroded, the general idea was to stiffen it with an internal plate:

    Mailbox door rebuild - interior
    Mailbox door rebuild – interior

    The array of small holes suggest the plate’s rich lived experience. Some are even tapped!

    External angle brackets stiffen the sides along the corroded flanges and surround the equally corroded pivot holes:

    Mailbox door rebuild - exterior
    Mailbox door rebuild – exterior

    The term “brick shithouse” springs unbidden to mind, doesn’t it? Those spare holes come from previous uses; I decided this application didn’t demand cosmetic perfection and, as a result, the remaining angle stock has no holes at all.

    Also, the angle brackets are as long as they are because that’s the maximum throat depth for Tiny Bandsaw™. I splurged on a Proxxon 10-14 TPI blade (for future reference: PN 28172) that cuts aluminum like butter, much better than the stock 14 TPI blade.

    The hinge pins used to be rivets. After careful consideration, I replaced them with 1/4-20 button-head cap screws:

    Mailbox door rebuild - hinge detail
    Mailbox door rebuild – hinge detail

    Yes, the sheet metal now pivots on screw threads, rather than a nice smooth cylinder. The nyloc nut maintains the proper amount of looseness around the battered sheet metal.

    While I had the door open, I slobbered hot melt glue over the flag anchor, which should keep it from spitting the ratchet pin into the roadside debris ever again:

    Mailbox door rebuild - flag anchor
    Mailbox door rebuild – flag anchor

    A pleasant evening of Quality Shop Time, indeed!

    The alert reader will note I’m securing aluminum plates with stainless steel hardware on a (nominally) galvanized steel box, thereby forming several batteries with a brine electrolyte from wintertime road salt. My engineering judgement determined this repair will last Long Enough™ and, most likely, succumb to somebody not quite making the curve while accelerating from the traffic signal.

    Aaaaand those painted numbers still look pretty good after four years.

  • CNC 3018-Pro: Milling the CD Fixture

    It turns out that the outer diameter of CD platters isn’t quite as perfectly controlled as you (well, I) might imagine, although the differences between CDs from different sources amounts to perhaps ±0.1 mm. Of course, instantly after putting the tape-down fixture into use, the next few discs atop my stack of scrap CDs were just large enough to not quite fit.

    The Sherline’s workspace can’t maneuver the holder’s perimeter around the spindle, so embiggening the OD calls for the rotary table. The general idea is to clamp the center of the fixture to the rotary table, run a small end mill about 0.1 mm into the fixture’s OD, spin the table one revolution, and be done with it.

    Of course, the rotary table’s 3/8-16 threaded center hole doesn’t match the fixture’s 6 mm center hole: we need an adapter. Start with a 1 inch long 3/8-16 stainless steel hex bolt, center drill the end, peel off the hex head, then turn to 6 mm OD, going down far enough so the threads don’t stick up out of the table too much:

    CNC 3018-Pro - CD fixture milling - bolt turning
    CNC 3018-Pro – CD fixture milling – bolt turning

    The Sherline uses 10-32 screws, so poke a #16 drill 15 mm into the bolt to get maybe 25% thread depth (because it’s a blind hole into stainless steel for an application requiring minimal strength and I hate breaking taps), tap 10-32, clean out the hole, and call it All Good:

    CNC 3018-Pro - CD fixture milling - rotary table adapter
    CNC 3018-Pro – CD fixture milling – rotary table adapter

    Find the trim plate from an old faucet to reach around the central boss, stack up enough flat washers to meet the nut, snug a Sherline spherical nut + washer set (because it’s within reach), chuck up a 1/8 inch mill, and have at it:

    CNC 3018-Pro - CD fixture milling
    CNC 3018-Pro – CD fixture milling

    The fixture sits atop an aluminum plate cut to fit a smaller version of the table riser, but this requires zero fancy alignment. The 6 mm adapter centers the fixture on the rotary table and the cutter sits at a fixed radius from the center wherever it contacts the fixture rim; just spin the table and it cuts a neatly centered circle.

    A test fit showed the oversize discs fit perfectly:

    CNC 3018-Pro - CD fixture milling - test fit
    CNC 3018-Pro – CD fixture milling – test fit

    Bonus: a nice new adapter for the rotary table!

  • CNC 3018-Pro: Tape-Down Platter Fixture

    Diamond drag engraving doesn’t put much sideways force on the platters, so taping the CD in place suffices to hold it:

    CNC 3018-Pro - CD taped to platform
    CNC 3018-Pro – CD taped to platform

    Wrapping a flange around the screw-down platter fixture provides plenty of surface area for tape:

    Platter Fixtures - CD on 3018 - tape flange
    Platter Fixtures – CD on 3018 – tape flange

    Which looks exactly as you think it would in real life:

    CNC 3018-Pro - CD fixture - taped
    CNC 3018-Pro – CD fixture – taped

    Admittedly, masking tape doesn’t look professional, but it’s low-profile, cheap and works perfectly. Blue painter’s tape for the “permanent” hold-down strips on the platform would be a colorful upgrade.

    It’s centered on the platform at the XY=0 origin in the middle of the XY travel limits, with edges aligned parallel to the axes. Homing the 3018 and moving to XY=0 puts the tool point directly over the center of the CD without any fussy alignment.

    The blue-and-red rings around the center hole assist probe camera alignment, whenever that’s necessary.

    The OpenSCAD source code as a GitHub Gist:

    // Machining fixtures for CD and hard drive platters
    // Ed Nisley KE4ZNU February … September 2016
    // 2019-08 split from tube base models
    PlatterName = "CD"; // [3.5inch,CD]
    CNCName = "3018"; // [3018,Sherline]
    TapeFlange = true; // Generate tape attachment
    PlateThick = 5.0; // [3.0,5.0,10.0,15.0]
    RecessDepth = 4.0; // [0.0,2.0,4.0]
    //- Extrusion parameters must match reality!
    /* [Hidden] */
    ThreadThick = 0.25;
    ThreadWidth = 0.40;
    HoleWindage = 0.2;
    Protrusion = 0.1; // make holes end cleanly
    inch = 25.4;
    function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
    module PolyCyl(Dia,Height,ForceSides=0) { // based on nophead's polyholes
    Sides = (ForceSides != 0) ? ForceSides : (ceil(Dia) + 2);
    FixDia = Dia / cos(180/Sides);
    cylinder(d=(FixDia + HoleWindage),h=Height,$fn=Sides);
    }
    ID = 0;
    OD = 1;
    LENGTH = 2;
    //———————-
    // Dimensions
    P_NAME = 0; // platter name
    P_ID = 1; // … inner diameter
    P_OD = 2; // … outer diameter
    P_THICK = 3; // … thickness
    PlatterData = [
    ["3.5inch", 25.0, 95.0, 1.75],
    ["CD", 15.0, 120.0, 1.20],
    ];
    PlatterSides = 3*4*5; // polygon approximation
    B_NAME = 0; // machine name
    B_OC = 1; // … platform screw OC, use small integer for slot
    B_STUD = 2; // … screw OD clearance
    BaseData = [
    ["3018", [5.0, 45.0], 6.0], // slots along X axis
    ["Sherline", [1.16*inch,1.16*inch], 5.0], // tooling plate
    ];
    PlateRound = 10.0; // corner radius
    FlangeSize = [5.0,5.0,3*ThreadThick]; // all-around tape flange
    //– calculate values based on input parameters
    PI = search([PlatterName],PlatterData,1,0)[P_NAME]; // get platter index
    echo(str("Platter: ",PlatterName));
    Platter = [PlatterData[PI][P_ID],
    PlatterData[PI][P_OD],
    PlatterData[PI][P_THICK]];
    BI = search([CNCName],BaseData,1,0)[B_NAME]; // get base index
    echo(str("Machine: ",CNCName));
    AlignOC = IntegerMultiple(Platter[OD],10);
    echo(str("Alignment pip offset: ±",AlignOC/2));
    AlignSlot = [3*ThreadWidth,10.0,3*ThreadThick];
    StudClear = BaseData[BI][B_STUD]; // … clearance
    StudOC = [IntegerMultiple(AlignOC + 2*StudClear,BaseData[BI][B_OC].x), // … screw spacing
    BaseData[BI][B_OC].y];
    echo(str("Stud spacing: ",StudOC));
    NumStuds = [2,1 + 2*floor(Platter[OD] / StudOC.y)]; // holes only along ±X edges
    echo(str("Stud holes: ",NumStuds));
    BasePlate = [(20 + StudOC.x*ceil(Platter[OD] / StudOC.x)),
    (10 + AlignOC),
    PlateThick];
    echo(str("Plate: ",BasePlate));
    Flange = [BasePlate.x + 2*FlangeSize.x,BasePlate.y + 2*FlangeSize.y,FlangeSize.z];
    echo(str("Flange: ",Flange));
    //———————-
    // Drilling fixture for disk platters
    module PlatterFixture() {
    difference() {
    union() {
    hull() // basic plate shape
    for (i=[-1,1], j=[-1,1])
    translate([i*(BasePlate.x/2 – PlateRound),j*(BasePlate.y/2 – PlateRound),0])
    cylinder(r=PlateRound,h=BasePlate.z,$fn=4*4);
    if (TapeFlange)
    hull()
    for (i=[-1,1], j=[-1,1])
    translate([i*(Flange.x/2 – PlateRound),
    j*(Flange.y/2 – PlateRound),
    0])
    cylinder(r=PlateRound,h=FlangeSize.z,$fn=4*4);
    }
    for (i=[-1,0,1], j=[-1,0,1]) // origin pips
    translate([i*AlignOC/2,j*AlignOC/2,BasePlate.z – 2*ThreadThick])
    cylinder(d=4*ThreadWidth,h=1,$fn=6);
    for (i=[-1,1], j=[-1,1]) { // alignment slots
    translate([i*(AlignOC + AlignSlot.x)/2,
    j*Platter[OD]/4,
    (BasePlate.z – AlignSlot.z/2 + Protrusion/2)])
    cube(AlignSlot + [0,0,Protrusion],center=true);
    translate([i*Platter[OD]/4,
    j*(AlignOC + AlignSlot.x)/2,
    (BasePlate.z – AlignSlot.z/2 + Protrusion/2)])
    rotate(90)
    cube(AlignSlot + [0,0,Protrusion],center=true);
    }
    for (i=[-1,1], j=[-floor(NumStuds.y/2):floor(NumStuds.y/2)]) // mounting stud holes
    translate([i*StudOC.x/2,j*StudOC.y/2,-Protrusion])
    rotate(180/6)
    PolyCyl(StudClear,BasePlate.z + 2*Protrusion,6);
    translate([0,0,-Protrusion]) // center clamp hole
    rotate(180/6)
    PolyCyl(StudClear,BasePlate.z + 2*Protrusion,6);
    translate([0,0,BasePlate.z – Platter[LENGTH]]) // disk locating recess
    rotate(180/PlatterSides)
    linear_extrude(height=(Platter[LENGTH] + Protrusion),convexity=2)
    difference() {
    circle(d=(Platter[OD] + 2*HoleWindage),$fn=PlatterSides);
    circle(d=Platter[ID] – HoleWindage,$fn=PlatterSides);
    }
    translate([0,0,BasePlate.z – RecessDepth]) // drilling recess
    rotate(180/PlatterSides)
    linear_extrude(height=(RecessDepth + Protrusion),convexity=2)
    difference() {
    circle(d=(Platter[OD] – 10),$fn=PlatterSides);
    circle(d=(Platter[ID] + 10),$fn=PlatterSides);
    }
    }
    }
    //———————-
    // Build it
    PlatterFixture();

  • DRV8825 Stepper Driver: Adding a Home Output

    The DRV8825 stepper driver chip has a -Home output going active during the (micro)step corresponding to 45°, where both winding currents equal 71% of the peak value:

    DRV8825 pinout
    DRV8825 pinout

    Unfortunately, pin 27 is another unconnected pin on the DRV8825 PCB, without even a hint of a pad for E-Z soldering.

    It’s also an open-drain output in need of a pullup, so I globbed on a 1/8 W 10 kΩ resistor in addition to the tiny wire from the IC pad to the left header pin:

    DRV8825 PCB - Home signal output
    DRV8825 PCB – Home signal output

    Read it from the right: brown black black red gold. Even in person, the colors don’t look like that, not even a little bit: always measure before installation!

    The right header pin is firmly soldered to the PCB ground pin I also used for the 1:8 microstep hack. The whole affair received a generous layer of hot melt glue in the hope of some mechanical stabilization, although hanging a scope probe off those pins can’t possibly end well.

    The general idea is to provide a scope sync output independent of the motor speed, so I can look at the current waveforms:

    3018 X - Fast - 12V - 140mm-min 1A-div
    3018 X – Fast – 12V – 140mm-min 1A-div

    The alert reader will note the pulse occurs on the down-going side of the waveforms, which means I have the current probes clipped on backwards or, equivalently, on the wrong wire. The point is to get a stable sync, so it’s all good no matter which way the current goes.

  • Tour Easy: PTT Switch Replacement

    The PTT switch on Mary’s Tour Easy became intermittent:

    Tour Easy - failed PTT switch
    Tour Easy – failed PTT switch

    It’s been sitting there for least five years, as witnessed by the sun-yellowed hot melt glue blob, which is pretty good service from a switch intended for indoor use. The 3D printed button never fell off and, in fact, was difficult to remove, so that worked well.

    I took it apart and cleaned the contacts, but to no avail, so her bike now sports a new switch with a similar rounded dome:

    Tour Easy - new PTT switch
    Tour Easy – new PTT switch

    I clipped the wires a bit beyond the terminals and soldered the new switch in place, so it’s the same cable as before.

    Now, to see how long this one lasts …

  • Raspberry Pi “Moster” Heatsink Retaping

    A pair of colorful laser-cut stacked acrylic Raspberry Pi cases with “Moster” (*) heatsinks arrived, with the intent of dressing up the HP 7475A plotters for their next Show-n-Tell:

    Moster RPi Heatsink - assembled case
    Moster RPi Heatsink – assembled case

    Unfortunately, the thermal tape on one of the CPU heatsinks was sufficiently wrinkled to prevent good contact with the CPU:

    RPi taped heatsinks - as received
    RPi taped heatsinks – as received

    The seller sent a replacement copper slug with tape on one side. Presumably, they glue it to the heatsink with thermal silicone:

    Moster RPi Heatsink - silicone adhesive
    Moster RPi Heatsink – silicone adhesive

    Of which, I have none on hand.

    So I did what I should have done originally, which was to drop a few bucks on a lifetime supply of thermally conductive heatsink tape, apply it to the bare side of the slug and stick the slug to the heatsink with their tape:

    Moster RPi Heatsink - replacement adhesive tape
    Moster RPi Heatsink – replacement adhesive tape

    The blue stuff is the separation film, with the tape being white. It doesn’t match the black tape on the other side, but seems gooey enough to work.

    Done!

    Despite the heatsink hype, ball grid array chips dissipate most of their heat through their pads (and perhaps a central thermal pad) into the PCB, so sticking a heatsink atop the package is largely decorative, along the lines of hotrod ornamentation.

    The epoxy packages used in previous Raspberry Pi iterations had better thermal conductivity to their top surface:

    RPi 3 B - epoxy CPU
    RPi 3 B – epoxy CPU

    Than the more recent metal-top packages, which surely have inert-gas fill under the lid:

    RPi 3 B - metal CPU
    RPi 3 B – metal CPU

    Pix cropped after being pilfered from the Official Raspberry Pi site.

    Yes, the heatsink does conduct some heat into the air, even if not nearly as much as you might want.

    (*) I’m pretty sure “Moster” was a typo in the original eBay listing which took on a life of its own to become something of an unofficial trademark. All of the search results ship from Duluth, Georgia (USA), regardless of the nominal seller; feel free to draw your own conclusions.