20140427

Helping Hackers Hack Better

Work put me on a detour for first thing on Monday up in Sacramento.  That means I got to spend a random weekend visiting Noisebridge in San Francisco. 

The last time I was here (which was also the first time), I felt a familiar sense of awe, not unlike the first time I set foot at 23b.  The vibe is indescribably unique, I like the way they hack, mostly.  The one thing that gets to me more than Hacker Stackers, or an overwhelming need for consensus, was that their machine shop was looking sad for lack of love and attention.  I decided I should change that. Since this is a "Do-ocracy", I guess the job is left up to me.

A pile of 3D printers in various states of entropy at Noisebridge
The CNC mill at Noisebridge is strikingly similar to the one we have at 23b.  Both are the MaxNC model.  However, this one seems to retain the original closed-loop control, which keeps track of the position of the stepper motor's rotation.  This is to accommodate for step loss which could occur while heavily loading the spindle.  Also, it seems like the hackers here have figured out how to interface LinuxCNC with the mill, sorting out the dreaded config file to twiddle the pins on a parallel port straight into the CNC control.  An impressive feat, except, they didn't get it quite right.


Noisebridge.  See any disparity between backplot and actual cut?

23b

Without knowing, I'd guess some VERY intelligent programmers figured out the interface between machine and computer.  I couldn't reverse-engineer the pinout on the magic "black box" on my own, so I ended up tearing it off completely and replacing with a set of Gecko Drives.  What Noisebridge missed was something very elementary to a machinist, but maybe not so much for a programmer - the X and Y axis were flipped.


Hold your right hand out like this.  Your fingers point toward the + direction in each axis.  Z is usually parallel with the spindle

When I set up the machine, I expected the cutter to start nearest to the front left hand corner, which was set as my G54 origin.  But, when the mill began by traveling to the opposite side of the workpiece, I panicked and hit the emergency stop button.  "What the hell!?", I cuss as I try to sort out what's wrong.  The code checked out and backplotted fine.  Ah, I know, I've seen this before.  The world is reversed!  After a quick googling, flipping a signed digit in the config file made the control behave as expected.  CNC machines are only trustworthy when they go where you tell them to.  Otherwise, they may try to drill a hole in the table at 10,000 miles an hour.  Okay, hyperbole a little bit, but CNCs are fantastically dumb machines.  They'll happily destroy themselves, if you let them (or tell them to!)

Once all that axial confusion was straightened out, the machine happily repeated cuts for the rest of the day.  Still, the machine was VERY slow.  Since this is a tiny, bantamweight duty machine, we could never expect a whole lot in the way of high feed rates, but the 6 inches per minute that this machine was running at was excruciatingly slow.  Not entirely sure of the upper limit of the speed on this machine, I seem to remember reading somewhere that these controls barfed when they were pushed beyond 20 IPM.  Digging back in the config file, I found a MAX_VELOCITY variable that needed a  tweak.  Now set at 15 IPM (a 250% increase) max travel rate, I doubt this machine could get into a whole lot of trouble before it had a chance to prevent CNC seppuku.   


After a few confidence-inspiring test cuts, eventually the kinks got works out of the code and the machine.  Gibs were tightened, syntax was changed, and ways lubed.  The machine is now working more properly than it ever has .

traced in Solidworks, plotted in CAMWorks

 
inspired by a sticker on a nearby laptop

While this is all a bunch of fun (and also a big component of my day job), why would I spend my weekend at Noisebridge fussing around with an esoteric piece of equipment?  It's because I live for the love of hacking.  For the adventure, for the skills, for the lulz.  Also, after reading Ivan Illich's Deschooling Society recently, a point has stuck with me: I feel compelled to contribute back to the society which created me. 

Spending time at 23b and other spaces has given me a chance to shine among brilliant peers and mentors; I stand on the shoulders of giants and all the work they've done before me.  Most of these hackers, for some reason, rarely dabble in the physical realm, or if they do, it's not to the level of sophistication required to get these finicky CNC machines running under optimal conditions (does that explain the pile of non-functioning 3d printers?).  Not everyone has the technical background to get these disparate hardware, software, and artistic systems integrated well enough to do what is commanded of them, but once in a while, putting a few heads together yields impressive results.  Two half wits make a whole wit. 


You may think, "So what? G code is difficult to generate anyway!"  Yes and no.  While the method I was generating G code was from a fancy (read: expensive) software suite, it looks like LinuxCNC offers a few options to generate toolpath from a greyscale image, or from a DWG file, and a few other format types.  While there's a little bit of nuance in the code that's missing from this whole exposition, the thought is generally this: the softer the material, the easier it is to machine.  Wood machines fine under many sub-optimal conditions.  If I didn't have the spindle speed set just right, or the feed incorrect, in many materials that would break tools and scrap parts.  Here, all we wanted to do is make a silly engraving of Nyancat in wood.  There's nothing technical or tightly toleranced here where we'd have to invoke the CNC gods to get the tools to perform crazy magic.  Keep it simple, stupid.

While this little CNC isn't great for building your next AR lower receiver, it would be perfectly suited for milling circuit boards, or a custom license plate frame for grandma.  These machines are essentially useless without proper instruction, which could be a challenge at Noisebridge.  The high level required to operate the CNC keeps it more in the arcane knowledge realm.  But, now that some of the hardware and software bugs have been worked out, the machine is a little more accessible.  Baby Steps.

It's difficult to send a n00b to a CNC mill and say, "Okay, time to make good parts!".  If G-code is unintelligible to you as a programming language, then you better get help from someone before you go running a CNC.  It's not difficult at all to understand g code, especially for such a simple machine like the MaxNC.  It's simply 3d connect the dots (think LOGO, from Mr. Wizard, remember???), with about a dozen extra commands operating the spindle and other things.

In fact, 3d printers speak a dialect of G code that's not much different from CNC mills.  Perhaps the CNC mill was neglected for much of the same reasons that the 3d printers remain in disrepair - too many levels of nuanced information to synthesize in order to get the machine to cooperate using limited human resources. 


What CAN be done, though, is for me to provide more thorough documentation of setup and operation of this milling machine with my newfound knowledge, which is in the process of being updated on the Noisebridge wiki page.  That might help a few people become self-sustaining.  However, after a few successful machine shop classes at HeatSync Labs, as well as a few sessions at 23b Shop, I think it's safe to say the way to get the shop to a lower state of entropy is to bootstrap the community into activity.  Teach them just enough to be self-sufficient.  There's a few things about machining that cannot be replaced by anything except for sheer experience, but with focused training, it would be interesting to see the way the Noisebridge community could come together and solve their own problems, figure things out in their own way. 



That's a part of the hacker ethic, right? 


No comments:

Post a Comment