This software has a GPL license. Please do not use this code in products (3D printers, CNC etc) that are closed source or are crippled by a patent. https://gnu.org/licenses/gpl.html
This firmware was designed in conjunction with Hugh Lyman to control a Lyman filament extruder with geared stepper motors. It is currently designed to support the RAMPS 1.4 with Smart LCD 2004 and depends on a prototype filament width sensor. It replaces much of the control electronics in the current design with one controller. It can control the extruder motor, puller motor, Extruder heater (PID) with thermistor, winder motor, filament cooling fan and has input for a filament width sensor. The processes and menus have been adapted to control a filament extruder. This code is currently in design, development, and testing and so might not be ready for casual users.
This firmware is based on Marlin 3D Printer Firmware but also has many original parts.
Marlins eat Mackerels and 3D printers consume filament.
The default baudrate is 250000. This baudrate has less jitter and hence errors than the usual 115200 baud, but is less supported by drivers and host-environments.
G-code and M-code control of the firmware is limited to M303 Autotune. More work is needed to make the codes relevant to a Lyman filament extruder.
This sofware only supports the RAMPS 1.4 and SMART LCD 2004. More work is needed to make it compatible with other hardware. Much of the Marlin code that handled board selection is still there, but needs to be updated.
Software requires a filament diameter sensor: http://www.thingiverse.com/thing:89044 . Work is needed to make the software flexible to run without this feature.
Motor speed control is handled by generating a sequence of position instructions in the code. It would be better to control the speed of the motors directly. This would require changing the guts of the step pulsing routine. I wanted to keep that intact.
Filament control is with a PID loop, but there is dead time in between where the filament is extruded and where it is measured. A Smith Predictor would be a better way to control it. The firmware has untested Smith Predictor code but I commented it out since it seemed more complicated to tune (more parameters in additon to PID) and may not be as robust.
Only uses 2 stepper outputs, so there is room for leveraging the other 3 outputs to control other steppers.
Add means to save run statistics in the SD card. Could capture system data at regular intervals for analysis later.
Install the arduino software IDE/toolset v1.x.x http://www.arduino.cc/en/Main/Software
Download the firmware https://github.com/filipmu/Marlin-Mackerel Use the "Download Zip" button on the right.
Start the arduino IDE.
Select Tools -> Board -> Arduino Mega 2560
Select the correct serial port in Tools ->Serial Port
Open Marlin.pde
Click the Verify/Compile button
Click the Upload button If all goes well the firmware is uploading
See http://www.thingiverse.com/thing:265375 for the extruder build and operation.