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

  • Kenmore 158: Pedal Recalibration

    With the Crash Test Dummy in place, Mary reports that the pedal required too much motion to reach the full speed position. The graph from the last time around shows the output as a function of pedal position:

    Hall sensor output vs pedal depression
    Hall sensor output vs pedal depression

    I’d done some fiddling around after recording that data, but it remained pretty close to the truth.

    A new scale, not quite in the same spot as the previous one:

    Kenmore 158 - Foot Pedal - motion recalibration
    Kenmore 158 – Foot Pedal – motion recalibration

    The two long lines mark the active region after I finished the mechanical tweaking described below; the pedal now produces nearly full output just beyond the 12 mm mark and has about that much overtravel. Measuring those values requires squeezing the pedal by hand, holding its position, and recording the ADC output dumped by the motor control program in the Arduino, a process that could be improved, but to not much benefit.

    The original pedal writeup goes into the gory details, but the bottom line is that the mechanical motion producing that output range depends on the length of the rod from the actuator bar to the magnet.

    The original version had a thin nut securing a screw inside the brass shaft to the actuator:

    Kenmore 158 - Hall speed control - prototype interior
    Kenmore 158 – Hall speed control – prototype interior

    I later swapped the nut for three washers, after observing that the nut wasn’t actually necessary, but that produced too much dead travel at the beginning of motion.

    We discovered that the actuator bar could slip off the end of the ramp cast into the pedal cover, jamming the end of the ramp, making the case extremely difficult to disassemble, and causing heartache & confusion. Affixing a pair of rubber feet to the rear wall of the pedal case with tapeless sticky keeps the bar about half a millimeter further forward and eliminates that problem:

    Kenmore 158 - foot pedal - short actuation
    Kenmore 158 – foot pedal – short actuation

    A second nut moved the brass rod forward, but that turned out to be a bit too much, so it now has a single, slightly thicker, nut. The 3D printed frame allows for far more travel in each direction than is strictly necessary, specifically to allow this fine tuning; it’s possible to make the rod’s resting position too close to the Hall effect sensor and have them collide at full travel, but I managed to avoid that.

    It’s impossible to measure anything with the case disassembled: each change requires reassembling everything, measuring, and iterating.

    After some of this & that, this graph shows the final output curve, with the Y axis in raw ADC counts at 100/div:

    Foot Pedal - ADC vs position - graph detail
    Foot Pedal – ADC vs position – graph detail

    The first 3 mm doesn’t produce much change in the output, it smoothly changes to the more-or-less linear ramp up to 12 mm, then tapers off to full output beyond 14 mm. That’s pretty close to the original graph, with full throttle occurring a bit more than 2 mm earlier; the difference between the two scales may have some effect. In any event, Mary reports it feels much better.

    Trust me: that matters.

    The original data from the first and second mods, plus a teeny version of that graph:

    Foot Pedal - ADC vs position
    Foot Pedal – ADC vs position
  • Adafruit Touch-screen TFT LCD Rotation

    The alert reader will have noted that the Kenmore 158 UI twisted around to a new orientation atop its fancy holder, with the USB port now poking out from the right side:

    Kenmore 158 UI - PCB holder
    Kenmore 158 UI – PCB holder

    That lets me position the whole affair to the right of the sewing machine, in what seems to be its natural position, without having the cable form a loop that would push it off the platform. It’s not entirely clear how we’ll keep a straight cable from pulling it off, but that’s in the nature of fine tuning.

    Anyhow, rotating the LCD isn’t a big deal, because the Adafruit library does all the heavy lifting:

    // LCD orientation: always landscape, 1=USB upper left / 3=USB lower right
    #define LCDROTATION 3
    
    ... snippage ...
    tft.begin();
    tft.setRotation(LCDROTATION);	// landscape, 1=USB upper left / 3=USB lower right
    

    Flipping the touch screen coordinates required just interchanging the “to” bounds of the map() functions, with a conditional serving as institutional memory in the not-so-unlikely event I must undo this:

    #if LCDROTATION == 1
    	p->x = map(t.y, TS_Min.y, TS_Max.y, 0, tft.width());	// rotate & scale to TFT boundaries
    	p->y = map(t.x, TS_Min.x, TS_Max.x, tft.height(), 0);	//   ... USB port at upper left
    #elif LCDROTATION == 3
    	p->x = map(t.y, TS_Min.y, TS_Max.y, tft.width(), 0);	// rotate & scale to TFT boundaries
    	p->y = map(t.x, TS_Min.x, TS_Max.x, 0, tft.height());	//   ... USB port at lower right
    #endif
    

    And then It Just Worked.

  • Kenmore 158 Needle LEDs: First Light

    With the boost converter mounted and the needle LEDs wired up:

     Kenmore 158 Needle Light - heatsink
    Kenmore 158 Needle Light – heatsink

    The Kenmore 158 sewing machine crash test dummy has plenty of light:

    Kenmore 158 LED Lighting - first light
    Kenmore 158 LED Lighting – first light

    Well, as long as you don’t mind the clashing color balance. The needle LEDs turned out warmer than I expected, but Mary says she can cope. I should build a set of warm-white LED strips when it’s time to refit her real sewing machine and add another boost supply to drive them at their rated current.

    Much to our relief, the two LEDs at the needle don’t cast offensively dark shadows:

    Kenmore 158 LED Lighting - detail
    Kenmore 158 LED Lighting – detail

    All in all, it looks pretty good.

  • Wider Borders in XFCE / Xubuntu

    A longstanding Xubuntu / XFCE UI problem has been single-pixel window borders that make click-and-drag resizing essentially impossible. The reason it’s a longstanding problem has been the developers’ unflinching response to any and all issues raised on the bug tracker:

    That discussion may be illuminating.

    I had never looked for the XFCE theme-building documentation (and, thus, never found any), because building a whole new theme would be a lot of work just to resize the damn borders. It should be feasible to tweak only the borders of an existing theme, but … I stalled.

    Repeatedly. On every single version of Xubuntu that’s come along.

    Fortunately, someone recently did the legwork and summarized the method, which I slightly adapted:

    cd /usr/share/themes/
    sudo cp -a Greybird-compact/ Greybird-wide
    cd Greybird-wide/xfwm4
    for f in bottom left right ; do sudo cp ../../Daloa/xfwm4/${f}* . ; done
    sudo sed -i -e 's/C0C0C0/CECECE/' *xpm
    sudo sed -i -e 's/A0A0FF/7C7C7C/' *xpm
    sudo sed -i -e 's/E0E0FF/E0E0E0/' *xpm
    

    The exact color mapping depends on which two themes you’re using. You can also specify GTK element colors, which seems like a better way to do it. Maybe next time.

    Apparently, the corresponding PNG files contain transparency information for the XPM files, but I haven’t bothered to investigate how that works or what might happen if I tweaked them.

    Then you select the new Graybird-wide theme and It Just Works.

    Sheesh & similar remarks…

  • Dual Monitors Redux

    My trusty 1050×1680 portrait monitor began resetting itself, which probably indicates failing capacitors in the power supply or logic board; eBay has capacitor kits, but it may not be worthwhile fixing the poor thing. I snagged a new 2560×1440 Dell U2713HM monitor, added a dual-Displayport PNY NVS310 video card, told Xubuntu 14.04LTS to use nVidia’s binary driver, and, somewhat to my astonishment, It Just Worked.

    The xrandr report:

    Screen 0: minimum 8 x 8, current 4000 x 2560, maximum 16384 x 16384
    DP-0 disconnected primary (normal left inverted right x axis y axis)
    DP-1 disconnected (normal left inverted right x axis y axis)
    DP-2 connected 2560x1440+0+0 (normal left inverted right x axis y axis) 597mm x 336mm
       2560x1440      60.0*+
       1920x1200      59.9
       1920x1080      60.0     59.9     50.0     24.0     60.1     60.0     50.0
       1680x1050      60.0
       1600x1200      60.0
       1280x1024      75.0     60.0
       1280x800       59.8
       1280x720       60.0     59.9     50.0
       1152x864       75.0
       1024x768       75.0     60.0
       800x600        75.0     60.3
       720x576        50.0     50.1
       720x480        59.9     60.1
       640x480        75.0     59.9     59.9
    DP-3 connected 1440x2560+2560+0 left (normal left inverted right x axis y axis) 597mm x 336mm
       2560x1440      60.0*+
       1920x1200      59.9
       1920x1080      60.0     59.9     50.0     24.0     60.1     60.0     50.0
       1680x1050      60.0
       1600x1200      60.0
       1280x1024      75.0     60.0
       1280x800       59.8
       1280x720       60.0     59.9     50.0
       1152x864       75.0
       1024x768       75.0     60.0
       800x600        75.0     60.3
       720x576        50.0     50.1
       720x480        59.9     60.1
       640x480        75.0     59.9     59.9
    

    Inexplicably, xsetwacom once again expects the "HEAD-0" parameter that was "DP1" the last time around:

    xsetwacom --verbose set "Wacom Graphire3 6x8 stylus" MapToOutput "HEAD-0"
    xsetwacom --verbose set "Wacom Graphire3 6x8 eraser" MapToOutput "HEAD-0"
    

    The new display presents crisp characters; seeing 140 source code lines at once is wonderful.

  • Thunderbird UI Tweakage

    If you want to change the font in all of Thunderbird’s UI, you must perform this magic ritual:

    • Create the file chrome/userChrome.css in wherever they’ve hidden your profile folder (for Ubuntu 14.04, it’s ~/.thunderbird)
    • Then put this incantation inside:
    /* Global UI font */
    /* may need !important on each entry */
    * { font-size: 14pt ;
      font-family: Arial Narrow ;
    }
    

    As nearly as I can tell, you don’t need the !important tag on the top-level entry, but I don’t profess to grok Mozilla-flavored CSS.

    Useful properties:

    • font-weight: normal | bold | light
    • font-style: normal | italic | oblique

    Maybe you can do the whole font thing in one shot, but I haven’t tried.

    The changes take effect the next time you fire up Thunderbird: dinking with this stuff gets tedious.

    This is way too intricate for mere mortals…

  • 3D Printed Chain Mail Armor – Zombie Hunter Edition

    Reducing the link bars to 4×4 threads produced a diminutive patch:

    Square Armor - small links - platform
    Square Armor – small links – platform

    Most of the dark smudges come from optical effects in the natural PLA filament, but the second-from-upper-left armor button contains a dollop of black PLA left in the nozzle from the end of that spool; running meters and meters of filament through the extruder isn’t enough to clean the interior. I now have some filament intended to clean the extruder, but it arrived after the black ran out.

    Comparing the patch with the original buttons shows the size difference:

    Square Armor - large vs small links
    Square Armor – large vs small links

    A trial fit suggested a 5×5 patch would fit better, so …

    Square Armor - small links - mounted
    Square Armor – small links – mounted

    The whip stitching accentuates the jacket’s style.  We I think a glittery piping cord square around the armor links would spiff it up enormously and hide the open links, but that’s in the nature of fine tuning.

    I’ll eventually see what happens with 3×3 thread = 1.2×0.6 mm links, which may be too small for reliable bridging and too delicate for anything other the finest evening wear.