MBot3D / Marlin

Optimized firmware for RepRap 3D printers based on the Arduino platform.

Home Page:http://www.marlinfw.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PC printing Buffer

jeffkyjin opened this issue · comments

Having trouble with print quality via direct USB connection or PC with your Marlin ? Here's a solution

https://www.thingiverse.com/thing:3626658

I had trouble with the quality of my prints via USB (and/or Octoprint) since switching from printing from the printers SD card. Zits, blobs and other issues plagued my printing experience.

It took me a while until I realised that the USB part was the issue, as I rarely printed from the SD card, due to the inconvenience.

So I started doing some research and after tweaking my Marlin firmware, I got the print quality from USB equal to that of the SD card. Great!

So.. What's the problem?

The default BAUDRATE of the Ender 3 in the Marlin firmware is very low. Along with low buffer sizes due to the memory limitations of the Ender 3 motherboard, it all adds up to the printer not being able to receive commands fast enough over USB. You'll see the print-head pause momentarily, and that's when you get blobs, zits etc.

Changing the BAUDRATE and making buffer sizes larger, allows the printer to receive commands fast enough to eliminate those pesky pauses.

By disabling some niceties that are unnecessary (like the Ender 3 boot logo for instance) we can free up enough space to allow for larger buffers.

Here are the values I used in Marlin:

#define BAUDRATE 250000

BAUDRATE is located in Configuration.h, the rest of these options are located in Configuration_adv.h

(the if statement is redundant here now, but I decided to keep it in case I wanted to have individual values for when using SD or not later)

#if ENABLED(SDSUPPORT)

#define BLOCK_BUFFER_SIZE 64 // SD,LCD,Buttons take more memory, block buffer needs to be smaller

#else

#define BLOCK_BUFFER_SIZE 64 // maximize block buffer

#endif

#define MAX_CMD_SIZE 96

#define BUFSIZE 32

#define TX_BUFFER_SIZE 32

You may need to disable some features in Marlin to compile with these options tweaked (to give you enough spare dynamic memory). I used SLIM_LCD_MENUS

disabled ARC support and removed the LCD boot dragon graphic. Those changes alone should give you enough room. Ideally, you want at least 30% of the dynamic memory available. Some people say you could get away with 10%, but in my opinion, that is too low.