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

General-purpose computers doing something specific

  • EAGLE Library: 10 W Aluminum Power Resistor

    It appears there are at least two different 10 W aluminum resistor sizes: the one used by Dale and the one used by everybody else. It’s either that or the EAGLE HS10 symbol is wrong…

    Using those dimensions, here’s a part that more closely fits the resistors in my heap. EAGLE 6 uses an XML file format, so you can stuff some ASCII text into the appropriate sections of your custom.lbr file (or whatever).

    The EAGLE package, which remains HS10 as in the resistor-power library, should produce something that looks like this:

    EAGLE 10 W Resistor package
    EAGLE 10 W Resistor package

    The XML code includes top-keepout rectangles under the body footprint:

    <package name="HS10">
    <description>DALE Power Resistor 10W</description>
    <wire x1="9.525" y1="5.461" x2="9.525" y2="10.3378" width="0.2032" layer="21"/>
    <wire x1="9.525" y1="10.3378" x2="4.6482" y2="10.3378" width="0.2032" layer="21"/>
    <wire x1="-9.525" y1="-5.461" x2="-4.6482" y2="-5.461" width="0.2032" layer="21"/>
    <wire x1="-4.6482" y1="-5.461" x2="9.525" y2="-5.461" width="0.2032" layer="21"/>
    <wire x1="9.525" y1="-5.461" x2="9.525" y2="5.461" width="0.2032" layer="21"/>
    <wire x1="9.525" y1="5.461" x2="4.6482" y2="5.461" width="0.2032" layer="21"/>
    <wire x1="4.6482" y1="5.461" x2="-9.525" y2="5.461" width="0.2032" layer="21"/>
    <wire x1="-9.525" y1="5.461" x2="-9.525" y2="-5.461" width="0.2032" layer="21"/>
    <wire x1="4.6482" y1="5.461" x2="4.6482" y2="10.3378" width="0.2032" layer="21"/>
    <wire x1="-9.525" y1="-5.461" x2="-9.525" y2="-10.3378" width="0.2032" layer="21"/>
    <wire x1="-9.525" y1="-10.3378" x2="-4.6482" y2="-10.3378" width="0.2032" layer="21"/>
    <wire x1="-4.6482" y1="-5.461" x2="-4.6482" y2="-10.3378" width="0.2032" layer="21"/>
    <wire x1="-9.47" y1="0.5" x2="-17.78" y2="0.5" width="0.2032" layer="51"/>
    <wire x1="-17.78" y1="0.5" x2="-17.78" y2="-0.5" width="0.2032" layer="51"/>
    <wire x1="-17.78" y1="-0.5" x2="-9.47" y2="-0.5" width="0.2032" layer="51"/>
    <wire x1="9.47" y1="-0.5" x2="17.78" y2="-0.5" width="0.2032" layer="51"/>
    <wire x1="17.78" y1="-0.5" x2="17.78" y2="0.5" width="0.2032" layer="51"/>
    <wire x1="17.78" y1="0.5" x2="9.47" y2="0.5" width="0.2032" layer="51"/>
    <pad name="1" x="-15.24" y="0" drill="1.3" shape="octagon"/>
    <pad name="2" x="15.24" y="0" drill="1.3" shape="octagon"/>
    <text x="-6.35" y="1.27" size="1.27" layer="25">&gt;NAME</text>
    <text x="-6.35" y="-2.54" size="1.27" layer="27">&gt;VALUE</text>
    <rectangle x1="-9.779" y1="-5.715" x2="9.779" y2="5.715" layer="43"/>
    <rectangle x1="4.318" y1="5.715" x2="9.779" y2="10.668" layer="43"/>
    <rectangle x1="-9.779" y1="-10.668" x2="-4.318" y2="-5.715" layer="43"/>
    <hole x="-7.1374" y="-7.9375" drill="2.3876"/>
    <hole x="7.1374" y="7.9375" drill="2.3876"/>
    </package>
    

    The EAGLE symbol looks just an ordinary schematic resistor:

    <symbol name="RESISTOR">
    <wire x1="-2.54" y1="0" x2="-2.159" y2="1.016" width="0.2032" layer="94"/>
    <wire x1="-2.159" y1="1.016" x2="-1.524" y2="-1.016" width="0.2032" layer="94"/>
    <wire x1="-1.524" y1="-1.016" x2="-0.889" y2="1.016" width="0.2032" layer="94"/>
    <wire x1="-0.889" y1="1.016" x2="-0.254" y2="-1.016" width="0.2032" layer="94"/>
    <wire x1="-0.254" y1="-1.016" x2="0.381" y2="1.016" width="0.2032" layer="94"/>
    <wire x1="0.381" y1="1.016" x2="1.016" y2="-1.016" width="0.2032" layer="94"/>
    <wire x1="1.016" y1="-1.016" x2="1.651" y2="1.016" width="0.2032" layer="94"/>
    <wire x1="1.651" y1="1.016" x2="2.286" y2="-1.016" width="0.2032" layer="94"/>
    <wire x1="2.286" y1="-1.016" x2="2.54" y2="0" width="0.2032" layer="94"/>
    <text x="-3.81" y="1.4986" size="1.778" layer="95">&gt;NAME</text>
    <text x="-3.81" y="-3.302" size="1.778" layer="96">&gt;VALUE</text>
    <pin name="2" x="5.08" y="0" visible="off" length="short" direction="pas" swaplevel="1" rot="R180"/>
    <pin name="1" x="-5.08" y="0" visible="off" length="short" direction="pas" swaplevel="1"/>
    </symbol>
    

    And then the EAGLE resistor device lashes everything together:

    <deviceset name="R" prefix="R" uservalue="yes">
    <description>Resistors</description>
    <gates>
    <gate name="R" symbol="RESISTOR" x="0" y="0"/>
    </gates>
    <devices>
    ... many more devices...
    <device name="ALUM-10W" package="HS10">
    <connects>
    <connect gate="R" pin="1" pad="1"/>
    <connect gate="R" pin="2" pad="2"/>
    </connects>
    <technologies>
    <technology name=""/>
    </technologies>
    </device>
    ... many more devices ...
    </devices>
    </deviceset>
    

    Update the libraries and then it should Just Work.

    It would have been much better had I discovered this before drilling & etching the board with one of those resistors…

  • EAGLE 6.x Invalid Device Names: Repair Thereof

    It seems that a much older version of Eagle allowed device names along the lines of ELECTRET MIC that contained blanks and worked perfectly at the time. Since then, the rules changed to prohibit blanks, but the EAGLE 5.x series evidently allowed those names to exist as long as they weren’t used in the schematic or touched in the library editor. In 6.x, however, you can’t even load the library without triggering an error message.

    Because 6.x won’t load the library, you can’t use the library editor to remove the blank.

    Because the most recent version of 5.x kvetches about the blank, you can’t use the library editor to remove the blank.

    Having only two offending device names, I figured I could use a hex editor to jam a hyphen in place of the blanks and be done with it. Come to find out that EAGLE (wisely) wraps a checksum around the binary library file to detect such changes and prevent the files from loading. I think that’s an excellent idea, even if it was inconvenient in this situation.

    Fortunately, 6.x both complains about the problem and offers up a “text editor” window with the complete XML source code for the library that it converted from the 5.x binary format.

    So:

    • Copy-and-paste the text into an editor that supports highlighted XML editing
    • Find the offending device names
    • Change the blanks to hyphens
    • Rename the original custom.lbr to custom.lbr.bin
    • Save the modified XML as custom.lbr

    Done!

  • Capacitor Self-resonance Calculator

    A Circuit Cellar reader recommended the KEMET Spice calculator that lets you explore the Z / ESR / capacitance / inductance of their various capacitors:

    KEMET Spice Simulation - 100 nF C0G SMD
    KEMET Spice Simulation – 100 nF C0G SMD

    As nearly as I can tell, my measurements on all those random capacitors fell into the right general neighborhood…

  • Website Pwnage

    Despite the fact that nobody bothers to crack your web passwords, as it’s easier for them to crack the entire server and scoop out everyone’s personally sensitive bits like so much caviar, all websites remind / require you to pick strong passwords. So, when I registered myself on a high-value website, I did what I always do: ask my password-generation program for a dollop of entropy.

    It came up with something along the lines of:

    Gmaz78fb'd]

    You can see where this is going, right?

    Pressing Submit (which always makes me whisper Inshallah with a bad accent) produced:

    The mumble.com website is temporarily unavailable. Please try again later.

    Little Bobby Tables rides again!

    [Yes, pwnage.]

  • Computer Amusements

    A friend asked me to scrub and rebuild an ancient IBM Thinkpad 760XD (there were good reasons for this task that aren’t relevant here), which led to a blast from the past:

    Windows 98 Welcome
    Windows 98 Welcome

    After Windows settled down from its obligatory reboots, installing the exceedingly complex MWave DSP drivers from three diskettes (!) produced this classic result:

    Windows 98 - BSOD
    Windows 98 – BSOD

    Ordinarily, I’d suggest installing some flavor of Linux, but the 760XD’s BIOS can’t boot from either CD or USB, so you’d be forced to sneak the install files onto the hard drive, hand-craft a suitable boot diskette (!), and then perpetrate some serious fiddling around. That made even less sense than (re-)installing Windows 98.

    However, given that exposing a fresh Windows 98 installation to the 2012 Internet would resemble tossing a duckling into a brush chipper, we agreed that this laptop’s next experience should be at an upcoming e-waste recycling event.

    The next morning confronted me with this delightful reminder that nobody knows how to handle boot-time errors, not even on a 2011 PC:

    Lenovo - USB Keyboard not found
    Lenovo – USB Keyboard not found

    The keyboard cable had gotten dislodged when the USB hub fell from its perch along the back edge of the desk. It’s fine now…

  • Skeinforge Feed Settings

    As part of the general reshuffling, I’ve started running the printer with different feeds for different functions:

    • Travel = 250 mm/s (non-printing!)
    • Basic rate = Infill = 60 mm/s (SF Speed plugin → Feed Rate)
    • Perimeter = 0.33 → 20 mm/s
    • First layer Infill = 0.25 → 15 mm/s
    • First layer Perimeter = 0.15 → 9 mm/s

    All of the corresponding Flow rates have the same values, which seems to be the right way to go. In Skeinforge 45, these are all collected in the Speed plugin.

    The very slow first layer ensures good adhesion to the Kapton build surface, with the rebuilt HBP now maintaining a very stable 0.25 mm across the whole platform. I’ll try goosing the first layer infill to 20 mm/s and the perimeter to 15 mm/s at some point, but this is entirely tolerable; I’d rather have it Just Work than occasionally come unstuck.

    The 20 mm/s perimeter reduces the Extruder Zittage problem, with the 9 mm/s Perimeter on the first layer coming out entirely zit-free. However, the sequential version of Amdahl’s Law applies here: a slow perimeter around a fast infill produces a fairly slow overall layer. Making the infill rather sparse doesn’t help, of course, but overall it’s a win.

    This collection of speeds hopelessly confuses Pronterface’s estimated print time calculation; the most amazing prediction reported just under 24 hours for a fairly simple set of objects that took maybe half an hour. A recent gizmo had an estimated time of 4:34 and an actual time of 28:07, off by a factor of 6.2. If Pronterface divides the total filament length by the first speed it finds in the file, it’d be off by a factor of 6.7, so maybe that’s close to what happens under the covers.

  • EAGLE 6.x Manual: Printing the Whole Thing

    Although reading PDF documents on the shining screen works fine for some topics, I’d much rather curl up with a printed version for the first read-through. Adobe Reader’s print-as-booklet option does all the heavy lifting required to print a PDF document four pages to a single Letter-size sheet of paper, after which I do a little slicing & binding to get a nice comb-bound book.

    So I printed out the entire EAGLE 6 manual (found in /wherever/eagle-6.1.0/doc/), which led to the discovery that page 86 is missing (at least in the 1st edition version). That screws up the pagination from page 87 onward: odd-numbered pages move to the left side of the binding, even-numbered pages to the right, and the blank space reserved for the gutter / binding appears on the outside margins. Fortunately, it’s still readable.

    To avoid that problem, do this:

    Print Range → Pages → [1-85,301,86-334]

    That selects the first set of contiguous pages, jams a copy of a “This page has been left free intentionally” page from the back of the manual in place of the missing page 86, and then selects the rest of the book.

    Print the front sides, flip the stack over, print the back sides (with the same page range), and bind as usual.

    FWIW, this is much better than having the printer mis-feed about 3/4 of the way through the back sides, which it has done in the past while printing a big book. I now run off about 20 sheets at a time, with only that many pieces of paper in the feeder, just to make sure it doesn’t ruin the entire job.

    One could, I suppose, use pdftk to shuffle the PDF into a complete file which would Just Work, but that seems like more trouble than it’s worth. Ditto for expecting CadSoft to re-create the PDF.

    Memo to Self: Check the last page. If the logical page doesn’t match what’s shown on the PDF page, then something’s wrong.