This instructable shows how to shape polystyrene foam, using a CNC machine. Starting with a brief introduction, design software necessary for creating an STL file is discussed. This is followed by a method for creating G-code, using an STL file as input. After this comes the introduction to GRBL, an arduino based system for using G-code to control stepper motors of a CNC mill. Stepper drivers are mentioned, after which the creation of large CNC hardware is described. The instructable finishes with next steps.
PS. I plan to expand/update this instructable as I gain experience and make improvements to my machine. Come back to check if you are interested! Also, if you would like more clarity on any of the steps, leave a comment and I will try to help out. I could potentially add more pictures as I took photos/videos of pretty much everything I did.
Step 1: Introduction
Step 2: Design Software
Having made the democratic decision for Windows (only one voter allowed: me...), the offering for CAD applications is plentiful and I advice to do plenty of research if you are serious about learning how to use a package. If budget is a constraint, 123D by Autodesk is hard to overlook. It seems to be relatively easy to learn and cannot be beaten on price as it is free. Be aware as it is still in beta stage (June 2012) and it seems troublesome on older, lower spec 32 bit systems. The 64 bit version should be pretty good on a more powerful machine. In the professional ranges the price for software climbs steeply, but one gets what one pays for... Popular offerings are Inventor by Autodesk and SolidWorks by Dassault. Both are very powerful and take a fair amount of time to learn.
In short: Use any CAD software you like as long as it can generate an STL file.
Something worth while mentioning, all softwares mentioned in the following steps are available as open source or freeware...
Step 3: G-code
It is very easy to use, but it could cause some issues with your graphics card. If it locks up, try the following: redo the steps until the last step before it would lock up again. Now shrink the program window or move it off screen, in order to prevent the 3D model from showing on your screen. The program should now work without crashing...
Step 4: Grbl
For Grbl see: https://github.com/grbl/grbl
Windows users can use the following to connect to grbl: https://github.com/OttoHermansson/GcodeSender
In practical terms, grbl runs on an arduino (uno) and needs to be uploaded to the microcontroller. Several methods are available, good instructions are already described here: https://www.instructables.com/id/Pocket-laser-engraver/
PS. Support the (Open Source) Arduino folks and buy an original...
Step 5: Stepper Drivers
For my larger CNC machine I need more power: 24 volts and bigger drivers. I tried some drivers based on the Toshiba TB6560 chip, but I have not been successful with this. As I only played around for an hour or two I might still get them to work before turning to an alternative. Suggestions welcome...
Update (7th of may 2012): The Toshiba based drivers were rubbish. The first one did not work, the second one burned, but the third one worked lovely. I think the quality of assembly was probably poor: when the boards first arrived I noticed a poor solder joint, which I fixed. I will get new drivers or even make my own, based on the same chip. All in all, it means I can't run the machine just yet :-(
Step 6: Hardware Objectives for the Big CNC Machine
- Use of standard components.
- Ideally I would be able to use 2400x1200x100mm sheets (8x4 foot by 4"), cut in half and six layers high, ie. 1200x1200x600mm. Sheets in this size are readily available from the local DIY shop for little cost.
- High speed
- Good repeatability
- Reasonably accurate
- Should be robust. ie. it should be able to withstand a beating and survive a harsh environment in terms of dust and humidity (no mdf, wood or cheese-like materials...)
- In order to avoid getting clogged up by cuttings, all slides and drives to be mounted overhead of the workpiece
Step 7: Base Frame Fabrication
In order to line up the frame properly, it is important to have a flat surface to work on. A table with a thick, steel top would be best. In my case, I used a table I made from an old door.
With the frame being so big, I was fortunate to have some help from my mate Kirk - thanks again! Another aspect of the frame/machine being big, is moving the machine when finished. As such, wheels are attached during this step.
The critical part of the phase is to have the top members parallel. I did spend a whole evening in order to get to the result I was after.
Step 8: Rails
The round shafts will be locating the carriage in the side ways direction. The second shaft will be non-locating or floating in this direction. As such it only needs to be straight to a high tolerance in the upward direction. Being so, a cold rolled box section of 20x20x1.5mm was my choice for this rail.
With both rails I tried to weld them as accurate as I could. Final adjustment to a high tolerance can be achieved at a later date by using shims*.
* I make my shims by cutting up freshly emptied beer cans; the thickness of such shims is very constant and around 0.1mm in size.
Step 9: Main Carriage
Note the use of only one pillow block in order to make maximum use of the round shaft. This is possible by having a longer floating rail with a pair of bearing sets.
Step 10: Upgrade to Bushes
The most cost effective way of upgrading the pillow blocks, was to make some closed bushes to fit. The OD of the bushes was 2mm smaller than the ID of my pillow housings. As such, I ended up making a 1mm thick spacer. It took some effort, but I think it is worth it.
At a later date I will also replace the ball bearings for nylatron sliding blocks.
Step 11: Chain Drive
- compared to belts, chains do not stretch as much
- chains are very robust
- chains can easily be adjusted to any length
- simplicity of assembly
During this stage of the build it is necessary to do some accurate machining. The bushes need to be mounted in reamed, 10mm holes. The sprockets need reamed, 8mm holes. I managed to avoid machining of shafts by obtaining 8mm OD silver steel. I took effort to produce tensioners that can be easily adjusted.
In order to straighten the long shaft on the base frame, I used the Gentle Persuader* for adjustment - X marks the spot!
Update 28th of June 2012: The chain on the vertical axis is driven by a sprocket, mounted directly on the motor shaft. The other two axes have two chains per axis and require a coupling between motor shaft and sprocket shaft. My initial couplings did twist too much under the high motor torque, resulting in backlash of at least 2mm (see attached video). New, spider couplings finally arrived from Hong Kong and are now on the machine. The backlash is now acceptable (less than 0.2mm).
* engineering term for hammer
Step 12: Secondary Carriage and Spindle Holder
I did not finish the bearings at the floating end. As I want to get away from rolling bearings, I will deviate from my original design and fit nylatron pads. I also have to finish the vertical drive. It will be chain driven, but having a drive based on a screw thread would be possible as well.
Update 12th of June 2012:
Z-axis is finished. I did not yet fit a counter-weight, but the motor seems to be happy without one. It just means the carriage will drop down with a bang if the power goes off. Also, the 315mm long drill bit is pushing it too much. As soon as it touches the foam even with the slightest pressure/speed, it will occasionally wobble too much. A shorter bit works fine. I will shorten the long bit step by step to see what I can get away with...
Step 13: Machine Working for the First Time
As mentioned in an earlier step, I did have a problem with broken stepper drivers. In order to run the machine for the first time from a mechanical point of view, my mate Russell (many thanks!!!) hooked up his 3-axis rig. It consists out of a Windows tower and a 3-axis parallel port board with Toshiba TB6560 chips.
The board was set up to use 1/8th microstepping, bringing the step size from 0.4mm to 0.05mm. We also set the backlash on the horizontal axes to 4mm each. The backlash is purely there due to the twist in the couplings. This will be sorted when the couplings will be replaced by spider couplings. The large motors were easily able to cope with the highest speeds we dared to run. They barely got warm and did not seem to skip any steps.
On the y-axis I managed to fit stops on the round shaft. I also will fit similar stops on the shaft for the x-axis, but this means taking it off in order to tap threads in the shaft ends. For the first trial I fitted temporary stops by clamping some 50x25 rectangular box to the main frame.
The long drill bit of 315mm was wobbling too much. At some stage we replaced it with a Dormer A110 1/4" bit, which I rounded so it would become a ball nose bit. I was able to make deep cuts at high speed. See the pictures and video...
Step 14: Making a Mould for a GRP Part
The end goal of the large CNC machine is not just to make shapes in polystyrene foam, but also to do something useful with the shaped foam. In first instance this would be the creation of composite moulds and or mouldings. In this step I will showcase the creation of a single use, polystyrene mould for a custom, GRP welding mask.
After designing a mould for the new mask, I created an STL file and opened it in FREEMILL. Here I created two sets of G-code: one for a rough cut (slices at 4mm intervals) and the next set for making the final cut (at 1.5mm intervals). The final cut is simply set 30mm deeper than the roughing cut. The roughing cut took a little over an hour to complete, whilst the final cut took around two and a half hours. As it was, the final cut resulted in noticeable steps on parts of the mould. This would have been improved by using 0.5mm intervals, but this would have taken three times as long, ie. seven and a half hours. In stead, I removed the steps by quickly sanding them down with a bit of sand paper, taking about three minutes to do...
Before being able to use the mould for creating the GRP part, it needs a protective layer, being latex paint in my case. I mixed a bit of blue from a paint sample into normal, white latex wall paint, and used this for the first layer. I then put more layers on of white latex, until the blue did not come through anymore. This way I was confident the protective layer of paint was thick enough.
Update 20th of June 2012:
The mould needed to be waxed and polished. I prefer to use honey wax for this, being the stuff made by bees. Three layers should usually be good enough for a single shot, I did apply four layers to be sure. The first part of a wet lay-up is usually the application of two layers of gel coat. I used two fairly thick layers of gel coat, having a red pigment mixed in. Having a thick layer will allow sanding down the part afterwards, in order to remove any imperfections in the surface. One or more layers of glass fibre, impregnated with laminating resin, follow the gel coat. In my case I used two layers of mat and laminating resin, having some white pigment mixed in.
After the resin hardens out, the part can be pulled from the mould. It can then be trimmed down, sanded to remove imperfections in the surface and polished to a shine. In the case of the welding mask, I will need to cut out a rectangle for the screen. The actual screen and the screen surround will be cut from a 'donor' mask, and bonded into the inside of the GRP shell. Attaching a handle to the shell will finish the assembly.
Step 15: Next Steps
- obtain replacement stepper drivers, the plan is to make some myself using Toshiba TB6560 chips
- finalise wiring
- use opto coupler to turn router on/off remotely
- paint everything
- level everything to within +/- 0.1mm, using shims
- replace bearings at floating rails for nylatron sliding blocks
- handle backlash (up to 3mm on horizontal chains), potentially by modifying grbl (!) 7th of June 2012: found the source of the play, being the twist in the couplings. simply replacing them with better quality spider couplings should resolve the issue. no mod to grbl needed. 28th of June 2012: couplings replaced, see step 11.
- 20th of June 2012: manage waste material. During the initial trials the extend and nature of dust generation by the machine became apparent. The main priorities will be to enclose the bottom part of the machine with boards and possibly curtains. The actual router tool would benefit from having ducting for cooling.
- design a car, cut it in foam and use the shapes to produce a set of composite moulds...