Unofficial Beta Firmware for Single/Dual with New M2 LCD
Posted: Sat Feb 20, 2016 4:55 am
I've been using a VIKI 1 LCD on my dual M2 for quite a while now, but just upgraded to the new MakerGear (GeeeTech) display. I really like the new display (purchased from MakerGear with a very nice case), but MakerGear doesn't yet have firmware for duals with the new display. So I spent a few hours (OK, maybe a bit more) mashing one together.
Attached is the first version - not entirely tested but a good start I think. It supports single or dual extruders with the new display, and supports either the newer all black or the older silver and black z-motor.
I took some artistic (err.. programmatic) license with the traditional Marlin firmware by adding an "m2.h" file that makes common firmware settings much easier to find. Please look at this file to set the options for your M2. I also added a "credits" screen that display the version and flash date of the firmware - handy if you forget what version you have.
There are a few other niceties in this firmware such as active display of power going to the heaters, an animated bed fan display (that shows down to 0% rather than 1% when it's off!), and a couple of other things. Since I didn't initially fully understand the new display completely, I'll describe some features below.
An important note: I've tested this in some very basic ways but I haven't run it as "production" firmware for very long, so I wouldn't at all be surprised if there are some bugs that I introduced. I'll try to respond to issues (beyond those inherent in the original Marlin sources) but remember the following when you post an issue: I didn't write the base firmware, I have a wife, this isn't even close to my day job, it's one of a dozen of my hobbies, I have a wife, I mashed together multiple firmware to get this together, the firmware I'm posting is free, and I have a wife. In other words, I'll help when I have time and if it's within my abilities.
Again, see the "m2.h" file for common settings. It looks like the following:
/*======================================================================================*/
/*================= This is MakerGear M2 specific firmware ==========================*/
/*======================================================================================*/
/* This version of marlin has been modified by Q*bert in order to make common settings */
/* for the MakerGear M2 more easily accessible. This file "m2.h" has been added */
/* to the traditional marlin sources in order to make common options for the */
/* MakerGear M2 easier to find and modify. */
/*======================================================================================*/
/*======================================================================================*/
/* This section contains settings for the most common M2 options. */
/*======================================================================================*/
#define BAUDRATE 250000 // This can be set to either 115200 or 250000 (there really isn't much reason to use 115200)
#define EXTRUDERS 2 // Set this to 1 for a single extruder or 2 for two extruders
// LCD displays - only one of these may be un-commented, or comment both out if you don't have an LCD display
#define M2_GEEETECH_LCD // Un-comment this line (remove //) if you have MakerGear's Geeetech display
// #define M2_VIKI1_LCD // Un-comment this line if you have MakerGear's VIKI 1 display (not yet tested)
// There have been two versions of Z-axis motors used on M2's
#define DEFAULT_AXIS_STEPS_PER_UNIT {88.88,88.88,400,471.5} // Un-comment this line if your M2 has a silver and black Z-axis motor
// #define DEFAULT_AXIS_STEPS_PER_UNIT {88.88,88.88,1007.7,471.5} // Un-comment this line if your M2 has an all black Z-axis motor
/*======================================================================================*/
/* This section contains advanced settings that I've moved here to make them easier to */
/* find. Comment them out if you wish to use the values as defined in the */
/* "traditional" source locations.
/*======================================================================================*/
// PID settings for a typical M2 v4 extruder
#define DEFAULT_Kp 14.79
#define DEFAULT_Ki 0.73
#define DEFAULT_Kd 75.37
// PID settings for a typical M2 hotbed
#define DEFAULT_bedKp 10.00
#define DEFAULT_bedKi .023
#define DEFAULT_bedKd 305.4
// While 3000 is a typical value here, reducing the acceleration can sometimes improve the print quality
#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
/*======================================================================================*/
As you can see above, the firmware should work with VIKI 1 displays also, but I have not tested this yet. I will when I get time to disconnect the new display and hook the old VIKI back up.
And, last but not least, here's some quick info on the display:
The "splash" screen shows for 2 seconds upon boot up or a reset:

The "credits" screen displays the (Q*bert!) version, and the date and time that the firmware was last flashed. This also displays for 2 seconds:

The home screen, showing from upper left to lower right the state of the extruders and hot bed (set temp on top and current temp on bottom, the bed fan (from 0 to 100%), the X, Y and Z positions, the "feed rate" which is set by the "Movement Override" knob in Simplify3D, the print run time above the "% done" bar graph, and lastly a status message on the bottom line:

A screen when the bed has reached temperature and extruder 1 is heating. Notice the white dot under the "1" on the first extruder - this indicates that the extruder is currently being supplied current for heat.

A screen during printing from the SD card showing the run time (1 minute) and the progress bar graph. It also shows that the bed fan is at 100% (the fan is animated when on). Also handy but barely noticeable is the one pixel dot in the lower right corner. This is a "heartbeat" monitor than blinks about once per second, showing that your printer and display are indeed alive and functioning. You can also see that the bed is currently being supplied current for heat (the white dot in the center of the bed):

And, finally, a screen showing that the print is done. The status message shows that the print took 6 minutes (it was a quick demo!) This also shows that the feed rate (Movement Override) was turned up to 200%:

Good luck!
(See the attached for the firmware source)
Attached is the first version - not entirely tested but a good start I think. It supports single or dual extruders with the new display, and supports either the newer all black or the older silver and black z-motor.
I took some artistic (err.. programmatic) license with the traditional Marlin firmware by adding an "m2.h" file that makes common firmware settings much easier to find. Please look at this file to set the options for your M2. I also added a "credits" screen that display the version and flash date of the firmware - handy if you forget what version you have.
There are a few other niceties in this firmware such as active display of power going to the heaters, an animated bed fan display (that shows down to 0% rather than 1% when it's off!), and a couple of other things. Since I didn't initially fully understand the new display completely, I'll describe some features below.
An important note: I've tested this in some very basic ways but I haven't run it as "production" firmware for very long, so I wouldn't at all be surprised if there are some bugs that I introduced. I'll try to respond to issues (beyond those inherent in the original Marlin sources) but remember the following when you post an issue: I didn't write the base firmware, I have a wife, this isn't even close to my day job, it's one of a dozen of my hobbies, I have a wife, I mashed together multiple firmware to get this together, the firmware I'm posting is free, and I have a wife. In other words, I'll help when I have time and if it's within my abilities.
Again, see the "m2.h" file for common settings. It looks like the following:
/*======================================================================================*/
/*================= This is MakerGear M2 specific firmware ==========================*/
/*======================================================================================*/
/* This version of marlin has been modified by Q*bert in order to make common settings */
/* for the MakerGear M2 more easily accessible. This file "m2.h" has been added */
/* to the traditional marlin sources in order to make common options for the */
/* MakerGear M2 easier to find and modify. */
/*======================================================================================*/
/*======================================================================================*/
/* This section contains settings for the most common M2 options. */
/*======================================================================================*/
#define BAUDRATE 250000 // This can be set to either 115200 or 250000 (there really isn't much reason to use 115200)
#define EXTRUDERS 2 // Set this to 1 for a single extruder or 2 for two extruders
// LCD displays - only one of these may be un-commented, or comment both out if you don't have an LCD display
#define M2_GEEETECH_LCD // Un-comment this line (remove //) if you have MakerGear's Geeetech display
// #define M2_VIKI1_LCD // Un-comment this line if you have MakerGear's VIKI 1 display (not yet tested)
// There have been two versions of Z-axis motors used on M2's
#define DEFAULT_AXIS_STEPS_PER_UNIT {88.88,88.88,400,471.5} // Un-comment this line if your M2 has a silver and black Z-axis motor
// #define DEFAULT_AXIS_STEPS_PER_UNIT {88.88,88.88,1007.7,471.5} // Un-comment this line if your M2 has an all black Z-axis motor
/*======================================================================================*/
/* This section contains advanced settings that I've moved here to make them easier to */
/* find. Comment them out if you wish to use the values as defined in the */
/* "traditional" source locations.
/*======================================================================================*/
// PID settings for a typical M2 v4 extruder
#define DEFAULT_Kp 14.79
#define DEFAULT_Ki 0.73
#define DEFAULT_Kd 75.37
// PID settings for a typical M2 hotbed
#define DEFAULT_bedKp 10.00
#define DEFAULT_bedKi .023
#define DEFAULT_bedKd 305.4
// While 3000 is a typical value here, reducing the acceleration can sometimes improve the print quality
#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
/*======================================================================================*/
As you can see above, the firmware should work with VIKI 1 displays also, but I have not tested this yet. I will when I get time to disconnect the new display and hook the old VIKI back up.
And, last but not least, here's some quick info on the display:
The "splash" screen shows for 2 seconds upon boot up or a reset:

The "credits" screen displays the (Q*bert!) version, and the date and time that the firmware was last flashed. This also displays for 2 seconds:

The home screen, showing from upper left to lower right the state of the extruders and hot bed (set temp on top and current temp on bottom, the bed fan (from 0 to 100%), the X, Y and Z positions, the "feed rate" which is set by the "Movement Override" knob in Simplify3D, the print run time above the "% done" bar graph, and lastly a status message on the bottom line:

A screen when the bed has reached temperature and extruder 1 is heating. Notice the white dot under the "1" on the first extruder - this indicates that the extruder is currently being supplied current for heat.

A screen during printing from the SD card showing the run time (1 minute) and the progress bar graph. It also shows that the bed fan is at 100% (the fan is animated when on). Also handy but barely noticeable is the one pixel dot in the lower right corner. This is a "heartbeat" monitor than blinks about once per second, showing that your printer and display are indeed alive and functioning. You can also see that the bed is currently being supplied current for heat (the white dot in the center of the bed):

And, finally, a screen showing that the print is done. The status message shows that the print took 6 minutes (it was a quick demo!) This also shows that the feed rate (Movement Override) was turned up to 200%:

Good luck!
(See the attached for the firmware source)