Jetty Firmware - Settting Parameters Without A Gen 4 LCD Interface

The Jetty Firmware referenced in this manual can be found on Thingiverse Thing 17855

For the Jetty Firmware usage manual, please see Jetty Firmware Manual.

Introduction

This document explains how to change parameters used by the Jetty Firmware without using a Gen 4 LCD Interface. If you happen to have a Gen 4 LCD Interface, then use it to change parameters. Using your Gen 4 LCD Interface is discussed in the Jetty Firmware Manual.

If, however, you do not have or wish to use a Gen 4 LCD Interface, then you can send some non-standard "mcode" commands directly from ReplicatorG to the bot. These commands will effect changes to parameter settings. But, to send these non-standard mcode commands, you need a custom version of ReplicatorG found at Thingiverse Thing 17855. Note that you only need use that custom version of ReplicatorG when making parameter changes: you do not need to use it for printing or otherwise controlling your bot. Once you have made your desired changes you can stop using the custom ReplicatorG and even uninstall it if you wish.

Getting started

First, you need to download and install the custom version of ReplicatorG found at Thing 17855.

Once you have installed the modified ReplicatorG, start it up. From the "File" menu, select "New". You should be presented with a untitled, blank screen which only shows the "gcode" tab. That's what you want to see; that's where you will type in the mcode commands to be sent to your bot.

Entering mcodes

The definitive reference of mcodes is kept in the Jetty Firmware Manual. Specifically, the mcode support section.

To send some mcodes to the bot, use this work flow

  1. Type the desired codes and parameter values in the blank "gcode" screen in ReplicatorG.
  2. Connect to your bot via the USB cable and ReplicatorG's "Connect" button.
  3. Use the "Build" button to send the mcodes to your bot.

Note that you can also build the mcodes to an SD card. You can even build separate SD card files for different functions such as "enable acceleration" and "disable acceleration". You can run these SD Card files (.s3g) from any ReplicatorG, i.e. you only need the special ReplicatorG to create the .s3g files.

Example 1: Setting axis steps per mm

In ReplicatorG open a "new" file. In the resulting gcode screen, enter the following two lines,

M215 X4706985 Y4706985 Z20000000 A5023548
M200

The first line specifies the following steps per millimeter

X & Y axis 47.06985 steps/mm
Z axis 200 steps/mm
A axis (extruder) 50.23548 steps/mm

The second line does a software reset allowing the firmware to pick up the new settings.

In the first line, you will want to replace the numeric values with values appropriate for your bot. The values should be multiplied by one hundred thousand (100000) and any fractional part then discarded. If you are unsure of the correct values for your bot, look in the machine .xml file for your bot. You can also see those settings from within ReplicatorG by using the "Machine information…" sub-menu item of the "Machine" menu. The values will appear as "stepspermm" values in the listed information. For some Cupcakes, the "scale" values are instead used.

Note that the A axis steps per mm, is the steps per millimeter of raw, input filament fed into the extruder. It is not the steps per millimeter of the extruded output noodle. For that, see the next example

Example 2: Setting extruder steps per mm

The acceleration firmware also needs to know how many stepper motor steps it takes to output a millimeter of extruded noodle. For Thing-o-Matics, this will be somewhere around 4.4 steps/mm +/-0.5 steps/mm. Without a Gen 4 LCD Interface to help you calibrate this, you will want to estimate it as described later in this example.

To set an value of 4.2 steps/mm for the extruder steps per millimeter of extruded noodle, use the following mcodes,

M208 A42
M200

The first line sets a value of 4.2 while the second line does a soft reset.
In general, the parameter supplied with the M208 mcode should be 10 times the desired value and with any fractional part discarded. For example, 4.22 times 10 would be 42.2. After discarding the fractional part of two-tenths you are then left with 42. That's the value to use for the parameter of the M208 mcode.

To estimate the number of extruder steps per millimeter of extruded noodle,
use the formula below for $e_s$,


$e_s = f_s {d_n}^{\,2} P \,/\, {d_f}^{\;2}$

where


$P =$ Packing ratio (0.85 for ABS, 1.0 for PLA)
$d_f =$ Input filament diameter (e.g., 1.77 mm)
$d_n =$ Output extruded noodle diameter (e.g., 0.58 mm for a 0.4 mm nozzle and 80 mm/s feed rate)
$N =$ Number of stepper motor microsteps per full revolution (e.g., 1600)
$d_g =$ Extruder gear diameter (e.g., 10.56 mm)
$f_s = N\, /\, (\pi d_g) =$ Steps per mm of input filament (e.g,. 48.23 steps/mm)

For the above example values, $e_s = 4.4 mm/s$.

Note that the diameter of your extruded noodle is larger than the diameter of your extruder's orifice. This is because the extruded plastic swells a bit as it relaxes from the shear stresses it was subjected to while passing through the extruder nozzle. This is referred to as "extrudite swell" and it increases with increasing feed rate up to a point. So, you should measure $d_n$ by extruding some plastic at your expected accelerated feed rates and then measuring with calipers. Below are some measured diameters for 1.77 mm diameter ABS plastic extruded at 235C through a 0.4 mm diameter orifice,

Feed Rate (mm/s) Extruded Noodle Diameter (mm)
10 mm/s 0.43 mm
20 0.44
30 0.45
40 0.47
50 0.51
60 0.54
70 0.57
80 0.58
90 0.60
100 0.61

Note that the equation for $f_s$ doesn't yield the value of 50.235 steps/mm typically seen in the machine .xml files. That's because the value in those files doesn't agree with published numbers for $d_g$ which is documented in the MBI store as 10.56 mm and in ReplicatorG as 10.58 mm, neither of which yield a value of 50.235 steps/mm.

Example 3: Setting maximum feed rates

To set the per axis maximum feed rates, use the M203 mcode. Each parameter to that mcode sets the maximum feed rate for the corresponding axis in units of mm/s. For example, the two lines

M203 X160 Y160 Z50 A100
M200

sets the maximum feed rates as follows

X axis 160 mm/s
Y axis 160
Z axis 50
A axis 100

Remember that the A axis is the extruder.

These maximum feed rates are then used to limit the per axis feed rates found in the commands sent by ReplicatorG when printing. Or those found in the SD card file. Thus it's okay to have very high "stepspermm" limits in ReplicatorG's machine definition file (.xml). When the bot actually prints, it will further limit the speeds using these maximum feed rate values set with the M203 command. (Or set through the Gen 4 LCD Interface.)

Example 4: Setting some acceleration parameters

In this example, mcode is sent to the bot to effect the following settings

  1. M203: Set the maximum X, Y, Z, and A axis feed rates to 160, 160, 50, and 100 mm/s.
  2. M201: Set the maximum X, Y, Z, and A axis acceleration values to 500, 500, 150, and 60000 mm/s^2.
  3. M204: Set the default acceleration and extruder only acceleration to 5000 and 3000 mm/s^2, respectively. The latter value is the extruder acceleration used when a gcode move command only involves the extruder and not the X, Y, or Z axes. E.g., a fast reversal.
  4. M216: Set the maximum per axis speed changes. Each value, in mm/s, is multiplied by 10 and then the fractional part discarded. This command sets the X, Y, Z, and A axis values to 30.0, 30.0, 10.0, and 30.0 mm/s.
  5. M200: Perform a soft reset so that the new values take effect.
M203 X160 Y160 Z50 A100
M201 X500 Y500 Z150 A60000
M204 S5000 K3000
M216 X300 Y300 Z100 A300
M200

Remember that the definitive and complete list of acceleration related mcodes for the Jetty Firmware can be found in the mcode support section of the firmware manual.

Example 5: Turning acceleration on

To turn acceleration on with the planner enabled, send the following two lines of mcodes,

M209 S3
M200

The first line enables acceleration with the planner, whole the second line does a soft reset. If you have a Gen 4 LCD Interface, you should see the splash screen re-appear and the BAR LED be lit.

Example 6: Turning acceleration off

To turn acceleration off, send the following two lines of mcodes,

M209 S0
M200

The first line disables acceleration and the second does a soft reset. If you have a Gen 4 LCD Interface, you should see the splash screen re-appear and the BAR LED go out.

Example 7: Calibrating JKN Advance K

As part of calibrating the JKN Advance K parameter, you want to ensure that

  1. Acceleration with the planner is enabled
  2. The maximum X and Y axis accelerations are not too high
  3. The JKN Advance K2 parameter is set to zero

The following example accomplishes the above three tasks as well as setting K itself to the value 0.00500.

M209 S3
M201 X500 Y500
M207 A0
M207 S500
M200

In the above, the K value is multiplied by 100000. Note that the two lines beginning with M207 can be combined into a single line,

M207 A0 S500

Example 8: Calibrating JKN Advance K2

As part of calibrating the JKN Advance K2 parameter, you want to ensure that

  1. Acceleration with the planner is enabled, and
  2. The maximum X and Y axis accelerations are not too high

The following example accomplishes the above tasks as well as setting K2 itself to the value 0.00500.

M209 S3
M201 X500 Y500
M207 A500
M200

In the above, the K2 value is multiplied by 100000.

Note: you should not set K=0 when tuning K2. Leave K set to whatever value you have decided to use or set to the default value.

Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.