M2 Firmware

All M2 printers ship with the most up to date, correct firmware - you do not need to update or change it. If you believe your printer has the incorrect firmware, please contact Support before changing anything.

Firmware Installation

To update the firmware of your M2, download the desired firmware from the below list. You will also need the Arduino IDE installed, available from [Arduino]. Version 1.5.5 is tested and recommended, 1.6.x is known to cause problems.

Disconnect any other software using the printer (Pronterface, Simplify3d - Machine Control Panel, etc).

Extract both the firmware and the Arduino IDE. Open the Arduino IDE, and go to the Tools menu. There, make sure that "Arduino Mega or Mega ADK" is selected in the Boards submenu, and that the COM port relating to your M2 is selected in the Serial Port submenu. If you are using any other, non-supported version of Arduino IDE, select the board and processor type as close to "Arduino Mega 2560" and "Atmega 2560" as possible.

Go to File, Open, and navigate to the location where you extracted the firmware. Open Marlin.pde (or Marlin.ino) in the Marlin subfolder. Once Marlin has been opened, click on Upload (Either File - Upload, Ctrl+U or click on the round button with the right-pointing arrow). The firmware should compile and upload to the RAMBo board.

Preconfigured Firmware

The M2 has gone through several small revisions over time, and if you have installed upgrades you'll need to choose carefully. Pick the correct firmware by the feature tabs below, and download using the link in the appropriate box:

Base Model M2E-Production-SnNRd-V100.zip
Dual extruder upgrade M2E-Production-SnNRd-V101 - Dual.zip
LCD The stock M2E firmware supports the Geeetech LCD standard - you do not need to change the firmware.
Dual with Geeetech LCD M2E-Production-SnNRd-V101 - Dual.zip
Dual with Viki 1 LCD M2E-Production-SnNRd-V104 - Dual - Viki.zip

If you are not sure which features you have and want to make some modifications

  • All printers shipped before 02/08/2013 have RAMBo boards with 1/8th microstepping. The steps/mm values for 1/8th microstepping are: [44.44,44.44,200,235.75]. The attached file M2Marlin.zip is this, original firmware.
  • All printers shipped after 02/08/2013 have RAMBo boards with 1/16th microstepping. The steps/mm values for 1/16th microstepping are: [88.88,88.88,400.00,471.50]. The attached file M2Marlinx1619V.zip is firmware appropriate for these machines, using the original 19V and 12V combination of power supplies.
    • While not an official revision, one may end up with a 24V/40W V3B hotend, on a 19V M2. This configuration requires a PID setting of P48.89 I3.41 D175.43, and a PID_MAX setting of 400. Firmware with this configuration, and x16 microstepping, is M2Marlinx1619Vwith24v40W.zip.
  • There have been two minor M2 revisions with 24V power supplies. All printers shipped after 10/25 should have a 24V power supply; these can be identified by the presence of only one large power supply, in a laser cut ABS case. Both revisions have their electronics fans in series, so when the printer starts up, it sets those fans to 255 (instead of 155 on the 19V M2).
    • 24r1 has a 24V power supply, matching HBP and a V3B cartridge heater hotend. The cartridge heater in 24r1 has a resistance of ~3.6 Ohm. Stock PID settings work fine. Firmware for this revision is M2Marlin24r1.zip.
    • 24r2 is the same as 24r1, except that it has a 24V/40W cartridge heater with a resistance of ~14.4 Ohm. Default PID settings have been changed to P25.89 I1.94 D86.53, and has had the PID_MAX setting moved up to 255. Firmware for this revision is M2Marlin24r2.zip .
  • Printers shipped after 12/11/2015 that have hardware revision D, and will use this firmware: M2Marlin-11-30-2015.zip. This firmware is compatible with V3B and single V4 extruder M2 units with the solid black Z motor; with a small change it can be used for a M2 with the black and silver Z motor (instructions in Marlin.ino). A different change will enable the Geeetech RepRap Discount Smart Controller LCD - library is included, instructions in Marlin.ino.
  • Printers shipped in March 2016 and beyond that have hardware revision E, which moves the Z endstop to the bottom of the Z travel (Z max), and has a four-corner leveling system, will use this firmware: M2E-Production-SnNRd-V100.zip.

Non-standard hardware configurations.

Through upgrades it is possible to end up with a non-standard hardware configuration on your M2 (an older hotend with the newer four-corner leveling system, for instance). The following files will provide at least a solid starting point for any necessary modifications:

Specific features and settings of our firmware are below; for general Gcode, see http://reprap.org/wiki/G-code.

Custom Gcode

M108 S* : Sets the PWM frequency of the filament drive and electronics case fans manually. They are set to 155 at boot, but can be controlled manually at anytime by sending M108 S*, where * is a number from 0-255. 155/255=.607~=60% of the MOSFET supply voltage, with M2 that is 19.5V. So .607*19.5=11.83V, very near the 12V rating of the 40mm and 50mm fans that are included with M2. This is a simplistic explanation of PWM speed control, http://en.wikipedia.org/wiki/Pulse-width_modulation has much more detail and precision.

M2 printers with the 24V power supply have their two 40mm fans (electronics case and extruder) connected in parallel, and are set to power them at PWM 255 when the printer starts up.

Custom configuration options in Configuration.h

In the motherboard definition list, RAMBo is called Ardurap, and has motherboard code "301".

Below are the added options for setting stepper motor current in software. Currently, it is necessary to modify Configuration.h and upload the firmware to RAMBo, to change these values. However, the values already in the firmware will work fine for most situations.

Your stepper motors WILL get hot during normal operation, but the fact that they are all bolted to a large heatsink keeps them safe. If, however, you feel that any of them are getting too hot for your preference, change the value in Configuration.h and reupload.

// Motor Current setting (Only functional when motor current pins are connected to digipot)
// Values 0-255
// RAMBO 135 = ~0.75A, 185 = ~1A
#define X_CURRENT 135
#define Y_CURRENT 135
#define Z_CURRENT 135
#define E0_CURRENT 165 //For MakerGear M2, 165 is a good starting point (~1A)
#define E1_CURRENT 125

Stock Configuration.h values

Below are the standard values for the mechanical settings for M2. By changing these (either in the firmware and reuploading, or via Gcode), you can tweak the way M2 moves, to optimize it for your specific printing environment. For instance, if you have M2 on a table that is less than stable, you can drop the DEFAULT_MAX_ACCELERATION values for X and Y, and the DEFAULT_ACCELERATION in general, so that all moves will accelerate and decelerate more gently.

If you would like the axes to home faster, change the HOMING_FEEDRATE for that axis - they are in mm/min, entered as a value A*60, where A is the desired speed in mm/sec, and *60 corrects that to mm/min for the firmware. X and Y are stock at 50mm/sec, and Z is at 4mm/sec. Taking those up to 70mm/sec and 10mm/sec will get all axes to 0, no matter where they are, in 3 seconds for X, 4 seconds for Y, and 20 seconds for Z. They will also make much scarier noises if the endstop does not engage, so please only change these values once you have all endstops installed correctly, and they are tested good.

#define NUM_AXIS 4 // The axis order in all axis related arrays is X, Y, Z, E
#define HOMING_FEEDRATE {50*60, 50*60, 4*60, 0}  // set the homing speeds (mm/min)

// default settings 

#define DEFAULT_AXIS_STEPS_PER_UNIT   {88.88/2,88.88/2,400/2,471.5/2}  // default steps per unit
#define DEFAULT_MAX_FEEDRATE          {500, 500, 250, 200000}    // (mm/sec)    
#define DEFAULT_MAX_ACCELERATION      {9000,9000,30,10000}    // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.

#define DEFAULT_ACCELERATION          3000    // X, Y, Z and E max acceleration in mm/s^2 for printing moves 
#define DEFAULT_RETRACT_ACCELERATION  3000   // X, Y, Z and E max acceleration in mm/s^2 for r retracts

#define DEFAULT_XYJERK                20.0    // (mm/sec)
#define DEFAULT_ZJERK                 0.4     // (mm/sec)
#define DEFAULT_EJERK                 5.0    // (mm/sec)


There is only one setting in Configuration_adv.h that is likely to be of interest, and that is:


This setting changes the length of time in seconds that the stepper motors will remain on, when no move command has been sent to the printer. If your printing process has the Z axis home, then heats up the extruder or bed, the Z motor may deactivate, letting the platform drop. If you wish to change this behavior, modify the setting above in Configuration_adv.h - 300 seconds would be 5 minutes, 600 10 minutes, etc. Should be kept as short as is convenient to you.