Archive for category Machine Shop
SJCAM M20 Camera: Tour Easy Seat Mount
Posted by Ed in Electronics Workbench, Machine Shop, Recumbent Bicycling on 2019-02-20
The general idea is to replace this:

With this:
Thereby solving two problems:
- Pitifully small battery capacity
- Wobbly camera support
The battery is an Anker PowerCore 13000 Power Bank plugged into the M20’s USB port. Given that SJCAM’s 1 A·h batteries barely lasted for a typical hour of riding, the 13 A·h PowerCore will definitely outlast my legs. The four blue dots just ahead of the strap around the battery show it’s fully charged and the blue light glowing through the case around the M20 indicates it’s turned on.
The solid model has four parts:
Which, as always, incorporates improvements based on the actual hardware on the bike.
A strap-and-buckle belt harvested from a defunct water pack holds the battery into the cradle and the cradle onto the rack, with a fuzzy velcro strip stuck to the bottom to prevent sliding:
The shell around the camera is basically a box minus the camera:
The shell builds as three separate slabs, with the center section having cutouts ahead of the camera’s projections to let it slide into place:
The new shell version is 30.5 mm thick, so a 40 mm screw will stick out maybe 5 mm beyond the nylon locknut. I trust the screws will get lost in the visual noise of the bike.
A peg sticking out behind the USB jack anchors the cable in place:
The front slab and center top have curves matching the M20 case:
The camera model has a tidy presentation option:
And an ugly option to knock the protruberances out of the shell:
The square-ish post on the base fits into an angled socket in the clamp around the seat rail:
The numbers correspond to the “Look Angle” of the socket pointing the camera toward overtaking traffic. The -20° in the first clamp shows a bit too much rack:
It may not matter, though, as sometimes you want to remember what’s on the right:
FWIW, the track veering off onto the grass came from a fat-tire bike a few days earlier. Most of the rail trail had cleared by the time we tried it, with some ice and snow in rock cuts and shaded areas.
Contrary to the first picture, I later remounted the camera under the seat rail with its top side downward. The M20 has a “rotate video” mode for exactly that situation, which I forgot to turn off in the fancy new mount, so I rotated the pix afterward.
A 3 mm screw extends upward through the hole in the socket to meet a threaded brass insert epoxied into the shell base, as shown in the uglified M20 model. Despite appearances, the hole is perpendicular to both the socket and the shell, so you can tweak the Look Angle without reprinting the shell.
All in all, the mount works well. We await better riding weather …
The OpenSCAD source code as a GitHub Gist:
YAGV Hackage
Posted by Ed in Machine Shop, Software on 2019-02-16
I’ve been using YAGV (Yet Another G-Code Viewer) as a quick command-line Guilloché visualizer, even though it’s really intended for 3D printing previews:

Oddly (for a command-line program), it (seems to) lack any obvious keyboard shortcut to bail out; none of my usual finger macros work.
A quick hack to the main /usr/share/yagv/yagv
file makes Ctrl-Q bail out, thusly:
diff yagv /usr/share/yagv/yagv
18a19
> import sys
364a366,367
> if symbol==pyglet.window.key.Q and modifiers & pyglet.window.key.MOD_CTRL:
> sys.exit()
I tacked the code onto an existing issue, but yagv may be a defunct project. Tweaking the source works for me.
The Ubuntu 18.04 LTS repo has what claims to be version 0.4, but the yagv GitHub repository (also claiming to be 0.4) includes code ignoring G-Code comments. Best to build the files from source (which, being Python, they already are), then add my Ctrl-Q hack, because my GCMC Guilloché generator adds plenty of comments.
Engraving Guilloché Patterns
Posted by Ed in Machine Shop on 2019-02-14
Flushed with success from engraving a hard drive platter for the 21HB5A tube, I bandsawed an acrylic square from a scrap sheet and unleashed the diamond drag bit on it:
That’s side-lit against a dark blue background. The long scratch and assorted dirt come from its protracted stay in the scrap pile.
If you look closely, you’ll see a few slightly wider loops, which came from a false start at Z=-0.1 mm.
Engraving at -0.5 mm looked pretty good:
Despite an angular resolution of 2°, the curves came out entirely smooth enough. The gritty scratchiness resulted in a pile of chaff covering the engraved area; perhaps some oil or lube or whatever would help.
Rescaling the pattern to fit a CD platter worked fine, too:
Polycarbonate seems to deform slightly, rather than scratch, leaving the final product with no chaff at all:
In this case, the doubled lines come from the reflection off the aluminized lower surface holding all the data.
That CD should be unreadable by now …
Collet Pen Holder vs. Cheap Refills
Posted by Ed in Machine Shop, Oddities on 2019-02-12
The three collet pen holders I got a while ago came with ink cartridges:
So I bought three bucks worth of a dozen pens to get pretty colors, whereupon I discovered they didn’t fit into the collet. Turns out the locating flanges aren’t in the same place along the cartridges:
The flanges on the top cartridge have been shaved down perilously close to the ink, but it now fits into the collet.
Bonus: a dozen fairly stiff springs that are sure to come in handy for something!
Makergear M2: Z-Axis Platform Sensor Switch, Replacement Thereof
Posted by Ed in Electronics Workbench, Machine Shop on 2019-02-11
After nearly four years of dangling a bare millimeter above the nozzle, the lever on the relocated Z-Axis switch finally snagged a stray thread and got bent out of shape. I un-bent it, but finally decided it was time to get more air between the nozzle and the switch actuator.
The small shim reduces the actuation distance:

Prying the ends outward with a thumbnail releases a pair of snaps and the cover pops off to reveal the innards:
The spring-loaded innards will launch themselves into the far corners of your shop, so be gentle as you slide the lever out and reinstall the side plate with a pair of clicks.
I filed the screw holes in my homebrew brass angle plate into slots, so as to get some adjustability, remounted the switch on the X-axis gantry, and tuned for best clearance:
It looks a bit more canted than it really is.
There’s about 1.6 mm of Z-axis distance between the nozzle and the switch, which should suffice for another few years.
The view from the front shows a slight angle, too:
There’s a millimeter or so below the nuts holding the X-axis linear slide in place, because the original 18 mm M3 SHCS are now 16 mm long (having shotgunned the metric SHCS and BHCS situation some time ago) and the washers are gone.
They’re all nylon lock nuts except for the one just to the left of the switch, providing barely enough clearance for the Powerpole connectors on the hotrod platform:
With the nozzle off the platform to the far right side, Z-axis homing proceeded normally. Manually jogging to Z=+5.0 mm left 2.6 mm of air under the nozzle, so I reset the offset in EEPROM to -2.4 = (2.6 – 5.0) mm:
M206 Z-2.4
M500
The first calibration square came out at 2.91 mm, so I changed the offset to -2.3 mm, got a 2.80 mm square with a firmly squished first layer, changed it to -2.5 mm, and got a 3.00 mm square for my efforts.
An array of five squares showed the platform remains level to within +0.05 / -0.07 mm:
I defined it to be Good Enough™ and quit while I was ahead.
The bottom two squares in the left pile have squished first layers. The rest look just fine:
The whole set-and-test process required about 45 minutes, most of which was spent waiting for the platform to reach 90 °C in the 14 °C Basement Laboratory.
Done!
Kenmore 158: COB LED Light Bar
Posted by Ed in Electronics Workbench, Machine Shop on 2019-02-07
With the Juki TL-2010Q all lit up, it seemed reasonable to apply the same technique to the Kenmore 158 sewing machine a few feet away:
In an ideal world, I’d match the COB LED module to the opening under the machine’s arm, but module length isn’t a free variable, so it sticks out a bit on both sides.
As you can see from the reflections on the base, this machine already has LEDs over the needle and in the endcap:
They run from a 12 VDC 18 W power supply with an adjustable boost converter producing 18 V for the nominally 21 V LEDs:
I replaced the coaxial power plug with a DE-9 connector:
Thpse 1/4 inch QD connectors on the AC power are marginally OK in this situation, as they’re tucked under the sewing table out of harm’s way. The other end of the AC line cord burrows into the sewing machine’s guts and isn’t easily removed, so this was the least-awful place for a connection.
The LED connector pinout:
The black cable comes from my lifetime supply of lovely supple flexible 28-ish AWG 9-conductor serial cables with molded-on male connectors.
I used some silver-plated / Teflon-insulated coaxial cable for the COB LED wiring. It burrows into the guts of the machine through a gap above the presser foot lift lever, then joins up with similar cables from the other LEDs routed through the (grossly oversized) heatsink fins:
The cables meet the repurposed serial cable inside the arm, following the original route of the 120 VAC wires formerly lighting the glowworm incandescent bulb in the endcap:
What’s not obvious in that picture: the cables pass under two stamped steel guides and through two stamped steel clamps, each secured to the frame by a cheese head screw in a tapped hole. They definitely don’t make ’em like they used to!
A 2.0 Ω ballast resistor produced the right amount of light, dropping 780 mV to run the LEDs at 390 mA and burning 300 mW. This supply produces 12.0 V at that current, so the COB LEDs run at 11.2 V and dissipate only 4.4 W.
The lower output voltage (compared to the supply on the Juki) is probably the result of the higher load from the SMD LEDs lighting up the area around the needle. We cranked up their voltage to match the COB LEDs, so they’re surely conducting more than the original (guesstimated) 50 mA apiece = 300 mA total. I have no convenient (pronounced “easy”) way to measure either their current or voltage; when the light’s good, it’s all good.
The other Kenmore 158 machines will eventually get the same treatment, but not right now.
Juki TL-2010Q: COB LED Light Levels
Posted by Ed in Electronics Workbench, Machine Shop on 2019-02-06
The COB LED module claims to run at 12 V and 6 W, so it expects to draw 500 mA. First pass measurements showed 500 mA happened at 11.6 V:
The 12 VDC supply actually produced 12.1 V at 500 mA, so a 1 Ω 1/2 W resistor should produce the right current:
Which it did, but the Customer Base judged 6 W to be far too much light. A 2.7 Ω resistor seemed too dim, so we settled on 2.2 Ω:
For the record, a 2.2 Ω resistor drops 980 mV and dissipates 440 mW, probably too close to its 500 mW rating. The supply produces 12.2 VDC at 450 mA, so the LEDs run at 11.2 V and dissipate 5 W; the heatsink remains pleasantly warm to the touch.
The hot melt glue anchoring the pin header won’t win any prizes, but it sticks like glue to the Kapton tape and, in any event, there’s not much to go wrong in there.
A cardboard cover hides the ugly details:
And then It Just Works™:
As evidenced by the glove fingertips, she does a lot of sewing and I’m glad I can shed some light on the subject …
Blowback