Monday, May 9, 2011

Small NXT CNC machine: A bit too ambitious, really

Since the NXT 2.0 set contains three motors, it should be possible to build a Lego CNC machine with a little help from some external parts. Its construction would be quite straightforward and use most concepts we are already well familiar with. Based on those assumptions, I've tried to build one ― or more precisely, its early prototype.

I'm sure it could be built very nicely on a large scale, but the intention was to make it smaller ― that is, small and brick-economical enough to fit entirely on a 48x48 baseplate, yet provide at least 10x10 studs (8x8 cm) of grinding area.


So here it is! Its components are quite self-explanatory. On one end of the platform we've got two motors; each moves a pair of beams along a rail via rack&pinion system, that move the cradle. The X-rail is stationary, while the Y-rail is mounted on the X-beams. Thus, the cradle easily moves in both axes. It is nothing more than a simple little "pool" where I have fitted a thick piece of bakelite, and which slides freely over the surface thanks to the tiles on its bottom.

A bridge is built above the cradle area, heavily reinforced with four rows of interconnected studded beams. It carries a large moveable cradle built specifically for this standard-issue electric drill. The cradle is attached to four strong arms, and there is significant counterweight on the other side, with four large old Technic wheels attached to long arms. The counterweight compensates for the drill weight (approx. 2.2 kg), so the bridge needs to withstand only vertical force, and not the sideways too, which would complicate construction.

The drill is raised and lowered by just a few millimeters at full extents, but it is more than enough for a sheet of bakelite. Its height is actually controlled by raising and lowering the counterweight arms with one linear actuator, connected to an NXT motor. Since the drill and the counterweight are in a fine balance, the actuator doesn't need to produce much force, but I've opted to use it for its precision. (To increase precision of X-Y movements, the motors are also directly connected to the driving pinions ― no gears that would introduce backlash.)

A simple clutch holds the electric drill at a desired power, and a very fine yet hard grinding drill bit with a 0.8 mm head diameter is mounted in it. The NXT module that controls all three motors is resting on the side, connected to a laptop that sends the machining data.

Obviously, this is a quite limited CNC contraption, as the drill can access the surface only from above, so it acts more like a carving machine. The input is really straightforward: a simple script analyses a greyscale bitmap (which is a depth map), calculates the area that needs to be grinded out for each layer, and then "carves" them out, layer by layer. The X-Y resolution is 80x80 pixels, so the pixel amounts to 1 mm ― less would anyway make little sense with the grinding bit of this size, and while the depth could theoretically reach 256 layers, that would be insane ― 10 is more than enough. Or to be very precise, we're not dealing with pixels here, but voxels. Anyway, such configuration amounted to approximately 5500 instructions (motor movements) for an averagely complicated desired result: a tiny physical model of Iceland with scaled altitudes I chose as a first test.

So I've built the prototype (yes, please excuse the horrible colours, but facing running out of beams I've had little choice), programmed the script and happily pushed 'Start'. And quickly learned that the above idealism works only in theory, while in practice, this CNC design has serious flaws, serious enough to classify it as a failure.

Namely, I have terribly, horribly, enormously underestimated the forces that act on the cradle during grinding. Not only does the whole X-Y beam structure bend significantly under lateral forces during the drilling, but the drill itself has the tendency to "dance" around as well, and miss its targets by 2-3 millimeters at least. Of course, the bakelite looks massacred rather than accurately carved.

Theoretically, this problem could be overcome by forcing the drill to always act vertically, and drilling each target pixel separately. Again, this is just a theory: not only would drilling a millimeter from the already drilled area push the drill there to the path of least resistance, but the operation would have to be done for each pixel that needs to be grinded. And that would also last forever, and breach one of the primary rules of engineering ― that the machine should not be as inefficient to actually get the job done slower than an averagely inexperienced person would manually. Finally, even if I was like the Master from the Exile of the Eons (Arthur C. Clarke, 1950) and waited several dozen billion years in suspended animation until it is done, this approach would make very rough, spiky surface on the material.

I guess these problems could be solved by using much more stable X-Y beams, both probably having large pinions on both ends and tighter rails, and attaching a different drill. Perhaps a faster, specialized one would do the job better, but I've intentionally tried to use one of type almost everybody has somewhere at home. These improvements will be the objectives for the second prototype, significantly larger and architecturally different.

P.S. I've tried carving other materials since, such as the brittle spongy plasticky material I've found and can be seen on the photos (a white block), but that didn't seem to solve the mentioned problems.

5 comments:

  1. Sub-millimeter precision is possible. Chains and rubber Technic bricks...!

    ReplyDelete
  2. Had to stop having fun and fix a washer that stopped working. Running out of clothes.

    ReplyDelete
  3. Great post : "Small NXT CNC machine: A bit too ambitious, really". I found it very useful and informative.
    AFAB Enterprises offers precision CNC machining, custom fasteners, repairs, and more. Call one of the most trusted machine shops Florida has to offer!
    Also visit refractometer.com for Refractometers of all kinds. Also more details click custom fasteners
    Thanks -

    ReplyDelete

  4. AFAB Enterprises is founded on the understanding that many manufacturing and processing facilities need accurate,
    reliable and repeatable results from refractometer equipment - but they don't necessarily have to spend tens of thousands
    to get those results. Through a series of common sense approaches to the design and engineering of our products,
    AFAB offers its customers the best of both worlds; dependability and affordability. Yes, anyone can probably spend more
    on refractometer equipment, but for most of the companies that use this equipment it is costly overkill.
    Refractometer

    Also more details click here


    ReplyDelete