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

  • LTSpice IV: Simulation Run Hotkey

    For some odd reason, Linear Tech’s LTSpice IV simulator has a hotkey to stop a simulation (Ctrl-H), but not one to start the run.

    Add one:

    • Control Panel
    • Drafting Options
    • Hot Keys button
    • Click in Run Simulation slot
    • Tap the ~ key
    • Back out of everything
    LTSPice Run key binding
    LTSPice Run key binding

    Done!

  • VLC Startup Settings: Audio Sync

    While thrashing around with that DVD player, I finally figured out that VLC stores its configuration settings in ~/.config/vlc/vlcrc. I don’t know if it’s supposed to update that file automagically after twiddling the GUI config settings, but it doesn’t; I must manually edit the file to get a sticky change.

    Anyhow, the vital setting for that particular drive turns out to be audio synchronization, as set by the audio-desync parameter. The audio must lag the video by 400 ms, thusly:

    # Audio desynchronization compensation (integer)
    audio-desync=-400
    

    And then it Just Works…

  • Ubuntu 11.10 vs. Epson R380 Printer: FAIL

    After getting everything configured, I hauled the Atom to the Basement Laboratory Computational Center, set the IP address, brought it up as the new file server, backed up the changed files, and everything worked fine. Then I plugged in all three printers, lit up the CUPS configuration screen, and configured the, uh-oh, two printers it could find.

    Turns out that the Epson R380 printer, being a member of the Epson R300 series of printers, doesn’t work with the USB subsystem in Ubuntu 11.10, for reasons that’ll surely get sorted out in a few months. Until then, it’s a showstopper for me.

    So I shut everything down, yanked out the Atom, plugged in the old AMD box, reconnected everything, restored the changed files from backup, and we’re back to where we were a few days ago. I’ll swap in the old drive and slide the Atom underneath the Thing-O-Matic again.

    Drat!

  • NFS V4 Tweaks

    Come to find out that Ubuntu 11.10 uses NFS V4 by default, which means the various clients scattered around here, all of which use NFS V3 by default, report all files have user & group 232 – 2: an awkward and unforgettable unsigned 4294967294. That’s -2 in 2’s complement notation with 32 bit hex numbers, corresponding to the unsigned 16-bit 65534 = -2 for the nobody user & group.

    Fix that by editing /etc/default/nfs-common to set NEED_IDMAPD=yes. Unmount the NFS share, do sudo start idmapd, remount, and it’s all good. The next time the client boots, the idmapd daemon starts automagically, and that’s all good, too.

    Adding the -t nfs4 filetype in /etc/fstab seems to be not necssary.

    How I got into this mess: the Intel Atom D525 that had been driving the Thing-O-Matic has a bog-standard Intel graphics chip that, despite (or perhaps because of) having an open-source video driver, reports doing only OpenGL 1.4. OpenSCAD, however, requires OpenGL 2.0 and those hacks don’t allow it to run properly, which makes it awkward for demos. The AMD that’s currently the file server has, IIRC, better graphics that might improve the situation; I think it sports a somewhat peppier processor, too. The fact that it’s running Ubuntu 8.10 says that it’s time for an update.

    Soooo, I swapped in a new 1.5 TB SATA drive, installed hot-from-the-oven Ubuntu 11.10, replaced Unity with XFCE, inhaled all the current data from the file server’s external USB backup drive, configured ssh / nfs / etc, and I’m now doing some simpleminded tests before I swap the IP addresses.

    Now, if the AMD has craptastic graphics hardware, it’s unhappy dance time…

  • Thing-O-Matic: Small Features

    Strainer - knob perimeter thread
    Strainer – knob perimeter thread

    It seems most of the stuff I build with my Thing-O-Matic involves small features and thin sections that bump hard against the minimum possible sizes. I’ve found that forcing critical solid model dimensions to be integer multiples of the the extrusion width or thickness stabilizes the whole idea→model→G-Code→object chain by encouraging Skeinforge to make the choices I prefer.

    Or perhaps I’m just constraining my choices to make Skeinforge happiest. One can view reality in many ways…

    Anyhow, my OpenSCAD programs tend to have these lines up near the top:

    ThreadThick = 0.33;
    ThreadWidth = 2.0 * ThreadThick;
    
    function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
    

    The ThreadThick parameter matches the Skeinforge thread thickness parameter(s) and the 2.0 matches the w/t setting(s). Those correspond quite closely to the actual printed results, as tediously verified through many measurements. Throughout the rest of the OpenSCAD program, I compute the dimensions of key features using those sizes as building blocks.

    The IntegerMultiple function returns the next higher multiple of the basic Unit that’s greater-than-or-equal-to the desired Size. Feeding in the thread thickness or width as the Unit ensures that the result will be an integer multiple of the smallest-possible dimension and won’t be smaller. The integer limit happens automagically, because the printer can’t lay down anything else, but a less-than-possible size can cause features to (unpredictably, in my experience) vanish without warning. This way your model reflects the printed reality and Skeinforge seems more likely to produce a predictable result.

    So the parameter controlling the thickness of a flat sheet might look like:

    PlateThick = IntegerMultiple(2.0,ThreadThick);
    

    Given ThreadThick = 0.33, the sheet will be 7 layers thick = 2.31 mm. If the sheet must not exceed 2.0 mm, however, then you need a similar function with floor(), which may eradicate very small features.

    This trick seems most useful for thin wall sections, because the wall width directly affects the fill:

    • Less  than 1 thread width can’t be built
    • Exactly 1 thread width is the thinnest possible wall
    • Widths between 1 and 2 thread widths may be either, depending on surrounding features
    • Exactly 2 thread widths produces a nice wall
    • Widths between 2 and 3 thread widths can’t fill properly
    • Exactly 3 thread widths fills perfectly
    • Over 3 thread widths generally fill properly

    So making the rim around a recessed lid become an integral number of thread widths, with a minimum width of 1.0 mm, looks like this:

    LidMargin = IntegerMultiple(1.0,ThreadWidth);
    

    With a 0.66 mm thread width, the nominal wall is 1.5 threads wide and could print as either 1 or 2 threads, depending on other factors. Rather than leave the results to chance, I force the solid model wall to be exactly 2 threads wide to make the printed result come out at 1.32 mm. Because I don’t care exactly how wide the lid margin is, as long as it’s at least one thread, that’s fine with me.

    Generally, the values come from computations based on other dimensions, so quantizing the results keeps the printed result stable over small variations of those inputs.

    If I ever get around to changing the nozzle to from 0.5 mm to 0.4 mm, I’ll probably change the thread dimensions to 0.25 mm x 0.5 mm (keeping the same 2.0 w/t ratio). A 1.0 mm wall would then still be exactly 2 threads wide and come out looking exactly the same, but with a total width of 1.00 mm.

    That’s the intent, anyway.

  • The Embedded PC’s ISA Bus: Firmware, Gadgets, and Practical Tricks — Unleashed

    ISA Bus Book - Front Cover
    ISA Bus Book – Front Cover

    A long time ago, in a universe far away, I wrote a book that (barely) catapulted me into the ranks of the thousandaires. Time passes, companies get sold / fail / merge / get bought, and eventually the final owners decided to remainder the book; the last royalty check I recall was for $2.88.

    Anyhow, now that it’s discontinued and just as dead as the ISA bus, I own the copyright again and can do this:

    They’re both ZIP files, disguised as ODT files so WordPress will handle them. Just rename them to get rid of the ODT extension, unzip, and you’re good to go. Note, however, that I do retain the copyright, so if you (intend to) make money off them, be sure to tell me how that works for you.

    The big ZIP has the original pages laid out for printing, crop marks and all, so this is not as wonderful a deal as it might first appear. The little ZIP has the files from the diskette, which was unreadable right from the start.

    Words cannot begin to describe how ugly that front cover really is, but Steve’s encomium still makes me smile.

    The text and layout is firmly locked inside Adobe Framemaker files, where it may sleep soundly forever. The only way I can imagine to get it back into editable form would be to install Windows 98 in a VM, install Framemaker, load up the original files, and export them into some non-proprietary format. Yeah, like that would work, even if I had the motivation.

    If you prefer a dead-tree version, they’re dirt cheap from the usual used-book sources. Search for ISBN 1-57398-017-X (yes, X) and you’ll get pretty close.

    Or, seeing as how I just touched the carton of books I’ve been toting all these years, send me $25 (I’m easy to find; if all else fails, look up my amateur callsign in the FCC database) and get an autographed copy direct from the source. Who knows? It might be worth something some day…

    The back cover has some useful info:

    ISA Bus Book - Back Cover
    ISA Bus Book – Back Cover
  • DNS Optimization

    A discussion on the MHV LUG mailing list pointed to the Gibson Research DNSBench utility. Letting it chew on all the nameservers it can find, then mulling over the results for a bit, produced this short list:

    • NY Public Library: 68.88.88.2
    • Level 3 Comm: 4.2.2.3 or .5
    • Yale: 130.132.1.10 or 11
    • NTT: 129.250.48.98

    Feed those into Network Manager (or /etc/resolv.conf) in some permuted order and away you go… at least if you’re near Poughkeepsie and using Optimum Online. Change anything and the results will differ.

    I’d been using OpenDNS at 208.67.22[02].22[02], but the new ones test out as marginally faster and are certainly more diverse. Who knew NYPL ran a DNS?