Interfacing with Software

The software to control the motors is Grbl Hotwire Cutter, a version of the open-source Grbl Panel that was modified by Daniel Rascio to control a hotwire machine This GUI made it possible to jog the motors into position, zero the positions wherever is needed, and run a GCode script to move the motors in a specified path. The GUI itself is created using Visual Basic, but the functionality that controls the motors is written in C and C++, to be flashed to an Arduino.

Controlling the Motors

To connect to the controller, we had to change where the signals were being sent to on the motor shield. This involved jumping into the While operating with four motors we were able to use Grbl Hotwire Controller as it was designed, where the X and U axes controlled the horizontal movement and the Y and Z controlled vertical movement. However, this did not allow us to rotate the base, so we were constrained to cutting two dimensional shapes. Adding functionality for a completely separate fifth motor proved too unfeasible for the amount of time available, so we had to take a different approach. Instead, we moved to link the vertical motors together in the Y axis, and adding the last motor for the base into the source code under the Z axis. This gave us the ability to move all 5 motors the way we wanted to.

DXF2GCODE display

Generating G-code

Writing G-code by hand would be very tedious for anything beyond simple shapes. In order to create a more interesting shape, we started by creating a two-dimensional shape in Solidworks and from there, we could export the outline of that shape as a dxf file. This still is not directly usable for our machine, but luckily we were able to find a different software that could help us out. DXF2GCODE is an open-source software that takes a dxf and converts the shape into G-code commands for a CNC machine to follow. Unfortunately, the output was making the assumption that the machine was either a mill or lathe, not a wire cutter like we have. Because of this, we created a python script to parse the output and modify it to a format that our machine could recognize and run properly.