So I have been working pretty diligently over the past 2 weeks on the software and firmware for the machine. Enough additional features were required that the software and firmware was completely written from scratch. So onto the details...
Firmware: The firmware is written in the Arduino development environment and is currently being tested on an Arduino Mega. The Mega was needed due to the large number of pins required for a multi-headed design. The firmware communicated to the host software via a USB serial connection and has a large collection of standard G and M codes that it accepts as input. A custom stepper motor library was created (cpwStepper) that allows for multiple stepping modes to be used on the machine. The stepping mode can be changed mid-build via a custom M code. The modes available include wave drive, half-stepping, full torque drive, microstepping 4x, 8x, 16x, 32x, and 64x. For our purposes, anything past 8x microstepping will likely be too slow as we are already gearing the machine down significantly through the use of a leadscrew. The firmware also features a PID temperature controller through the PID Library available from the Arduino Playground. There are many additional G and M codes added as the machine will need to be able to accept standard machine codes for milling as well. Some of these include a set/return to reference position, enable/disable software endstops, set/disable maximum speed setting, set current position as home, and many more. The readme file in the release linked below has more details about the complete code list.
Software: The software is written in Java via the Processing development environment and thus can be run on Windows, Mac OS, and Linux. I have tested the software on all 3 platforms and it works flawlessly assuming you have Java and USB serial drivers installed. The software is what is used to send individual commands or complete gcode files to the machine. Sending files to the machine is extremely easy and robust. The file sender also includes a preview window to show exactly what each command that is sent to the machine should be doing. For example if the last command sent to the machine specifies that the extruder lay down plastic from X0.0 Y0.0 Z0.0 to X3.0 Y2.0 Z0.0, you will see a thick line appear on the virtual build table corresponding to where the extrusion should take place. Movements without extrusion or cutting are represented with a thin line. This file preview ability is also available without actually sending the file to the machine. If the independent file preview is used, there will be a timeline skimming bar along with a play button to move through the build and preview what is supposed to happen. This is extremely useful for checking a gcode file for incorrect commands before actually sending it to the machine. The software is also able to pause sending a file mid-build and perform any number of other operations while being paused. This includes sending individual movement commands, setting a new temperature, setting/returning to a reference point, and lots more. All in all, it is a very robust alternative to what is currently out there.
Here is a screenshot of the GUI:
I would love any feedback on the project so please feel free to try it out and let me know about any suggestions for improvement!
Labels: arduino, arduino mega, firmare, host software, hydra, hydra-mmm, Java, processing, serial