D9 Firmware, Marlin

text-25

Whilst waiting for my quieter fans to arrive, A little more digging into the inner workings of the printer is called for – mainly to ensure that Estimated slicing times in Cura get a little closer to the real world slicing times that I’m seeing…

Overall, if Cura suggests it’ll be 6 hours, it’ll actually be a 9 hour print!

I’m using the vanilla Ultimaker version of Cura rather than the Wanhao custom version

Not quite sure what the advantages are of a custom version that’s lagging a little behind the bleeding edge, Wanhao really  need to get their sales pitch documentation up to scratch!

Lots of reading around suggests that Cura’s settings don’t match the printer capabilities, which is why the estimates are quite off..

So, how to find the Jerk settings from the factory?

Infact, how to find any standard printer firmware setting from the factory? – what exactly did Wanhao shove in the EEPROM to make it ‘be’ a Wanhao D9?

Enter – Pronterface

printrunNow known as Printrun

Quite a bit of Googling suggested a very easy, simple way of tethering a printer via USB and ‘doing stuff’ to it was to use this software….

Indeed, it IS easy….

pronterface

Just fire up, Select the right COM port and….there you go!, simple Full control over stuff!….AND…Look at that Terminal port over on the right!

……….Lets Get cracking

G-Code – http://marlinfw.org/meta/gcode/

Everyone should know a little about this GCode stuff…..

Reading Marlin’s pages, …..http://marlinfw.org/docs/gcode/M503.html  M503 – Report Settings Lets go, type – M503 into that terminal box on the right

Printer is now online.
echo:Marlin 1.1.4
echo: Last Updated: 2017-07-04 12:00 | Author: (none, default config)
Compiled: Jun 12 2018
echo: Free Memory: 3693  PlannerBufferBytes: 1296
echo:V03 stored settings retrieved (466 bytes; crc -26881)
echo:  G21    ; Units in mm
echo:  M149 C ; Units in Celsius
echo:Filament settings: Disabled
echo:  M200 D3.00
echo:  M200 D0
echo:Steps per unit:
echo:  M92 X80.30 Y80.30 Z400.50 E94.30
echo:Maximum feedrates (units/s):
echo:  M203 X300.00 Y300.00 Z5.00 E25.00
echo:Maximum Acceleration (units/s2):
echo:  M201 X500 Y500 Z100 E500
echo:Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>
echo:  M204 P500.00 R800.00 T500.00
echo:Advanced: S<min_feedrate> T<min_travel_feedrate> B<min_segment_time_ms> X<max_xy_jerk> Z<max_z_jerk> E<max_e_jerk>
echo:  M205 S0.00 T0.00 B20000 X7.00 Y7.00 Z0.40 E1.00
echo:Home offset:
echo:  M206 X0.00 Y0.00 Z0.00
echo:Auto Bed Leveling:
echo:  M420 S1
echo:Material heatup parameters:
echo:  M145 S0 H200 B60 F0
  M145 S1 H240 B80 F0
echo:PID settings:
echo:  M301 P33.40 I1.40 D189.20
echo:Z-Probe Offset (mm):
echo:  M851 Z-0.50
M1102 status:0
Now, lets Try – M115 – Firmware Info
M115
FIRMWARE_NAME:Marlin 1.1.4 (Github) SOURCE_CODE_URL:https://github.com/MarlinFirmware/Marlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:I3PLUS EXTRUDER_COUNT:1 UUID:cede2a2f-41a2-4748-9b12-c55c62f367ff
Cap:EEPROM:1
Cap:AUTOREPORT_TEMP:1
Cap:PROGRESS:0
Cap:PRINT_JOB:1
Cap:AUTOLEVEL:1
Cap:Z_PROBE:1
Cap:LEVELING_DATA:1
Cap:SOFTWARE_POWER:0
Cap:TOGGLE_LIGHTS:0
Cap:CASE_LIGHT_BRIGHTNESS:0
Cap:EMERGENCY_PARSER:0
I’ve no idea what quite a lot of this means right now, So, lets dig a little deeper

This isn’t necessarily a bad thing, a LOT of consumer devices have software / fimrware that lags significantly behind the cutting edge….Car manufacturers are notorious for this…

  • Compiled: Jun 12 2018 –

Wanhao have modified the source code and added things like the DGUS LCD control

 

echo:Filament settings: Disabled
  • echo:  M200 D3.00 – Set Filament Diameter for Volumetric Extrusion Mode
  • echo:  M200 D0 – Disable Volumetric Extrusion

This basically means that the firmware doesn’t use any calculations relating to volumetric extrusion Which is that fancy newer filament width setting can use

The command refers to ‘per unit’ that’s just confusing you, we in Europe use Metric, so here, we’ll go Metric, so that’ll read ‘Steps per Milimeter’

  • M92   – returns fairly ‘standard’ numbers!
    • X80.30 – 80.3 microsteps of the X (left to Right) stepper motor per MM movement
    • Y80.30 – 80.3 microsteps of the Y (Front to Back / Bed movement ) stepper motor per MM movement
    • Z400.50 –  400.5 microteps of the Z (Height) stepper motor per MM movement
    • E94.30 – 94.3 microsteps of the extruder to pass 1mm of filament out

These, I’ll possibly be changing another time…..These will be quite important for ensuring the Printer outputs stuff that is accurately sized

In particular, the X and Y axis belts definitley  aren’t the same length, so it’s likely the steps per MM will be slightly different

http://print.theporto.com/posts/how-to-calibrate-your-3d-printer-extruder-steps/ Goes into more detail than I can for the Extruder calibration.

echo:Maximum feedrates (units/s)  – This basically limits how fast the pinter can go! units are again Millimetres per second

  • M203 – 
    • X300.00 – Left to right – 300mm/s (30cm/s, that’s the whole width in 1 second!!)
    • Y300.00 – front to back – 300mm/s (30cm/s, that’s the whole depth in 1 second!!)
    • Z5.00 – Up and Down – 5mm/s – Glacial 🙂
    • E25.00 – Extruder – unsure what this means at the moment…25 what per what?

echo:Maximum Acceleration (units/s2): – i.e. how quick it can get to somewhere – in this case, X is able sustain an acceleration of 500 milimeters per second from rest…or, using some simple formula we can figure out that these numbers are a tad high

  • M201 – Set Print Max Acceleration
    • X500 –500 millimeters per second per second …Given the bed is just 300mm long, a maximum speed of 547.723m/s would be reached at the end of the bed in just 1.095 seconds!…..this won’t happen in real life of course, which is where the Jerk settings come in AND where the maximum speed of 300mm/s applies above……i.e. just because your Tesla in ludicrous mode can out accelerate gravity, doesn’t mean it’ll get into orbit any time soon, or be able to sustain that acceleration for the amount of time necessary to obtain orbit!……
    • Y500
    • Z100 –
    • E500 – there must be a ‘multiplier’ somewhere for extruder, can’t believe that it can accelerate filament at a steady 0.051 G!

 

echo:Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>

  • M204 – Set Starting Acceleration

    • P500.00 – maximum Printing acceleration
    • R800.00 – maximum filament retraction acceleration
    • T500.00 – maximum Travel acceleration (whilst not printing / extruding)

 

 

echo:Advanced: S<min_feedrate> T<min_travel_feedrate> B<min_segment_time_ms> X<max_xy_jerk> Z<max_z_jerk> E<max_e_jerk>
  • M205 – Set Advanced Settings

    • S0.00 – Feed Rate – Minium feedrate for Print moves
    • T0.00 – Feed Rate – Minimum feedrate for Travel moves
    • B20000 – Minimum Segment Time – Microseconds -this number suggests 20 seconds!?
    • X7.00 – X Maximum Jerk in mm/s
    • Y7.00 – Y Maximum Jerk in mm/s
    • Z0.40 – Z Maximum Jerk in mm/s
    • E1.00 – Extruder Maximum Jerk

These settings seem to be fairly important – especially to tuning the time for printing in Cura

Summary – Important settings

  • Speed – which is  the rate of change in your position – Millimeters per second
  • Acceleration – which is the rate of change of speed – Millimeters per second Squared
  • Jerk – is the minimum velocity difference at which the printer doesn’t need to accelerate or decelerate…….it’ll be a higher number in Bowden setups due to their lesser print head mass….lower in direct drive because they have steppers and stuff on the head, more mass, which can’t change velocity as quickly. From the Marlin Firmware – when changing Speed AND direction – if the difference is less than the value defined, it may happen instantaneously
  • Basic Jerk explaination
    • If you’re driving at high speed in your car and try to turn down a side street without slowing down, you can’t, you’ll overshoot the street (ringing) and have to turn your car around or reverse to be able to get into  that street…
    • To take the turning you have to change acceleration – decelerate in the direction you’re currently going just enough to turn and accelerate again to the desired speed when you’re in the side street. Your car hasn’t lost all it’s speed taking the corner, just enough to make sure you take the corner well, without skidding (missing steps)
  • simpler Jerk explaination
    • Hold a 20Kg weight in your hand….now, imagine someone taking it off you slowly..If it were instantaneously removed, your hand would probably shoot upwards and whack you in the face….In both cases, the force has gone fron about 9.8 newtons to Zero slow removal of the weight vs instant removal is a good analogy for low jerk vs infinite / very high jerk settings….it’s a fine tuning  for what your machine is ‘in theory’ capable of, vs what it is physically capable of.

 

  • Speed – Faster = lower quality prints
  • Acceleration – Faster = stringing, slower = blobbing
  • Jerk – effectivley ‘clamps down’ the maximum speed
    • 100000 towards infinite – ‘faster’ – instant changes in direction…. causes lots of vibration, shaking of printer and ‘ringing’ in prints Repetier has a default setting of 20! Marlin has 10…
    • 1 – ‘slower’ – problems cornering, too slow, blobby prints, really smoothes out motion on lower end / badly setup printers

Even better post about how Jerk affects your prints

 

 

 

Author: Bleugh

Early Fourties, Wife, two kids in primary school. Both of us work full time...5 years now we’ve been Back in Blighty after a decade away...It's a new country for everyone! Still finding time to tinker!

8 thoughts on “D9 Firmware, Marlin”

  1. Dear bleughbleugh,
    can I use your Firmware on GitHub also for the Wanhao D9/500? I got a Volcano hotend and have to change the thermistor type and would like to enable the PID tuning for the bed.

    Like

    1. Hi, I’ve not written any firmware, only copied some from github to learn a bit about the workings! I’m not the right person to ask, but, what you do ask is a relatively simple few code changes of Marlin firmware, I’d have no idea where to start for the wanhao, nor am I plentiful enough in time to learn! Good luck

      Like

  2. I am using Cura 3.6.0 and Octorpint. So what do I set those too? I have the Monoprice Maker Pro mk1 which is a rebranded D9. so far prints are coming out ok but I am not sure what to set the printhead to in Cura and Octoprint. Octoprint has this under axes “Please define the maximum speed/feedrate of the individual axes and whether their control should be inverted or not.” Is that the M203 above? and in Cura is asks “PrintHead Settings X min Y min X max Y max…. I am not sure about any of this.

    Like

  3. printhead settings really are a physical measurement of your printhead! taken from the hotend………It’s there to allow the Cura option “print all at once” or “print one at a time” – if you enable one at a time, the slicer calculates how far apart to space them on the bed to make sure that the print head doesn’t hit the other ones.

    Hope that makes sense?

    unless you plan on printing lots of things at the same time, but one at a time, I wouldn’t worry about this setting

    Like

    1. That does actually. I did learn about printing two things at once or two things on the plate at the same time but printed in two separate print instances. I think I have it all setup now with the speed/feedrate and the like all set and printing fine. Getting ready to print an 8 inch plate to replace some broken plastic holding a head light in on a truck. It was all broken out in a fender bender and the part is 800 bucks because it stretches across the entire front. I’ll use some glue to connect the print out to the old plastic still in there. Will be really cool if it all holds.

      Thanks for your help

      Like

  4. I saw a brief mention of adding a filament run out sensor to the D9 300 but haven’t heard anything else recently (firmware changes, printing or changing the existing part to add a switch etc). Have you toyed with this at all? I would love to add this!
    Thanks!

    Like

    1. Hi, I haven’t played with it yet, it’s still on the ‘things to do’ list..someone (Justin Boshoven) on one of the facebook groups has though, and it works well apparently. Thanks for the reminder though, i’ll push it up my schedule of things to document!, i’m months behind already 😛

      Like

  5. I really would appreciate that! I have really enjoyed the stuff and tips you have offered, big fan! SO much good stuff here and am thankful you have shared it all.
    Thanks again,
    Jon

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: