My Stoopid Stuff
  • Home
  • Projects
  • Blog
  • Lec'tronics
  • Links
  • CNC
  • Quick Recipes
  • 3D Printer Tips

Goodbye Ender FW, Hello Marlin

7/13/2018

0 Comments

 
Picture
M304

Well technically the firmware on the Ender 3 is Marlin. just a customized version of it, but I wanted the full Marlin firmware on the Ender 3.  And because I can't seem to stop getting into deeper problems with this, I am trying Marlin 2.0 which is not quite released yet.

To load up Marlin on the Ender 3, I had to do two things (really only one thing if I wanted to use a pre-compiled image):
  1. Burn the bootloader since the Ender 3 does not have a bootloader from the factory.
  2. compile and load an image of Marlin 2.0

The bootloader is just needed to load other firmware on the motherboard, and the Arduino IDE can take care of it with some work.  Some jumper wires however are required.  The following are good guides to burning the bootloader:

https://matterhackers.dozuki.com/Guide/Flashing+the+Bootloader+on+a+Creality+CR-10/62

https://www.youtube.com/watch?v=27RDXtKjrCI

Part 1 is pretty straightforward, and I could have stopped there and just used a pre-compiled binary for the Ender3, but I wanted to compile a version from Marlin2.0 using the Arduino IDE.

To get started I used the configuration.h from Blinkii (https://www.thingiverse.com/thing:2981891) who was kind enough to upload a working image of Marlin 2.0 for the Ender 3, and his configuration files for Marlin 2.0. 


==========================================================================================
Update - I removed some bogus info due to my lack of understanding of PID - the following is correct to the best of my current knowledge:

To tune PID for the heated bed, I used the info here:

https://www.youtube.com/watch?v=6gr-XOJ_1Fo
 
That is basically running this GCode from the Octoprint terminal:

M303 E-1 C8 S90

E-1 specifies the heated bed
C8 = run the calibration for 8 cycles
S90 = use 90deg C as the target bed temp

That will then run for a bit and if you have Octoprint, it will show the temp going up.  On the terminal it helps to suppress the temp messages, but I noticed that I had to uncheck that to see the results.  When it was done I had this:

Recv: Kp: 866.45 Ki: 170.59 Kd: 1100.17

Which I then set using this:


M304 P866.45 I170.59 D1100.17

Then M500 to save the settings to EEPROM, and M501 to confirm they are correctly saved.  This calibration routine is custom to each printer so don't just pop these in, does not work that way.  A similar calibration routine can be run on the hot-end, but the parameters are different.  In the linked video, E303 E0 S200 C8, he used to calibrate and M301 was used to save them, with M500 to save the settings and M501 to view are the same.

The same values can be entered directly into the Marlin configuration.h by searching for these and changing the values, below are mine:


    //Default Bed PID
    #define  DEFAULT_bedKp 866.45
    #define  DEFAULT_bedKi 170.59
    #define  DEFAULT_bedKd 1100.17

As an aside, I found that in TH3D's Marlin flavor which I am now trying out, these are in configuration_backend.h which it says not to edit so probably, though I did it and then re-ran the calibration utility anyway.

Getting back to the Blinkii Marlin 2.0 configuration.h files, I also changed this line in configuration.h to English (en) since the file from thingiverse was set for German (de):

#define LCD_LANGUAGE en
 

Once I had the configuration.h and configuration_adv.h settings the way I wanted them for my printer, I had to compile them with the Arduino IDE which is easier than it sounds.  I did have a few errors however.  

This error popped up when attempting to compile Marlin 2.0 using Arduino IDE 1.8.5:

Arduino: 1.8.5 (Windows 7), Board: "Sanguino, ATmega1284 or ATmega1284P (16 MHz)"

sketch\src\lcd\dogm\u8g_dev_ssd1306_sh1106_128x64_I2C.cpp:72:20: fatal error: U8glib.h: No such file or directory

 #include <U8glib.h>

                    ^

compilation terminated.

exit status 1
Error compiling for board Sanguino.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.



I did two things to get around this:

1. Followed the instructions here to change my build.path=c:\temp (or something short like that)

https://www.v1engineering.com/forum/topic/avr-gcc-exe-the-filename-or-extension-is-too-long/#post-56045

2. And then I just installed the missing library from the Arudino Library manager ( Sketch > Include Library > Manage Libraries > search for "U8glib" and I think it was the 1.19.1 version bu Oliver that I used.

Then Marlin 2.0 was able to compile.  I had the Arduino IDE configured to complie for a Sanguino /  "ATmega 1284 or ATmega 1284P (16 MHz)" and then plugged in the board for the Ender 3 and uploaded the sketch.  I also exported the binary in case I need it later.  I almost forgot that the Sanguino board profile is not available by default - it needs to be installed maually in the Arduino IDE - just follow step 6 here or heck just follow that guide, it is really good.

Thanks to Marlin I can now get my extruder calibrated and it is starting to look better, I am just a few steps from hopefully getting it dialed in.  Unfortunately the damn think bucked a bit when I was printing a test cube and tore up the build tac.  This is one stubborn machine.
Picture
Picture
Picture
0 Comments



Leave a Reply.

    Picture

    Stoopid Me

    Welcome to my Stoopid corner of teh Internet.  It's mostly gonna be 3D printing stuff, but I also post some recipes, projects, and the occasional rant here as well.  More Stoopid stuff is updated regularly.

    I recently joined the Amazon Associate program, so some of the links on this site are Amazon affiliate links. This means that, at zero cost to you, I will earn an affiliate commission if you click through the link and finalize a purchase.  This will help to support this site, and pay for more Stoopid Stuff.

    Archives

    March 2023
    February 2023
    January 2023
    November 2022
    October 2022
    September 2022
    August 2022
    July 2022
    April 2022
    February 2022
    January 2022
    December 2021
    November 2021
    October 2021
    September 2021
    August 2021
    July 2021
    June 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2020
    March 2020
    February 2020
    January 2020
    December 2019
    November 2019
    October 2019
    September 2019
    August 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    November 2017
    September 2017
    August 2017
    June 2017
    December 2016
    October 2016
    September 2016
    July 2016
    March 2016
    February 2016
    September 2015
    August 2015
    June 2015
    May 2015
    April 2015
    March 2015
    February 2015
    January 2015
    December 2014
    November 2014
    October 2014
    September 2014
    July 2014
    June 2014
    May 2014
    April 2014
    March 2014
    February 2014
    November 2013
    August 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    January 2013
    December 2012
    November 2012
    October 2012
    September 2012
    August 2012

    Categories

    All

    RSS Feed

      Contact Form (Name is optional)

    Submit
Powered by Create your own unique website with customizable templates.