Lyman Mulier Filament Extruder V5 Manual R1 PDF
Lyman Mulier Filament Extruder V5 Manual R1 PDF
Lyman Mulier Filament Extruder V5 Manual R1 PDF
No liability is accepted for errors, omissions and the use of this manual. Users use at their own risk.
The Lyman / Mulier Filament Extruder V5 is an open source product licensed under
http://creativecommons.org/licenses/by-sa/3.0/
Page 2
TABLE OF CONTENTS:
Cover Page……………………………………………...Page 1
Table of Contents………………………………………..Page 2
Preface…………………………………………………..Page 3
Construction Comments……………………….….…….Pages 4 - 14
Part Drawings……………………………………….…..Pages 23 - 32
The LYMAN / MULIER FILAMENT EXTRUDER V5 is a complete desktop extruder system that produces filament for
use in 3D printers. It can extrude 1.75mm to 3mm diameter filament without changing the nozzle. Once set up it can be
left unattended and in about 4 hours it will extrude and level wind 2 lbs of filament on a spool.
If it is a desktop extruder it ought to be able to run on a desktop. You can tell how quiet it is by watching the video. You
will only hear it when the camera is close to the machine. OK, so if you are watching the LCD display you will see the
thickness of the filament diameter as it changes by the second. The quality is going to be around +/- 0.10mm for 3mm fila-
ment, with occasional blips over or under that. Hallelujah, the average is also displayed, so when done I mark the average
on the spool and I don’t have to measure it before slicing. My machine is extruding around 11mm per sec (25 inches/min).
This is not smoke and mirrors, wherein others give info that doesn’t hold up. I know, I bought one.
Two folks have contributed to the design and success of Version 5 Extruder:
Filip Mulier designed the firmware Mackerel and furnished the filament sensor along with the LCD control system. Also
he has done the debugging of the system and written the manual part for operating the extruding system. He has the same
extruder as mine. We have worked hand in hand developing this extruder. As Filip commented: “Marlin eat Mackerel, 3D
printers eat filament”.
Mehmet Sutas design of a printed worm gear for the level wind assembly led me to the new level wind assembly as shown.
Some of the new features of V5:
1. Stepper motors for the extruder and the puller assemblies.
2. LCD display for controlling a Ramps 1.4 with a Mega 2560 R3 with Mackerel firmware.
3. Redesigned the level winding assembly with printed worm gear.
4. LCD with menus that control all extruder functions.
5. Filament sensor that shows the diameter of the filament as it extrudes, also shows the average diameter.
6. After reaching a preset length of filament the extruder automatically shuts off.
All the functions controlled by the LCD are listed in the section titled “Setting up and Operating the Extruder with a
RAMPS-based LCD controller”
Page 4
CONSTRUCTION COMMENTS:
The following is an explanation of each part shown on sheets A01 through
A08. All cyan colored parts in the drawings are 3D printed. All white
parts in photos are 3D printed.
I suggest 3D printing all the printed parts first and assembling the sub as-
semblies before mounting any of them to the Base Plate. Do this while
you wait for part shipments to arrive.
Part # 21 - Thermistor
The Thermistor is an Epco 100k ohm. It is taped to the black iron coupler
with Kapton tape. Note the thermistor is laid at the gap of the heat band
and is applied before the heat band is installed. If you use a different ther-
mistor , you can adjust for it in the Mackerel code the same as in Marlin.
Page 7
This photo shows the Sensor / Fan assembly not attached to the base plate,
wherein I am using a lead weight to hold it in place during work in pro-
gress. I may not even attach it to the Base Plate. As the fan and sensor
brackets are separate mounting the fan to each completes the full assem-
bly.
The sensor itself is optional. Without it the extruder can be operated in the
same way as version V4, but you will have to measure the diameter by
hand.
http://www.thingiverse.com/thing:89044
The 3D printed parts are custom for this extruder. The electronic compo-
nents are listed in the BOM.
Part # 4 - Fan:
The fan is 50 x 50 x 10mm , 12V brushless.
The assembly is printed with 4 parts. The Base bracket holds the drive roller and the idler
roller bracket which holds the idler roller. The separate motor mount hold the gear motor
M2. The black pads under the assembly is scrap welding blanket I used for the hot end
nozzle wrap. Worked good for noise control.
Part #1 - Roller Mount Bracket Base:
Place the spring on the Idler roller bracket and place it in the top of the Base bracket, hold-
ing it here with a clamp. Feed the shaft through the slots in the Base bracket through the
roller and on through the idler bracket and Base slot. Hold it there with a clamp while the
drive roller is installed in a similar way. Note that I used ball bearings in lieu of bushings.
I can’t even remember how many hours this took to complete. The worm
gear design was inspired from Mehment Suta’s gear design shown on
Thingiverse. Once this worked the rest was easy. I must have printed a
dozen worm gears before it worked. This is one of the best assemblies I
have done. Oh, it works so good. Sorry for the bragging. The second one I
made for Filip Mulier was easier. A simpler design is work in progress.
Part #5 - Shaft:
The shaft is 8mm in diameter and the length is 155mm.
Part #7 - Pawl:
This part I machined on a mill out of 5/8” peek. The hole was drilled out
on a lathe. The length I found was too short to hold enough lead weight,
thus I added a piece to add more weight. The stl file is longer and lead
filled it should work fine.
Part #8 - Lead:
For this part I melted lead and poured it in to the Pawl cavity.
Part #4 - Pulley:
The pulley also will be need drilling out for the shaft size. Fit it the same
as the collars.
No Liability is accepted for errors, omissions and the use of this manual or the
hardware or software referenced. Users use it at their own risk.
Page 40
Contents
Description .................................................................................................................................................... 5
Features: .................................................................................................................................................... 5
Background ............................................................................................................................................... 6
Setup ............................................................................................................................................................. 6
Compatible Controller Hardware .............................................................................................................. 6
Default Extruder Hardware ....................................................................................................................... 7
Assembly of RAMPS, Mega 2560, A4988 driver boards, SMART 2004 LCD Controller...................... 7
Firmware Installation ................................................................................................................................ 8
Wiring connections ................................................................................................................................... 9
Controller Operation ................................................................................................................................... 11
LCD Display ........................................................................................................................................... 11
Accessing the Menus .............................................................................................................................. 11
Menus...................................................................................................................................................... 11
Main Menu – While motors are Idle ................................................................................................... 12
Main Menu – While motors are running ............................................................................................. 13
Prepare Menu ...................................................................................................................................... 13
Tune Menu .......................................................................................................................................... 14
Control Menu ...................................................................................................................................... 14
Temperature Menu .............................................................................................................................. 15
Motion Menu ...................................................................................................................................... 15
Filament PID Menu............................................................................................................................. 16
Preheat config Menu ........................................................................................................................... 16
Control Setup .............................................................................................................................................. 16
Motor Setup ............................................................................................................................................ 16
Heater Setup ............................................................................................................................................ 18
Running the Extruder .................................................................................................................................. 18
Starting the Run ...................................................................................................................................... 18
During the Run ........................................................................................................................................ 19
Shutdown ................................................................................................................................................ 19
Appendix ..................................................................................................................................................... 19
Tuning the A4988 stepper motor driver boards ...................................................................................... 19
PID operation and PID Tuning (from Wikipedia) .................................................................................. 20
Page 41
Page 42
Description
This controller 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
works with a prototype filament width sensor. It replaces much of the control electronics in a typical
filament extruder 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 firmware, called Mackerel1, is based on Marlin 3D Printer Firmware but also has many original
parts. The firmware can be compiled and uploaded to the Mega 2650 with the Arduino development
environment. The latest firmware can be found at:
https://github.com/filipmu/Marlin-Mackerel
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. This motor can also be quickly
adjusted with the LCD.
• Accurate temperature control of extruder barrel (Uses temperature PID control and allows for auto-
tuning)
• With the filament diameter sensor, accurate real time filament diameter display and control.
• Can connect with Pronterface or Repetier Host to view the extruder temperature trending curves.
• Has an input for mechanical switch to allow quick control of the extruder motor.
1
Marlins eat Mackerel, 3D printers consume filament.
Page 43
Background
This new controller concept was born out of collaboration between Hugh Lyman, creator of the first and
also a series of open source low cost filament extruders, and Filip Mulier, the creator of a prototype
filament sensor. The mutual goal was to create a controller that could improve on the existing controls of
the Lyman Extruder V4.1 in a number of areas:
Consolidate the separate control units used in V4.1 into one overall controller to simplify the
design.
Continue toeverage off-the-shelf components as much as possible.
Reduce costs where possible, which lead to the concept of repurposing the controllers currently
used 3D printers.
Provide more real-time information and control using a liquid crystal display.
Improve the extruder torque capability and speed control.
Incorporate measurement and feedback control over filament diameter.
Build know-how into the controller logic to simplify and automate extruder operation.
The pair started work on the controller in early March 2014 developing and refining the controller and
extruder s with prototypes at each of their respective locations. Each collaborator brought complementary
skills to the project. Hugh brought years of experience designing and building filament extruders, along
with a mechanical engineering aptitude. He is a thought leader in this area and coordinated the
mechanical and overall design. Filip contributed electronic, sensor, control, and embedded software
engineering know-how . By the end of June the new design, V5 of the filament extruder was complete.
Setup
This section describes how to set up the controller, in terms of identifying compatible hardware,
reviewing the wiring diagram, and describing how to install the firmware.
3. A4988 stepper motor driver boards with heatsink x2 – here is one example (w/o heatsink)
http://www.pololu.com/product/1182/
Page 44
nt Sensor pro
5. Filamen ototype (option
nal) - http://w
www.thingiveerse.com/thingg:89044
M1
M Extruder Motor:
M a stepp
per motor with
h 200 steps/reev and a 15.3:1 gearbox.
M2
M Puller Mottor: a stepper motor with 200
2 steps/rev aand a 100:1 ggearbox.
M3
M Winder Motor: a geared d DC motor thhat spins at 700RPM with 112 volt supplyy
Pu
uller driven roller: 120mm m circumferen
nce (38mm/1..5 in diameterr).
Thermistor:
T 10
00K EPCOS.
Assemb
bly of RAM
MPS, Mega 2560, A498
88 driver b
boards, SM
MART 20044 LCD
Controlller
Page 45
3. The A4988 stepper motor driver boards should be placed over the jumpers oriented as shown in the
picture below.
4. LCD Connection – The SMART 2004 LCD Controller is connected to the RAMPS 1.4 using with an
adaptor board and two ribbon cables. The adaptor board is plugged into the Aux3 and Aux 4 connectors
on the RAMPS.
Firmware Installation
The firmware is installed into the Mega 2560 using the Arduino toolset and a USB cable. The Arduino
toolset can be obtained from http://www.arduino.cc/en/Main/Software.
The latest version of the firmware can be obtained from github: https://github.com/filipmu/Marlin-
Mackerel . Click the ‘download Zip’ button to obtain it.
Page 46
5. If confiiguration chan
nges are needded to supportt non-default hardware (likke no filamennt sensor,
alternativee stepper mottors), the conffiguration.h file
fi needs to bbe edited. Sellect the configgure.h tab andd edit
the file (seee Appendixx, Configuratiion Changes for f further deetails on possiible changes)
6. Click upload.
u After a minute or tw
wo you will see “Upload D
Done” messagge
After the firmware is in nstalled, you should see thhe LCD displaay starting to show the setttings, and it wwill
start to beeep, indicating
g that the tem
mperature is to
oo low (therm
mistor failure).. This is expeected, since nno
thermistorr is connected d. At this point you are reeady to powerr down and w wire up the conntroller.
Note: Firm
mware updatees may be avaailable from th
he github sitee and the sam
me approach iss used to instaall
updates. The
T controlleer can remain wired with th
he main poweer off during ffirmware upddates. The usbb
cord will power
p the con
ntroller for th
he update.
Wiring connection
ns
Please seee the diagram
m below for wiiring connectiions to the RA
AMPS 1.4.
+12V suppply – The positive terminaal of the 12 v supply should be connecteed to both possitive power sscrew
terminals on the RAMPPS board.
Page 47
-12V supply – The negative terminal of the 12 v supply should be connected to both negative power
screw terminals on the RAMPS board.
Winder Power – The terminal block labelled D8 will provide power for the geared DC spool motor M3.
Note the + indicating the positive terminal. Voltage will range from 0-12v depending on speed setting.
Filament Fan – The terminal block labelled D9 will provide 12 v power for the brushless filament fan.
Again, note the + indicating the positive terminal.
SS Relay – Terminal block labelled D10 provides the control signal to the solid state relay for controlling
the heater current. Again, note the polarity indicated by the +. Provides a 12v signal to the SS relay.
Extruder motor switch (or jumper if no switch) – These pins on the RAMPS are an input to allow an
external switch to control the extruder motor. This allows the user to quickly turn on and off the extruder
without having to go through the LCD menu. If no switch is desired, place a jumper across these pins.
Thermistor – The thermistor is connected to the pins labelled T1. The default thermistor is an Epcos
100K, but this can be changed in the firmware configuration.
M1 Extruder Stepper Motor – The 4 wire extruder stepper motor is attached to the E0 stepper motor
output of the RAMPS. Connect one phase of the stepper motors to the pins 1A, 2A. The other phase of
the stepper motor goes to pins 1B, 2B. If the stepper motors rotate the wrong way, switch the phases. If
a connector is used, simply rotate the connector 180 degrees and reconnect.
M2 Puller Stepper Motor – The Puller stepper motor is connected to the E1 stepper motor output of the
RAMPS. Each phase is connected in a manner similar to M1.
Filament Sensor gnd – This pin provides the ground connection to the filament sensor board.
Filament Sensor +5v – This pin provides the +5v supply to the filament sensor board.
Filament Sensor input – This pin is an input for the filament sensor’s analog output voltage.
Page 48
Controller Opera
ation
This section describes how to interp pret the main status displayy and get arouund the controoller menus. It
also detaills what is avaailable on each menu.
LCD Diisplay
Actual Extru uder barrel ttemp in deg C
Setpoint Exttruder barre el temp in deeg C
RPM of the Extruder mo otor (also dissplays ‘COLD
D’ for cold exxtruder and ‘OFF’ when
external exttruder switch h is off)
Measured d diameter of ffilament in mmm
Average me easured filamment diameter
Length of fillament prod duced in mm m
Filament Feed rate at Pu uller in mm//sec
RPM of the Puller moto or
Time remain ning in hh:m
mm to reach Length Cutooff
Time elapse ed in hh:mm in current rrun
Last row
w – also showws status orr warning me essage
Accessin
ng the Men
nus
Menus aree accessed byy pressing the rotary knob from
f the mainn status displaay. When onn a menu, the
rotary kno
ob is used to either
e highlight the next menu,
m or makee a numerical parameter addjustment.
Pressing the
t rotary kno ob selects the next menu orr sets the num
merical param meter.
Menus
Page 49
This dia
agram show
ws the avaiilable menu
us of the coontroller.
Resume
R extruuder: – Will turn
t on the Puuller motor, exxtruder motorr (if warmed uup), Winder
motor,
m and fan n (if warmed up). The extrruder motor w will be disableed if the extruuder is not 1770 deg
C or greater to protect the motor
m and geaarbox.
Clear
C Statisticcs: – Clears th
he Filament average
a diameeter, extrudedd length, and eelapsed time
sttatistics. Th his lets you cleear the stats iff you have ennabled the stattistics while tthe extruder iss not
ru
unning – see nextn menu iteem.
Enable
E Statisttics: – turns on
o the gatherinng of statisticcs while extruuder is not runnning. This iss
usseful if want to
t test the filaament sensor without runnning the extrudder.
Page 50
Prepare: – Go to the Prepare menu. This menu lets you enter the parameters needed to start the
run.
Preheat: – This will turn on the heater to the configured temp setting. The system will beep
when it is at the desired temperature so that you know the extruder is ready to operate. Pressing
the knob will stop the beep.
Cooldown: – This will turn off the heater to allow the extruder to cool.
Control – Go to the Control menu, which is used to set the parameters for motion, temperature,
and filament control.
Extruder Auto Con: – Turns on the PID loop that controls the puller motor speed based on the
filament diameter. This control scheme will attempt to hold the measurecd filament diameter to
the desired setpoint.
Clear Statistics: – Clears the Filament average diameter, extruded length, and elapsed time
statistics. In most runs of the extruder, it takes some time and tuning to get the extruder to
produce the desired filament diameter. This lets you clear the stats after the initial startup and
tuning of the extruder.
Pause Statistics: – Pauses collection of statistics. Freezes the current values of the stats on the
status screen.
Tune: – Goes to menu used to tune settings such as motor speeds while running the extruder.
Preheat: - This will turn on the heater to the configured temp setting. The system will beep
when it is at the desired temperature so that you know the extruder is ready to operate. Pressing
the knob will stop the beep.
Cooldown: – This will turn off the heater to allow the extruder to cool.
Control: – Go to the Control menu, which is used to set parameters for motion, temperature, and
filament control.
Prepare Menu
Main: – Returns to the Main Menu.
Extruder RPM: - Enter the desired extruder RPM achieved when the extruder is enabled.
Default is 12 RPM .
Puller mm/s: - Enter the desired default puller mm/second. Default is 6 mm/sec
Page 51
Fil Dia: - Enter the desired filament diameter when using Extruder Auto Control. Default is
2.8mm
L cutoff: - Enter the length of filament desired before the machine is automatically halted.
Default is 150,000mm.
Winder RPM: - Enter the desired winder RPM. Default is 35 RPM. Note that this is only an
approximate RPM and depends on the motor load.
Preheat: - Turn on the heater to the configured temp setting. System will beep when at
temperature. Can press the knob to stop the beep.
Tune Menu
Main: – Returns to the Main Menu
Extruder RPM: - Enter the desired extruder RPM. Default is 12. This will change the extruder
RPM while the extruder is operating.
Puller mm/s: - Enter the desired default puller mm/second. Default is 6 mm/sec. Alternatively,
turn the knob on the main status screen.
Extruder T: - Enter the desired setpoint extruder temperature in deg C. Default is 185 deg.
Changing the setpoint here will change the temperature of the extruder while running. It does not
update the preheat setting. To update the preheat setting, see the Preheat Config Menu.
Fil Dia: - Enter the desired filament diameter when using filament PID control. Default is 2.8mm
L cutoff: - Enter the length of filament desired before the machine is automatically halted.
Default is 150,000mm. This can be changed while the extruder is running. The Time remaining
display will change based on the length entered.
Winder RPM: - Enter the desired winder RPM. Default is 35. Note that this is only an
approximate RPM and depends on the motor load.
Control Menu
Main: – Return the Main Menu
Filament PID: – Select the Filament PID control menu (Filament PID settings)
Restore failsafe: – Revert back to firmware initial default settings for all parameters.
Page 52
Temperature Menu
Control: – Return back to the Control Menu
Extruder T: - Enter the desired extruder temperature in deg C. Default is 185 deg.
PID-P: - Enter the desired P value for the heater PID loop. Default is 12.66. See Autotune to
automatically tune this. For some explanation, see the Appendix.
PID-I: - Enter the desired I value for the heater PID loop. Default is 0.27. See Autotune to
automatically tune this. For some explanation, see the Appendix.
PID-D: - Enter the desired D value for the heater PID loop. Default is 146.24. See Autotune to
automatically tune this. For some explanation, see the Appendix.
PID-C: - Enter the desired C value for the heater PID loop. Default is 1. This is usually not
adjusted.
PID Autotune: – Brings the extruder to the configured preheat temperature and cycle the
temperature 5 times to automatically tune the Temperature PID parameters above. Beeps when
the process is complete, which may take 15-20 minutes. Use Store Memory to save parameters
for future runs.
Motion Menu
Control: – Return back to the Control Menu
Winder RPM Factor: - Enter the 12 volt rated RPM of the spool winder motor. Default is 70
RPM. This is used to by the firmware to control the output duty cycle for the winder output
based on desired RPM. This approach for motor control is only approximate, so the actual shaft
RPM may differ depending on load and other factors.
Esteps/rev: Enter the number of steps per 1/100th of a revolution of the extruder, taking into
account the gearbox and fractional steps. Default is 489.6. for a 200 step/rev stepper motor with
15.3:1 gears. See Appendix on how to determine value for different stepper motors or gear
ratios.
Psteps/mm: Enter the number of steps per 1mm of motion of the puller motor, taking into
account the gearbox and fractional steps. Default is 2653.6 for a stepper with 100:1 gears. See
Appendix on how to determine value for different stepper motors or gear ratios and a means to
measure and calibrate.
Motor Acc: Enter the acceleration for the steppers in mm/sec^2. Default is 200. This setting
limits the acceleration asked of the stepper motors. It should be reduced if at motor startup the
stepper motors are not able to keep up with the acceleration. This is indicated by the steppers
losing steps (not turning, but making a buzzing sound).
Ve-jerk: Default is 1.0. Advanced setting that does not normally need to be changed.
Page 53
Fil Dia: - Enter the desired filament diameter when using filament PID control. Default is 2.8mm
L cutoff: - Enter the length of filament desired before the machine is automatically halted.
Default is 150,000mm.
PID-P: - Enter the desired P value for the filament diameter PID loop. Default is 0.020. This
parameter is adjusted based on behavior of control. See appendix for general tips on tuning a PID
loop.
PID-I: - Enter the desired I value for the filament diameter PID loop. Default is 0.020. This
parameter is adjusted based on behavior of control. See appendix for general tips on tuning a PID
loop.
PID-D: - Enter the desired D value for the filament diameter PID loop. Default is 0.250. This
parameter is adjusted based on behavior of control. See appendix for general tips on tuning a PID
loop.
Extruder T: - Enter the desired extruder temperature in deg C that will be used for the setpoint
when ‘Preheat ’ is selected in the Main Menu or Prepare Menu . Default is 185 deg.
Control Setup
In this section we will go through the various control settings in the menus. These settings only need to
be changed if using motors with a gear ratio that are different than the default, or if heater temperature
control is not tuned.
Motor Setup
The motor setup involves computing the factors that relate the number of steps sent to the motor
controller with the menu input (RPM or mm/sec). Each motor (Extruder and Puller motors) has its own
factor. The firmware uses these factors to calculate the number of steps/sec to send the stepper controller
based on the users input (RPM or mm/sec), ensuring that the actual motion of the motors matches the user
input exactly. These factors need to be changed if you change any of the following:
Page 54
Change the gear ratio of the motor. For the Extruder, the specified gear ratio is 15.3:1 and for the
puller it is 99 and 1044/2057 : 1 (approx. 100:1).
Change the stepper motor. The firmware is defaulted to 200 steps per revolution of the stepper
motor.
Change the step fraction of the stepper controller boards. The firmware assumes 1/16 stepper
fraction, (16 pulses rotates the motor 1 mechanical step).
If any of these are changed, please see the next two sections for how to enter new Esteps/Rev or
Psteps/mm parameters.
The following chart shows how to calculate the Esteps/rev based on the motor, gearbox, and stepper
controller parameters. The Scaling Factor of 1/100 is expected by the firmware and is used to keep the
numbers to within a reasonable magnitude (<9999).
The following charts shows how to calculate the Psteps/mm setting based on the motor, gearbox, stepper
controller, and puller drive roller parameters .
The above works fine, but since the puller driven roller is usually urethane, it is indented by the filament,
and so the effective diameter is less than the diameter measured with a ruler. After setting the value
calculated above, more accuracy can be achieved by the following calibration approach:
Page 55
1. Run the puller motor at a set mm/s (like 10 mm/sec) in the controller and run a fixed length of filament
through it while timing how long it takes. Can use some scrap filament and make 2 marks on it with a
permanent marker a known distance apart (300mm say). You would expect it to take 300/10=30 sec for
the known length of filament to pass, but in reality it may be different.
2. Based on the actual time you would adjust the Psteps/mm using:
Heater Setup
In this section we describe how to adjust the PID parameter settings for the heater. This is only required
if the heater temperature significantly overshoots the target setting when heating up, oscillates, or seems
to take a long time to get to temperature. These may be signs that the PID parameters are not correct for
the extruder heater.
1. Go to the Temperature Menu and note the P, I , and D parameter values for later reference.
2. Go to the Preheat Config Menu and ensure that the Extruder T is at a typical value for normal
extruder operation (185 – 230).
3. Select Autotune on the Temperature Menu.
4. The extruder will begin to heat up, as shown on the status screen. You will see the measured
temperature go up slightly past the Extruder T of step 2, and then cool off below the Extruder T.
5. The Autotune routine will repeat this 4 more times to optimize the temperature PID parameters.
6. The controller will beep indicating Autotune is complete. Press the knob to stop the beeping.
7. Go to the Temperature Menu and note the new P, I, and D values as compared to the ones noted
in step 1.
8. Go to the Control Menu and select Store Memory to save the settings to EEPROM so that they
become the new default at power up.
This section describes the basic approach for starting, running, and shutting down the extruder.
Page 56
3. Turn on the motors and fan by selecting Resume Extruder from the Main Menu. Both the
extruder and puller motors should be rotating. Extruder default is 12 RPM and the Puller is
6mm/s. The winder motor will start up as well, assuming the winder motor switch is on.
1. Adjust the Puller motor speed via the knob to achieve close to the filament diameter desired (for
example, 2.8mm). Can use the Tune menu or Control menu to make adjustments to motor speeds,
target filament diameter etc.
2. Switch to Extruder Auto Con from the Main Menu to go to automatic control of the puller motor.
Puller motor is then controlled by the sensor to hold the selected filament diameter. You will
notice the puller motor speed increase or decrease as needed to maintain a more stable filament
diameter.
3. Go to the Tune menu and set the desired length of filament to extrude. (150,000mm is the default)
4. You can Clear Statistics on the Main Menu to start collecting data now that filament is under
control. At this point it may make sense to discard the filament produced so far, and begin
spooling the filament produced while under control.
Shutdown
The machine will enter cooldown and stop the motors automatically when the selected length of filament
is produced (default 150,000mm). Alternatively you can select Pause Extruder on the Main Menu at any
time to turn off the motors. Then select Cooldown on the Main Menu to shut off heater.
Appendix
Tuning the A4988 stepper motor driver boards
Tuning the A4988 stepper motor driver boards is critical to achieve adequate torque, especially for the
extruder motor M1. Each of the A4988 stepper motor driver boards has a small potentiometer control on
it that can be rotated with a screwdriver. This potentiometer controls the current going to the motor, and
therefore the amount of torque provided by the motor shaft. At one end of the range, the current will be
low, and the motor may stop turning and lose steps. At the other end of the range, the stepper driver
overheats, and cuts out, causing clicking and erratic operation of the motor. The goal is to find a setting
that produces enough torque to drive the motor in all conditions, but not cut out due to overheating.
Sometimes it takes a bit of time for the overheating to occur (20-30 sec) so it may work fine for a while at
Page 57
a setting, but then fail. The potentiometer needs to be adjusted while the motor is under load. If you use
a metal screwdriver you may introduce interference which can cause the controllers to cut out as well.
Sometimes it stops working and you need to cycle the power to the controller. This can be a tricky step
since these controller boards are just acceptable at producing the current required to turn the extruder
shaft and there is not much extra torque available.
By tuning the three parameters in the PID controller algorithm, the controller can provide control action
designed for specific process requirements. The response of the controller can be described in terms of the
responsiveness of the controller to an error, the degree to which the controller overshoots the setpoint, and
the degree of system oscillation. Note that the use of the PID algorithm for control does not guarantee
optimal control of the system or system stability.
Page 58
Minimize distance between the filament sensor and extruder nozzle. Keep the filament sensor as
close as physically possible to the filament cooling fan, and the filament cooling fan close to the
extruder nozzle. Also make sure that this distance stays fixed. Long distances results in poorer
control performance.
The time period of the PID depends on the feedrate. It is easier to tune when the feedrate is high
because the system will respond and stabilize faster when parameters are changed.
The PID control has a long time period, so it takes a while to stabilize. In other words, when you
make changes to the PID parameters, you need to observe the results for a number of minutes to
see if control is better or worse.
Start with small values of P and I (around .010 to .020) and then increase, observing the trend of
the filament diameter. If you notice that the filament diameter is oscillating over long time
periods, the P and I values are too large.
Only small values are required. When I make P > .030 the oscillation is noticeable. Also making
I > .050 causes oscillation. Your mileage may vary.
The D parameter is not crucial – adjust P and I first and then fine tune to see if improvements
occur.
Technical note: The PID control is not time-based, it is feedrate-based. Most PID loops have a fixed time
interval that is used to update the control (dt is a time unit in seconds). For the filament control, the
update interval is distance-based ( dt is a distance unit in mm). PID updates are done every time a fixed
length of filament passes the puller rollers. This approach was chosen because the filament sensor is a
fixed distance away from the extruder nozzle, causing a feedback time delay that varies with feedrate.
This ensures the same PID parameter settings work for any filament feed rate.
Configuration Changes
This section describes some of the more common changes that can be made to the firmware configuration
file Configuration.h to effect extruder operation. For some settings, modifying the configuration file is
the only way to make changes to these settings. These changes can then be uploaded as described earlier
in the manual. The configuration borrows many additional settings from its Marlin roots not mentioned
here. Note that changing the Configuration.h file in ways not mentioned below requires understanding
the code, or at a minimum understanding Marlin, and may or may not give the intended results.
Thermistor Selection
The type of thermistor used needs to be defined in the firmware, so that the right calibration curves are
employed. Below is the section of the Configuration.h file that pertains to this setting. The line in the
file that affects the change in setting is highlighted in green:
Page 59
//===========================================================================
//=============================Thermal Settings ============================
//===========================================================================
//
//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
//
//// Temperature sensor settings:
// -2 is thermocouple with MAX6675 (only for sensor 0)
// -1 is thermocouple with AD595
// 0 is not used
// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
// 3 is Mendel-parts thermistor (4.7k pullup)
// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (4.7k pullup)
// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
// 71 is 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup)
// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
// 10 is 100k RS thermistor 198-961 (4.7k pullup)
// 20 is the PT100 circuit found in the Ultimainboard V2.x
// 60 is 100k Maker's Tool Works Kapton Bed Thermistor
//
// 1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
// (but gives greater accuracy and more stable PID)
// 51 is 100k thermistor - EPCOS (1k pullup)
// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)
//
// 1047 is Pt1000 with 4k7 pullup
// 1010 is Pt1000 with 1k pullup (non standard)
// 147 is Pt100 with 4k7 pullup
// 110 is Pt100 with 1k pullup (non standard)
#define TEMP_SENSOR_0 1
In the highlighted line, the default thermistor is indicated as 1, which is the EPCOS 100K. If another
thermistor is being used, then the 1 should be replaced by the number for that thermistor in the comments.
// PID settings:
// Comment the following line to disable PID and enable bang-bang.
#define PIDTEMP
#define BANG_MAX 255 // limits current to nozzle while in bang-bang mode; 255=full current
#define PID_MAX 255 // limits current to nozzle while PID is active (see PID_FUNCTIONAL_RANGE below); 255=full current
#ifdef PIDTEMP
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
#define PID_FUNCTIONAL_RANGE 10 // If the temperature difference between the target temperature and the actual temperature
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_INTEGRAL_DRIVE_MAX 255 //limit for the integral term
#define K1 0.95 //smoothing factor within the PID
#define PID_dT ((OVERSAMPLENR * 8.0)/(F_CPU / 64.0 / 256.0)) //sampling period of the temperature routine
// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
//Lyman Filament Extruder
#define DEFAULT_Kp 12.66
#define DEFAULT_Ki 0.27
#define DEFAULT_Kd 146.24
Page 60
The highlighted line shows where to change the default P, I, and D parameters.
/************************************************************************\
* Lyman Filament Extruder
* Settings
*************************************************************************/
#define LYMAN_EXTRUDER
#define DEFAULT_WINDER_RPM_FACTOR 70 //factor for converting winder PW to rpm - reflects rpm of motor at 12v
#define DEFAULT_WINDER_SPEED 35 //default winder speed (0-DEFAULT_WINDER_RPM_FACTOR)
#define PULLER_PID_MIN_LIMIT 1.0 //min output limit of filament dia control in mm/sec
#define PULLER_PID_MAX_LIMIT 24.0 //max output limit of filament dia control in mm/sec
#define PULLER_PID_INTEGRATOR_WIND_LIMIT 1000000 //absolute value of integrator windup max value
#define EXTRUDE_MINTEMP 170 //min temp that extruder motor will run
//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
//can be software-disabled for whatever purposes by
#define PREVENT_DANGEROUS_EXTRUDE
#define DEFAULT_ESTEP_PER_REV 489.6 //default setting for the extruder step calibration
#define DEFAULT_PSTEP_PER_MM 2653.6 //default setting for the puller motor step calibration
//The next two defines have arrays of 5 values which correspond to the 5 axis X,Y,Z,E,P
//For the Lyman Extruder, only E = Extruder Motor and P = Puller Motor settings are utilized
#define DEFAULT_AXIS_STEPS_PER_UNIT {78.7402,78.7402,200.0*8/3,DEFAULT_ESTEP_PER_REV, DEFAULT_PSTEP_PER_MM}
#define DEFAULT_MAX_FEEDRATE {500, 500, 5, 50, 50} // (mm/sec)
#define DEFAULT_MOTOR_ACCELERATION 200 // E and P max acceleration in mm/s^2 - controls extruder acceleration
#define DEFAULT_EJERK 1.0 // (mm/sec)
#define DEFAULT_PJERK 1.0 // (mm/sec)
#define FILAMENT_SENSOR
Page 61
This row indicates to the firmware whether a filament sensor is attached. If you do not have a filament
sensor then this should be commented out by placing two // in front of the line. The controller will then
hide anything that depends on a filament diameter reading. It will still allow full control of the extruder
motors and heater.
#define EXTRUDER_RPM_MAX 50
#define EXTRUDER_RPM_MIN 1
These rows set the range of extruder RPM that can be selected in the LCD menus. The maximum can be
set based on the capability of the extruder motor and stepper controller.
#define PULLER_FEEDRATE_MIN 1.0 // min feedrate in manual control, 1 mm/sec min feed - limited by max pulse rate of 50,000
#define PULLER_FEEDRATE_MAX 15.0 // max feedrate in manual control 12mm/sec max feed - limited by max pulse rate of 50,000
These rows set the range of puller federate (mm/s) that can be selected in the LCD menus. The
maximum can be set based on the capability of the puller motor and stepper controller. When using a
puller motor with a high gear ratio, the maximum federate is limited by the firmware’s 50,000 steps/sec
limitiation.
#define DEFAULT_WINDER_RPM_FACTOR 70 //factor for converting winder PW to rpm - reflects rpm of motor at 12v
This factor should represent the RPM the geared winder motor achieves when powered by 12 volts. If the
geared winder motor is not 70 RPM @ 12V then this factor should be changed to give more accurate
speed settings.
Page 62
#define PULLER_PID_MIN_LIMIT 1.0 //min output limit of filament dia control in mm/sec
#define PULLER_PID_MAX_LIMIT 24.0 //max output limit of filament dia control in mm/sec
#define PULLER_PID_INTEGRATOR_WIND_LIMIT 1000000 //absolute value of integrator windup max value
These settings affect the PID loop for the filament diameter control. They define the allowable output
range of the PID and Integrator windup. These are advanced settings and would only need to be changed
if the extruder machine design is radically different from the Lyman design.
#define EXTRUDE_MINTEMP 170 //min temp that extruder motor will run
//this prevents dangerous Extruder moves, i.e. if the temperature is under the limit
//can be software-disabled for whatever purposes by
#define PREVENT_DANGEROUS_EXTRUDE
These settings control the safety interlock between the extruder motor and the extruder temperature.
Recommendation is to leave these as is.
#define DEFAULT_ESTEP_PER_REV 489.6 //default setting for the extruder step calibration
#define DEFAULT_PSTEP_PER_MM 2653.6 //default setting for the puller motor step calibration
These settings control the default Esteps/rev and Psteps/mm for the firmware. Changing them here will
make them the default setting that returns when selecting Restore Failsafe from the Control Menu in the
LCD. The settings were described in the section Motor Setup.
#define DEFAULT_MOTOR_ACCELERATION 200 // E and P max acceleration in mm/s^2 - controls extruder acceleration
#define DEFAULT_EJERK 1.0 // (mm/sec)
#define DEFAULT_PJERK 1.0 // (mm/sec)
These settings affect the stepper motor motion control. Users may want to adjust the Default Motor
Acceleration in situations where the stepper motors are not able to accelerate as fast as demanded by the
controller. The Ejerk and Pjerk settings are advanced settings and should not require adjustment for the
standard Lyman extruder design.
Page 63
Filament Sensor
1) Connect Power by opening the case
a) Carefully remove the LED in the illumination tower by using a small screwdriver to gently pry it
out leveraging the LED edge.
b) Unscrew the 2‐56 screws in the back of the case.
c) LED will fit through hole in front case if you want to free the front case.
d) Gently remove the PC board from the back case.
e) Solder wires for +5.00v supply to the terminals marked “+5v” and “gnd”. Sensor is calibrated
for a 5.00v supply, but will also operate at 3.30v.
1
Page 64
f) Solder a wire for sensor output to the terminal marked “v out”. The other terminals are cur‐
rently not used.
g) Reassemble – carefully press the PC board into the back part of the case. Insert the LED into
the hole in the case and reassemble the case. Press the LED into the illumination tower, being
careful not to allow the LED wires to short.
2) Test the sensor
a) The sensor has two measurement modes, a ratio‐metric mode (steady LED) or an absolute
voltage mode (blinking LED). Pressing the calibration button briefly will switch modes. Last
setting is saved in Flash.
b) Apply power to the sensor. The sensor is calibrated for a 5.00v supply and will provide a volt‐
age output of 1mm/1volt when the supply is exactly 5.00v in ratio‐metric mode. In absolute
mode, supply voltage does not impact the measurement.
c) A precise calibration wire is provided, which has a dimension of 1.57mm. Carefully place this in
the sensor and it should read close to 1.57 volts, or 31.4% of the actual supply voltage (in ratio‐
metric mode).
d) The calibration button can be used to calibrate the sensor on the calibration wire. This should
only be needed if the sensor is modified (different housing, LED, etc). Press the calibration but‐
ton while the calibration wire is inside the sensor to calibrate. Hold the button for roughly 3
seconds, until the LED lights or flashes again. The sensor is then calibrated and settings will be
saved in the flash.
3) Use the sensor – some options
a) Sensor could be wired to a suitable digital panel meter to show real‐time caliper. (use the ab‐
solute mode – flashing LED)
b) Sensor output could be wired to the extruder control to influence extrusion rate. In this case it
is best to supply the sensor from the same 5.0v supply as the control board so that the Sensor
output and the A/D input have exactly the same input range and use the ratiometric mode
(steady LED).
4) Troubleshooting
a) Dust or debris on the sensor will lead to false readings. Sensor can be cleaned with a cotton
swab if this occurs.
b) Calibrating the sensor without the calibration wire inserted will lead to unpredictable behavior.
To correct, recalibrate with the calibration wire correctly inserted in the sensor.
c) For accurate readings, the filament must stay down against the sensor. Upward motion of the
filament (away from the image sensor) will lead to inaccurate measurements.
2