CNC routed custom cases


Lately I've been working toward better methods of designing custom cases to fit arbitrary objects, including circuit boards. My original intended use case, user group, or potential market, is for open source hardware -- anything from assembled printed circuit boards (PCBs) to bare PCBs to PCB designs.

Starting from the Gerber files and bill of materials for the "Inmojo Digital Dimmer v.2," (of which I'd bought parts for 6 and for which I wanted 6 cases) I used OpenSCAD to define the 3D models, first of the PCB itself (especially its connectors) and then of the case. Initially I was planning to 3D print the case, until I saw that it would take 7.5 hours to print on one of the 3D printers at Xerocraft. I was not looking forward to (6 x 7.5) = 45 hours of 3D printing. Plus, if you press me, I have to admit that I am not in love with plastic. It's expedient when it's cheap, but 45 hours is not cheap if machine time is worth anything.

On the Shark, I was able to rout the top half of one of my cases in much less time than 7.5 hours. (The finishing pass took 27 minutes, the roughing pass about the same I think. These times could be reduced with faster feed rates if I were to use cleaner bits, since at least the 1/4" bit is carbide, which does not really dull.) I then drew on what I'd learned to write Xerocraft's wiki entry on the Shark.

The "Cover Photo" is my first case top. It was the same design I'd created for 3D printing. Later I defined the design as a solid block, minus the volume of its contents (where the contents are the PCB, wires, and strain reliefs), cut in half.

Please note the wooden case should be oiled immediately after routing to prevent warping as the newly exposed inner material exchanges moisture with the air.

To amortize setup time, I defined an array: two pairs of case bottom and top, with a "frame" around it for clamping. This array is designed to be cut apart by tablesaw or chop saw. Between each two pieces is a waste piece the width of a saw blade's kerf. There's also a thick area in the very middle in which a brass screw could be set, to aid in fixturing.

Cut3D estimates this 2x2 array would take about 1 hour 15 minutes per side with 1/8" round/ball nose bit, at the feed rate I selected. Probably I could increase the feed rate if I were to add a previous roughing step with a 1/8" end mill. The end mill can run with 50% stepover and thus work much faster than the round/ball nose, which requires a very small stepover (maybe 15%) due avoid leaving ridges between the paths of the apex of the nose. Aspire can generate a much more efficient toolpath that doesn't require 100% raster coverage, as this one does.

The routing time comes out to 1 hour 15 minutes per case, which is longer than I'd hoped but much faster than the 7.5 hours estimated for a 3D print.

Oct 8th, 2015 @ 3:53 pm

As of 10/8/15 I've revised my model: For subtractive manufacturing, it is more efficient to remove less material. With constructive solid geometry tools such as OpenSCAD, I was able to define the interior contour of the case by subtracting the volume of its intended contents (PCB, strain reliefs, and a cavity for wiring to pass through, plus a tolerance or error margin) from the solid volume of a wooden block. (Of course, if the contents were a circuit board that needed to dissipate a significant amount of heat, I would need to add adequate channels and apertures for ventilation.)

Oct 9th, 2015 @ 12:15 pm

I am thinking that this kind of work would be much easier if the language had introspection. That would, for example, let me query the dimensions explicitly of an object that I'd built up through many steps. I am thinking CadQuery, a plugin for FreeCAD, which is based on Python, would work great. Python has introspection, and CadQuery CSG like OpenSCAD does, but also permits assigning shapes to variables. Some things I want to do look easy in these examples.