Jump to content

  • Log in with Facebook Log in with Twitter Log in with Windows Live Log In with Google      Sign In   
  • Create Account

Photo

How to configure Marlin Firmware yourself? Heated print bed problem

marlin heated bed

  • Please log in to reply
33 replies to this topic

#1 isphording90

isphording90

    Member

  • Members
  • PipPip
  • 44 posts
  • LocationGermany

Posted 21 April 2013 - 08:56 AM

Hi there,

 

at the moment I'm building a heated bed for my ultimaker. But Daids Marlin Builder ist not working at the moment and I don't really know how to configure the Firmware myself and install it on the ultimaker.

 

Is there anyone who has a Tutorial for that or or can tell me how to do this?

What I already know is that I can install firmware through Cura but don't know where to change the code and how to compile it to make it installable...

 

I have the newest electronics (1.5.7) and used an epcos 100k thermistor.

Or is there even someone who already has a working Marlin build for a heated bed with an epcos thermistor and would share it with me?

I have never done something like this and would be very greateful for any kind of help!

 

Regards,

Lukas

 



#2 isphording90

isphording90

    Member

  • Members
  • PipPip
  • 44 posts
  • LocationGermany

Posted 21 April 2013 - 09:20 AM

I already installed the arduino 0022 version like told in the wiki and downloaded the source code from

https://github.com/ErikZalm/Marlin

 

But now i don't know how to continue? What do I have to change in the code? Do i have to upload the new firmware through arduino like said in the wiki or can I also somehow compile it as a hex file and install it via cura?



#3 illuminarti

illuminarti

    Moderator

  • Moderators
  • 2,734 posts
  • LocationMemphis, TN.
  • Printer(s):Ultimaker², Ultimaker Original

Posted 21 April 2013 - 05:20 PM

If you have the arduino software installed, then you need to find the 'Makefile' inside of the inner Marlin directory, and read and edit the start of that. Set the motherboard to type 7, and set the Arduino install path, avr tools path, and arduino version. 

 

Then from a command prompt, if you change into that Marlin directory, and then type 'make' it should compile the firmware. You'll be left with a .hex file in the applet subdirectory.  You an then use cura to upload that firmware as a custom hex file.

 

To get the settings you want, you will need to edit the configuration.h and possibly configuration_adv.h files. In spite of what the wiki says, you might be better off starting from the Ultimaker/Marlin fork on github - it has more Ultimaker friendly settings as the default.

 

If you do use the ErikZalm version (which is the official 'any printer' version of Marlin, and so may have a few non-ultimaker-relevant updates, and non-ultimaker default settings) at the very least you will want to uncomment a line in order to enable the Ulticontroller if you have one (see the latter stages of a google group discussion yesterday: https://groups.googl...7w/ssStjjfTJrAJ )



#4 gr5

gr5

    Ultimaker User

  • Moderators
  • 4,991 posts
  • LocationBoston
  • Printer(s):UM Original, Ultimaker²

Posted 21 April 2013 - 07:13 PM

configuration.h is pretty easy to edit but to be sure to get it right, I recommend grabbing a few.  Get the one from github/ultimaker/marlin and try to use daid's web page to create one (configuration.h).  Then compare the 3 configuration files, plus read it and I think it's pretty clear what you want to do.

 

Also look at the thermistertables .h file to make sure you have the right thermistor selected.  It's pretty simple.

 

You can use illuminarti's command line "make" method above or you can use only the IDE (the gui) and do it that way.  If you google "how to build marlin for arduino" or something similar, there are detailed directions.

 

Oh - daid's page is here - only use it for configuration.h:

http://daid.mine.nu/...d/marlin_build/



#5 isphording90

isphording90

    Member

  • Members
  • PipPip
  • 44 posts
  • LocationGermany

Posted 21 April 2013 - 08:14 PM

I downloaded the source from https://github.com/Ultimaker/Marlin but can't find a Marlin.pde file to open the project in arduino? Is that correct?



#6 isphording90

isphording90

    Member

  • Members
  • PipPip
  • 44 posts
  • LocationGermany

Posted 21 April 2013 - 09:33 PM

Never mind, I found a version with the Marlin.pde file. But when I compare the configuration.h file from github with the one from the broken builder than there are things I can't find. For example: #define THERMISTORBED 6 is from the broken builder but is not in the version from github.

 

The only thing I really found was that I have to change

#define TEMP_SENSOR_BED 0 to #define TEMP_SENSOR_BED 6.

 

Is that correct? I'm really just asking this much because I don't want to do something wrong and harm my ultimaker... :oops:



#7 TigrouxMaker

TigrouxMaker

    Member

  • Members
  • PipPip
  • 15 posts

Posted 22 April 2013 - 09:26 AM

This is strange...

 

When i generate the config file i got :

 

#define TEMP_SENSOR_BED 1
#define BED_USES_THERMISTOR
#define THERMISTORBED 1

 

For an 100k thermistor...

 

See ya.



#8 vincentp

vincentp

    Member

  • Members
  • PipPip
  • 31 posts

Posted 22 April 2013 - 02:43 PM

I'm in the same situation, I'm going to try the above.

 

However, I didn't see defined on WHICH temp sensor input the heated bed is defined ? ultimaker wiki suggests that you can use either temp sensor input #2 or #3, is there one set by default in the firmware ? or something to change in the config.h file ?

thanks !



#9 isphording90

isphording90

    Member

  • Members
  • PipPip
  • 44 posts
  • LocationGermany

Posted 22 April 2013 - 08:55 PM

@TigrouxMaker

If you read the Configuration.h file there is a commented part with a table with all numbers for the thermistors. There you can read that 1 (as in #define THERMISTORBED 1) stands for 100k thermistors. So nothing strange there. For a 100k thermistor the settings are ok.

 

 

@ vincentp

If you don't want to change anything to the firmware than you have to use sensor input #3 for the heat bed (as shown in the picture in the ultimaker wiki). Sensor input #2 is made for a second extruder.



#10 gr5

gr5

    Ultimaker User

  • Moderators
  • 4,991 posts
  • LocationBoston
  • Printer(s):UM Original, Ultimaker²

Posted 23 April 2013 - 02:53 AM

@TigrouxMaker

If you read the Configuration.h file there is a commented part with a table with all numbers for the thermistors. There you can read that 1 (as in #define THERMISTORBED 1) stands for 100k thermistors. So nothing strange there. For a 100k thermistor the settings are ok.

 

No!!!  "6" is also a 100k thermister and that is the epcos one.



#11 isphording90

isphording90

    Member

  • Members
  • PipPip
  • 44 posts
  • LocationGermany

Posted 23 April 2013 - 06:57 AM

Quote from configuration.h:

 

//===========================================================================
//=============================Thermal Settings  ============================
//===========================================================================
//
//--NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table
//
//// Temperature sensor settings:
// -2 is thermocouple with MAX6675 (only for sensor 0)
// -1 is thermocouple with AD595
// 0 is not used
// 1 is 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
// 2 is 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
// 3 is mendel-parts thermistor (4.7k pullup)
// 4 is 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
// 5 is 100K thermistor - ATC Semitec 104GT-2 (Used in ParCan) (4.7k pullup)
// 6 is 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup)
// 7 is 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup)
// 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup)
// 9 is 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup)
// 10 is 100k RS thermistor 198-961 (4.7k pullup)
//
//    1k ohm pullup tables - This is not normal, you would have to have changed out your 4.7k for 1k
//                          (but gives greater accuracy and more stable PID)
// 51 is 100k thermistor - EPCOS (1k pullup)
// 52 is 200k thermistor - ATC Semitec 204GT-2 (1k pullup)
// 55 is 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan) (1k pullup)

 

 

 

So you can use both 1 and 6 for the epcos. 1 is intended for other (normal?) thermisters but also for the epcos. Its the preffered table alo for the epcos because its more accurate in its readings.

You can also use 6 for the epcos (this one is only for the epcos) but the readings wont be as accourate as they would be if you choose 1.



#12 vincentp

vincentp

    Member

  • Members
  • PipPip
  • 31 posts

Posted 23 April 2013 - 07:31 AM

thanks a lot

 

I'm having issues compiling with arduino.

 

I took the ultimaker branch archive, copied the source code in my arduino subdir. Edited a few things for the heated bed in the configuration.h file (really a few things).

Renamed the ultimaker-main file to .ino

opened it with arduino 1.01

 

compiled, got errors. Any ideas ? missing a file / dir location ???

The SPI and liquid crystal libs are part of arduino, so including them with #include should find them but I have a no go with LCD class.

In file included from ultralcd.cpp:27:
ultralcd_implementation_hitachi_HD44780.h:27: error: 'LiquidCrystal' does not name a type
/ultralcd_implementation_hitachi_HD44780.h: In function 'void lcd_implementation_init()':
ultralcd_implementation_hitachi_HD44780.h:113: error: 'lcd' was not declared in this scope
/ultralcd_implementation_hitachi_HD44780.h: In function 'void lcd_implementation_clear()':
ultralcd_implementation_hitachi_HD44780.h:126: error: 'lcd' was not declared in this scope
/ultralcd_implementation_hitachi_HD44780.h: In function 'void lcd_printPGM(const char*)':
ultralcd_implementation_hitachi_HD44780.h:134: error: 'lcd' was not declared in this scope
/ultralcd_implementation_hitachi_HD44780.h: In function 'void lcd_implementation_status_screen()':
ultralcd_implementation_hitachi_HD44780.h:194: error: 'lcd' was not declared in this scope
/ultralcd_implementation_hitachi_HD44780.h: In function 'void lcd_implementation_drawmenu_generic(uint8_t, const char*, char, char)':
ultralcd_implementation_hitachi_HD44780.h:305: error: 'lcd' was not declared in this scope
/ultralcd_implementation_hitachi_HD44780.h: In function 'void lcd_implementation_drawmenu_setting_edit_generic(uint8_t, const char*, char, char*)':
ultralcd_implementation_hitachi_HD44780.h:327: error: 'lcd' was not declared in this scope
/ultralcd_implementation_hitachi_HD44780.h: In function 'void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t, const char*, char, const char*)':
ultralcd_implementation_hitachi_HD44780.h:349: error: 'lcd' was not declared in this scope
/ultralcd_implementation_hitachi_HD44780.h: In function 'void lcd_implementation_drawedit(const char*, char*)':
ultralcd_implementation_hitachi_HD44780.h:400: error: 'lcd' was not declared in this scope
/ultralcd_implementation_hitachi_HD44780.h: In function 'void lcd_implementation_drawmenu_sdfile_selected(uint8_t, const char*, const char*, char*)':
ultralcd_implementation_hitachi_HD44780.h:414: error: 'lcd' was not declared in this scope
/ultralcd_implementation_hitachi_HD44780.h: In function 'void lcd_implementation_drawmenu_sdfile(uint8_t, const char*, const char*, char*)':
ultralcd_implementation_hitachi_HD44780.h:434: error: 'lcd' was not declared in this scope
/ultralcd_implementation_hitachi_HD44780.h: In function 'void lcd_implementation_drawmenu_sddirectory_selected(uint8_t, const char*, const char*, char*)':
ultralcd_implementation_hitachi_HD44780.h:454: error: 'lcd' was not declared in this scope
/ultralcd_implementation_hitachi_HD44780.h: In function 'void lcd_implementation_drawmenu_sddirectory(uint8_t, const char*, const char*, char*)':
ultralcd_implementation_hitachi_HD44780.h:475: error: 'lcd' was not declared in this scope
/ultralcd_implementation_hitachi_HD44780.h: In function 'void lcd_implementation_draw_line(uint8_t, const char*)':
ultralcd_implementation_hitachi_HD44780.h:503: error: 'lcd' was not declared in this scope


#13 vincentp

vincentp

    Member

  • Members
  • PipPip
  • 31 posts

Posted 23 April 2013 - 08:37 AM

fixed (sorry). Couple of things, sorry if it's been detailed elsewhere, I'm trying to find a straight forward way to compile the source code without making a arduino specific (at least not too much) version of it. This is supposed to help people like me which are make-impaired (windows based env.)

 

issue with the LCD lib : for some reasons, having the lib included where it's requested isn't enough to have the cpp file compiled. Various articles I've read this morning say that you need to request it in the main file (sketch).

 

Therefore, I took the inclusion code from ultralcd_implementation_hitachi_HD44780.h and copied it in the marlin.ino file, right after the inclusion of the SPI code. This worked and forced the compilation of the LiquidCrystal class.

I suppose we could get the same result using a #include "LiquidCrystal.h" (with quotes) with a local lib along with the rest of the source code but that would kill the link with the stock arduino lib I suppose (dirty fix).

 

I suppose that the following code has to be added after marlin.h is parsed as it includes configuration.h where you can definde the language of your choice.

#if DIGIPOTSS_PIN > -1
#include <SPI.h>
#endif

#if LANGUAGE_CHOICE == 6
#include "LiquidCrystalRus.h"
#define LCD_CLASS LiquidCrystalRus
#else
#include <LiquidCrystal.h>
#define LCD_CLASS LiquidCrystal
#endif


#14 isphording90

isphording90

    Member

  • Members
  • PipPip
  • 44 posts
  • LocationGermany

Posted 23 April 2013 - 02:23 PM

I downloaded the firmware from: https://github.com/U...timaker/Marlin  (branch: Marlin_v1)

 

There is nor Marlin.pde in the marlin directory so I can not open it directly in Arduino. Is that correct?

 

I opened the makefile and changed the beginning:

 

 

 

# This defined the board you are compiling for (see Configuration.h for the options)
HARDWARE_MOTHERBOARD ?= 7

# Arduino source install directory, and version number
ARDUINO_INSTALL_DIR  ?= Users/IsphordingDesign/Applications/Arduino
ARDUINO_VERSION      ?= 22

# You can optionally set a path to the avr-gcc tools. Requires a trailing slash. (ex: /usr/local/avr-gcc/bin)
AVR_TOOLS_PATH ?= /Users/IsphordingDesign/Desktop/Marlin-Marlin_v1/ArduinoAddons/Arduino_0.xx/hardware/tools/avr/etc

#Programmer configuration
UPLOAD_RATE        ?= 115200
AVRDUDE_PROGRAMMER ?= arduino
UPLOAD_PORT        ?= /dev/arduino

#Directory used to build files in, contains all the build files, from object files to the final hex file.
BUILD_DIR          ?= applet

 

Now when i get into the marlin directory with the makefile in it and type "make" I get this error message:

 

make: *** No rule to make target `applet/wiring.o', needed by `applet/Marlin.elf'.  Stop.

 

Have I done something wrong? Did I downloade the wrong marlin brand from github? I'm a little desperate at this point so any kind of help will be highly appreceated.



#15 illuminarti

illuminarti

    Moderator

  • Moderators
  • 2,734 posts
  • LocationMemphis, TN.
  • Printer(s):Ultimaker², Ultimaker Original

Posted 23 April 2013 - 06:37 PM

Here's the relevant section of my makefile (this is on a Mac - but it should be more or less the same for you):

 

# This defined the board you are compiling for (see Configuration.h for the options)

HARDWARE_MOTHERBOARD ?= 7

 

# Arduino source install directory, and version number

ARDUINO_INSTALL_DIR  ?= /Applications/Arduino.app/Contents/Resources/Java

ARDUINO_VERSION      ?= 23

 

# You can optionally set a path to the avr-gcc tools. Requires a trailing slash. (ex: /usr/local/avr-gcc/bin)

AVR_TOOLS_PATH ?= /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/

 

 

Notice that the avr tools path is under the Arduino application, not part of the project structure. Also, I'd be inclined to get the older 0023 version of the tools and use that - that's what the instructions reference, and I'm not sure if the code as-is will compile for the 1.x series Arduino tools (I've never tried, because the older one works fine).



#16 isphording90

isphording90

    Member

  • Members
  • PipPip
  • 44 posts
  • LocationGermany

Posted 23 April 2013 - 07:52 PM

Now it works! Thank you very much! :D

Now I get a bunch of files in the applet folder. Do I only use the hex file for the upload through cura?



#17 illuminarti

illuminarti

    Moderator

  • Moderators
  • 2,734 posts
  • LocationMemphis, TN.
  • Printer(s):Ultimaker², Ultimaker Original

Posted 23 April 2013 - 08:04 PM

Yes, just the hex file.



#18 gr5

gr5

    Ultimaker User

  • Moderators
  • 4,991 posts
  • LocationBoston
  • Printer(s):UM Original, Ultimaker²

Posted 23 April 2013 - 08:10 PM

Yes, you only need the hex file.

 

You can use Cura or other software.  I think I used pronterface but they both do it.  Also I think the arduino IDE can possibly do it also.

 

It's strange you had to do all this stuff.  I didn't have to do any of it.  I just followed the build instructions on some website - it was basically just a few button clicks.  No editing.  Not sure why you had to do so much editing.

 

My only editing was Configuration.h.

 

I think I might have followed these directions:

http://reprap.org/wi...nd_compilation:



#19 isphording90

isphording90

    Member

  • Members
  • PipPip
  • 44 posts
  • LocationGermany

Posted 23 April 2013 - 08:46 PM

I also went that way with the Arduino IDE, just changed the configuration.h file and uploaded directly through arduino. But I had a problem that with the new firmware the feeder-stepper motor didn't work properly anymore and was very loud. Changed back to the default firmware and the problem was gone. Now I wanted to compile the firware first as an hex file via "makefile" and then upload through cura to see if the problem is still there.

 

From where did you download the source-code? From ErikZalm or from Ultimaker on gitHub? If you downloaded from ether one from github, which brand did you download? There is just too much you can choose from that its quiet dificult for someone new to this all to download the "right" one... :/



#20 isphording90

isphording90

    Member

  • Members
  • PipPip
  • 44 posts
  • LocationGermany

Posted 23 April 2013 - 10:03 PM

I got it working now to compile the hex file and upload it via cura. But just like before with the new firmware the stepper driver from the feeder is very loud and misses steps while retraction so that almost no filament gets extruded. What happened there? I just changed the hardware to 7 (Ultimaker) in config.h and left everything else!

 

What do I have to do to get it right? :/







Also tagged with one or more of these keywords: marlin, heated bed