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: Repairs

If it used to work, it can work again

  • Capacity Test For New UPS Batteries

    Just got a quartet of 12 V 7 A·h lead batteries, prompted by a big Belkin UPS that instantly shut down during a power blink. It needs only two batteries, but the shipping was the same for two or four and I’m sure the spares will come in handy.

    A stiff 2 A discharge test shows that SLA batteries really don’t like high currents, which is exactly what they must provide in a UPS:

    Rhino SLA - 2013-01
    Rhino SLA – 2013-01

    The capacity is barely 4 A·h at 2 A, not to mention that I’m using a conservative 11.4 V cutoff.

    The two batteries with the highest capacity also were the closest matches, so they’re now in the UPS.

  • Dishwasher Rack Pins: More Plastic

    Those 3D printed dishwasher rack protectors solved the problem on the bottom of the pins, but the tops also had some rust. I dosed the pins with Evapo-Rust to stabilize the corrosion:

    Dishwasher rack - rusted pins
    Dishwasher rack – rusted pins

    After that picture, the pins soaked for a while, got a rinse & blotting, then sat for a while to dry. I can’t say that’s in complete accordance with the directions, but it’s close to the spirit of the thing.

    Meanwhile, the MEK / xylene / acetone I added to the bottle of stiffened ReRACK repair coating had softened it up pretty well.  They recommend several coats at half-hour intervals, of which this was the first:

    Dishwasher rack - first plastic layer
    Dishwasher rack – first plastic layer

    I probably should have chewed off the corrosion bulging the OEM coating, but, given the number of pins that needed chewing, that started looking like a major project. Let’s face it, I can always touch things up if the pins continue rotting out.

    The next morning, the rack was back in service:

    Dishwasher rack - recoated pins
    Dishwasher rack – recoated pins

    One advantage of a big blob atop each pin: the printed rack protectors might not wriggle off quite so easily.

     

  • RayTek IR Thermometer: Trigger Switch Replacement

    According to the sticker inside, I’ve been using my RayTek IR Thermometer since 2000. At some point in the last dozen or so year, Fluke Borged RayTek, which means yellow plastic instead of gray.

    The pushbutton switch behind the trigger has recently gone from intermittent to nonfunctional, but everything else still works fine: some simple surgery should suffice…

    The handle has a flip-down cover, for the battery compartment and °C/°F switch, that pivots on molded hinges.  The cover’s hinge pins are rectangular with a slight bevel and the case sockets have a notch that will just clear a properly aligned pin. Given this hint, you’ll get the cover off much faster than I did:

    RayTek IR Thermometer - handle joint
    RayTek IR Thermometer – handle joint

    Remove the obvious screw and press the latches while prying the two halves apart. A small screwdriver helps persuade the latches to release their death grip:

    RayTek IR Thermometer - case latches
    RayTek IR Thermometer – case latches

    The parts heap didn’t have any suitable through-hole pushbutton switches, but I managed to solder an SMD switch in place; the original switch is parked atop the IC for reference. Yes, the white button is slightly taller than the original black one, but it doesn’t matter:

    RayTek IR Thermometer - new switch installed
    RayTek IR Thermometer – new switch installed

    Then it’s just a matter of tucking everything in place:

    RayTek IR Thermometer - contents
    RayTek IR Thermometer – contents

    There. That was easy.

  • LibreOffice 3.6: Fixing Font Selection Problems

    This may not be a LibreOffice problem, but that’s where it shows up: the font selection dialog won’t display fonts with nonstandard Style names. There is, of course, no documentation anywhere (that I can find, anyway) on what Style names are permitted, so you discover this only when a font style that’s properly installed and accessible by other programs (like, say, Inkscape or Scribus) doesn’t render properly and doesn’t appear in the list.

    In Xubuntu 12.10, LibreOffice 3.6.2.2 can’t handle the American Typewriter font style called Medium, which is what I’ve been using for the return address field on my (very few, these days) mail envelopes. Over the years, various versions of OpenOffice and LibreOffice have alternately accepted and rejected the Medium style, so this isn’t exactly a regression. It is, however, Yet Another Annoyance.

    The solution, hinted at in that thread, involves using FontForge to rename the offending Style to, say, Regular, then saving the font. It’s actually the Weight property, hidden in Element → Font Info → PS Names tab. In this case, I changed the word “Medium” in the Fontname, Name for Humans, and Weight fields to “Regular”, which also updates the values in the TTF Names tab.

    I save the modified font files in ~/.local/share/fonts using TrueType format, just to be sure I don’t confuse them with the original Postscript version in /usr/share/fonts/custom, delete the original, and then run fc-cache -v -f to update the caches. This surely isn’t the cleanest way to make it happen and almost certainly isn’t allowed by the Adobe EULA I agreed to, back when I actually bought the fonts, but so it goes.

    And then It Just Works…

    LibreOffice vs American Typewriter font
    LibreOffice vs American Typewriter font
  • Fixing LibreOffice Document Graphic File Paths

    It turns out that if you put convenient symlinks in your directories, then use them to build a LibreOffice document, LO will cheerfully put those paths into the graphic file links inside its XML files. That will produce horrible breakage on a new system without those links. We’ve come to the conclusion that the only way to keep LO happy is to create a Pictures directory in whatever directory holds the document file, then put all of the document’s image files into that directory, and make sure LO stores relative paths. Of course, this leaves us with the prospect of updating a whole bunch of existing (and, alas, horribly broken) documents by hand, which is unappealing. My previous solution worked for a single file, but now it’s time for some scripting…

    This would probably be easier in Python, but Bash works fine after you get the quoting straightened out. This script builds several other scripts that actually do the heavy lifting, because that way you can inspect the scripts before running them to verify that you’re not about to make a bad situation much, much worse. I recommend copying the presentations into another directory, running this script, check the output scripts, run them by hand, and then copy the fixed files and the Pictures directory back where they belong.

    You must tweak the actual paths to the pictures to match your situation; for these documents, one simple change sufficed for all the image files. Those paths are not variables, because I can barely keep the quoting straight without adding another layer of indirection. Make sure all the paths match up, verify the scripts before you run them, and don’t trust anything you see.

    CAUTION: It’s highly likely that the multiple levels of character escaping required to make these listings appear correctly on the screen will produce incorrect results when copied-and-pasted. You can download the script file as FixGraphics.sh.odt, which is a bare-ASCII TXT file (which you must rename to eliminate the ODT extension, then make executable as a shell script), to see how it compares.

    The main FixGraphics.sh script, with some key lines highlighted:

    #!/bin/bash
    
    echo "Extract list of images from all ODP files"
    rm images.txt
    for f in *odp
    do
    	unzip -p "$f" content.xml | sed 's/></>\n</g' | grep Cameras | cut -d \" -f 2 | sort -u >> images.txt
    done
    
    echo "Make source file name list"
    # strip off leading relative pathing, set actual absolute path, un-quote blanks and special characters, add quotes
    sed 's/..\/..\/..\/../\/mnt/' images.txt | sed 's/%20/ /g' | sed 's/&amp;/\&/g' | sed 's/^.*/\"&\"/' > source.lst
    
    echo "Make target file name list"
    # set relative to current directory
    sed 's/\/mnt\/bulkdata\/Cameras\/MCWN/\.\/Pictures/' source.lst > target.lst
    
    echo "Make target directory list"
    # must add trailing quote stripped by dirname
    rm dirs.lst
    cat target.lst | while read tline ; do
    	tdir=`dirname "$tline"`
    	echo ${tdir}\"
    done > dirs.lst
    
    echo "Create target directory structure script"
    rm mkdirs.sh
    sort -u dirs.lst | while read dline ; do
    	echo mkdir --parents ${dline}
    done > mkdirs.sh
    chmod u+x mkdirs.sh
    
    echo "Create image file copy script"
    rm cpjpgs.sh
    cat dirs.lst | while read dline ; do
    	echo cp -n -t ${dline}
    done > cptemp.txt
    paste cptemp.txt source.lst > cpjpgs.sh
    chmod u+x cpjpgs.sh
    
    echo "Create ODP fixup script"
    echo "for f in *odp ; do" > fixodp.sh
    echo "unzip -p \"\$f\" content.xml > raw.xml" >> fixodp.sh
    echo "sed 's/..\/..\/..\/..\/bulkdata\/Cameras\/MCWN/\.\.\/Pictures/g' raw.xml > content.xml"  >> fixodp.sh
    echo "zip \"\$f\" content.xml"  >> fixodp.sh
    echo "done" >> fixodp.sh
    echo "rm raw.xml content.xml" >> fixodp.sh
    chmod u+x fixodp.sh
    

    Run mkdirs.sh, cpjpgs.sh, and fixodp.sh: then it Just Works.

    Some of the tricky parts:

    The content.xml file may be stored in unformatted mode, with everything mushed together into one huge line. To make it readable and parse-able, insert a newline between each pair of adjoining angle brackets:

    sed 's/></>\n</g'
    

    This burst of line noise un-escapes the file name from the way LO stores it internally. Note that the middle sed command really does have the literal escape sequence ampersand-amp-semicolon in it and the ampersand in the last one is the sed-ism for “the whole matching string”:

    sed 's/%20/ /g' | sed 's/&amp;/\&/g' | sed 's/^.*/\"&\"/'
    

    The difference between these two sed strings indicates the actual relative path to the Pictures subdirectory in the filesystem and the faked relative path from the LO pseudo-subdirectory where the document stores its internal state. The string of periods in the second command shows what LO stored for the original files in our documents; your mileage will certainly differ:

    sed 's/\/mnt\/bulkdata\/Cameras\/MCWN/\.\/Pictures/' source.lst > target.lst
    sed 's/..\/..\/..\/..\/bulkdata\/Cameras\/MCWN/\.\.\/Pictures/' raw.xml > content.xml
    

    I don’t know how they could make the file linkages work better, but it’d be really nice if there were a less horrible way to fix the breakage.

  • X10 Controller Lid Hinge Repair

    The modified lid for our X10 controller didn’t quite survive a fall from the dresser to a wood floor:

    X10 controller - hinge chip
    X10 controller – hinge chip

    Not even I could use more than one clamp on this job:

    X10 controller - hinge clamping
    X10 controller – hinge clamping

    Sometimes, it’s OK to do easy ones…

  • LAW Lifetime Member Plaque: Rejuvenation Thereof

    The brass plate from this plaque rattled down the basement stairs(*) a while ago:

    League of American Wheelmen plaque
    League of American Wheelmen plaque

    As you might expect, the adhesive failed and has been replaced at least once. This time, I drilled a pair of 2-56 clearance holes in the plate, match-marked the wood with a punch, drilled a pair of tapping holes, and put it all back together.

    There’s not much to see, but I’m pretty sure that plate won’t fall off ever again:

    League of American Wheelmen plaque - detail
    League of American Wheelmen plaque – detail

    The lacquer finish has begun disintegrating, but I wasn’t in the mood to strip-and-restore that. The tile remains firmly affixed; when that falls out, it won’t be pretty.

    The LAW long ago morphed into the League of American Bicyclists, after deeming Wheelmen as too gender-specific for the modern era.

    (*) We hang plaques, certificates, diplomas, and suchlike on the walls beside the basement stairs. Every time we pass by, it’s an Ego Trip…