Wednesday, December 23, 2015

Yoda In A Box

Initial pass of laser cutting on
the first layer of Yoda
Even though Yoda apparently doesn't get his just due in the latest installment, he's still my favorite Star Wars (tm) character. Wry, witty, lots of character, instantly recognizable. So I decided to memorialize him in a multimedia creation that could serve both as a unique Christmas present and a brief example of how to use a variety of makerspace tools (at Techno Chaos, of course!) and techniques to make something special. I call this story "Yoda in a box".

The ingredients include some digital graphics processing, a few passes in the laser cutter, a quick dash of 3D design and printing, capped off with a nice touch of simple electronics. After finding a good box in a local hobby store, the total parts outlay was less than $5 (but please don't tell my nephew...).

Here's the ambient-light look of the
Yoda box. The pattern created by the 1st
pass of the laser cutter dominates.
The digital graphics processing was the most complex part of this project. This was because of the "wow factor" I wanted for this project: not only would the Yoda image be clearly visible and recognizable under normal ambient light conditions, but it also needed to allow light to shine through parts of the image for a super-cool light-box effect. Because the normal-light image needed sharp lines for clear recognition, I decided to use a laser cutter to apply the image to the box (see the photo above to get the general idea). This would be created by the first pass of the laser cutter over the box (tech notes: this pass was applied with a 40W infrared laser at a speed of 80 inches per minute at about 20% power). Developing the cutting pattern for this step was relatively easy and straightforward, using my current-favorite tool for combined graphics processing and gcode generation laser cutting Inkscape to process a nice clear Yoda drawing I found with an online search. ("Gcode" is the standard "language" to tell computer numerical controlled (CNC) machines like the laser cutter how to move and act. If a pencil in your hand was the drawing instrument of a machine, gcode would tell your arm how to move to move the pencil the correct way to create a pattern or drawing. You don't want to write gcode manually -- the 1st-pass Yoda pattern had 50,000 lines of it! -- rather, you want a software tool like Inkscape that can convert a source graphic to gcode for you. There are more complex programs that can create gcode for a wider range of CNC devices, but I've found Inkscape is all I need for laser cutting. I will publish more tips and tricks about using Inkscape for laser cutting in future blogs.)
Details of the 3D-printed background and
LED electronics installation

The harder part was creating the gcode instructions for the 2nd pass of the laser cutter -- the one that would fully penetrate the wood in the box lid to create the light holes for the wow factor. Anyone with laser cutter experience will recognize that just using the "simple" pattern created for the 1st pass would result in nothing more than a large hole in the box lid resembling the head of Yoda with no features. That might be novel but not very cool. So I adjusted how Inkscape processed the Yoda art so that less than half of the lines remained in the output image, and then I erased additional areas of the artwork to reduce the image to more of an outline effect with hints of a few key features. I also built in bridges where fully-encircled shapes would have been cut out and dropped so the remaining wood would stay in place and visible. And I used good technique to ensure the 2nd pass would be precisely aligned over the 1st pass lines already on the box (tip: I insert an alignment dot at the axis orientation point (also known as origin or "0,0,0") in the lower-left corner of the graphics before applying the gcode generation step, and never rescale the graphics between multiple passes of graphics processing). The resulting 2nd pattern was then applied using the 40W laser cutter with power set high enough to cut all the way through the 1/8"-thick lid; on my laser that's 5 inches per minute feedrate speed at 80% power, just to be sure. (Note: I tested the full process on scrap 1/8" thick plywood twice to get it right before going to the final cuts on the box.)

Yoda shines through with the backlight on -- even more
detail is actually visible than seen from this angle.
The result was excellent! With some quick 3D design and printing a static green backdrop was created and then inserted inside the box to accentuate both modes of Yoda viewing. Then a simple set-up of RGB flashing LEDs (click here for an example source at Amazon) wired in series across a 6 volt coin-cell battery holder with on-off switch (got mine at Adafruit, but they're available in many other places too) was added and locked in placed with the good-ol' hot-glue gun and -- voila' -- we have a lighted glow-through box of Yoda that can be enjoyed day and night!

I hope this story inspires you to think "outside (or, perhaps more fittingly, inside...) the box" for future projects for gifting -- or keeping! Get with us at the Techno Chaos makerspace to get started and for assistance and support.

No comments:

Post a Comment