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
Two passes make the scratch deep enough to hold engraving crayon / lacquer / ink, without making it much wider. Laser engraving would surely work better.
In lieu of actually milling the cursor, this code scratches the perimeter:
local dr = DeckBottomOD/2;
local hr = CursorHubOD/2;
local a = atan(hr - CursorTipWidth/2,dr); // rough & ready approximation
local p0 = hr * [sin(a),cos(a),-]; // upper tangent point on hub
local c1 = [dr - CursorTipRadius,CursorTipWidth/2 - CursorTipRadius*cos(a),-];
local p1 = c1 + [CursorTipRadius*sin(a),CursorTipRadius*cos(a),-];
local p2 = c1 + [CursorTipRadius,0,-]; // around tip radius
feedrate(KnifeSpeed);
goto([-,-,TravelZ]);
goto([-hr,0,-]);
move([-,-,EngraveZ]);
repeat(3) {
arc_cw(p0,hr);
move(p1);
arc_cw(p2,CursorTipRadius);
move([p2.x,-p2.y,-]);
arc_cw([p1.x,-p1.y,-],CursorTipRadius);
move([p0.x,-p0.y,-]);
arc_cw([-hr,0,-],hr);
}
Three passes makes it deep enough to snap along the line:
Tektronix Circuit Computer – cursor outline
If you look closely, though, you’ll find a little divot over on the left along the bottom edge, so I really must machine the thing.
Were I to go into production, I’d have to figure out a fixture, but I think I can just clamp a rough-cut acrylic rectangle to the Sherline’s table, mill half the perimeter, re-clamp without moving anything, then mill the other half.
Subtractive machining is such a bother!
The pivot holding the cursor and decks together is a “Chicago screw“, a.k.a. a “sex bolt“. I am not making this up.
A new-to-me Dell Optiplex 9020 needed a BIOS update, which, as always, arrives in a Windows / DOS EXE file. Because I’d already swapped in an SSD and installed Manjaro, I had to (re-)discover how to put the EXE file on a bootable DOS USB stick.
Unzip it to get the USB image file, then find the partition offset:
fdisk -l FD12FULL.img
Disk FD12FULL.img: 512 MiB, 536870912 bytes, 1048576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
FD12FULL.img1 * 63 1048319 1048257 511.9M 6 FAT16
Mount the partition as a loop device:
sudo mount -o loop,offset=$((63*512)),uid=ed FD12FULL.img /mnt/loop
See how much space is left:
df -h /mnt/loop
Filesystem Size Used Avail Use% Mounted on
/dev/loop0 512M 425M 87M 84% /mnt/loop
The image file is 512 MB and has 87 MB available. The BIOS file is 9.5 MB, so copy the file to the “drive”:
cp O9020A25.exe /mnt/loop
Which knocks the available space down by about what you’d expect:
df -h /mnt/loop
Filesystem Size Used Avail Use% Mounted on
/dev/loop0 512M 435M 78M 85% /mnt/loop
Unmount the image “drive”:
sudo umount /mnt/loop
Copy the image file to a USB stick:
sudo dcfldd status=progress bs=1M if=FD12FULL.img of=/dev/sdg
512 blocks (512Mb) written.
512+0 records in
512+0 records out
Pop the USB stick in the Optiplex, set the BIOS to boot from “Legacy” ROMs, whack F12 during the reboot, pick the USB stick from the list, and It Just Works™:
BIOS Update screen
We have a couple of other 9020s around that need the same treatment, so the effort won’t go to waste.
The Tektronix Circuit Computer, being a specialized circular slide rule, requires logarithmic scales bent around arcs:
Scale Tick Layout – Bottom Deck
Each decade spans 18°, except for the FL scale’s 36° span to extract the square root of the LC product:
FL = 1 / (2π · sqrt(LC))
The tick marks can point inward or outward from their baseline radius, with corresponding scale labels reading either inward or outward.
There being no (easy) way to algorithmically set the tick lengths, I used a (pair of) tables (a.k.a. vector lists):
TickScaleNarrow = {
[1.0,TickMajor],
[1.1,TickMinor],[1.2,TickMinor],[1.3,TickMinor],[1.4,TickMinor],
[1.5,TickMid],
[1.6,TickMinor],[1.7,TickMinor],[1.8,TickMinor],[1.9,TickMinor],
[2.0,TickMajor],
[2.2,TickMinor],[2.4,TickMinor],[2.6,TickMinor],[2.8,TickMinor],
[3.0,TickMajor],
… and so on …
The first number in each vector is the tick value in the decade, the log of which corresponds to its angular position. The second gives its length, with three constants matching up to the actual lengths on the Tek scales.
The Circuit Computer labels only three ticks within each decade in the familiar (to EE bears, anyhow) 1, 2, 5 sequence. Their logs are 0.0, 0.3, and 0.7, spacing them neatly at the 1/3 decade points.
Pop quiz: If you wanted to label two evenly spaced ticks per decade, you’d mark 1 and …
Generating the L (inductance) scale on the bottom deck goes like this:
The L scale covers 1 nH to 1 MH (!), as set by the MinLog and MaxLog values. Arc sets the angular size of each decade from ScaleArc, with the negative sign indicating the values increase in the clockwise direction.
The first decade starts with a tick labeled 1, so dec = 1. The next decade has dec = 10 and the third has dec = 100. Maybe I should have used the log values 0, 1, and 2, but that seemed too intricate.
The angular offset is zero because this is the outermost scale, so 1.0 H will be at 0° (the picture is rotated about half a turns, so you’ll find it off to the left). All other scales on the deck have a nonzero offset to put their unit tick at the proper angle with respect to this one.
The scales have legends for each group of three decades, positioned in the middle of the group:
I wish there were a clean way to draw exponents, as the GCMC Hershey font does not include superscripts, but the characters already live at the small end of what’s do-able with a ballpoint pen cartridge. Engraving will surely work better, but stylin’ exponents are definitely in the nature of fine tuning.
With all that in hand, the scales look just like they should:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The text baseline sits at the specified radius from the center point, regardless of its orientation, so you must offset the text path by half its height in the proper direction before handing it to the ArcText function.
A utility function to draw scale legends stuffs some of that complexity into a bottle:
function ArcLegend(Text,Radius,Angle,Orient) {
local tp = scale(typeset(Text,TextFont),LegendTextSize);
local tpa = ArcText(tp,[0mm,0mm],Radius,Angle,TEXT_CENTERED,Orient);
feedrate(TextSpeed);
engrave(tpa,TravelZ,EngraveZ);
}
Which means most of the text uses a simpler invocation:
Arc determines the angular span of each decade, with positive values going counterclockwise. MinLog is the logarithm of the scale endpoint, so adding 1.5 puts the text angle one-and-a-half decades from MinLog and multiplying by Arc moves it in the right direction. The offset angle rotates the entire scale with respect to the 0° reference sticking out the X axis over on the right. The top picture has its 0° reference pointing north-northeast.
The GCMC source code as a GitHub Gist:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GCMC treats variables defined inside a function as local, unless they’re already defined in an enclosing scope, whereupon you overwrite the outer variables. This wasn’t a problem in my earlier programs, but I fired the footgun with nested functions using the same local / temporary variables. Now, I ruthlessly declare truly local variables as local, except when I don’t, for what seem good reasons at the time.
It’s been quite a while since BIOS boot sequences started with the floppy drive. Combined with a CMOS backup battery failure, I’d say this poor PC has been chugging along for two decades.
On another floor:
Kiosk – Windows Updates
Isolating a Windows kiosk from the Interwebs is an excellent design principle, but Windows Update really wants to phone home. The kiosk’s presentation ran Adobe Flash 10, so it’s been confined for maybe a decade.
Looks like it’s time for another fundraising drive to replace the PCs with Raspberry Pi controllers. The real expense, of course, goes into rebuilding the presentations using whatever tech stack is trendy these days.
Along the same lines as the MPCNC pen holder, I now have one for the 3018:
CNC3018 – Collet pen holder – assembled
The body happened to be slightly longer than two LM12UU linear bearings stacked end-to-end, which I didn’t realize must be a constraint until I was pressing them into place:
CNC 3018-Pro Collet Holder – LM12UU – solid model
In the unlikely event I need another one, the code will sprout a max() function in the appropriate spot.
Drilling the aluminum rod for the knurled ring produced a really nice chip:
CNC3018 – Collet pen holder – drilling knurled ring
Yeah, a good drill will produce two chips, but I’ll take what I can get.
There’s not much left of the original holder after turning it down to 8 mm so it fits inside the 12 mm rod:
CNC3018 – Collet pen holder – turning collet OD
Confronted by so much shiny aluminum, I realized I didn’t need an 8 mm hole through the rod, so I cut off the collet shaft and drilled out the back end to clear the flanges on the ink tubes:
CNC3018 – Collet pen holder – drilling out collet
I figured things would eventually go badly if I trimmed enough ink-filled crimps:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters