Anycubic Mega S

From Leo's Notes
Last edited on 11 April 2023, at 00:01.

The Anycubic Mega S is a cheap 3D printer. I bought this printer for about $280 CAD with shipping.

Configuration[edit | edit source]

Serial talks at 250,000 baud.

The print area is 210x210x205 (width, depth, height).

Anycubic suggests that the following slicer settings:

  • bottom layer speed not exceed 20mm/s
  • top/bottom speed 30mm/s
  • outer shell speed 30mm/s
  • retraction speed at 60mm/s at 6mm or for flexible filament at 91mm/s at 6.4mm

Leveling[edit | edit source]

The build plate seems to sag in the middle. This can be compensated after doing an initial leveling of the 4 corners by applying a mesh leveling value in Marlin. Run the following in the serial console:

M421 I0 J0 Z-0.00
M421 I0 J1 Z-0.01
M421 I0 J2 Z-0.01
M421 I0 J3 Z-0.02
M421 I0 J4 Z-0.02

M421 I1 J0 Z-0.02
M421 I1 J1 Z-0.03
M421 I1 J2 Z-0.05
M421 I1 J3 Z-0.03
M421 I1 J4 Z-0.02

M421 I2 J0 Z-0.04
M421 I2 J1 Z-0.05
M421 I2 J2 Z-0.08
M421 I2 J3 Z-0.05
M421 I2 J4 Z-0.04

M421 I3 J0 Z-0.03
M421 I3 J1 Z-0.02
M421 I3 J2 Z-0.05
M421 I3 J3 Z-0.02
M421 I3 J4 Z-0.03

M421 I4 J0 Z-0.00
M421 I4 J1 Z-0.01
M421 I4 J2 Z-0.01
M421 I4 J3 Z-0.01
M421 I4 J4 Z-0.00

Use G29 S0 to show the mesh.

Recv: Measured points:
Recv:         0        1        2        3        4
Recv:  0 +0.00000 -0.02000 -0.04000 -0.03000 +0.00000
Recv:  1 -0.01000 -0.03000 -0.05000 -0.02000 -0.01000
Recv:  2 -0.01000 -0.05000 -0.08000 -0.05000 -0.01000
Recv:  3 -0.02000 -0.03000 -0.05000 -0.02000 -0.01000
Recv:  4 -0.02000 -0.02000 -0.04000 -0.03000 +0.00000

Enable bed leveling with M420 S1, then check its status with M420.

Send: M420
Recv: echo:Bed Leveling OFF
Recv: echo:Fade Height OFF
Recv: ok

Send: M420 S1
Recv: echo:Bed Leveling ON
Recv: echo:Fade Height OFF
Recv: X:0.00 Y:210.00 Z:42.32 E:3000.52 Count X:0 Y:16800 Z:16920
Recv: ok

Use M500 to save to EEPROM.

If you reboot, you might need to re-enable bed leveling with M420 S1.

Cura Profiles[edit | edit source]

Travel speed at 100 mm/s seemed to help with stringing.

General Notes[edit | edit source]

Unnecessary Travels along Inner Wall[edit | edit source]

When trying to print a curved wall that is 3 layers thick (1.2mm thick with 0.4mm nozzle), the middle inner wall is broken up into multiple sections by Cura and the nozzle prints each section backwards, causing the nozzle to judder backwards instead of printing the inner wall as a single smooth line. This seems to be an issue when a curved section is exactly a multiple of the nozzle width and increasing the wall thickness from 1.2mm to 1.3mm seems to fix this issue.

However, Cura still has unnecessary travel around the perimeter of the initial inner wall. This was rectified by setting the Minimum Wall Flow (under Shell) to 30%. This forces Cura to not travel through printed walls since it must be extruding at 30% flow rate. It still might travel for some sections as it tries to start the next seam in another corner which can be fixed by setting the Z Seam Alignment (Shell) to 'Shortest'.

Firmware[edit | edit source]

The stock firmware can be found on Anycubic's website, near the bottom of the page. https://www.anycubic.com/products/anycubic-i3-mega-s?variant=32094219305091. The stock firmware uses Marlin 1.1.0-RC8. UUID cede2a2f-41a2-4748-9b12-c55c62f367ff.

The TFT display is driven by a separate microprocessor (more information on the displays at https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/Types-of-Anycubic-Touchscreens) which communicates via serial with the main board. Updating the firmware will not update the display GUI.

Custom Firmware[edit | edit source]

There is a custom firmware for the Mega S maintained by knutwurst at https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S. This firmware uses the latest version of Marlin. You can download the pre-compiled release .hex file or obtain the source and compile it in Arduino IDE manually. I would recommend against using the HEAD for your firmware since it appears knutwurst commits test changes to master.

Precompiled[edit | edit source]

If you use the precompiled version, note that there are the following issues/annoyances with knutwurst's precompiled version:

  • The firmware still has startup sound. This can only be disabled by editing Marlin/Configuration.h and ensure STARTUP_CHIME is not defined.
  • Filament sensor needs to be closed or else it shows an error on the display when the machine is powered on. The special menu to disable the filament sensor is only temporary and reverts on a reset. You will need to undefine the ANYCUBIC_FILAMENT_RUNOUT_SENSOR in Configuration.h to disable this completely. The screen nags you of the filament because this firmware will send J15 to it on startup to the display if FILAMENT_RUNOUT_PIN is high.
  • Bed size is changed from 210x210 to 225x220 (width, depth). I reverted this back to 210x210 by compiling the firmware manually (see section below) because the nozzle can crash to the clips on the right side of the bed.

Compile Yourself[edit | edit source]

If you choose to not use the pre-compiled version, compiling a modified version is very easy. I eventually went with this route to address the issues listed above. Clone the repository and open the Marlin/Marlin.ino file in Arduino IDE. Set the target for the ATmega2560 board. Get the compiled binary by going to Sketch -> Export compiled binary. The binary will be located in the same location as the Marlin.ino file. Upload the .hex file that does not contain the bootloader via OctoPrint to update the firmware.

Review the first 100 lines of Configuration.h and uncomment whatever applies. Ensure that the correct device is enabled with the proper configuration flags (eg. KNUTWURST_MEGA_S, KNUTWURST_TMC). You may want to uncomment line 287 so that #define MOTHERBOARD BOARD_TRIGORILLA_14 is defined.

Flashing Firmware[edit | edit source]

After obtaining the .hex file, to update the firmware via OctoPrint, install the OctoPrint Firmware Updater plugin and configure the plugin with the following settings:

  • Flash method: avrdude
  • AVR MCU: ATmega2560
  • Path to avrdude: /usr/bin/avrdude
  • AVR Programmer Type: wiring
  • Baud Rate: auto

Mods and Upgrades[edit | edit source]

Filament Holder[edit | edit source]

Filament Holder - https://www.thingiverse.com/thing:2841440

I installed this filament holder so that the entire printer fits inside a Creality enclosure which was designed for the Ender 3.

Issues[edit | edit source]

The filament holder seems to be working fine. Initially, the filament spool was sagging, but this turned out to be a loose screw. The filament guide will come loose over time which I attribute to the extruder motor's vibrations and needs periodic retightening.

TMC2208 v2 Motor Driver[edit | edit source]

Follow the guide at: https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki/Swap-stepper-motor-driver-for-TMC2xxx

To install the new TMC2208 drivers, disconnect power and open the unit to remove all the existing drivers. Plug one driver in one by one and apply power. Adjust the potentiometer so that the measured voltage on the Vref pad is 1V. You can do this all at the same time, but due to space constraints, it was easier to do it sequentially.

If you intend to update the firmware to use the TMC module, you can leave the wiring as-is. Otherwise, you will need to reverse the wirings so that the motor directions are reversed.

3D Printer nozzle types
3D printer nozzle types. Right one is the type suitable for the Anycubic

Changing nozzle size[edit | edit source]

A quick note on nozzle types[edit | edit source]

Pictured on the right are the two types of 3D printer nozzles that are commonly available. The Anycubic Mega uses the type on the right hand side, which has a shallower nozzle with a slightly longer thread. While both types uses the same M6 threads, because of the slight difference in thread length, swapping one for the other will require adjusting the heat break to avoid material seeping out of the heater block.

Because I had bought the cheapest nozzles without realizing there were different types of nozzles, I ended up with the 'wrong' type for the Anycubic. To use the nozzles properly, I had to tighten the heating block into the heat break by 1.25 turns. This then allowed the nozzle to tighten into the heating block completely.

How to change the nozzle[edit | edit source]

  1. Heat the hot end to ~40-50C hotter than your print temperature. I did 260C.
  2. Remove the nozzle. This should come out relatively easily. Use pliers to hold on to the heating block to prevent it from moving if required.
  3. Replace with the new nozzle. If it's a different type of nozzle, make sure that the nozzle starts to tighten before the nozzle head reaches the heating block. This ensures that there's a good connection between the heat break and the nozzle. If the nozzle is threaded completely into the heating block, you may need to adjust the heat break further in to compensate. Tighten the nozzle lightly; don't strip the threads.
  4. If using a different length nozzle, you will need to adjust the 2 screws on either ends of the extruder arm so that the nozzle trips the Z axis end stop switch before the nozzle touches the build plate. Not doing this could cause the nozzle to ram into the build plate.
  5. Relevel everything again.

Use as a pen plotter[edit | edit source]

Setup[edit | edit source]

I use the pen holder from this design by zhwang168 at https://www.thingiverse.com/thing:4799274. Rather than using his pen refill enclosure and 3D printed plastic spring, I was able to use an existing Pilot G2 pen almost as-is but modified such that the internal spring is placed between the ink tube and the top of the pen. This allows the pen nib to have some leeway in its movement similar to what zhwang168's printed part can do. I found the original spring to be a little too stiff, so I replaced them with two mechanical keyboard switch springs interleaved together.

Securing the printed page to the print bed was another tricky part. I wanted to have some way to quickly load/unload a page from the printer and didn't want to use binder clips or tape. The 3D print bed at 21cm x 21cm is also a little too short for a normal letter page. My work-around is to use an old clipboard which I can attach to the print bed with magnets. The benefit with this is that I can remove the clipboard easily if I wanted to print 3d objects later on without having to mess with the bed again and that pages can be added/removed through the clipboard clip. Because the bed height is now higher with the addition of the clipboard, I added two identical magnets on top of the Z axis limit switch to compensate to avoid the extruder from crashing into the clipboard surface.

Calibration should be done by zeroing the XYZ axis. The magnets on the Z axis limit switch will cause the head to be above the printer bed by the diameter of the magnets. Move the head via Gcode to somewhere on the page and determine an appropriate Z value for the pen in both down and up states. Adjust the pen clip as required. You want the pen to be pressing half way up the spring in the down state and fully off the page in the up state. Depending on the spring in the pen, there could be up to 5mm in leeway. Using a harder spring with smaller tolerances might be useful to minimize Z axis movements to help speed up printing.

Text to Gcode[edit | edit source]

To convert text into gcode, use Inkscape 0.92 and the 4xiDraw & KM laser extensions. The extensions only work with Inkscape 0.92. Place the contents of the extensions into the Inkscape extensions directory under the Inkscape program directory at $InkscapeProgramDir/share/extensions, you will need to overwrite any existing files.

Create a new document of size 210mm x 210mm. Use the text tool to write text. To convert the text into gcode, you will have to convert the text to Hershey text which basically is a stroke font that can be converted to Gcode. This can be done by selecting your text, then click Extensions -> KM Laser -> CONVERT: HERSHEY TEXT .... Enable live preview and select the desired stroke font.

To convert the hershey text into gcode, select the converted text, then click Extensions -> Generate Pen (Servo) Gcode Tool.... Ensure the tool has the following settings set:

  • Pen (Servo) Up Command: G0 Z9 F6000
  • Pen (Servo) Down Command: G0 Z2 F6000
  • Travel Speed: 5000
  • Drawing Speed: 3000
  • Servo Up Angle S#: 0
  • Servo Down Angle S#: 0
  • Delay: 0.0

Note: The up position at 9mm may be higher than necessary. It may be possible to use a smaller value.

Review the exported Gcode. You may also want to prepend and append the following chunks of Gcode:

G21             ; work in metric
G28 X0 Y0 F3000 ; reset X / Y
G28 Z0 F1000    ; reset Z
G90             ; absolute
G92 Y55         ; set to Y 75mm offset, as our pen holder is off-centered from the tool
; M211 S0       ; disable software endstops, we may need to run past the normal work area
G0 Z10 F6000    ; bring tool up

At the end, add:

M211 S1          ; Re-enable software endstops
G0 Z100 F6000    ; lift pen to 40 to ease removal of work
G28 X0           ; Move out of the way
G1 Y180 F2000
M84              ; steppers off
M300 P300 S4000  ; play tone

See Also[edit | edit source]