Coder Social home page Coder Social logo

zacai / marlin-extruder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from filipmu/marlin-mackerel

0.0 0.0 0.0 2.72 MB

A modified version of Mackerel (Marlin for Lyman extruders)

C 87.94% Makefile 0.38% C++ 9.23% Processing 1.90% Scilab 0.08% Objective-C 0.40% Python 0.06%

marlin-extruder's Introduction

========================== Mackerel - Firmware for Lyman Extruder Controller

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

Quick Information

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.

Features:

  • Allows complete control of a Lyman Filament Extruder via LCD menus.
  • Controls an extruder screw motor (geared stepper motor) so that it runs at a fixed RPM that can be set with the LCD.
  • Controls a Puller motors (geared stepper motor) calibrated in mm/sec. Can also be quickly adjusted with the LCD.
  • Accurate temperature control of extruder barrel (Uses Marlin temperature PID control and allows for auto-tuning)
  • With the filament diameter sensor, accurate filament diameter control.
  • Displays statistics (average, min, max) of filament diameter.
  • Displays length of filament extruded.
  • Allows selection of different thermistors (like Marlin)
  • Can connect with Pronterface or Repetier Host to view the extruder temperature trending curves.
  • Smooth motion control of extruder and puller geared stepper motors (Uses the Marlin motion control)
  • Has an input for mechanical switch to allow quick control of the extruder motor.
  • Parameters saved in EEPROM (like Marlin).
  • Ability to control speed of the brushed DC winder motor.
  • ON/OFF control of the filament cooling fan.

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.

Limitations and Possible Improvements

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.

Implemented G Codes:

  • None

M Codes

  • M303 - PID relay autotune S sets the target temperature. (default target temperature = 150C)

Configuring and compilation:

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

Running the Lyman Extruder

See http://www.thingiverse.com/thing:265375 for the extruder build and operation.

  1. Turn on the heater โ€“ select Preheat ABS from the Main Menu.
  2. Wait until temp hits setpoint (185 deg). Beeper will go. Can press knob to shut off.
  3. Turn on the motors โ€“ select Resume Extruder from the Main Menu.
  4. Adjust the Puller motor speed via the knob to achieve close to the filament diameter desired (2.8mm). Can use the Tune menu or Control menu to make adjustments to motor speeds, etc.
  5. Switch to Extruder Auto Con from the Main Menu to go to automatic control of the puller motor.
  6. Can Clear Statistics on the Main Menu to start collecting data now that filament is under control.
  7. Select Pause Extruder on the Main Menu when finished with run.
  8. Select Cooldown on the Main Menu to shut off heater.

marlin-extruder's People

Contributors

cftechno avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.