loading

CNC machine for shaping large pieces of polystyrene foam

FeaturedContest Winner
Picture of CNC machine for shaping large pieces of polystyrene foam
Summary

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.

Enjoy,
Richard Tegelbeckers

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.
 
Remove these adsRemove these ads by Signing Up

Step 1: Introduction

Picture of Introduction
05032012335.jpg
I became interested in CNC machines, shortly after being let down by a 3D printing firm in the UK. Intrigued with the reprap efforts, I decided that having a drill-like tool wizzing around in three directions would be an easy target to achieve. I did my research and ended up slapping together a small machine, using an old flatbed scanner, an ancient printer carriage and a defunct CD player. I learned from the experience and used it to come with the following objective: to create a large 3 axis CNC machine, capable of machining polystyrene foam. The machined foam can then be covered in a protective layer (eg. water based latex), before pulling a composite fibre mould(ing) from it.

Step 2: Design software

Picture of Design software
In order to design something on a computer in 3D, (CAD) design software is needed. This might not be pleasant for the Fancy Apple folks or the Open Source Linux enthousiasts, but the system to use (in 2012) is boring old Microsoft Windows. Sorry, no discussion...

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

Picture of G-code
As soon as an STL file is present, G-code can be created. The program I use is called Freemill: http://www.mecsoft.com/freemill.shtml

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

Picture of grbl
Grbl ('garble') is great for one reason more then any other: it will allow the use of USB for connecting a CNC machine to a laptop. Many established hobby solutions utilize the out of date parallel port, which will not work properly on a laptop due to power management issues...

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: http://www.instructables.com/id/Pocket-laser-engraver/

PS. Support the (Open Source) Arduino folks and buy an original...

Step 5: Stepper drivers

Picture of Stepper drivers
S8302109.JPG
S8302168.JPG
On my initial CNC machine I used small printer motors in conjunction with a 12 volt power supply and pololu drivers. Plenty info is available from the reprap guys.

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

Picture of Hardware objectives for the big CNC machine
Hardware objectives for the big machine:
  1. Use of standard components.
  2. 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.
  3. High speed
  4. Good repeatability
  5. Reasonably accurate
  6. 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...)
  7. In order to avoid getting clogged up by cuttings, all slides and drives to be mounted overhead of the workpiece
Update 20th/24th of June 2012: BOM updated. I missed out on a few parts on the last version of the BOM. Still, the BOM only contains the parts and materials I did have to purchase especially for the project. It does not include materials I already did have, which is mainly steel, wood router, fasteners, castor wheels, cables, etc. It also does not include the round shafts, which I stripped from a broken A0 printer. For more details, see the 3D model. I was initially going to publish a model to the 123D website, but as I experienced problems with this I uploaded a zipped ACIS file to this step (file extension .SAT, can be imported in 123D and many other CAD packages) and a zipped 3D AutoCAD file (file extension .dwg, can be used in AutoCAD R14 or higher). The model does not contain all items and components. However, it should be enough as a basis for making a machine yourself - it was good enough for me to make my own machine... You will probably want to modify the design to suit your own requirements and use your own choice of components/steel sections.

Step 7: Base frame fabrication

For the base frame I used 50x50x2.5mm box section. Whereas I did have most of the other steel for the project already, I needed to buy four lengths of the box section. It wasn't cheap...

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

For the rails I re-used the round shafts from a broken A0 printer. It came from the local tip, where it initially changed hands for £5 and ended up in my mate's house for several years... When taking the printer apart, the drive belt disintegrated. This just confirmed it is a good idea to avoid non-standard components. In case of the round shafts themselves: if they would need replacing, I would be able to do so by obtaining 16mm OD silver steel.

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

Again, I made use of the flat surface of the table top for alignment. In order to stop even the slightest deflection, I braced the 50x50x2.5 box sections with some 25x25x3 box sections. On the locating end I mounted a pillow block with an open, linear ball slide. On the floating end I mounted roller skate bearings.

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

Very soon after placing the main carriage on top of the base frame, I noticed some issues with the ball slide. Some of the balls stopped revolving and ended up scoring my lovely shaft. It must have been dust clogging up the raceways. I concluded it would be better to have a plain bush in the pillow block.

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

I decided to have a chain drive for various reasons. The main ones are:
- 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

The spindle holder consists mainly out of a cold rolled steel box section 40x27x1.5mm, bolted to a linear slide. When mounted to the secondary carriage, there is no noticeable play. I tried spinning a 315mm long drill bit at 30000 rpm and there is no vibration during operation. Once the drill bit has been rounded in order to resemble a ball nose cutter, it should be great for machining polystyrene. The length of the bit is not for making large cuts; only the end should be used for cutting. However, it will be great for creating deep cavities at shallow release angles. In order to machine solid wood, normal router bits can be fitted.

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

Picture of Machine working for the first time
S8302228.JPG
S8302239.JPG
S8302249.JPG
S8302258.JPG
S8302264.JPG
Step added 12th of June 2012:

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

Step added 18th of June 2012:

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

Picture of 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...
cyiangou21 year ago
hello, I really like your project and I would like to do it. Can you help me please how to connect all electronics parts or how to program the arduino?
Thank you
donkeyknee2 years ago
nice
Finster1012 years ago
Cool machine! Do you have any pics of the part you molded from the mold you showed cut in this instructable? I'd love to see the finished product.
RTegelbeckers (author)  Finster1012 years ago
Thanks for your comment! The red gel coat resin I used was over ten years old, having been at the bottom of a badly sealed bucket. As such it did not want to harden out properly. I applied the laminating resin with extra hardener in the vain hope to compensate. This only resulted in the generation of too much heat, which caused the melting of the polystyrene mold in certain places. I left the part in a corner of my workshop as after several days the gel coat was still tacky. By now it must be ok to still do something with the part. As you reminded me by posting your question, I will dig it out next time I am in my workshop and finally finish it off! In the first week of July I have some panels to machine on the big CNC, so I will have a go at it whilst 'babysitting' the machine. Pictures will be posted soon after that...
cjc03062 years ago
Hi RT! Congratulations on a fine build. I am in the process of building a similar machine inorder to print some prototypes of my inventions. Since I have left over aluminum 1 5/8" tent poles laying around, I decided to build the foam cnc with them instead of square tubing. The current design Im prototyping measures 32" x 60", so I need a large machine. I have already built a 3D printer so Im pretty familiar with cnc technology. Any suggestions would be greatly appreciated, thanks.
RTegelbeckers (author)  cjc03062 years ago
Hi. How do want to connect the aluminium tubes to each other? Welding aluminium is not easy and usually requires a TIG welder.

In the near future I will make some alterations to my own machine. On the horizontal axes I want to further reduce the backlash and add gearing, by replacing each coupling with a chain and two sprockets. A ten tooth sprocket on the motor and a twentyfive tooth sprocket on the drive shaft will give a 1:2.5 reduction. Check my instructable in a few weeks as I will document the upgrades.

My z-axis is not very stiff in sideways direction, especially when the tool is all the way down. Not much of a problem for shaping large pieces of low density foam, but could be an issue in other applications.

Good luck wih your own machine!
Vika843 years ago
Good Luck babe! xx
RTegelbeckers (author)  Vika843 years ago
Thanks gorgeous! Sorry for having spent the last two months in my workshop... xxx
FoolishSage3 years ago
This is a really cool build! Can you estimate how long it took and how much it ended up costing?
RTegelbeckers (author)  FoolishSage3 years ago
Thanks! The total cost for the small machine was £70 (mainly for electronics)and it took the occasional hour over a few months. The second, larger machine took several days over the last two months. The total cost for parts and consumables was £665. I also spend £28 on job specific tools, just as reamers (8mm & 10mm) and drill bits.
RTegelbeckers (author)  RTegelbeckers3 years ago
I noticed I missed out on a few items on my initial costing. I now worked out the total cost for parts and consumables as being £728. This does not take into account the materials I already did have. See step 6 for a Bill Of Materials.
mgingerich3 years ago
Have you considered building custom motor drivers? I'm making a CNC with from scratch electronics right now, and it's worked pretty well so far. Way cheaper too. Just something to think about. Great instructable!
So I am not the only cheapo person on the web. That's nice to know, so how are you planning to build the electronics from scratch? I am sort of a person with shallow knowledge in this field, and would appreciate you sharing the knowledge that you have with me.
I'd be happy to. My way of doing things was a little unconventional, since I'm controlling my CNC with a microcontroller. The schematic on page 3 of this instructable is the main part of my motor driver. four of these are needed to control one unipolar stepper motor. I'll let you know when I write a more detailed instructable on it.
Here's the link: http://www.instructables.com/id/How-To-Make-an-Optocoupler/
Very interesting, looks much easier than using some relays. Thanks! I shall be making my CNC's main chassis today. I just finished gutting a printer, and scanner, so now I have some steppers, worms, etc. The only thing is that I cant decide on what material to make the body. Wood, plastic, steel, I dont know what it should be made of, probably wood or steel though. Thanks for the insight, I have a picaxe 18x lying around that will work great with the opticoupler.
Glad I could help :) What tools did you use to machine your steel? I'm restricted to wood so far because I don't have access to a shop. Let me know when you get your machine built!
RTegelbeckers (author)  mgingerich3 years ago
I have used a 'custom driver' on an x/y table I played around with, years ago. I used four PN2222 transistors, four MJE3055T transistors and four MJE2955T transistors to drive a single stepper. I used a DPDT relay to switch between the two stepper axes, losing holding torque in the process. The maximum current would have been in the order of 1A at 12Volt. I will now make a driver based on a Toshiba TS6560, which I can get for £2.24 each, incl. delivery: http://www.instructables.com/id/How-to-make-a-driver-for-a-stepper-motor/
The driver is not only good value, it also is economical on the ports needed on the microcontroler: per axis it only needs one line for steps and one line for direction. This means a bottom of the range arduino uno can easily handle three axes and will be left with a few lines spare. On top of this, it will allow for microstepping. This is essential on my rig as each step would otherwise be 0.4mm in size. It saves me from having to add a costly gear reduction to the motors..
ketirock3 years ago
Very Impressive.
Vika843 years ago
I managed to get movement by using the 12 volt pololu based electronics from my first, smaller CNC machine. In one direction the main carriage did move sort of ok, but in the other direction it needed a bit of help as it was jurky. The Toshiba based drivers running on 24 volt should in theory be good enough for the job. As I only give it a quick try, I hope I can still get them to work by tickering a bit more. Otherwise I will be very interested in your custom drivers!

PS. The price for the TB6560 drivers was pretty good: £36.65 for all three incl. delivery - source: Ebay
RTegelbeckers (author)  Vika843 years ago
OOPS! I was logged in under my wife's credentials for the last comments... Check out her instructables and especially the one for the Swan if you want to impress at a diner party!