Makergear M2: Marlin Configuration Tweaks

The slightly customized version of Marlin shipped with the M2 works well enough, but some of the constants required adjustment.

Most of the changes appear in the Configuration.h file…

Start by tweaking the version info so you know what’s in the Flash ROM every time it starts up:

#define STRING_VERSION_CONFIG_H "2013-03-27" //Personal revision number for changes to THIS file.
#define STRING_CONFIG_H_AUTHOR "Ed Nisley - KE4ZNU" //Who made the changes.

I reduced the maximum temperatures to match the Makergear-defined limits, even though those are far beyond what I expect to use. I’ll probably cut them back even further, but they’ll do for now:

// When temperature exceeds max temp, your heater will be switched off.
// This feature exists to protect your hotend from overheating accidentally, but *NOT* from thermistor short/failure!
// You should use MINTEMP for thermistor short/failure protection.
// Ed Nisley KE4ZNU - 26 March 2013 - reduce to M2 limit
#define HEATER_0_MAXTEMP 230
#define HEATER_1_MAXTEMP 230
#define HEATER_2_MAXTEMP 230
#define BED_MAXTEMP 125

Long ago, I settled on a much lower extrusion temperature for ABS in the Thing-O-Matic than nearly everyone else and that’s also holding true for PLA in the M2, so I reduced the minimum allowable temperature limit from 170 °C to 120 °C. The firmware seems to use a “less-than-or-equal” test, so it prevents extrusion at exactly 120 °C. Close enough:

// M2 - reduce to allow much cooler PLA extrusion
// KE4ZNU - 24 March 2013
//#define EXTRUDE_MINTEMP 170
#define EXTRUDE_MINTEMP 120

Before I added the shim around the Z axis leadscrew bearing, the default homing speed excited a howling mechanical resonance. Increasing the homing speed moved the vibration away from the resonance, but the real cure was to reduce the motor current, which eliminated the four dead spots per full step:

// KE4ZNU - 24 March 2013 - M2 - Goose Z feedrate to avoid resonance
//#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0}  // set the homing speeds (mm/min)
#define HOMING_FEEDRATE {50*60, 50*60, 6*60, 0}  // set the homing speeds (mm/min)

Dan Newman’s comments to the post about the Z axis performance calculations suggest some rationalization should happen among all the maximum speed and acceleration settings; they appear to be quite inconsistent right now. This will take a bit of measurement, but I think substantive measurements & changes must wait until I get the LinuxCNC controller running.

The block of constants for the motor currents includes some misleading comments. I added the RAMBo design equations, which will become invalid when a board iteration changes either the supply voltage or the sense resistor value, and a bit of explanatory text.

The extruder current seemed slightly low, as it would skip steps while infilling large bottom layers. This happened before I lowered the extruder temperature, so the nominal value may be right on the edge of goodness. The new value of 1.5 A heats the motor to about 120 °C, which is higher than I’d like for something attached to a plastic mount, but I anticipate some changes there in the near future.

I increased the XY motor currents to 1.5 A in anticipation of using higher speeds, although that wasn’t based on any evidence. The motors now run at about 120 °C, which is OK because they’re attached to solid metal parts (albeit without heatsink compound).

As described earlier, reducing the Z motor current to 0.6 A from 1.1 A didn’t materially affect the maximum torque, dramatically smoothed the motion, and slightly reduced the temperature. It still runs at nearly 130 °C, despite heatsinking to the chassis, and is in line for replacement.

// Motor Current setting (Only functional when motor current pins are connected to digipot)
// Values 0-255
// RAMBO 135 = ~0.75A, 185 = ~1A
// Ed Nisley KE4ZNU - 25 March 2013 - increase XY current to 1.5 A (185 was 135)
//		decrease Z current to nominal 600 mA (75 was 135) based on 19 V / 28 ohm winding
//		value = 255 * (0.8 * Imax) / 1.66 V
// Ed Nisley KE4ZNU - 27 March 2013 - increase E current to 1.5 A (185 was 165)
//		to support 300 mm/s XY extrusion speed
#define DIGIPOT_MOTOR_CURRENT
#define X_CURRENT 185
#define Y_CURRENT 185
#define Z_CURRENT 75
#define E0_CURRENT 185 //For MakerGear M2, 165 is a good starting point
#define E1_CURRENT 125

The only change to Configuration_adv.h increases the stepper timeout to allow the build platform to reach operating temperature; the default value shut off the motors just before printing started. The value obviously depends on the start and end temperatures, so more testing is in order:

//default stepper release if idle
// Ed Nisley KE4ZNU - 25 March 2013 - make deactivate timeout exceed plate heating time
#define DEFAULT_STEPPER_DEACTIVE_TIME 400

,

  1. #1 by solaandjin on 2014-02-28 - 11:10

    You say you extrude PLA at lower temps than usual. Down to 120 C? And there are no issues with jamming or adhesion?

    • #2 by Ed on 2014-02-28 - 11:40

      The 120 °C value let me do test extrusions at absurdly low temperatures, without having to remember and type the M302 low-temperature override every time. It’s probably a Bad Idea for a general setting, though.

      PLA extrudes easily and sticks like glue at my usual setting of 175 °C, with the caveat that the thermistor actually measures the nozzle temperature, which is not true of the original hot end.

      There’s a whole bunch of posts about calibrating that thermistor against various thermocouples, so I’m pretty sure it’s reporting an accurate temperature. Note that I rebuilt the thermistor table to match the observations, which suggests my M2 arrived with a different thermistor than everybody else’s hardware.

      The new M2 cartridge heater hot ends report different temperatures for equivalent extrusion performance, probably due to having a better thermistor mount. I’m not convinced any two hot ends will agree with each other; I’m positive that temperature measurement should be done more carefully.

  1. M2 vs. Marlin: Step/mm Calculations | The Smell of Molten Projects in the Morning