Anycubic i3 Mega / Mega-S Marlin 1.1.9 Custom Firmware Documentation
This is a custom version of the Marlin Firmware for the i3 Mega/Mega-S, gratefully based on derhopp's repo with his remarkable efforts to get the Anycubic TFT screen to work with the latest versions of Marlin.
Deutsche Übersetzung der Anleitung ist hier zu finden. For the German translation of the instructions, click here.
Looking for a BLtouch firmware? Head this way! Mounting and configuration instructions are included.
Read the FAQ linked below if you have any issues/questions. Search the internet if it isn't answered there. Still nothing? Feel free to comment then. (No questions regarding BLtouch please.)
While the i3 Mega is a great printer for its price and produces fantastic results in stock, there are some improvements and additional features that this firmware provides:
T<temperature>
: Target bed temperature (min 15°C), 30°C if not specified (do not set this under room temperature)S<fan speed>
: Fan speed between 0 and 255, full speed if not specifiedM888 S191 T25
: run the fan at 75% until the bed has cooled down to 25°CI provided three different precompiled hex files: One for no modifications on the stepper motor drivers - good for people who didn't touch anything yet, one for boards with TMC2208 installed and where the connectors have been flipped and one with TMC2208 and the connectors in original orientation.
Marlin-AI3M-vx.x.x-TMC2208.hex
Marlin-AI3M-vx.x.x-TMC2208_reversed.hex
Marlin-AI3M-vx.x.x-TMC2208_reversed.hex
.Marlin-AI3M-vx.x.x-stock_drivers.hex
.Source code.zip
from the latest releaseMarlin.ino
Tools -> Board
select Genuino Mega 2560
and ATmega2560
559
to 566
and line 857
to 865
in Configuration.h
)Sketch
, select Export compiled binary
Marlin.ino.hex
, not the Marlin.ino.with_bootloader.hex
!)Settings
-> Printer
-> Manage Printers
-> Update Firmware
.Monitor
tab, but since you can't read responses from the printer, I'd recommend a tool with a proper terminalM502
- load hard coded default valuesM500
- save them to EEPROMM92 E384
- set correct steps for the new extruderM203 E30
- limit extruder feedrateM204 R1500.00
- lower retract accelerationM500
- save the valuesIf you have issues with an uneven bed, this is a great feature.
G28
or G28 Z0
) command and insert these two right underneath it:M501
M420 S1
G29 S1
- Start MMBLG29 S2
- Next Mesh pointG91
, G1 Z0.02
, G90
(one after another, not in one line)G91
, G1 Z-0.02
, G90
ok
in the console, send M500
to save.I can recommend this customizable leveling test by kenwebart.
Send the following commands
G28
G26 C H200 P5 R25 Q4.2 Z4
H
parameterB80
Q
parameter sets retraction length in mm, Z
sets unretraction.BETA: This now also works without USB printing, via SD & display.
M603 L0 U0
to use manual loading & unloading.M603 L538 U555
to use automatic loading & unloadingL
and U
paramters define the load and unload length in mm. The values above work well on a stock setup, if you modded your extruder, bowden tube or hotend, you might need to adjust those.M500
M600
in your GCode at the desired layerM600
in your GCode at the desired layer or send it via terminalFilamentChange Pause
in the Special MenuCONTINUE
(only once!) on the screen and wait for the hotend to heat up again.M108
and wait for the hotend to heat up again.CONTINUE
on the screenM108
via your USB host or use FilamentChange Resume
in the Special MenuM108
, enable the advanced options at the bottom of the terminal and press Fake Acknowledgement
M600
in your GCode at the desired layerM600
in your GCode at the desired layer or send it via terminalFilamentChange Pause
in the Special MenuCONTINUE
(only once!) on the screen and wait for the hotend to heat up again.M108
and wait for the hotend to heat up again.CONTINUE
on the screenM108
via your USB host or use FilamentChange Resume
in the Special MenuM108
, enable the advanced options at the bottom of the terminal and press Fake Acknowledgement
M503
. Look for the line starting with M92
, the value after the E
are your current steps.M104 S220
M83
to prepare the extruderG1 E100 F100
M92 X80.00 Y80.00 Z400.00 Exxx.xx
, replacing x
with your valueM500
M82
Only calibrate your PID values if you experience fluctuating temperatures!
M106 S191
). Remember to also limit it in your slicer.M303 E0 S210 C15 U1
to start extruder PID auto tuningM303 E-1 S60 C6 U1
to start heatbed PID auto tuningM500
, turn off fan with M106 S0
Note: These commands are tweaked for PLA printing at up to 210/60 °C. If you run into issues at higher temperatures (e.g. PETG & ABS), simply change the S
parameter to your desired temperature
Reminder: PID tuning sometimes fails. If you get fluctuating temperatures or the heater even fails to reach your desired temperature after tuning, you can always go back to the stock settings by sending M301 P15.94 I1.17 D54.19
and save with M500
. You can also try my values: M301 P20.28 I1.45 D71.01
+ M500
.
Some updates require the storage to be cleared (M502
), if mentioned in the update log. In those cases, before updating, send M503
and make a backup of all the lines starting with:
M92
G29
M301
M304
After flashing the new version, issue a M502
and M500
. After that, enter every line you saved before and finish by saving with M500
.
No worries. You can easily go back to the default firmware and restore the default settings.
Flash the hex file from the manufacturer's website (in case it's offline, I have uploaded the stock firmwares here as well). After flashing, send M502
and M500
. Now your machine is exactly as it came out of the box.
I am very grateful for any feedback and constructive criticism. While I ran this firmware for over 800 print hours successfully, I am by no means a commercial user and this machine is just for private purposes. It's stable for me, but since every machine is different, feel free to chime in with your observations.
But please keep in mind that a simple two-liner with nothing but "x doesn't work" won't get us anywhere (let alone on Thingiverse, with a single comment feed at over 500 posts now - it's a mess to navigate).
This firmware now (v1.4.6 and up) uses acceleration and jerk values that are either very close or identical to the manufacturer values.
I recommend slightly reducing some accel/jerk values. This reduces print speed by a very tiny fraction but reduces ghosting and improves overall quality a bit. Reduced acceleration and jerk can (depending on your print speed) make very sharp edges getting slightly rounded off.
Since I am just sharing values that work well for me, I'd recommend you to look into acceleration and jerk settings and tweak them to your likings.
M201 X2000 Y1500 Z60 E10000 ; max acceleration
M204 P1200.00 R3000.00 T1500.00 ; default acceleration
M205 S0.00 T0.00 Q20000 X9.00 Y9.00 Z0.40 E5.00 ; min segment time and jerk
M201 X3000 Y2000 Z60 E10000 ; max acceleration
M204 P3000.00 R3000.00 T3000.00 ; default acceleration
M205 S0.00 T0.00 Q20000 X10.00 Y10.00 Z0.40 E5.00 ; min segment time and jerk
Try them out yourself and see what works best for you. Simply send the three lines and save them with M500
.
13.12.2018
Fixed TMC2208 layer shifts that were caused by acceleration
M502 and M500 after updating recommended (save your mesh and e-steps to put it in after updating!)
Please use M502 and M500 after flashing.
Improved USB printing by preventing buffer from running dry and waiting for serial input
Completely reworked pause, stop and filament runout functionality:
M600 filament change updates:
M500
and M502
in display menuM888
cooldown routine for the Anycubic Ultrabase (EXPERIMENTAL): This is meant to be placed at the end Gcode of your slicer. It hovers over the print bed and does circular movements while running the fan. Works best with custom fan ducts.T<temperature>
: Target bed temperature (min 15°C), 30°C if not specified (do not set this under room temperature)S<fan speed>
: Fan speed between 0 and 255, full speed if not specifiedM888 S191 T25
: run the fan at 75% until the bed has cooled down to 25°CM502
and M500
(or Load FW Defaults
and Save EEPROM
via display) is mandatory after this update.
All prior releases can be found here.
Marlin is published under the GPL license because we believe in open development. The GPL comes with both rights and obligations. Whether you use Marlin firmware as the driver for your open or closed-source product, you must keep Marlin open, and you must provide your compatible Marlin source code to end users upon request.
/*
* Flashing a custom firmware happens at your own risk.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
* AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/