

My adventures in CNC robotics - zaroth
http://lcamtuf.coredump.cx/rstory/

======
yan
Zalewski was the reason I felt unaccomplished in 2005, when I read his
"Silence on the wire" and noted he wasn't much older than I am.

His separate guide on CNC is great[1]. He also has a great intro to
electronics[2]. His first book is an amazing survey of totally passive
attacks[3]. His second book is a comprehensive survey of web application
osecurity[4].

[1] [http://lcamtuf.coredump.cx/gcnc/](http://lcamtuf.coredump.cx/gcnc/)

[2]
[http://lcamtuf.coredump.cx/electronics/](http://lcamtuf.coredump.cx/electronics/)

[3] [http://www.amazon.com/dp/1593270461](http://www.amazon.com/dp/1593270461)

[4]
[http://www.amazon.com/dp/1593273886/](http://www.amazon.com/dp/1593273886/)

~~~
zaroth
Sample chapter of 'Silence on the wire':
ftp://ftp.helion.pl/online/bekomp/bekomp-11.pdf

Edit: Almost funny to see FTP actually being used to, you know, transfer
files. As Scotty would say, "How quaint!"

~~~
agumonkey
warning: sample in polish (as the host dn)

------
hoprocker
I love articles like this. They display long-term focus and a patient, multi-
disciplined investigation into how to complete a project (in this case, some
light mechanical engineering, materials science, and machine technology). I've
been planning out a project and will need to make some large-ish 3D parts out
of a translucent plastic (part of a larger audiovisual installation), and
until now I'd been uncertain about how to proceed. I'm shedding tears of joy
reading through this brave soul's explorations into DIY resin casting.

Something that struck me about this article -- and something which I see
regularly around CNC hobbyists -- is the unfamiliarity with basic machining
calculations, a problem that usually results in chipped parts and broken
tools. I didn't even know about machining fundamentals like chipload/chip per
tooth (CPT), inches per minute (IPM), and correct RPMs for different materials
until fairly recently. Additionally, "climb" versus "conventional" milling
refers to how the bearings are loaded -- you almost always want "conventional"
unless you're on a nice CNC machine. Why isn't there more information
crossover into the hobbyist world?

Anyways, kudos to the OP for throwing this out there, and thank you Zalewski;
I'll be methodically absorbing pretty much everything linked to in this essay.
:-)

~~~
GregBuchholz
>Something that struck me about this article -- and something which I see
regularly around CNC hobbyists -- is the unfamiliarity with basic machining
calculations

...do you have a recommendation or two for books/resources for learning about
machining?

~~~
msds
I've found the best machining resource is working with a good machinist. Quite
a bit of machining is about intuition and properly evaluating other sensory
inputs - knowing how to interpret the sound a cutting tool makes is critical!
Unfortunately, finding a good machinist willing to let you watch them in
person - or better yet, work under their supervision - is pretty hard,
especially if you're just a hobbyist. Crotchety old-timers don't scale
particularly well...

Youtube is one of the better resources right now, for anything other than
really basic calculations. There seems to be a trend of old-school
professional machinists documenting jobs they're working on - sort of a cross
between a tutorial and virtual job-shadowing. Some nice users include
oxtoolco, KEF791, Abom79, and mrpete222.

~~~
hoprocker
Bang on true. As I noted elsewhere, that semester of night courses at the
local JC has improved my machining abilities _drastically_ , as well as
illuminated me as to actually planning the order of operations (y'know, "step
1: bandsaw", etc).

------
mcphage
Well, it's good to know how utterly I'm pissing away my entire life. It helps
to be reminded of that now and again.

~~~
dominotw
Comparing yourself to anyone else is silly, worshipping success is sillier,
bemoaning failure is silliest.

~~~
droopyEyelids
Everything is silly in a sensory deprivation chamber where you neither have
aspirations nor external motivation.

I understand it's possible to fall back on solipsism whenever life gets
challenging or you have to admit something unpleasant, but many of us relish
it and don't need to fall back on that sort of philosophical crutch.

~~~
dominotw
>don't need to fall back on that sort of philosophical crutch.

I am not suggesting that one needs a philosophical crutch like my pithy
platitude above to justify laziness.

I am merely suggesting that constant internal battle with yourself is not very
productive.

------
felixgallo
Hidden deep in this is an incredible treasure: how to do it yourself:

[http://lcamtuf.coredump.cx/gcnc/](http://lcamtuf.coredump.cx/gcnc/)

~~~
auxym
Also hidden, a great reference on mechanical design in general. Author
mentions it for gear design, but it covers a broad range of topics including
strength/stiffness analysis of parts, fasteners (nuts & bolts), materials,
etc.

Shigley : [http://www.amazon.com/Shigleys-Mechanical-Engineering-
Design...](http://www.amazon.com/Shigleys-Mechanical-Engineering-Design-
McGraw-
Hill/dp/0073398209/ref=sr_1_1?ie=UTF8&qid=1414029342&sr=8-1&keywords=shigley)

~~~
nraynaud
$265.75 for a book? I think I'll stay ignorant, that's one third of the price
for a lathe.

~~~
darkmighty
[http://www.abebooks.com/servlet/SearchResults?sts=t&tn=Shigl...](http://www.abebooks.com/servlet/SearchResults?sts=t&tn=Shigley%27s+Mechanical+Engineering+Design)

Publishers got used to the idea they can charge as much as they want on US for
textbooks. Higher education already costing so much, who would neglect books?
This is not the case in developing countries (specially India).

~~~
nraynaud
You're right, the kindle version on amazon.fr is "only" €46.

Well I still think that buying an american mechanical book seems like a bad
idea outside the US. My world is ISO, and american standards are a pain for
us: fractions, inverted units like mesh sizes or thread pitch, letter drill
bits (that one I never understood since they also have fractional sizes) and
variable standard between screw diameter and pitch (actually ISO has coarse
and fine pitch, but it's always coarse unless fine is explicitly designated).
People who think we could just divide everything by 25.4 would be really
naive. Even metal designations are different.

------
maguirre
Wow! This blog exemplifies someone whom I wish I could be. I am an EE who is
hopelessly enamored with the idea of one day becoming at least proficient in
mechanical design.

I better get going. I am not getting any younger

~~~
tmuir
Here's a little stream of consciousness from another EE that has dipped his
toes in the CNC world :

ME's scoff at the very existence of Sketchup, but for a free modeling tool,
its good enough.

If you like something more programming oriented, OpenSCAD is great for
parameterization. You literally code your 3D model.

Neither of these tools comes close to something like SolidWorks, but they both
get the job done.

A 3D printer is probably the easiest and cheapest method of fabricating your
designs, but the ability to make functional parts is fairly limited

Sherline sells a small tabletop mill for something close to $1000.

Grizzly sells a bigger one for $1300.

Both of these can be retrofitted for CNC for around $2000.

There are now 3 offerings of complete tabletop CNC mills for $2000 to $2500
(Nomad, Othermill, and Carvey)

If you can program, learning GCode will be a breeze.

CAM is probably where most of the learning curve lies. This is where machining
knowledge is most beneficial.

If you are lucky enough to live in certain metro areas, Techshop has several
locations across the US. Its essentially a fitness club but with machine shop
tools instead of exercise equipment. You pay a monthly fee, and you can use
everything. They have several different types of CNC machines, as well as
training.

~~~
kqr2
I would also like to mention FreeCad - an open source _parametric_ 3d modeler.

[http://www.freecadweb.org/](http://www.freecadweb.org/)

Cubify Design, although not open source, is one of the cheaper 3d cad tools
which also supports parametric modeling.

[http://cubify.com/Products/Design](http://cubify.com/Products/Design)

~~~
jwr
About a year ago I evaluated Cubify (Geomagic, Alibre, they seem to change
names quite often).

It was very, very promising, right until the moment I started doing a real
design in it. I hit so many bugs and problems, that I couldn't finish the
work. Debugging constraints was pretty much impossible: if something went
wrong (and it almost always did), I'd have to restart from scratch.

I can compare it to SolidWorks, which I also used, where debugging constraints
is also a major pain point (why don't they make this easier?), but at least
it's possible. And it is buggy, too, but much less so than Cubify, which means
you can actually get things done.

From my point of view (external perspective of a software engineer), 3D
modelling tools suck, in general. Few support parametric modelling, which
consider a must-have, and those that do are pretty poor at it (discuss after
you've created a parameter-driven assembly of multiple components in
SolidWorks, and then decided to change a parameter name/value or move a
parameter from a component to assembly-level).

~~~
phasetransition
JWR,

I would welcome your thoughts on just how to best hack these exact types of
parametric changes in SolidWorks, especially at the component to assembly-
level transition. It does seem pretty hopeless, as you say.

Email in profile

~~~
jwr
Oh, I am nowhere near expert with SolidWorks. What I end up with are fairly
brittle constructs: I first build components (parameterized), then plug them
into assemblies, then add key parameters to the assembly, and finally set up
component parameters to track those of the assembly.

BTW, top-down building (e.g. starting from the assembly) has never worked for
me. I always end up with an unmaintainable mess — but that could be my poor
skills.

------
zaroth
A veritable treasure trove! Some really beautiful craftsmanship and
perseverance.

Also on the site; Dial-a-threat:
[http://lcamtuf.coredump.cx/word/](http://lcamtuf.coredump.cx/word/) Shannon's
Ultimate Machine:
[http://lcamtuf.coredump.cx/ultimate/](http://lcamtuf.coredump.cx/ultimate/)

------
stillsut
Designing my first CNC, any ideas/answers would be appreciated:

[1]Looking to move XY stage with fine resolution: 5 micrometers [2]The stage
will only need to support ~5grams [3] There will be optical feedback [4] speed
can always be sacrificed for accuracy

\- Instead of the classic steppermotor setup, I was wondering about the
feasibility of servos with arbitrarily reduced gearing (let's say a stack of
laser cut planetary gears).

-What are the pitfalls of this method? has anyone else done something similar?

------
amckenna
For any that were not aware, this is the same Zalewski that did a lot of great
work around the Shellshock bug. He found 2 additional issues with the parsing
function after the initially reported bug. CVE-2014-6277 and CVE-2014-6278

[http://lcamtuf.blogspot.com/2014/10/bash-bug-how-we-
finally-...](http://lcamtuf.blogspot.com/2014/10/bash-bug-how-we-finally-
cracked.html)

I don't know where he finds time to sleep.

------
devchuk
Thank you so much for sharing this

------
pizu
What impressed me the most is that his work evolved slowly, over many years,
with incremental improvements. Stead and forward. Well done! Impressive.

------
emddudley
As if I needed another hobby.

But really, awesome page.

------
ashish01
What are the low cost (< $200) options for a CNC machine? Or making something
from scratch in that price range.

------
moconnor
"I bought a low-cost vacuum pump and constructed a makeshift degassing
chamber. After the makeshift chamber imploded, I constructed a better one and
started to wear eye protection, too."

A nice taste of the gentle humour waiting for you in the article!

------
pitt1980
t

