Unofficial Beta Firmware for Single/Dual with New M2 LCD

The official subforum for discussion of the installation and use of the official M2 Dual Extruder upgrade.
Post Reply
Q*bert
Posts: 42
Joined: Sat Apr 12, 2014 7:45 pm
Location: Waukesha, WI

Unofficial Beta Firmware for Single/Dual with New M2 LCD

Post by Q*bert » 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:
Image

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:
Image

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:
Image

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.
Image

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):
Image

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%:
Image

Good luck!

(See the attached for the firmware source)
Attachments
Marlin_M2_Qbert_021816.zip
(252.22 KiB) Downloaded 129 times
Last edited by Q*bert on Sat Feb 20, 2016 3:50 pm, edited 1 time in total.

User avatar
willnewton
Posts: 477
Joined: Wed Apr 09, 2014 8:32 pm

Re: Unofficial Beta Firmware for Single/Dual with New M2 LCD

Post by willnewton » Sat Feb 20, 2016 3:23 pm

About your //comment on baud rate. Mac users need 115200 baud rate! ;)

And your images aren't currently working.

Did MG tell you they don't have a FW available directly or were you not able to find one for download? Before I became experienced tweaking things myself, they were able to provide me with FW, but did not have public links available to it.

That being said, you have gone beyond what MG would normally provide with your bonus tweaks. Nice job! 8-)
I'm finally back to where I started two days ago!

A thread with some stuff in it I update every once in a while. viewtopic.php?f=8&t=9
See some of my stuff http://www.thingiverse.com/willnewton/about

Q*bert
Posts: 42
Joined: Sat Apr 12, 2014 7:45 pm
Location: Waukesha, WI

Re: Unofficial Beta Firmware for Single/Dual with New M2 LCD

Post by Q*bert » Sat Feb 20, 2016 3:55 pm

Thanks for the info about Mac users using 115200. I wasn't aware of that and I'll change it in the next revision. I've also updated the host for the images, so hopefully they're working now. Someone please let me know if they're not working.

As to MG, I did ask and they said they don't support dual extruders with the LCD. That's why I forged ahead with this.

User avatar
willnewton
Posts: 477
Joined: Wed Apr 09, 2014 8:32 pm

Re: Unofficial Beta Firmware for Single/Dual with New M2 LCD

Post by willnewton » Sun Feb 21, 2016 3:30 pm

Q*bert wrote:As to MG, I did ask and they said they don't support dual extruders with the LCD. That's why I forged ahead with this.
This is a rhetorical question.
Why on earth would they sell something, provide firmware for each, but not both?

BTW-Images work fine now.
I'm finally back to where I started two days ago!

A thread with some stuff in it I update every once in a while. viewtopic.php?f=8&t=9
See some of my stuff http://www.thingiverse.com/willnewton/about

Luciano
Posts: 2
Joined: Wed Feb 24, 2016 9:32 pm

Re: Unofficial Beta Firmware for Single/Dual with New M2 LCD

Post by Luciano » Wed Feb 24, 2016 9:35 pm

If anyone's having trouble with this, I used Arduino 1.6.7 (the newest version). I downloaded u8glib_arduino_v1.14.zip from https://code.google.com/archive/p/u8glib/downloads and extracted its contents to C:\Program Files (x86)\Arduino\libraries, then restarted Arduino, opened up the Marlin_M2_Qbert_021816.ino and uploaded it.

Hope this helps!

User avatar
jamigas
Posts: 21
Joined: Thu Feb 04, 2016 8:32 pm
Location: Crawfordsville, IN

Re: Unofficial Beta Firmware for Single/Dual with New M2 LCD

Post by jamigas » Fri Mar 04, 2016 7:53 pm

I've been using my M2 now for a couple years on a plethora of successful projects so I consider myself a seasoned operator but I'm pretty new to the forum so apologies if I fail to follow proper etiquette, but I may have something of interest to add here... middle of last month (mid Feb 2016) I reached out to MG Support asking about firmware for the Dual extruder upgrade in conjunction with the Geetech LCD display they had just sold me. A fellow there named Josh was a huge help...

After a few back and forths he sent me firmware (that I've attached to this post) for the following setup:
1) MakerGear M2 (received early fall 2014) - 24v, black powder coated frame, has the older silver/black/silver z-stepper (not the newer all black z-stepper)
2) Dual extruder upgrade (received early fall 2015) - dual V4 extruders
3) Geeetech RRDSC LCD (received early Feb 2016) - the one offered from the MG website

Josh suggested I use Arduino IDE 1.5.5 to do the upload as he had verified on his end so I did and I can confirm it uploads and works beautifully so I figured it was worth sharing here for folks that are looking for the same functionality.

If you have a setup that differs from the setup I have listed above, it might be worth reaching out to the makergear support team. If you can get a hold of a guy named Josh, I bet he could play around with the firmware to match whatever you need. These guys have never failed to fully address any questions or concerns that I have ever had.
Attachments
M2-Marlin-RRDSC_LCD-ZMin_OldZMotor-2-19-2016.zip
(1.35 MiB) Downloaded 130 times

Luciano
Posts: 2
Joined: Wed Feb 24, 2016 9:32 pm

Re: Unofficial Beta Firmware for Single/Dual with New M2 LCD

Post by Luciano » Fri Mar 11, 2016 12:20 am

I'd like to clarify that using the newest Arduino IDE gives a strange printing error where the X and Y layers shift diagonally. So, I would suggest using jamigas's steps above.

Post Reply