fogbound.net




Page 1 of 6312345...1020...Last »

Mon, 1 Jan 2018

Projector Stand, v.1.0. Status: failure.

— SjG @ 10:55 am

We have a ViewSonic short-throw projector hooked up to an old Mac Mini and a DVD player, which we use to watch videos and YouTube. We project the shows on the living room wall, or sometimes, to be easier on our backs, upward to create “ceiling cinema.”

After taking a class on OnShape given at Crash Space, I thought an adjustable projector stand would be a good project to really teach me the software.

I’ve used a half dozen modeling / CAD programs over the past few years, and each one has a different learning curve. I should probably write up what I like and dislike about all of them. For now, I’ll just say that OnShape is a JavaScript modeler that runs in your browser1, and is developed by the team behind SolidWorks. It has all manner of professional design capabilities, materials planning, and so on — far, far more than I’m capable of using at this point.

My design was based on the plan to use the Crash Space laser cutter and 5mm birch plywood to build the final stand. It would be adjustable on one axis to swing from wall to ceiling modes, would have a simple locking mechanism, and would be stable enough to old the projector steady.

After far longer than I thought was reasonable, I had a design done in OnShape. For joining the edges with nice interleaving tabs, I used the Laser Joint add-in. The rest was based on measuring the physical objects and thinking about what I wanted. One nice thing in OnShape is that you can set motion constraints and simulate solids. This way, I could paste in a stand-in for my projector, and see that the range of motion would be correct.

Now that I had a design, I needed to export the individual pieces to be laser cut. There are layout add-ins available for OnShape, but none seemed to work for my design (probably because I didn’t take the time to thoroughly read the manual). Instead, I selected the primary face of each piece, and exported it as a DXF drawing.

Initially, I had problems. Nothing recognized the DXF files, even Inkscape, which generally is very good with this sort of thing. Aha! My version of Inskscape was out of date. Upgrading solved the problem. From Inkscape, I could export valid dimensioned PDFs.

From here, I had one other problem. One piece, the base, was larger than the 24″ x 12″ bed of the laser cutter. So I had to figure out a way to design two pieces that would fit together nicely. Taking inspiration from skull or pelvis suture patterns and the more happy shape of butterfly wings, I came up with a design. I imported the PDFs into Affinity Design, and split the base into two similar pieces. Since I already created some nice vector butterfly outlines, I figured I’d embellish the structure as well (I can’t help myself).

I ended up with four PDFs of actual-size designs that I could use on the laser cutter. I later realized that they are not the most efficient designs in terms of minimizing cuts, but I hadn’t been thinking of that when laying them out.

Here are the PDFs:



So those got cut out, and then brought home.

I clamped and glued the base, and misaligned it by a bit, but with some judicious sanding was able to make the relatively subtle mistake into something screamingly obvious. Oh well.

Then, I clamped and glued the sides to the base, and the hinge pieces to the platform piece. After the glue had dried, I sealed the pieces with polyurethane which turns out to be harder to brush on evenly than I expected. I ended up having to sand it away in places so that some of the closer tolerances would still fit.

From there, it was a simple matter to assemble. I added a spring to pull the locking bar up, and mounted the projector.

Hooray, it worked… sort of. There were a few problems that made themselves known right away. The first was dimensional.

In the original design, I measured the size of the projector — which I’d had to do very carefully so the three mounting screws would line up correctly. But what I didn’t take into consideration is that in use, the projector has cables plugged in, and they take up space. As per the photo below, I hadn’t accounted for about an inch and a half of needed clearance. This prevents positioning vertically for a good ceiling tee-vee experience.

Another problem, however, is the one that will require a new design. I anticipated that the combination of the large disc-in-hole hinges and the overall friction would result in fairly low force on the locking teeth against the locking bar. This proved to be true, but also the high friction in the system made it hard to tell when the locking bar was entirely clear when doing position adjustments. This, in turn, made it unfortunately easy to break the teeth.

So there it is. Version 1.0 earned a grade of “Failure.”

Version 1.1 is under consideration. Possible approaches are a pin-and-hole locking mechanism (slower and more difficult to change), or possibly forgoing locking altogether and using a screw-down friction-based brake instead. After all, the projector only weights a few pounds. A switch of materials would also work, but I’m kind of set on wood. I like the look of wood far more than I do the look of the various acrylics that I’d be able to cut with the Epilog. I suppose I could use a service to cut out of metal, but quarter-inch metal would be pretty heavy for the purpose.

1 The fact that you can write this kind of serious software, and that it runs in a web browser on a five-year-old notebook computer is really astonishing to me. Yet, it is indeed true.

Filed in:

Sat, 9 Dec 2017

Laser Menorah

— SjG @ 6:49 pm

You know, this title is misleading. The reality is a whole lot more boring. Maybe next year, I should take inspiration from the title.

This is more of a lazy Saturday afternoon project. I wanted to use some designs that I’ve been kicking around. So I took a sea of hexagons and a tree in Affinity Designer and mucked about for a bit until I had something where I more or less liked the look.

Next, I grabbed a slice of poplar (available in 8″ x 24″ x 0.25″ slabs at Home Deport, as “Hobby Poplar”) and drove over to CRASH Space. While it’s mega-take-apart-day, I scurried over to the laser cutter. I converted the design to PDF, loaded it up in Corel Draw, used the Epilog printer-driver, and sent it to the laser cutter. The poplar cuts very nicely.

Here’s a link to the PDF of the laser-cut portion, if you want to cut a copy yourself.2017-12-09-hexonorah-cut.pdf

I brought the pieces home, sanded lightly, drilled a few holes, and mounted the vertical piece onto the base, carefully mis-aligning it with the major axis of the elliptical base. Ah well.

I drilled holes where I would mount the candle holders themselves (after all, poplar is pretty, but not ideal as a holder for things on fire). For the actual sockets, I used some nice quarter-inch brass compression caps (also from Home Depot). I drilled a center hole, pushed through a brad, and then soldered it with a torch.

Next, let things cool, dried off the sockets, and put it all together.

The final result is not as attractive as I had imagined it. It’s a little … I dunno, squat? Perhaps the next iteration will have more dramatic tree-like branches emerging to hold the candles.

OK. Next year, forget the design. We’ll just go with lasers.


Sat, 7 Oct 2017

Simple file monitor

— SjG @ 11:59 am

Say you host a few web sites for various folks, and you give them write access to a directory on your server. Well, then, my friend, you’re as big a fool as I am.

Maybe you want to mitigate this foolhardiness by keeping an eye on what these folks upload. For example, when I see a user uploading SuperBulletinBoardThatIsTotallyNotASpamTool.php or SuperWordPressPasswordSharingPlugin.php, I can call them and explain why I’m deleting it. I can be a slightly-less-bastard operator from heck.

So here’s a quick bash script that I use. It’ll also help to alert you if somehow one of the WordPress sites gets compromised, and rogue php files get installed. It ignores commonly changing files or things we’re not interested in like images. It shouldn’t be considered an intrusion detection system, or a robust security auditing tool — this wouldn’t really help in the case of an actual hacker with any l33t skillz at all. It’s just a quick information source.


#/bin/bash

rm -f /tmp/fcl.txt

rm -f /tmp/fcld.txt

/usr/bin/find /var/www/ -type f -ctime -1 | /bin/egrep -v "\\.git|\\.svn|(*.jpg$)|(*.gif$)|(*.pdf$)|wp-content\\/cache|files\\/cache\\/zend_cache" > /tmp/fcl.txt

xargs -0 -n 1 ls -l < <(tr \\n \\0 /tmp/fcld.txt

[ -s /tmp/fcld.txt ] && /usr/bin/mail -aFrom:account@mydomain.com -s "MYDOMAIN.COM FILES UPDATED" you@youremail.com < /tmp/fcld.txt

Throw it into a crontab, and there you have it. You'll get an email with a list of files changed in the past day.


Wed, 27 Sep 2017

Seasonal Palettes

— SjG @ 7:43 pm

Over the years, I’ve written various JavaScript mandala-generators. I like giving variety to the color sets used, and in the past, I’ve hand-crafted collections of colors which I’ve given descriptive names like “Earthy,” “Angst,” and “Scorchio.”

For a new project, I wanted seasonal palettes. Being a northern-hemisphere dweller, I think of January as cool colors, May as yellows and greens, August as ambers and oranges, etc. Rather than hand assemble them, I thought this would be a good use for the Interwebs.

So I wrote a bash/php/ImageMagick script that would hit flickr.com with a seasonal search term to bring back the first twenty-five matching pictures. It then made a composite of the pictures, did a pixelation process, reduced the colors to a minimum set, and built a palette from them.

With excuses of fair use, here’s a visual of that process, using the example where the search terms were “Landscape July”:

1. Images are brought down, each scaled to fit in a 64 x 64 pixel square, and then they’re all combined into a single image.

2. The combined image is pixelated by scaling to 5% of the original size, then scaling back up to a larger size.

3. To get a little more punch and a little less muddy, the pixelated image has its histogram equalized

4. For good measure, the script then reduces the image to 32 colors.

Now, some of this may be redundant. For example, we could easily skip step 2, since we’re reducing colors in step 4. However, this way we sort of reduce the color space before we equalize the histogram. Maybe I should experiment with other paths here.

In any case, the results for my first search term “($month) Landscape” was not very good:

I tried some other search terms for good measure.

Here’s “($month) colors”:

Here’s “($month) thoughts”:

And finally, here’s “($month) skies”:

I have a few conclusions. First, it’s obvious that a hand-created set of palettes would be better. The pictures Flickr returned for each search term didn’t match my expectations very well. Perhaps I’d have done better with season names instead of month names. Lastly finding the best palette from an image is a problem that Google tells me many have worked on. I’m assuming others have probably done better than I.

But it’s a curious question — what are the “characteristic” colors from an image? My approach largely comes down to the number of pixels of a given general color. Are there lots of blues? My approach will have at least some blue. But if an accent color is “important,” whatever that means, my approach will probably lose it.

In any case, it’s probably back to mandalas and hand-crafted palettes for the next project.


Thu, 21 Sep 2017

Time Machine Backups

— SjG @ 3:37 pm

I use Time Machine for my local desktop backups. It’s a nice solution. It sits there quietly backing stuff up, keeping multiple revisions of files, and even keeping it all encrypted so if the external drive gets swiped it’s not going to be easy to get at the data.

Of course, it’s no substitute for a revision control system for code, nor is it good for situations where the office gets annihilated due to stray meteorite or drone strike. It’s not a complete solution, but it’s part of a broader collection of solutions.

Today I was reminded of some of the limitations. I used Time Machine to migrate to a new machine. That’s a pretty sweet process. You wait for a few hours of disk read time, and suddenly a new machine is populated with all your old settings, applications, data, and so on from your old machine.

But I found some things that weren’t quite right. Most of them had to do with processes that keep open files or databases, and don’t get backed up in a clean fashion.

  • Interestingly, Safari didn’t propagate Ublock Origin, which was a manually-added extension. This was the only surprising one of the bunch.
  • MySQL databases. I hadn’t shut down the MySQL server when the backup ran, so the table files from the Time Machine restore were corrupted. I was able to copy the files off the old machine (after shutting down mysqld gracefully), and use those.
  • TimeKeeper‘s datastore files were all corrupted. I had to delete them, and re-export/import the data from the old machine.
  • VMWare Virtual Machines. I knew they’d get corrupted if backed up by TimeMachine for the same reason as the above, but then I forgot that they weren’t backed up. I had to manually copy them off the old machine. This reminded me — if I want backups of my VMs, I need to do it myself!

That’s all thus far. Nothing too surprising, but a good reminder. Just because you’re backing up, doesn’t necessarily mean you’re backing up stuff in a restorable state!


Page 1 of 6312345...1020...Last »