Intro: 4-Axis CNC Hot-wire Foam Cutter (Arduino+Ramps1.4)
A CNC Hot-wire cutter is an awesome tool to have when you are building aeroplanes out of foam. It allows the ability to cut out any aerofoil shape from a CAD design accurately. A properly configured machine can save you a lot of effort and produce a smooth finish.
The machine has a Nichrome wire stretched between two towers. The wire is heated by passing current through it and the towers move relative to each other to define the shape of the cut. The 2D CAD design to be cut out is turned into G-code and fed to the machine, which moves in four independent axes to create complex contours like tapered wings.
The motion of each axis can be achieved by any means such as linear bearings on smooth rods or by using drawer slides of various sizes. Each axis is driven by a stepper motor through a Leadscrew, a GT2 belt and pulley can also be used depending on the size of the machine. The cutting forces involved is minimal and the construction only needs to be rigid enough to withstand the tension of the wire stretched between the towers.
This is a true 4-axis machine capable of cutting different shapes on both sides simultaneously, the problem then becomes, how to control 4 independent axes at the same time. Many tutorials focus on 3-axis machines like 3D printers but there does not seem to be enough documentation on building a 4-axis machine using easily available parts and open source software. We found a few people who had done similar projects using Arduino and Grbl and decided to make a CNC hot wire cutter of our own.
The build log and documentation can be found on Github
Step 1: Hardware
Depending on the design you choose to make you can substitute parts with the ones you find locally. For example, you can switch the steel tubes/smooth rods with a Drawer slider, which can act as a linear axis.
- Plywood (12mm)
- Rails (Steel tubes, Smooth rods)
- Lead screw (M8 x 600mm, as long as you need the axis to be)
- M8-M5 Motor coupler (M8 for the Leadscrew and M5 for the motor shaft)
- Arduino Mega 2560
- Ramps 1.4 board
- Stepper Motors (one for each axis)
- A4988 Stepper driver (one for each stepper motor)
- 12V Power Supply for Arduino+Ramps
- Variable power supply (Lipo chargers with Hot-wire mode)
- Nichrome wire (32-28 gauge, depending on the size of machine)
The core components are the Arduino Mega, Ramps 1.4, Stepper drivers and motors. The rest of the machine can be made with any design and hardware.
Step 2: Software
- Grbl Hotwire Controller
- 4-Axis G-code Generator
- Wing Gcode
The difficult part in making a 4-axis CNC is finding software to generate the G-code and to drive the machine. There are many people using DevFoam and profilli for generating the G-code and to control their machine. But unfortunately, these softwares are not free and most run on outdated hardware which has a parallel port.
Our search led to an Arduino based 4-axis G-code interpreter developed by Marginally clever which uses an Arduino Mega 2560 and the Ramps 1.4 CNC shield. His page has codes for moving 4 independent axes and a Java-based G-code sender that could send the G-code to the Arduino using the serial port. We got it working after some fiddling, it's not the most straightforward method and 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.
We stumbled on a post in rcgroups.com, It was for a CNC foam cutter using Arduino and GRBL, from there we started building the machine.
Step 3: Building the Machine
The design is made from 12mm plywood, the linear assembly is made using 1/2 inch steel tubes with Plywood sliding blocks. The design of the sliding blocks can be improved to prevent direct contact by introducing a linear bearing or a sleeve. Since we are using Leadscrews, it enough torque to overcome the friction and still provide good resolution. The two steel tubes provide the support and constrain the guide block on one axis.
The vertical tower is placed on top of the horizontal guide block, It has four tubes to properly constrain the motion. A minimum of three is required to prevent bending of the vertical tower.
The leadscrew is attached to the stepper motor using the flexible coupling. This helps with any slight miss-alignment between the shaft and the screw. The vertical tower has a stepper motor with an integrated leadscrew, this can be purchased or replaced with an ordinary stepper motor and coupling.
The two towers are mirrors of each other and space is provided in the base to clamp the machine to a workbench.
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.
Step 4: Connecting the Electronics
The next step is to connect the electronics, move the motors, and configure the machine. We have 4 stepper motors which need to be connected to our Ramps board. The wires need to extend 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.
We laser cut a base for our Arduino and Ramps and attached a 12V DC fan to provide active cooling for the board.
Step 5: 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 microstepping you are using.
steps_per_mm = (motor_steps_per_rev * driver_microstep) / thread_pitch
We are using a stepper motor with 200 steps/rev, driven using an A4988 driver on 1/16th microstepping, driving a leadscrew with 2mm pitch.
Steps_per_mm = (200*16)/2 =1600
The leadscrew I was using was a two-start one hence the value would be half the above ie- '800' If it is a four-start one then the value would be a quarter of the above value.
After flashing the Mega 2560 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.
Step 6: Attaching the Hot-wire
In order to cut foam, you need a resistance wire made of a suitable material which can withstand the heat and will have a uniform temperature across its length.
Nichrome is a suitable material, I have seen some use steel fishing lines. Read selecting a Nichrome wire for more information. It is best to have the thinnest wire as possible to decrease the kerf formation while cutting and to give clean cut lines. Generally, the longer the wire, the more tension that must be applied and the thicker the wire must be. Experiment with various wire thickness from 32AWG to 28AWG.
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 with a pulley.
Note- Constant tension can be applied to the wire by using a Flat spring (Constant force spring) or by hanging a dead weight at the end. A cheap way to get a constant force spring is by using ID card pull-up reels. Get a good quality one, and you can even stack springs in parallel to provide more pulling force.
Step 7: Control Software and Generating G-code
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. There is also a Gcode graph visualization tool, and the ability to save your own macros. The Hotwire temperature can be controlled using M3/M5 to turn ON/OFF and S"xxx" command to set the voltage output, either manually or via scrollbar in the software. The hotwire should be connected to "D8" output and is supplied by the power connected to the "11A" input on Ramps.
Wing G-code Generator
Wing G-code Generator is a program to generate XYUV G-code for hotwire cutting model aeroplane 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.
This software is easy to use and supports layering wings on the same piece of foam to save material. The outputted G-code can be sent to the machine via the Grbl controller.
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. 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 a cutting wizard to help you do sweep wings and compensate for wire kerf by adding a skin thickness. It can cut more than wing profiles, like 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.
Working G-codes with both software are included, use them to test out the controller.
Step 8: Setting the Feed Rate and Temperature
Unlike conventional milling, the wire cuts by melting the plastic surrounding it, and when the wire stays in one position for some time, the surrounding material keeps melting away. This increases the kerf of the cut and causes dimensional inaccuracies. There are two variables which affect the kerf of the cut.
- Cutting Feed rate.
- The temperature of the wire.
The Cutting Feed rate is the speed at which the wire cuts through the material. mostly denotes in mm/min. The faster the speed the smaller the kerf, but the higher the temperature required and also the 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, when the wire does not actually touch 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 the voltage applied.
There are software which allows for PWM control of the wire to heat it just at the right 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, Nichrome wire Application Calculator 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.
Step 9: Hot-wire Cutting Workflow
The Process starts with the design, which is exported as a DXF. This file is then imported into the CAM software and output as G-code. 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.
I hope you enjoyed the Instructable, do try it for yourself, the machine is easy to build and very forgiving. Many amazing things can be made with it. Happy Flying!