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: Electronics Workbench

Electrical & Electronic gadgets

  • MPCNC: Button Box Connector Mount

    This will eventually end up on a board supporting the GRBL controller box:

    Control Box - Connector Mount - Slic3r
    Control Box – Connector Mount – Slic3r

    It’s a direct cut-n-paste descendant of the old NEMA motor mount.

    The nut threads onto the connector behind the bulkhead, so you must either wire it in place or make very sure you can feed all the terminations through the hole:

    Connector Mount
    Connector Mount

    Given the previous hairball, I think in-situ soldering has a lot to recommend it:

    GRBL - Control button wiring
    GRBL – Control button wiring

    The OpenSCAD source code as a GitHub Gist:

    // Circular connector bracket
    // Ed Nisley KE4ZNU 2018-02-22
    //– Extrusion parameters
    ThreadThick = 0.25;
    ThreadWidth = 0.4;
    HoleWindage = 0.3; // enlarge hole dia by this amount
    function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
    Protrusion = 0.1; // make holes look good and joints intersect properly
    //– Useful sizes
    inch = 25.4;
    Tap10_32 = 0.159 * inch;
    Clear10_32 = 0.190 * inch;
    Head10_32 = 0.373 * inch;
    Head10_32Thick = 0.110 * inch;
    Nut10_32Dia = 0.433 * inch;
    Nut10_32Thick = 0.130 * inch;
    ID = 0;
    OD = 1;
    LENGTH = 2;
    //– Mount Sizes
    Connector = [14.6,15.5,4.0]; // connector thread; ID = dia at flat
    Screw = [5.1,10.0,3.0]; // screw size, more-or-less 10-32, OD & LENGTH for head
    MountWidth = IntegerMultiple(2*Connector[OD],ThreadWidth); // use BCD for motor clearance
    MountThick = IntegerMultiple(Connector[LENGTH],ThreadThick); // for stiffness
    WallThick = 3.0; // default wall thickness
    StandThick = IntegerMultiple(WallThick,ThreadWidth); // baseplate
    StrutThick = IntegerMultiple(WallThick,ThreadWidth); // sides holding motor mount
    UprightLength = MountWidth + 2*StrutThick;
    StandBoltHead = IntegerMultiple(Head10_32,5); // bolt head rounded up
    StandBoltOC = IntegerMultiple(UprightLength + 2*StandBoltHead,5);
    StandLength = StandBoltOC + 2*StandBoltHead;
    StandWidth = 2*StandBoltHead;
    StandBoltClear = (StandLength – UprightLength)/2; // flat around bolt head
    Recess = StandWidth – MountThick;
    echo(str("Stand Base: ",StandLength," x ",StandWidth," x ",StandThick));
    echo(str("Stand Bolt OC: ",StandBoltOC));
    echo(str("Strut Thick: ",StrutThick));
    //———————-
    // Useful routines
    module PolyCyl(Dia,Height,ForceSides=0) { // based on nophead's polyholes
    Sides = (ForceSides != 0) ? ForceSides : (ceil(Dia) + 2);
    FixDia = Dia / cos(180/Sides);
    cylinder(r=(FixDia + HoleWindage)/2,
    h=Height,
    $fn=Sides);
    }
    //———————-
    // Model
    module MotorMount() {
    difference() {
    translate([StandThick/2,0,StandWidth/2])
    cube([(MountWidth + StandThick),StandLength,StandWidth],center=true);
    translate([-Protrusion/2,0,StandWidth – (Recess – Protrusion)/2])
    cube([(MountWidth + Protrusion),MountWidth,(Recess + Protrusion)],center=true);
    translate([0,0,-Protrusion])
    PolyCyl(Connector[OD],StandWidth,4*4);
    for (j=[-1,1]) // cutouts over bolts
    translate([-Protrusion/2,
    j*((StandLength – StandBoltClear)/2 + Protrusion/2),
    StandWidth/2])
    cube([(MountWidth + Protrusion),
    (StandBoltClear + Protrusion),
    (StandWidth + 2*Protrusion)],center=true);
    for (j=[-1,1]) // stand bolt holes
    translate([(MountWidth/2 – Protrusion),j*StandBoltOC/2,StandWidth/2])
    rotate([0,90,0])
    rotate(180/6)
    PolyCyl(Clear10_32,StandThick + 2*Protrusion,6);
    translate([0,-(UprightLength/2 – ThreadWidth/2),StandWidth/2])
    rotate([90,180,0])
    linear_extrude(ThreadWidth,convexity=10)
    text(text=str(Connector[OD]),size=6,spacing=1.20,font="Arial",halign="center",valign="center");
    }
    }
    //———————-
    // Build it
    MotorMount();
  • Baofeng BL-5 Battery Pack: Disassembly

    Not much to my surprise, both Baofeng BL-5 lithium batteries went bad on the shelf:

    Baofeng BL-5 Packs - Final Failure - 2018-02-21
    Baofeng BL-5 Packs – Final Failure – 2018-02-21

    The longer traces show their original capacity, back in the day.

    Whacking a chisel into the obvious split lines broke the solvent glue bonds holding the case sections together, after which some slow prying defeated the double sticky foam tape on the cells:

    Baofeng BL-5 battery pack - innards
    Baofeng BL-5 battery pack – innards

    A closer look at the (dis)charge controller PCB:

    Baofeng BL-5 battery pack - protection PCB
    Baofeng BL-5 battery pack – protection PCB

    The other side of the PCB has no components, so what you see is what you get. The larger IC proclaims FS8205A EP050C, which may indicate a vague relation to an S8205 protection IC. The datasheet shows a 16 pin TSSOP package containing an IC for four or five cell batteries, completely unlike the 8 pin package on the PCB, but when you buy enough of anything, you can get anything you want.

    In common with all cheap lithium batteries around here, the “thermistor” terminal connects to a 10 kΩ SMD resistor steadfastly maintaining its resistance in the face of all temperature variations.

    Some probing shows one feeble cell in each pack. Perhaps a Frankenbattery built from the debris will have enough capacity for a standard ride around the block.

  • APRS/Voice HT Interface: Cap Failure

    The TinyTrak3 on the Wouxun adapter wasn’t working, showing a dim red Power LED to indicate it wasn’t getting enough juice. A bit of tracing showed my adapter board provided just over 5 V to the poor thing, not the nearly 9 V it should be getting, which led me to believe the transistor switching the supply had failed. A bit more tracing, however, revealed the true problem:

    Failed electrolytic cap
    Failed electrolytic cap

    The schmutz on the black cap matches up with a crater in the rear of the (originally not so) brown cap.

    The Little Box o’ SMD Caps revealed two nearly identical sets of 33 μF caps, one with a 6 V rating, the other with 16 V rating. Yup, when I added that cap in the hopes of reducing RFI troubles, I soldered the wrong one onto the PCB: it’s my fault!

    The poor thing lasted for over six years with just under 9 V applied to it, so I can’t complain.

    I removed the corpse and reassembled the box without the additional cap (and without the terminals contacting the back of the Wouxun, because reasons). If RFI turns out to be a problem, I’ll take another look at the situation.

  • APRS/Voice HT Interface: Baofeng Mods

    My carefully contrived plug plates for Wouxun radios:

    Wouxun plug plate - epoxy cap
    Wouxun plug plate – epoxy cap

    … of course don’t fit the Baofeng radio. This being in the nature of a final fix, I chopped off enough protrusions to make the remainder fit snugly into the recess.

    APRS-voice HT interface - Baofeng mods
    APRS-voice HT interface – Baofeng mods

    The case containing the TinyTrak3 GPS board and the APRS-voice adapter PCB of course doesn’t fit in place of the Baofeng battery pack, so I replaced the battery contact studs with simple 4-40 screws to prevent heartache & confusion.

    Based on one ride, both Baofeng batteries have very little capacity left after several years on the shelf, which comes as absolutely no surprise whatsoever.

  • MPCNC: Autolevel Probe, Endstop Edition

    When in doubt, use an endstop switch:

    MPCNC - Endstop Z probe - USB camera
    MPCNC – Endstop Z probe – USB camera

    The USB camera lurks in the upper right.

    Just after that picture, I clipped off the NC switch terminal so I can wire this endstop in parallel with the tool length probe. Epoxy coating to follow.

    The DW660 collet grabs a length of 1/8 inch drill rod jammed into a hole positioned to put the switch actuator directly in line with the spindle axis when it trips the switch, so as to measure a known and useful location:

    Z Axis Height Probe - MBI endstop - Slic3r
    Z Axis Height Probe – MBI endstop – Slic3r

    After mulling things over for a while, I fired up the Sherline, drilled a #54 hole in the actuator, and epoxied a 3/32 inch bearing ball in the hole:

    MPCNC - Endstop Z probe - bearing
    MPCNC – Endstop Z probe – bearing

    A #54 drill hole is half the diameter of the ball and, with a bit of luck, enough of the ball will stick through into the epoxy on the underside for a good grip:

    MPCNC - Endstop Z probe - bearing - detail
    MPCNC – Endstop Z probe – bearing – detail

    The general idea is to convert the stamped steel actuator into a single, albeit not particularly sharp, contact point that can glide over the platform / PCB / sheet-of-whatever to measure the surface. The actuator pivots as it depresses, so the ball must slide horizontally just a bit. I prefer a rod-in-tube probe poking a linear button switch, but those weren’t getting me anywhere.

    If I were really cool, I’d use a ruby ball. Maybe silicon nitride?

    The OpenSCAD source code as a GitHub Gist:

    // MPCNC Z Axis Height Probe – MBI endstop in router collet
    // Ed Nisley KE4ZNU – 2018-02-17
    Layout = "Build"; // Build, Show
    /* [Extrusion] */
    ThreadThick = 0.25; // [0.20, 0.25]
    ThreadWidth = 0.40; // [0.40]
    /* [Hidden] */
    Protrusion = 0.1; // [0.01, 0.1]
    HoleWindage = 0.2;
    inch = 25.4;
    function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
    ID = 0;
    OD = 1;
    LENGTH = 2;
    //- Adjust hole diameter to make the size come out right
    module PolyCyl(Dia,Height,ForceSides=0) { // based on nophead's polyholes
    Sides = (ForceSides != 0) ? ForceSides : (ceil(Dia) + 2);
    FixDia = Dia / cos(180/Sides);
    cylinder(r=(FixDia + HoleWindage)/2,h=Height,$fn=Sides);
    }
    PCB = [40.0,1.6,16.5]; // endstop PCB, switch downward, facing parts
    Touchpoint = [4.8,4.8,-4.5]; // contact point from PCB edges, solder side
    TapeThick = 1.0; // foam mounting tape
    ShankOD = 0.125 * inch; // rod into tool collet
    ShankInsert = 3*ShankOD; // … insertion into switch holder
    WallThick = 3.0; // basic wall & floor thickness
    Mount = [PCB.x,
    (WallThick + TapeThick + Touchpoint.y) + (ShankOD/2 + WallThick),
    PCB.z + ShankInsert
    ];
    NumSides = 2*4;
    //—–
    // Define shapes
    module SwitchMount() {
    difference() {
    translate([PCB.x/2 – Touchpoint.x, // overall block
    Mount.y/2 – (ShankOD/2 + WallThick),
    (PCB.z + ShankInsert)/2])
    cube(Mount,center=true);
    translate([0,0,-Protrusion]) // collet shank hole
    PolyCyl(ShankOD,2*Mount.z,NumSides);
    translate([PCB.x/2 – Touchpoint.x, // PCB recess
    -Mount.y/2 + TapeThick + Touchpoint.y,
    PCB.z/2 – Protrusion/2])
    cube([Mount.x + 2*Protrusion,
    Mount.y,
    PCB.z + Protrusion
    ]
    ,center=true);
    }
    }
    //—–
    // Build it
    if (Layout == "Show")
    SwitchMount();
    if (Layout == "Build") {
    translate([0,0,Mount.z])
    rotate([180,0,-90])
    SwitchMount();
    }
  • Monthly Science: BLDC Fan Characteristics

    I have often asserted, in public, in writing, that you can’t change the speed of a fan’s BLDC motor by varying its voltage, because the fan controller generates the waveforms responsible for the motor speed based on its internal timing.

    A pair of BLDC blowers recently arrived and a quick test showed I’m pretty much completely wrong:

    BLDC Blower - RPM I P vs V
    BLDC Blower – RPM I P vs V

    The data points come from this blower:

    Blower label - 24V 0.2A
    Blower label – 24V 0.2A

    The blower specs from the eBay listing:

    75MM 24V Brushless DC Blower Cooling Fan Exhaust Fan

    • Dimension:75(L)x75(W)x30(H)mm
    • Connector:2Pin-PH2.0
    • Rated Voltage: DC24V
    • Rated Current: 0.2±10% Amp
    • Rated Speed: 3800±10%rpm
    • Air flow:1.8CFM
    • Noise: 23±10%dBA
    • Bearing Type: Sleeve
    • Life: 35000 hours
    • Cable Lenght: 32cm(12.5in)
    • Weight: 75g/pcs

    The case is about 75 mm × 75 mm × 30 mm, so the generic part number seems to be 7530, with many variations. However, they all seem to resolve to the same blower with different models drawing different current at specific voltages (clicky for more dots, JPG blurriness in original):

    GDT7530S12B BLDC blower parameter table
    GDT7530S12B BLDC blower parameter table

    The blower in hand roughly corresponds to the bottom line of the 24 V section:

    • 0.21 A
    • 4000 RPM
    • 16.3 CFM
    • 1.1 inch H2O pressure
    • 43 dBA

    There’s a gross discrepancy between the eBay 1.8 CFM and the chart 16.3 CFM, but the other parameters seem within handwaving distance and, yo, it’s from eBay. ‘Nuff said.

    The graph up top shows the results with an unrestricted output opening.

    For more realistic results with some resistance to air flow, I taped a small anemometer to the blower output:

    Blower air flow test
    Blower air flow test

    Which produced:

    BLDC Blower - RPM Flow vs V - anemometer
    BLDC Blower – RPM Flow vs V – anemometer

    In very round numbers, the anemometer aperture is 400 mm², so the 9 m/s air flow at 24 V works out to 3.6×10-3 m3/s = 0.13 CFS = 7.6 CFM. Which is maybe half the 16.3 CFM spec, but they’re surely using a fancier anemometer with much lower back pressure. Close enough, anyway. Fer shure, 1.8 CFM is wrong.

    Completely blocking the inlet with a plastic sheet to simulate the blower pulling air from, e.g., a vacuum table:

    BLDC Blower - RPM vs V - blocked inlet
    BLDC Blower – RPM vs V – blocked inlet

    The RPM varies more linearly with voltage when the blower isn’t accelerating any air.

    Some current waveform show why you really shouldn’t run fans in series to “split the power supply”, as seems common in 3D printers with 24 VDC power supplies.

    From a 24 V supply, the current drops to 50 mA every 75 ms (200 mA/div):

    BLDC 24V Blower - 24 V - 200mA-div
    BLDC 24V Blower – 24 V – 200mA-div

    From a 12 V supply, even weirder things happen (50 mA/div):

    BLDC 24V Blower - 12 V - 50mA-div
    BLDC 24V Blower – 12 V – 50mA-div

    Note that you can’t reduce the fan’s supply voltage by applying PWM to the current, as happens in essentially all 3D printers for “speed control”. Basically, PWM turns the fan off several hundred times every second, which does not modulate the voltage.

    I have no way to measure pressure, but if the 1.1 inch H2O number comes close to reality, the blower can produce 1.5 lb of clamping force per square foot. Which isn’t a lot, granted, but it might suffice for paper and vinyl cutting.

    The DRV10866 BLDC fan controller doc from TI is completely unrelated to the blower in question, but gives a reasonable introduction to the subject.

  • Streaming Radio Player: RPi and OLED Updates

    Because the OLED driver came from the pip package manager, not the Raspberry Pi’s system-level apt package manager, it (or they, there’s plenty of code under the hood) don’t get updated whenever I do system maintenance. The doc says this should do the trick:

    sudo -H pip install --upgrade luma.oled
    

    However, it turns out the new version has a slightly longer list of pre-requisite packages, causing the update to go toes-up at a missing package:

    Could not import setuptools which is required to install from a source distribution.
    Please install setuptools.
    

    So update (or install, for the new ones) the missing pieces:

    sudo apt-get install python-dev python-pip libfreetype6-dev libjpeg-dev build-essential
    

    Doing so produced a backwards-compatibility error in my Python code:

    ... change ...
    from luma.core.serial import spi
    ... into ...
    from luma.core.interface.serial import spi
    

    The motivation for all this fuffing and fawing came from watching some OLEDs wake up completely blank or become garbled in one way or another. Evidently, my slower-speed SPI tweak didn’t quite solve the problem, although it did reduce the frequency of failures. I have decided, as a matter of principle, to not embrace the garble.

    Soooo, let’s see how shaking all the dice affects the situation.

    It’s entirely possible the OLED controllers don’t quite meet their specs, of course, or have begun deteriorating for all the usual reasons.