Friday, September 7, 2012

What the World is Made of

This actually happened several months ago...

On my way home from work, slumped in a BART seat, playing some kind of puzzle game or something on the iPad, and some kid (early-mid 20's maybe) flops down - a little heavily - in the seat next to me.

Generally I kind of keep to myself on planes, trains, etc., and I kind of like it when others do the same, so my annoyance needle kind of twitches over to the right a little when this kid looks at me (which I feel through the side of my head even though I'm pretty pointedly looking at what I'm doing and not at him), and asks:

"Hey, can I ask you what the most important thing you've ever learned is?"

It's Friday, I'm looking at a weekend, and I had a reasonably good day, so I give him an honest answer.

"Never make a decision hot."

"Oh.... You mean, like, physically hot, or...?"

"No, emotionally hot - angry, excited, whatever."

"Oh yeah, okay.  How did you learn that?"

"By making the wrong decisions a bunch of times because I didn't know it yet."

"Ah.  Thanks."

Like I had just told him which stop was coming up next.

I go back to whatever pointless game I was fooling with for a second, then I think to myself that what that kid just did required a certain amount of courage - I mean, asking a complete stranger on a BART train what is the most important thing they ever learned was statistically pretty likely to get the answer "Not fucking talking to strangers on the train" or something similar - so I put away the game and ask him a question of my own.

"So...what made you ask me that just now?"

"Well, I look at this train, and there's all these people.  There's like hundreds of years of life experience right here in this train car, and I figure it's worth trying to benefit a little from that."

"Huh - interesting thought."

"Yeah - I like hearing people's thoughts and stories.  I kind of collect stories."

"Yeah, well, that's what the world is made of, right?"

At this, the kid goes all quiet, and looks at me like I just pulled a quarter out of my eye.

"Have you read that?"

"Uh...read what?"

"That book - 'The World is Made of Stories'?"

"It's a book?"

I had honestly never heard of it, nor had any recollection of hearing that phrase anyplace in particular.

The kid keeps looking at me with that your-clothes-are-on-fire look.  "That book changed my life - I tell all my friends to read it."

"Really?  Huh."

"Yeah."

We ride on without really talking any more until his stop comes up, and he gets off the train. "Hey - thanks for the wisdom."

"Sure, if you can call it that.  Take it easy."

I downloaded the book to my iPad, but haven't gotten too far in it.

Shapeways and SketchUp, a maker's friend

So we bought this cheap-o lamp years ago - little florescent tube on the end of a plastic jointed neck, nothing special.  It was one of those "touch lamps" - instead of a mechanical electrical switch, it had a capacitive switch, the kind with a little metal nub that you touch and it uses the capacitance of your body to trigger the switch.  You know the ones.

Anyway, the crummy plastic housing broke about a year into its life, and of course I think to myself "well, I'm not going to throw out a perfectly good working circuit like that," so I scavenged the circuit board and the flourescent tube assembly, and stowed it away for a future project.

Recently, I got to thinking about that lamp circuit, and started roughing out some designs, and realized that before I could get very far I'd need an enclosure for the bare circuit board so that I could then put the whole affair into a mortise in the base or something.  But where to get a suitable enclosure?  I looked all over the place for an off-the-shelf project box, but they were all either way too big or just enough too small for my needs - I wanted the minimum amount of space to house this thing to allow for as much latitude as possible in the design.  What I really needed was a custom enclosure designed to JUST fit the board and components, isolating it from its surroundings, and allowing for the wires that needed to come out of it for the tubes, the power cord, and the touch switch.

Enter SketchUp and, ultimately, shapeways.com.  For those who don't already know, SketchUp is a very simple yet powerful (and free!) 3D modeling application (you can get it from sketchup.com - the free version is plenty functional for most purposes, including this one).  Taking exact measurements of the circuit board (including the power cord strain relief, holes for the mounting screws, etc.), I created a simple box with the ports, stand-offs, and recesses to just exactly hold the circuit board and provide clearance for the wires.  Here's what it looked like:

Simple enough, right?

So how to make this a reality? Enter shapeways.com.  Shapeways is a website front end to a 3D printing shop that makes custom forms to order in a number of materials, including a kind of nylon plastic.   They take a number of 3D model formats, including one that SketchUp natively exports, and in a couple of weeks voila!  

My box showed up today, and apart from a minor defect in the snap-together tabs which turned out to be a defect in the exported file, it was exactly to spec.  The material is also easy to machine, so if you want to leave some details to "post-production" (like I did with the drilling of screw holes in the standoffs) it works fine.

Here's the box, with the circuit board installed:

Cozy, no?  I had to shorten the power cord wires and re-solder them (the strain relief isn't moveable on the wires), but everything fits exactly into the little notches, and the screws went into the drilled posts perfectly.

Now instead of a mess of components and wires to deal with, I just have to account in my design for a mortise to hold this:

In the interest of full disclosure, this wasn't cheap - it ended up costing about $70 after shipping etc. - but I figured that it was an okay investment in an experiment, and was cheaper than a lot of other ways of producing a single unit of a custom design in plastic.  Also note: it does say on the site that the material is "for decorative purposes only" - so they don't vouch for using it in this context.  If you do something like this, then like me, you are doing so at your own risk.

All things considered, I'm calling it a success, if only because it made possible a much more professional result than I would have been able to get from off the shelf products, and learning how easy it was to get from digital to physical was pretty cool.

Once the lamp is done, I'll post pictures.