Our goal was to build a UAV out of foam since there will be many crashes involved, we decided to make a device to help us get through the iterations a bit faster. A hot wire cutter is the most efficient way to cut foam. A CNC hot wire cutter is even better! It is an awesome tool to have when you are building airplanes out of foam.
Mechanically, its not complicated to make a CNC Hotwire cutter. All you need is 4 independent linear axes, two horizontal axes, and two vertical axes stacked on top of it. This can be achieved by any means such as linear bearings, smooth rods and also drawer slides. The axes are driven by stepper motors. There are minimal cutting forces involved, the machine only needs to be rigid enough to withstand the tension of the wire stretched between the towers.
The problem is how to control 4 independent axes at the same time. Most tutorials online are for 3-axis 3D printers. There does not seem to be enough documentation on building a 4-axis machine using easily available parts such as parts from a 3D printer kit and open-source software. We found some people who had done similar projects using Arduino and Grbl, and decided to make a CNC hot wire cutter ourselves and try it out.
Hotwire CNC Resources
Hot wire cutter, RcKeith
4-axis cnc hotwire cutter (arduino+Ramps)
Airfoil coordinates database
Free CNC Software
4-axis Arduino based Hot wire cutter
Devcnc Foam cutting software
Jedicut foam cutting software
Arduino Uno based foam cutter
Nichrome wire Application Calculator
G-codes simply explained
- Plywood (12mm)
- Rails (Steel tubes, Smooth rods)
- Stepper Motors (one for each axis)
- Lead screw (M8 x 600mm, as long as you need the axis to be)
- Ramps 1.4
- A4988 Stepper driver (one for each axis)
- Arduino Mega 2560
- Nichrome wire (30 gauge for smaller builds and 26 gauge for larger ones)
- M8-M5 Motor coupler (M8 for the thread and M5 for the motor shaft)
- Grbl Hotwire Controller
- 4-Axis G-code Generator
- Wing Gcode
We realized that the most difficult part of making a CNC hot wire cutter was the G-code and Controlling systems. So we decided to start there. In our initial research, we found many people using DevFoam and profilli for generating the G-code and using Mach3 to control their machine. But unfortunately, this software was not free, and to run a Mach3 machine you need a parallel port, which is outdated now. Then our search leads to an Arduino based 4-axis cutter developed by Marginally clever which used an Arduino Mega2560 and the Ramps 1.4 CNC shield.
His page has codes for moving 4 independent axes and a Java-based G-code sender application that could send the G-code sequentially to the Arduino using the serial port. We tried this solution and after some fiddling around, we got it working. Not the easiest or most straight forward method. There is almost no documentation on how to use it.
RcKeith has some good documentation on the machines he built and what he used to control them. Some of them use expensive software and outdated hardware, which might be difficult to find.
We finally stumbled on a solution that worked, it was posted on a forum in rcgroups.com. Its for a 4 axis foam cutter using Arduino + Ramps1.4 It addressed the major problems we were having like a control software for the machine and generating 4-axis Gcode to drive the machine.
Building the Machine
My initial design was based on Rckeith’s foam cutter which used drawer slides as the linear guideways. This seemed like a good idea. They were locally available and rails are rigid without much backlash. The first design was for a machine with two towers on linear slides, with a total travel of the towers for about 20 inches. The machine would be laser cut out of 4mm plywood.
This was well and good until we went to the shop to buy the slides. A 20-inch drawer slide can only travel 10 inches, so in order to get 20 inches of travel we would need a slide of 40 inches, which were just too bulky and expensive for our use and the rails would protrude out of the machine for about 20 inches. Hence we dropped the plans for using drawer slides. Back to the drawing board.
We started on a new design for a more rigid machine using smooth rods and leadscrews for motion.
The design is fully parametric. You can change the length of each axes, the diameter of the rods, and even the clearance height of the vertical axis by changing the parameters in the file. On the vertical axes, there are 4 rods to provide some torsional rigidity so the towers would not bend.
This is the fully redesigned machine using 1⁄2 inch steel tubes, 12 mm plywood as the base and M8 lead screws to move the axes.
All the parts, except the lead screws, were bought locally. The half-inch steel tubes were not designed for linear bearings and there are not dimensionally accurate. So our plan was to 3D print a coupling for it to reduce the friction between wood and steel.
The design made ready for milling on Shopbot (CNC mill)
We cut the design by exporting the 2D DXF sketches and doing the CAM operations in Vcarvepro software. Since this is the initial version we decided to skip the couplers and go with wood on steel. we had to play with the tolerance between the circular hole and the steel tube to get it good enough to move on to the next step.
The first axis looks promising. The steel tubes are press-fitted at the ends to form a rigid structure. The carriage is a bit loose but the motion is a lot smoother when a small amount of lubricant is applied. so we moved on to the vertical axis.
The vertical axis has two steel tubes to carry the weight and two smaller aluminum tubes to provide torsional rigidity. We are using a stepper motor with an integrated lead screw to avoid using a coupler.
The final assembled towers. All the rods are press-fit at the ends and loose fit on the steel rods to give a smooth motion.
Note- When using sliding surfaces, depending on the material, a phenomenon called ‘stick and slip’ can happen. This would cause the motion to become jagged and cause vibrations. It may also lead to surfaces locking up leading to excessive loads and missed steps when using a stepper motor.
After the machine was assembled its time to fix the machine on a table, connect all the electronics, and tie the Nichrome wire across the towers.
Connecting the Electronics
We fixed the machine on a table using clamps. The base is designed to make it easier to use clamps to hold it in place.
The next step is to connect the electronics to move the motors and configure the machine. We have 4 stepper motors that need to be connected to our Ramps board. The wires need to extend enough to provide enough travel of the axes.
All the wiring connects to our Ramps board, which is a CNC shield for Arduino Mega2560. The Ramps can support up to 5 stepper motor drivers like the A4988. We are using Nema 17 motors with 200 steps per revolution running at 1/16th micro-stepping, giving us a smooth rotary motion.
The A4988 stepper drivers can be attached on top of the Ramps, one for each axis. Ensure proper orientation of the A4988 chip before attaching to the Ramps board. Each stepper can pull as much as 2 Amps, the stepper drivers have heat sinks to dissipate the heat. The board also has an 11A MOSFET on it to control the temperature of the wire connected to the D8 pin. All the components in the board will get hot, ensure proper cooling is provided.
IMPORTANT When the system is powered on, the stepper motors continue to draw current to maintain the holding position. The components like Stepper drivers and Mosfets can get very hot during operation. Do not operate the Ramps board without active cooling.
In the beginning, we ran our machine without active cooling and lost 4 stepper drivers and bricked a Mega2560. After that, we made a base for the board, attached it using spacers, and put a fan to cool the board.
The board rests on spacers and is cooled by a 12V fan to prevent overheating of the board.
Grbl Hotwire controller
We are using a Grbl control panel developed by Garret Visser which was adapted for Hotwire cutting by Daniel Rascio.
The panel has Independent jogging control for all axis, including homing along with Gcode graph visualization, and the ability to save your own macros. The Hotwire temperature can be fully controlled using M3/M5 to turn ON/OFF and S”xxx” command to set the voltage output, either manually or via a scroll bar in the software. The hotwire should be connected to the “D8” output and is supplied by the power connected to the “11A” input on Ramps.
Configuring the Machine
Every CNC needs to be properly configured before operating. Since we are using stepper motors in an open-loop system (without feedback) we need to know how far the carriage will move with every revolution of the Stepper motor. This depends on the number of steps per revolution of the motor, the pitch of the lead screw, and the level of micro-stepping you are using.
steps_per_mm = (motor_steps_per_rev * driver_microstep) / thread_pitch
After flashing the Megaa2560 with the Grbl8c2MegaRamps file, open the serial monitor and type ‘$$’ to access the Grbl settings panel. In order to change any value type the $number=value. Eg- $0=100 Once the machine is configured, ensure that the machine moves the exact amount as shown in the controller.
Attaching the Hotwire
In order to cut the foam using a hot wire, you need a resistance wire made of a suitable material that can withstand the heat and will have a uniform temperature across the length.
Nichrome is a suitable material, I have seen some use steel fishing lines. This is a good article for selecting a Nichrome wire for Hotwire cutting. Since our machine will use a wire length of more than 1 meter. we decided to use a 26 gauge wire. It might be a bit too thick for our application. we will also test with a 32 gauge wire and see how it goes.
The next step is to attach the nichrome wire to the machine since we have 4 independent axes, we cannot just tie both ends of the wire to the towers. The wire needs to have some extension to it, either by means of a spring or a weight attached to the end.
The hot wire is attached using hoops screws into the wood, these hoops help the wire move back and forth while maintaining the same height. A pulley would have been best, but we wanted to start with something simple and work our way up. In the left axis, one end of the wire is attached to a screw, which is pulled up to maintain a level height at the hoop.
The other end of the wire is currently attached to the end of a torsion spring we had laying around, which will provide the necessary tension to keep the wire taught and to give some amount of flex so that the wire can extend and be pulled back.
Generating the G-code
Wing G-code Generator
Wing G-code Generator is a program to generate XYUV G-code for hotwire cutting model airplane wings. It runs on python 2.7 and can also integrate with LinuxCNC’s Axis interface. There is also an online version
It allows you to enter the parameters of the wing such as root chord, tip chord, Sweep, gantry length, and even support washout. It has a database of airfoils in .dat format. New airfoils can be imported in the same way.
Jedicut is a cool piece of software in that it can do both CAD/CAM and also act as a machine controller. Thought the machine controller needs a PC with the old parallel port interface. But it also has a plugin to generate the G-code. It is not the easiest to configure. Some of the options and error messages are in french, but if you sit with it for some time, you can get it working.
It has lots of features like cutting wizard to help you do swept wings and compensate for wire kerf by adding a skin thickness. It can but more than wing profiles, it can cut out lettering and other shapes also.
*Note- Wing g-code generates G-codes in Absolute mode which works on Grbl without any issues, but Jedicut generates G-code in incremental mode. We had difficulty when first getting it to work, where the machine would just move back and forth. If this happens, Edit the G-code to remove unnecessary lines in the header.*
Both Wing G-code and Jedicut generate G-code with some Grbl unsupported codes in the header, The controller will show in the monitor when such errors happen. Edit the G-code and remove unnecessary lines of code.
Setting the Feed rate and temperature
Unlike conventional milling, the wire cuts by melting the plastic surrounding it, and when the tool stays in one position for some length of time, the surrounding material keeps melting away. This increases the kerf of the cut and causes dimensional inaccuracies. There are two variables that affect the kerf of the cut.
- Cutting Feed rate.
- Temperature of wire.
The Cutting Feed rate is the speed with which the wire cuts through the material. mostly denotes in mm/sec. The faster the speed the lesser the kerf, but the higher the temperature required, and also tension in the wire has to be sufficient to withstand the cutting forces. Good starting speeds are around 350mm/min to 500mm/min.
The Temperature of the wire must be a bit higher than the melting point of the foam you are cutting. Ideally, you want to cut with just the radiant heat whereby the wire dose not actually touches the material but cuts in front of it. The temperature is governed by the amount of current which flows through the wire, which is determined by its voltage. There is software that allows for PWM control of the wire to heat is just right at the moments to optimize the cutting feed rate.
The temperature of the wire is determined by the square of the current times the resistance.
If you are using Nichrome wire,
This is a cool application that can help you determine the temperature of the wire depending on the length and the voltage applied. For our setup with a wire length of 850mm, we applied a voltage of 26V and cut at a feed rate of 350mm/min. This gave us a good finish and low kerf.
The Cutting process
The Process starts from the design, which is exported as a dxf and turned into G-code by one of the software. The machine is turned on and calibrated, the material is placed on the workbench and the origin is now set. Turn on the hot-wire, run the G-code file, and watch the machine do the work for you.
Link to the repo – https://github.com/rahulsarchive/4AxisFoamCutter