Recent posts (max 10) - Browse or Archive for more

LDraw Parts Library 2022-03 - Packaged for Linux

LDraw.org maintains a library of Lego part models upon which a number of related tools such as LeoCAD, LDView and LPub rely.

I packaged the 2022-03 parts library for Fedora 34 to install to /usr/share/ldraw; it should be straight-forward to adapt to other distributions.

The *.noarch.rpm files are the ones to install, and the .src.rpm contains everything so it can be rebuilt for another rpm-based distribution.

ldraw_parts-202203-ec1.fc34.src.rpm

ldraw_parts-202203-ec1.fc34.noarch.rpm
ldraw_parts-creativecommons-202203-ec1.fc34.noarch.rpm
ldraw_parts-models-202203-ec1.fc34.noarch.rpm

Sabaton "The War To End All Wars" album released

Sabaton released a new album this week with the theme of World War One titled The War To End All Wars. A previous album The Great War was also about WW1; the new album looks at another set of stories from that era, including "Christmas Truce", the story of a truce made by the ground forces on Christmas Eve. I've updated SabatonIndex with the discography and videos they've released for the new album.

Random Username Generator

Sometimes you need a username for a service, and you may not want it to be tied to your name. You could try to come up with something off the top of your head, but while that might seem random, it's still a name you would think of, and the temptation will always be to choose something meaningful to you. So you want to create a random username. On the other hand, "gsfVauIZLuE1s4gO" is extremely awkward as a username. It'd be better to have something more memorable; something that might seem kinda normal at a casual glance,

You could grab a random pair of lines from /usr/share/dict/words, but that includes prefixes, acronymns, proper nouns, and scientific terms. Even without those, "stampedingly-isicle" is a bit "problematical". So I'd rather use "adjective"-"noun". I went looking for word lists that included parts of speech information, and found a collection of English words categorized by various themes, which are grouped by parts of speech. The list is much smaller, but the words are also going to be more common, and therefore more familiar.

Using this word list, and choosing one adjective and one noun yields names like "gray-parent", "boxy-median", and "religious-tree". The smaller list means that such a name only has about 20 bits of randomness, but for a username, that's probably sufficient.

On the otherhand, we could use something like this for passwords like "correct horse battery staple", but in the form of adjective-adjective-adjective-noun. Given the part-of-speech constraint, 3 adjectives + 1 noun is about 40 bits of entropy. Increasing that to 4 adjectives and 1 noun gets about 49 bits of entropy.

So of course, I implemented such a utility in Python:

usage: generate-username [-h] [--adjectives ADJECTIVES] [--divider DIVIDER] [--bits BITS] [--verbose]

Generate a random-but-memorable username.

optional arguments:
  -h, --help            show this help message and exit
  --adjectives ADJECTIVES, -a ADJECTIVES
                        number of adjectives (default: 1)
  --divider DIVIDER     character or string between words (default: )
  --bits BITS           minimum bits of entropy (default: 0)
  --verbose             be chatty (default: False)

As the word list grows, the number of bits of entropy per word will increase, so the code calculates that from the data it actually has. It allows you to specify the number of adjectives and the amount of entropy desired so you can choose something appropriate for the usecase.

That said, 128 bits of entropy does start to get a little unweildy with 13 adjectives and one noun: "concrete-inverse-sour-symmetric-saucy-stone-kind-flavorful-roaring-vertical-human-balanced-ebony-gofer". Whoo-boy; that's one weird gofer. That could double as a crazy writing prompt.

If the word list had adverbs, we might be able to make this even more interesting. For that matter, it might be fun to create a set of "Mad Libs"-like patterns "The [adjective] [noun] [adverb] [verb] a [adjective] [noun]." Verb tenses and conjugations would make that more difficult to generate, but could yield quite memorable passphrases. Something to explore some other time.

Hopefully this will be useful to others.

LDraw Parts Library 2022-01 - Packaged for Linux

LDraw.org maintains a library of Lego part models upon which a number of related tools such as LeoCAD, LDView and LPub rely.

I packaged the 2022-01 parts library for Fedora 34 to install to /usr/share/ldraw; it should be straight-forward to adapt to other distributions.

The *.noarch.rpm files are the ones to install, and the .src.rpm contains everything so it can be rebuilt for another rpm-based distribution.

ldraw_parts-202201-ec1.fc34.src.rpm

ldraw_parts-202201-ec1.fc34.noarch.rpm
ldraw_parts-creativecommons-202201-ec1.fc34.noarch.rpm
ldraw_parts-models-202201-ec1.fc34.noarch.rpm

Remote Power Switches

Being able to turn a vacuum cleaner or fan on and off from across a room can make life much easier while working on a project. I had previously made an extension cord which incorporated a double lightswitch and had found that I was dragging that box around with the switch and the vacuum cleaner power cord plugged in, and that was getting awkward. So I created a dedicated "remote" switch power cable to make it easier to use.

I'm going to show four designs for such a remote switch. One of them is a reasonable design. Three of them add functionality, but also introduce hazards, and therefore I must recommend against them. But I find those interesting enough to explore.

All components use NEMA5-15 receptacles and plugs.

Basic Remote Switch

Beginning with the simplest design, we have a switch that controls a receptacle:

wiring-diagram-single-switch-hardwired.png

Complete parts list:

Part Qty
single-width deep electrical box 2
electrical box outlet cover plate 1
electrical box switch cover plate 1
conduit clamp grommet 3
heavy-duty extension cord 1
NEMA5-15 power outlet 1
light switch 1
fuse holder 1
fuse 1
wire nut 1
10-12 AWG insulated female spade crimp terminal 2
4-5" of stranded wire 1

Cut the extension cord so you have the plug end connected to about 2 feet of wire, then cut the receptacle off the other part of the extension cord. This will give you a pigtail that can plug into a receptacle, and a length of power cable.

To create a hole in which to mount the fuse holder in the switch module, drill/dremel a hole of matching size in the electrical box knock-out plate opposite the knock-out plate removed for the power cable.

Wire the contraption up following the diagram above. The pigtail with the plug is wired to the receptical in the box, The wire nut is used inside the receptacle box to connect the hot wire from the pigtail to the hot wire in the power cable. The power cable runs from the receptacle box to the switch box. The power cable hot wire connects to the fuse holder in the switch box with a crimp terminal, and then the other lead on the fuse holder connects to the switch using a crimp terminal and the short length of stranded wire. The ground wire connects to the ground terminal on the switch.

Be sure to use a multimeter to check that your wiring is correct and you have not introduced a short before you plug it into power.

This is the reasonable design; it gives you a switch that controls a power outlet up to some number of feet away, depending on the size of the extension cord you started with. It solves the problem at hand. If you're here looking to solve that problem, this is the design to use, and you can skip the rest of the blog post. The remaining designs below, while more functional, introduce hazards that I cannot recommend.

But if you have an engineering mindset, come with me as I explore them anyway.

Extensible Remote Switch

The above design is quite functional, but you have to commit to the distance between the receptacle and the switch. We can add a receptacle and plug into the design between the two like this:

wiring-diagram-single-switch-extensible.png

And now you can put a standard extension cord of almost arbitrary length between the receptacle box and the switch.

But this also introduces a hazard. Now the switch is its own module, and could accidentally be plugged into a regular power outlet and flipped "on", directly creating a short circuit. While doing so should throw a breaker or blow the fuse in the switch module, there is risk of problems, so I recommend against building this.

Complete parts list:

Part Qty
single-width deep electrical box 2
electrical box outlet cover plate 1
electrical box switch cover plate 1
conduit clamp grommet 3
heavy-duty extension cord 1
NEMA5-15 power outlet 1
light switch 1
fuse holder 1
fuse 1
wire nut 1
NEMA5-15 receptacle 1
NEMA5-15 plug 2
10-12 AWG insulated female spade crimp terminal 2
4-5" of stranded wire 1

For this design, you make a different set of cuts on the power cord. Cut the extension cord so you have the plug end connected to about 2 feet of wire. From the other portion of the extension cord, cut two 2-foot lengths from the cut end to give you two 2-foot sections of power cable, with the remainder of the power cable still connected to the original receptacle.

Build a (shorter) extension cord:

wiring-diagram-extension-cord.png

Sub-assembly parts list:

Part Qty
heavy-duty extension cord receptacle + wire 1
NEMA5-15 plug 1

Wire one of the plugs to the remaining part of the extension cord (which has the extension cord's original receptacle on it) to give you a (shortened) extension cord.

Build the receptacle module:

wiring-diagram-single-switch-extensible-receptacle-module.png

Sub-assembly parts list:

Part Qty
single-width deep electrical box 1
electrical box outlet cover plate 1
conduit clamp grommet 2
heavy-duty extension cord plug + 2' wire 1
heavy-duty extension cord 2' wire 1
NEMA5-15 power outlet 1
wire nut 1
NEMA5-15 receptacle 1

The wire nut is used inside the receptacle box to connect the hot wire from the short plug pigtail to the hot wire going to the receptacle.

Build the switch box module:

wiring-diagram-single-switch-extensible-switch-module.png

Sub-assembly parts list:

Part Qty
single-width deep electrical box 1
electrical box switch cover plate 1
conduit clamp grommet 1
heavy-duty extension cord 2' wire 1
light switch 1
fuse holder 1
fuse 1
NEMA5-15 plug 1
10-12 AWG insulated female spade crimp terminal 2
4-5" of stranded wire 1

Be sure to use a multimeter to check that your wiring is correct and you have not introduced a short before you plug any of this into power.

Double Remote Switch

A different functionality enhancement is to make the two receptacles in the receptical box independent of each other and put two switches in the control box, giving two controls in one device.

wiring-diagram-double-switch-hardwired.png

This also introduces a hazard, though a more subtle one; in this case we use the ground wire between the receptacle box and the control box to carry load current. The ground wire may be a smaller gauge wire than the neutral and hot conductors, and thus risk overheating. Additionally, the control box which you will be handling is no longer grounded; if something goes wrong electrically, you risk electrocution.

Part Qty
single-width deep electrical box 2
electrical box cover plate 2
conduit clamp grommet 3
heavy-duty extension cord 1
NEMA5-15 power outlet 1
double light switch 1
fuse holder 1
fuse 1
spray paint, white 1
spray paint, black 1
wire nut 1
10-12 AWG insulated female spade crimp terminal 2
4-5" of stranded wire 1

Lightly sand the faceplates,

sanded-faceplates.jpg

and paint one half white and one half black.

painted-faceplates.jpg

For this design, you make the same cuts in the extension cord as for the single remote switch design. Cut the extension cord so you have the plug end connected to about 2 feet of wire, then cut the receptacle off the other part of the extension cord. This will give you a pigtail that can plug into a receptacle, and a length of power cable.

Wire the contraption up following the diagram above. The wire nut is used to connect the hot wire inside the receptacle box.

open-assembly.jpg

Note that you will likely need to snap off a metal tab connecting the hot terminals of the receptacles to make them independently controllable.

Be sure to use a multimeter to check that your wiring is correct and you have not introduced a short before you plug it into power.

Once the painted faceplates have dried, install them so that the white switch controls the white receptacle, and the black switch controls the black receptacle.

fully-assembled.jpg

Double Extensible Remote Switch

The two previous enhancements can be combined to yield the most functional, but also the most hazardous version of this remote power switch:

wiring-diagram-double-switch-extensible.png

Part Qty
single-width deep electrical box 2
electrical box cover plate 2
conduit clamp grommet 3
heavy-duty extension cord 1
NEMA5-15 power outlet 1
double light switch 1
fuse holder 1
fuse 1
spray paint, white 1
spray paint, black 1
wire nut 1
NEMA5-15 receptacle 1
NEMA5-15 plug 2
10-12 AWG insulated female spade crimp terminal 2
4-5" of stranded wire 1

Paint the faceplates as for the previous build.

In an effort to mitigate one of the hazards of this design, I took the plug and receptacle in the middle of this system and painted them to make them stand out as somehow different from normal plugs and receptacles. Before building everything, I plugged them into each other and wrapped two pieces of electrical tape around them in a spiral to create something resembling a warning stripe. Since they were yellow plastic, I sprayed them with black paint, then removed the electrical tape. That gave a visually striking touch to those connectors:

extendable-version.jpg

For this design, you make the same cuts in the extension cord as for the single extensible remote switch design. Cut the extension cord so you have the plug end connected to about 2 feet of wire. From the other portion of the extension cord, cut two 2-foot lengths from the cut end to give you two 2-foot sections of power cable, with the remainder of the power cable still connected to the original receptacle.

Build a (shorter) extension cord:

wiring-diagram-extension-cord.png

Sub-assembly parts list:

Part Qty
heavy-duty extension cord receptacle + wire 1
NEMA5-15 plug 1

Wire one of the plugs to the remaining part of the extension cord (which has the extension cord's original receptacle on it) to give you a (shortened) extension cord.

Build the receptacle module:

wiring-diagram-double-switch-extensible-receptacle-module.png

Sub-assembly parts list:

Part Qty
single-width deep electrical box 1
electrical box outlet cover plate 1
conduit clamp grommet 2
heavy-duty extension cord plug + 2' wire 1
heavy-duty extension cord 2' wire 1
NEMA5-15 power outlet 1
wire nut 1
NEMA5-15 receptacle 1

The wire nut is used inside the receptacle box to connect the hot wire from the short plug pigtail to the hot wire going to the receptacle.

Note that you will likely need to snap off a metal tab connecting the hot terminals of the receptacles to make them independently controllable.

Build the switch box module:

wiring-diagram-double-switch-extensible-switch-module.png

Sub-assembly parts list:

Part Qty
single-width deep electrical box 1
electrical box outlet cover plate 1
conduit clamp grommet 1
heavy-duty extension cord 2' wire 1
double light switch 1
fuse holder 1
fuse 1
NEMA5-15 plug 1
10-12 AWG insulated female spade crimp terminal 2
4-5" of stranded wire 1

Be sure to use a multimeter to check that your wiring is correct and you have not introduced a short before you plug any of this into power.

And here is the completed contraption in all its hazardous glory:

extended-remote.jpg

(A couple of notes regarding the photo: I started with an extension cord on which I had previously replaced the original receptacle. Further, I made my cuts "backward" from what is described here; I used the plug end of the original extension cord for the build of the shortened extension cord. I've attempted to refine the designs given here based on my trial-and-error build experience.)

Conclusion

As always, the above should be used at your own risk, but hopefully you can see that there are risks and weigh them appropriately. And once again, the simplest answer is frequently the best answer.

Filtering embedded timestamps from PNGs

PNG files created by ImageMagick include an embedded timestamp. When programatically generating images, sometimes an embedded timestamp is undesirable. If you want to ensure that your input data always generates the exact same output data, bit-for-bit, embedded timestamps break what you're doing. Cryptographic signature schemes, or content-addressible storage mechanisms do not allow for even small changes to file content without changing their signature or address. Or if you are regenerating files from some source and tracking changes in the generated files, updated timestamps just add noise.

The PNG format has an 8-byte header followed by chunks with a length, type, content, and checksum. The embedded timestamp chunk has a type of tIME. For images created directly by ImageMagick, there are also creation and modification timestamps in tEXt chunks.

To see this for yourself:

convert -size 1x1 xc:white white-pixel-1.png
sleep 1
convert -size 1x1 xc:white white-pixel-2.png
cmp -l white-pixel-{1,2}.png

That will generate two 258-byte PNG files, and show the differences between the binaries. You should see output something like this:

122   3   4
123 374 142
124  52 116
125 112 337
126 123 360
187  63  64
194 156 253
195 261  26
196  32  44
197  30 226
236  63  64
243  37 332
244 354 113
245 242 234
246 244  52

I have a project where I want to avoid these types of changes in PNG files generated from processed inputs. We can remove these differences from the binaries by iterating over the chunks and dropping those with a type of either tIME or tEXt. So I wrote a bit of (Python 3) code (png_chunk_filter.py) that allows filtering specific chunk types from PNG files without making any other modifications to them.

./png_chunk_filter.py --verbose --exclude tIME --exclude tEXt \
    white-pixel-1.png white-pixel-1-cleaned.png
./png_chunk_filter.py --verbose --exclude tIME --exclude tEXt \
    white-pixel-2.png white-pixel-2-cleaned.png
cmp -l white-pixel-{1,2}-cleaned.png

Because of the --verbose option, you should see this output:

Excluding tEXt, tIME chunks
Found IHDR chunk
Found gAMA chunk
Found cHRM chunk
Found bKGD chunk
Found tIME chunk
Excluding tIME chunk
Found IDAT chunk
Found tEXt chunk
Excluding tEXt chunk
Found tEXt chunk
Excluding tEXt chunk
Found IEND chunk
Excluding tEXt, tIME chunks
Found IHDR chunk
Found gAMA chunk
Found cHRM chunk
Found bKGD chunk
Found tIME chunk
Excluding tIME chunk
Found IDAT chunk
Found tEXt chunk
Excluding tEXt chunk
Found tEXt chunk
Excluding tEXt chunk
Found IEND chunk

The cleaned PNG files are each 141 bytes, and both are identical.

usage: png_chunk_filter.py [-h] [--exclude EXCLUDE] [--verbose] filename target

Filter chunks from a PNG file.

positional arguments:
  filename
  target

optional arguments:
  -h, --help         show this help message and exit
  --exclude EXCLUDE  chunk types to remove from the PNG image.
  --verbose          list chunks encountered and exclusions

The code also accepts - in place of the filenames to read from stdin and/or write to stdout so that it can be used in a shell pipeline.

Another use for this code is stripping every unnecessary byte from a png to acheive a minimum size.

./png_chunk_filter.py --verbose \
    --exclude gAMA \
    --exclude cHRM \
    --exclude bKGD \
    --exclude tIME \
    --exclude tEXt \
    white-pixel-1.png minimal.png

That strips our 258-byte PNG down to a still-valid 67-byte PNG file.

Filtering of PNG files solved a problem I faced; perhaps it will help you at some point as well.

Pool noodle PVC swords

Swords are cool. Sword fights, doubly so. But sword fights are dangerous, so we don't let kids do that for fun. Unless we make the swords out of pool noodles. One approach is to wrap one end of the pool noodle in duct tape to create a "light saber" style sword; but that design is hard to swing well and devolves towards treating it like a cross between a sword and a whip.

The main complaint with the pool-noodle-as-sword approach is that swinging a limp noodle does not work well. So let's reinforce the noodle with a section of PVC pipe. But if we do that, we can add a sword hilt while we're at it. We also want to make sure that the PVC pipe end won't injure a playmate from an enthusiastic thrust.

Materials

Parts to make 5 swords:

Item Price Qty Total
10' 1/2" PVC pipe (pressure pipe, thinner wall than schedule 40) 2.98 x 2 5.96
1/2" PVC cross fitting 1.51 x 5 7.55
1/2" PVC end cap 0.51 x 20 10.20
pool noodle 0.97 x 5 4.85
duct tape, 45yards 5.28 x 1 5.28
4oz PVC primer+cement pack 7.70 x 1 7.70
Grand total $41.54

That works out to $8.31 per sword. (Prices circa 2021-Q3.) This should not consume the entire roll of tape, nor all the of the PVC adhesives, so if you have those on hand or have additional uses for them you can reduce your costs accordingly.

If I were to do this over again, I would also buy a single 1/2" PVC coupling to turn into a cutting tool instead of using a short bit of PVC pipe.

Assembly

Cut one of the 10' PVC pipes into four 30" sections. Cut a 30" section off the other pipe. That gives you 5 blades.

Then cut ten 3-3/4" sections to use as hilts.

Then cut five 9-1/2" sections to use as handles.

cut-parts.jpg

Cement an end cap to one end of each PVC section.

Cement two cross-guard assemblies opposite each other in each PVC cross fitting.

Cement one handle assembly in each PVC cross fitting.

Cement one blade assembly in each PVC cross fitting.

assembled-PVC-frame.jpg

Measure the shoulder of the cross fitting. Cut a circle near one end of the pool noodle, so that the edge of the hole is that distance from the end of the noodle. There are a few options here. You can just hack a hole into it with a sharp knife, or you can get a 1/2" PVC straight coupler fitting, and sharpen one end of it, and use that to cut the circle. Or you can use the small leftover chunk of 1/2" pipe to cut the circle, though that yields a hole that is slightly under-sized.

foam-cutting-technique.jpg

Slit the pool noodle from the end to the hole so that it can be pushed over the cross-guard.

foam-cut-hilt-end.jpg

Slide the noodle down over the PVC blade.

Measure 40-1/2" from the base of the noodle, and cut the noodle to that length.

foam-cut-to-length.jpg

Tape the noodle around the base of the cross guard with a piece of duct tape, cut to about 1/3rd the typical width of duct tape.

taped-at-hilt.jpg

Optionally, you can take the excess foam cut from the blade, cut it in half, and use it for a foam-ensconced hilt.

optional-foam-hilt.jpg

assembled-foam-hilt.jpg

Optionally cover the entire noodle with duct tape to improve its durability. Without this, energetic sword fights can tear small bits of foam out of the blades.

fully-taped-foam-hilt.jpg

This could be taken up a level with some tennis racket handle wrap on the handle to make it more grippy and less obviously made from PVC. In my hands, the 1/2" PVC pipe is a bit too small; were I to build one for myself, I would consider a larger diameter for the handle, which would imply a reducing coupling, and the junction with the cross piece might be awkward or look odd. The coupling, and a second size of pipe would also increase the cost.

As for concerns over durability, five kids playing with these for a couple months has yielded no broken swords or requests for repairs. I'd rank that as pretty good durability.

Ready. Set. Fight!

The Sabaton Index

I enjoy music that tells a story. True stories are even better. For what has probably been a couple of years, I have stumbled across references to Sabaton and their songs about historical events (particularly battles, wars, and related topics). But I only recently investigated and listened to their work.

Oh. Wow.

They post videos on YouTube where they also have a Sabaton History channel that covers the history behind the songs. They also publish their discography with lyrics and some background.

Who would sing a song about the Holocaust? Sabaton did. Listen carefully to the lyrics, soak in the thunder of the music. Reflect on the history.

For me, a song is more meaningful when I know the story behind it and the words from which it is crafted. So I want to learn the history, read the lyrics, and then listen to the song. But Sabaton has created so much material, from lyrics to lyric videos to music videos to history videos, that it is hard to really wrap your head around it. It really needs some organization to navigate it.

So I made an attempt at it.

Generally, each row of the table lists the title of the song, a link to the official lyrics, links to the Sabaton History videos for that song, various videos of the song itself, and a brief comment noting the topic of the song. They publish multiple video variants for their songs, such as "lyric videos" which show the words as they sing, or "music videos" which sometimes take a more reenactment approach. Or a "story video", as with No Bullets Fly, or even a stop motion animation "block video" as with The Future Of Warfare. I've attempted to be fairly complete in terms of listing all songs for which I found information, even if I didn't find enough to fill out all the columns. I have listened to but a small fraction of the material indexed here, but I've found this structure to be useful in exploring Sabaton's work.

Find the full table at SabatonIndex.

Lego and aluminum phone camera tripod mount

For a family project, we needed a way to take pictures with the stability of a tripod. The best camera we own happens to be the one in a OnePlus 6 cellphone. We have a collapsible tripod with a standard mounting plate and bolt.

Those don't exactly attach to each other.

Ok, so how can we approach this? Well, the tripod has a 1/4" 20tpi captured bolt. So we need something rigid for it to screw into. I can drill and tap some aluminum to meet that interface. For holding the OnePlus 6, a frame built from Lego could work.

So all we need then is something that can bolt onto the tripod, and to which we can attach Lego pieces.

Studs look challenging to machine, and I expect they would be extremely finicky to get machined precisely enough to give the right amount of "clutch". And might be prone to damaging bricks, which we want to avoid. An easier approach is to drill holes compatible with Lego Technic pins.

The tripod attachment plate is roughly 4 studs by 6 studs in size. So a 4x4 brick with a 1/4" 20-tpi hole in the center, with no studs, and with Technic pin holes around the edge should give us a very versatile base from which to work.

For material, I started from an aluminum ingot I had cast from cans, and machined that using my CNC mill (a Grizzly G8689 mini-mill with a HeavyMetal CNC conversion kit).

To start, I machined an aluminum block 1.254" x 1.254" x 0.380". (Ok, fine, the actual part was off by 2 thou, but it was close enough for the task at hand.) Then I machined 3 Technic pin holes on each of the 4 sides of the part. That included the shoulder around the top of each hole. I used an 1/8" endmill, and machined the outer ring, then the main hole within that. For each of those operations, I helixed down to cut the body of the hole, then cut the bottom circle to get a flat bottom. I don't have the g-code I actually used handy, but this gcode file gives the basic idea. Of note, the two Technic pin holes at each corner overlap partially within the part, so only one Technic hole at each corner can be used at a time. I then drilled a 13/64" hole through the center of the square face of the part, and threaded the hole with a 1/4" 20-tpi tap.

machined-aluminum-adapter.jpg

(There are many readily-visible flaws in the part. The casting had a lot of porosity, the edge of the tapped hole is rough, and there are some ugly machining marks on part of it. That said, they have not impaired its functionality.)

aluminum-adapter-beside-technic-1x4.jpg

Once I verified that the part accepted Technic pins, and screwed down solidly on the tripod, I wrapped the part in Technic bricks and slapped a 6x6 plate on top of it. That gets us a Lego-compatible tripod.

aluminum-adapter-with-technic-pins.jpg

aluminum-adapter-with-brick-wall.jpg

aluminum-adapter-with-brick-wall-and-top-plate.jpg

I then handed the contraption and a OnePlus 6 to my oldest son, Samuel, with directions to design and build a way to mount the phone on the tripod.

tripod-with-adapter.jpg

In short order, he came back with this:

tripod-with-bracket-rear.jpg

tripod-with-bracket-front.jpg

While there is room for refinement and optimizing the part count, this thing is very solidly built and did the job well.

tripod-with-phone.jpg

Using LeoCAD, I modeled the Lego portion of the contraption,

camera-tripod-mount-overview.png

And I created build instructions using LPub3D for anyone looking to build their own.

Based on the success of this, I expect that the next time I need to interface between Lego and "the real world", I will use the same 4x4 Technic-compatible brick design and drill-and-tap holes to suit the need.

LeoCAD 21.06 - Packaged for Linux

LeoCAD is a CAD application for building digital models with Lego-compatible parts drawn from the LDraw parts library.

I packaged (as an rpm) the 21.06 release of LeoCAD for Fedora 34. This package requires the LDraw parts library package.

Install the binary rpm. The source rpm contains the files to allow you to rebuild the packge for another distribution.

leocad-21.06-1ec1.fc34.x86_64.rpm

leocad-21.06-1ec1.fc34.src.rpm