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

  • HP 7475A: Superformula Successes

    In the course of running off some Superformula plots, I found what must be my original stash of B-size plotter paper. Although it wasn’t archival paper and has yellowed a bit with age, it’s the smoothest and creamiest paper I’ve touched in quite some time: far nicer than the cheap stuff I picked up while reconditioning the HP 7475A plotter & its assorted pens.

    Once in a while, all my errors and omissions cancel out enough to produce interesting results on that historic paper, hereby documented for future reference…

    A triangle starburst:

    Superformula - triangle burst
    Superformula – triangle burst
    Superformula - triangle burst - detail
    Superformula – triangle burst – detail

    A symmetric starburst:

    Superformula - starburst
    Superformula – starburst
    Superformula - starburst - detail
    Superformula – starburst – detail

    Complex meshed ovals:

    Superformula - meshed ovals
    Superformula – meshed ovals
    Superformula - meshed ovals - details
    Superformula – meshed ovals – details

    They look better in person, of course. Although inkjet printers produce more accurate results in less time, those old pen plots definitely look better in some sense.

    The demo program lets you jam a fixed set of parameters into the plot, so (at least in principle) one could reproduce a plot from the parameters in the lower right corner. Here you go:

    The triangle starburst:

    Superformula - triangle burst - parameters
    Superformula – triangle burst – parameters

    The symmetric starburst:

    Superformula - starburst - parameters
    Superformula – starburst – parameters

    The meshed ovals:

    Superformula - meshed ovals - parameters
    Superformula – meshed ovals – parameters

    The current Python / Chiplotle source code as a GitHub gist:

    from chiplotle import *
    from math import *
    from datetime import *
    from time import *
    from types import *
    import random
    def superformula_polar(a, b, m, n1, n2, n3, phi):
    ''' Computes the position of the point on a
    superformula curve.
    Superformula has first been proposed by Johan Gielis
    and is a generalization of superellipse.
    see: http://en.wikipedia.org/wiki/Superformula
    Tweaked to return polar coordinates
    '''
    t1 = cos(m * phi / 4.0) / a
    t1 = abs(t1)
    t1 = pow(t1, n2)
    t2 = sin(m * phi / 4.0) / b
    t2 = abs(t2)
    t2 = pow(t2, n3)
    t3 = -1 / float(n1)
    r = pow(t1 + t2, t3)
    if abs(r) == 0:
    return (0, 0)
    else:
    # return (r * cos(phi), r * sin(phi))
    return (r, phi)
    def supershape(width, height, m, n1, n2, n3,
    point_count=10 * 1000, percentage=1.0, a=1.0, b=1.0, travel=None):
    '''Supershape, generated using the superformula first proposed
    by Johan Gielis.
    – `points_count` is the total number of points to compute.
    – `travel` is the length of the outline drawn in radians.
    3.1416 * 2 is a complete cycle.
    '''
    travel = travel or (10 * 2 * pi)
    # compute points…
    phis = [i * travel / point_count
    for i in range(1 + int(point_count * percentage))]
    points = [superformula_polar(a, b, m, n1, n2, n3, x) for x in phis]
    # scale and transpose…
    path = []
    for r, a in points:
    x = width * r * cos(a)
    y = height * r * sin(a)
    path.append(Coordinate(x, y))
    return Path(path)
    # RUN DEMO CODE
    if __name__ == '__main__':
    override = False
    plt = instantiate_plotters()[0]
    # plt.write('IN;')
    if plt.margins.soft.width < 11000: # A=10365 B=16640
    maxplotx = (plt.margins.soft.width / 2) – 100
    maxploty = (plt.margins.soft.height / 2) – 150
    legendx = maxplotx – 2900
    legendy = -(maxploty – 750)
    tscale = 0.45
    numpens = 4
    # prime/10 = number of spikes
    m_values = [n / 10.0 for n in [11, 13, 17, 19, 23]]
    # ring-ness 0.1 to 2.0, higher is larger
    n1_values = [
    n / 100.0 for n in range(55, 75, 2) + range(80, 120, 5) + range(120, 200, 10)]
    else:
    maxplotx = plt.margins.soft.width / 2
    maxploty = plt.margins.soft.height / 2
    legendx = maxplotx – 3000
    legendy = -(maxploty – 900)
    tscale = 0.45
    numpens = 6
    m_values = [n / 10.0 for n in [11, 13, 17, 19, 23, 29, 31,
    37, 41, 43, 47, 53, 59]] # prime/10 = number of spikes
    # ring-ness 0.1 to 2.0, higher is larger
    n1_values = [
    n / 100.0 for n in range(15, 75, 2) + range(80, 120, 5) + range(120, 200, 10)]
    print " Max: ({},{})".format(maxplotx, maxploty)
    # spiky-ness 0.1 to 2.0, higher is spiky-er (mostly)
    n2_values = [
    n / 100.0 for n in range(10, 60, 2) + range(65, 100, 5) + range(110, 200, 10)]
    plt.write(chr(27) + '.H200:') # set hardware handshake block size
    plt.set_origin_center()
    # scale based on B size characters
    plt.write(hpgl.SI(tscale * 0.285, tscale * 0.375))
    # slow speed for those abrupt spikes
    plt.write(hpgl.VS(10))
    while True:
    # standard loadout has pen 1 = fine black
    plt.write(hpgl.PA([(legendx, legendy)]))
    pen = 1
    plt.select_pen(pen)
    plt.write(hpgl.PA([(legendx, legendy)]))
    plt.write(hpgl.LB("Started " + str(datetime.today())))
    if override:
    m = 4.1
    n1_list = [1.15, 0.90, 0.25, 0.59, 0.51, 0.23]
    n2_list = [0.70, 0.58, 0.32, 0.28, 0.56, 0.26]
    else:
    m = random.choice(m_values)
    n1_list = random.sample(n1_values, numpens)
    n2_list = random.sample(n2_values, numpens)
    pen = 1
    for n1, n2 in zip(n1_list, n2_list):
    n3 = n2
    print "{0} – m: {1:.1f}, n1: {2:.2f}, n2=n3: {3:.2f}".format(pen, m, n1, n2)
    plt.select_pen(pen)
    plt.write(hpgl.PA([(legendx, legendy – 100 * pen)]))
    plt.write(
    hpgl.LB("Pen {0}: m={1:.1f} n1={2:.2f} n2=n3={3:.2f}".format(pen, m, n1, n2)))
    e = supershape(maxplotx, maxploty, m, n1, n2, n3)
    plt.write(e)
    pen = pen + 1 if (pen % numpens) else 1
    pen = 1
    plt.select_pen(pen)
    plt.write(hpgl.PA([(legendx, legendy – 100 * (numpens + 1))]))
    plt.write(hpgl.LB("Ended " + str(datetime.today())))
    plt.write(hpgl.PA([(legendx, legendy – 100 * (numpens + 2))]))
    plt.write(hpgl.LB("More at https://softsolder.com/?s=7475a&quot;))
    plt.select_pen(0)
    plt.write(hpgl.PA([(-maxplotx,maxploty)]))
    print "Waiting for plotter… ignore timeout errors!"
    sleep(40)
    while NoneType is type(plt.status):
    sleep(5)
    print "Load more paper, then …"
    print " … Press ENTER on the plotter to continue"
    plt.clear_digitizer()
    plt.digitize_point()
    plotstatus = plt.status
    while (NoneType is type(plotstatus)) or (0 == int(plotstatus) & 0x04):
    plotstatus = plt.status
    print "Digitized: " + str(plt.digitized_point)
  • Treecutting

    These days, removing senescent trees and clearing out deadwood requires a combination of high-tech machinery:

    Treecutting - 76 ft manlift
    Treecutting – 76 ft manlift

    And good old manual labor:

    Treecutting - trunk takedown
    Treecutting – trunk takedown

    One of the guys observed that they get a good deal of amusement from Youtube videos of amateur tree cutting incidents.

    They worked hard all day, pacing themselves well, finished cutting in a driving rainstorm, then returned the next day for cleanup.

    I felt a nap comin’ on strong…

  • Lenovo Q150: Setup for HP 7475A Plotter Demo

    Starting with a blank 120 GB SSD, I had to disable the “Plug-n-Play OS” BIOS option to get the Lenovo Q150 to boot from a System Rescue CD USB stick. While the hood was up, I told the BIOS to ignore keyboard errors so it can boot headless.

    Partitioning:

    • 50 GB ext4 partition for Mint
    • 8 GB swap
    • The remainder unallocated

    Booting & installing Mint Linux 17.2 XFCE from another USB stick went smoothly, after which it inhaled the usual gazillion updates. Rather than wait for the auto-updater to wake up and smell the repositories, I generally get it done thusly:

    sudo apt-get update
    sudo apt-get upgrade
    apt-get dist-upgrade
    apt-get autoremove
    

    Add my user to the dialout group, so I have access to the USB serial converter on /dev/ttyUSB0 that will drive the plotter.

    Configure a static IP address that appears in the appropriate /etc/hosts files.

    Install some useful packages:

    • nfs-common
    • openssh-server
    • htop and iotop

    Set up ssh for public key authentication, rather than passwords, on an unusual port, so everything else can happen from the Comfy Chair upstairs.

    Install packages that Chiplotle will need:

    • build-essential
    • python-setuptools
    • python-dev
    • python-numpy
    • python-serial
    • hp2xx

    I think some of those would be auto-installed as dependencies by the next step, but now I can remember what they are for the next time around this action loop:

    sudo easy_install -U chiplotle
    ... blank line to show underscore above ...
    

    Plug the old hard drive into a USB-SATA adapter to copy:

    Then chuck up some paper and pens to let it grind out art:

    HP 7475A - demo plot
    HP 7475A – demo plot

    It’s good clean fun…

  • Lenovo Q150: Opening the Case For an SSD

    A pre-Christmas sale brought a cheap SSD that rendered my oath not to install one in the Lenovo Q150 inoperative, so I had to figure out how to open the case. Removing the visible screws didn’t release the cover, but some exploratory prying eventually popped the internal snap latches. Knowing the latch & screw locations will simplify harvesting the SSD when that time comes…

    Front (with USB & SPDIF jacks):

    Lenovo Q150 - case latches - front
    Lenovo Q150 – case latches – front

    Rear (with all the other jacks):

    Lenovo Q150 - case screws - rear
    Lenovo Q150 – case screws – rear

    Top (with the heatsink outlet):

    Lenovo Q150 - case latches - top
    Lenovo Q150 – case latches – top

    Bottom (with the mounting boss):

    Lenovo Q150 - case latch screws - bottom
    Lenovo Q150 – case latch screws – bottom

    With the cover off, the inside looks like this:

    Lenovo Q150 - interior overview
    Lenovo Q150 – interior overview

    The two rubber blocks glued to the hard drive bracket (carrier / sled / whatever) conceal the screws holding that side to the chassis. However, removing the blocks and the screws didn’t release the bracket, because it had what looked like a black adhesive layer below the screw flanges:

    Lenovo Q150 - hidden drive bracket screw
    Lenovo Q150 – hidden drive bracket screw

    Gentle prying from the edge of the bracket eventually released it, showing that the black plastic was just an insulating layer. Below that, two thin foam strips had firmly affixed themselves to the PCB, despite not having any adhesive on that side:

    Lenovo Q150 - drive bracket - foam strips
    Lenovo Q150 – drive bracket – foam strips

    With the bracket on the bench, installing the SSD went exactly as you’d expect and reinstalling the cover was, quite literally, a snap.

  • Chip-on-board LED Desk Lamp Retrofit

    After the 5 mm white LEDs failed on the original desk lamp rebuild, I picked up some chip-on-board LED lamps from the usual eBay supplier:

    COB LED Desk Lamp - bottom
    COB LED Desk Lamp – bottom

    The LED’s aluminum baseplate (perhaps there’s an actual “board” inside the yellow silicone fill) is firmly epoxied to a small heatsink from the Big Box o’ Heatsinks, chosen on the basis of being the right size and not being too battered.

    The rather limited specs say the LED supply voltage can range from 9 to 12 V, suggesting a bit of slack, with a maximum dissipation of 3 W, which definitely requires a heatsink.

    The First Light test looked promising:

     COB LED Desk Lamp - first light
    COB LED Desk Lamp – first light

    That’s driven from the same 12 VDC 200 mA wall wart that I used for the failed ring light version. Measuring the results shows that the supply now runs at the ragged edge of its current rating, with the output voltage around 10.5 V with plenty of ripple:

    COB LED V I 100ma div
    COB LED V I 100ma div

    The 260 mA current (bottom, trace 1 at 100 mA/div) varies from 200 to 300 mA as the voltage (top, trace 2 at 2 V/div) varies between 10 V and a bit under 11 V. If you believe the RMS values, it’s dissipating 2.7 W and the heatsink runs at a pleasant 105 °F in an ordinary room. The wall wart gets about as warm as you’d expect; it contains an old heavy-iron transformer and rectifier, not a trendy switcher.

    The heatsink mount looks nice, in a geeky way:

    COB LED Desk Lamp - side detail
    COB LED Desk Lamp – side detail

    The left side must be that long to anchor the gooseneck; I thought about tapering the slab a bit, but, really, it’s OK the way it is. Dabs of epoxy hold the gooseneck and heatsink in place.

    The heatsink rests on a small ledge at the bottom of the slab that’s as tall as the COB LED is thick, with a wire channel from the gooseneck socket:

    COB LED Heatsink mount - Slic3r
    COB LED Heatsink mount – Slic3r

    The Hilbert Curve infill on the top produces a textured finish; I’m a sucker for that pattern.

    The old lamp base isn’t particularly stylin’, but the new head lights up my desk below the big monitors without any glare:

    COB LED Desk Lamp - overview
    COB LED Desk Lamp – overview

    Now, let’s see how long this one lasts…

    The OpenSCAD source code as a Github gist:

    // Chip-on-board LED light heatsink mount for desk lamp
    // Ed Nisley KE4ZNU December 2015
    Layout = "Show"; // Show Build
    //- Extrusion parameters must match reality!
    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);
    //———————-
    // Dimensions
    ID = 0; // for round things
    OD = 1;
    LENGTH = 2;
    Gooseneck = [3.0,5.0,15.0]; // anchor for end of gooseneck
    COB = [25.0,23.0,2.5]; // Chip-on-board LED module
    Heatsink = [35.5,31.5,4.0]; // height is solid base bottom
    HSWire = [23.0,28.0,53.3]; // anchor width OC, width OAL, length OC
    HSWireDia = 1.4;
    HSLip = 1.0; // width of lip under heatsink
    BaseMargin = 2*2*ThreadWidth;
    BaseRadius = Gooseneck[OD]; // 2 x gooseneck = enough anchor, sets slab thickness
    BaseSides = 2*4;
    Base = [(Gooseneck[LENGTH] + Gooseneck[OD] + Heatsink[0] + 2*BaseRadius + BaseMargin),
    (Heatsink[1] + 2*BaseRadius + 2*BaseMargin),
    2*BaseRadius];
    //———————-
    // 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);
    }
    //– Lamp heatsink mount
    module Lamp() {
    difference() {
    translate([(Base[0]/2 – BaseRadius – Gooseneck[LENGTH]),0,0])
    hull()
    for (i=[-1,1], j=[-1,1])
    translate([i*(Base[0]/2 – BaseRadius),j*(Base[1]/2 – BaseRadius),Base[2]/2])
    sphere(r=BaseRadius/cos(180/BaseSides),$fn=BaseSides);
    translate([(Heatsink[0]/2 + Gooseneck[OD]),0,Heatsink[2] + COB[2]]) // main heatsink recess
    scale([1,1,2])
    cube((Heatsink + [HoleWindage,HoleWindage,0.0]),center=true);
    translate([(Heatsink[0]/2 + Gooseneck[OD]),0,Heatsink[2] – Protrusion]) // lower lip to shade lamp module
    scale([1,1,2])
    cube(Heatsink – [2*HSLip,2*HSLip,0],center=true);
    translate([0,0,Base[2]/2]) // goooseneck insertion
    rotate([0,-90,0]) rotate(180/8)
    PolyCyl(Gooseneck[OD],Base[0],8);
    translate([0,0,Base[2]/2 + Gooseneck[ID]/2]) // wire exit
    rotate([180,0,0])
    PolyCyl(Gooseneck[ID],Base[2],6);
    translate([Gooseneck[OD],0,(COB[2] – Protrusion)/2]) // wire slot
    rotate([180,0,0])
    cube([2*Gooseneck[OD],Gooseneck[ID],(COB[2] + Protrusion)],center=true);
    }
    }
    //———————-
    // Build it
    if (Layout == "Show") {
    Lamp();
    }
    if (Layout == "Build") {
    }
  • Kenmore Progressive Vacuum Cleaner: Improved Suction Control

    The Suction Control slider on the handle of our shiny new Kenmore Progressive vacuum cleaner varies the speed of the howling motor in the base unit, rather than venting more or less air into the pipe. We like that, but it’s all too easy to inadvertently slide the control and never notice it, sooo I marked the default condition:

    Kenmore Progressive Vacuum - visible suction slider
    Kenmore Progressive Vacuum – visible suction slider

    Although every vacuum cleaner we’ve ever owned has touted its “quiet operation”, we always wear 30 dB ear muffs and it’s sometimes hard to tell the difference between full throttle and not quite so fast…

  • Command-line CD Ripping & Encoding

    A recent and rather battered book-on-CD posed more than the usual problems for Asunder, so I finally broke down and fiddled around with cdparanoia and lame. This has obviously been done many times before, but breaking it into two simple steps per CD makes the inevitable errors easier to find and work around.

    Invoke cdparanoia thusly to rip an entire CD into separate tracks:

    cdparanoia -B -v
    

    The files pop out sporting names like track01.cdda.wav, but they won’t be around long enough for you to develop a deep emotional attachment.

    Throw a handful of parameters at lame to convert the WAV files into tagged MP3 files:

    d=7
    for t in {01..18} ; do lame --preset tape --tt "D${d}:T${t}" --ta "Author Name" --tl "Book title" --tn "${t}/18" --tg "Audio Book" --add-id3v2 track${t}.cdda.wav D${d}-${t}.mp3 ; done
    rm track*
    

    There’s surely a way to make a double substitution work in the track sequence, but the syntax, ah, escapes me at the moment.

    You might want to not delete the WAV files until you’re happy with the MP3 results.

    In any event, that produces a sequence of MP3 files imaginatively named along the lines of D1-01.mp3, which fits neatly into the cramped LCD space available on an MP3 player.

    Your quality preferences may differ…