3D printing guides – Firmware basics

I’m Tom and today I’m going to give you
a very basic walkthrough of configuring uploading and debugging your 3D printers
firmware so the firmware controls basically every aspect on your
printer from step of control over heater management to the communication with the
printer host everything is handled by some part of the firmware
now a 99.9% of all printers the firmware runs on a atmega chip which makes a
Control Board arduino compatible so naturally we’re going to be using the
arduino environment to configure and upload the firmware if you don’t have
arduino installed yet head over to arduino.cc and download and install
the latest stable arduino software check the video description below for a link
so I kind of lied when I said the controllers are Arduino a compatible
for many of them especially the ones like the ramps where an actual Arduino
board is the basis of the controller you can use the Arduino environment just
lightly comes out of the box however for some boards like the sanguine or Lulu
the melty or the printer board you need to download a hardware configuration set
so that the Arduino software knows how to talk to the board you’ll find these
linked in the RepRap wiki or on the board’s manufacturers page once you get
the file close the Arduino software if you have it open and unzip the file you
downloaded into arduino sketch book folder on Windows and Mac that’s usually
documents Arduino on Linux it’s the sketchbook folder in your users home
directory inside you’ll find a folder called hardware when unzipping the files
make sure you end up with a folder named after your control board that in turn
has focused called bootloader cores and so on if you installed it correctly
you’ll now be able to select your board within arduino and upload firmware to it
so the firmware I’m going to be using is Marlin which is the most popular
firmware at the moment again check the video description for a download link to a
fresh copy of Marlin unpack the zip file and you’ll find the
Marlin.ino file which you can open with the arduino software since the
Marlin firmware is being very active developed some of the options might look
a bit different if you downloaded the new version still the basics aren’t
going to change so that’s what I’ll be covering in this video also if you’re
using a 3D printer kit or ready build printer check with the manufacturer of
your printer they might just have a pre-configured version for download then
you can either tweak to your heart’s content or use as a basis for a fresh
configuration so is the open up Marlin it will flood your Arduino software with
heaps of tabs the important one for now is configuration.h which contains
all the basic settings what is really important with these settings is that it
don’t change the punctuation or separated by commas or brackets unless
you know exactly what they’re doing if you’re unsure if you mess things up hit
the compile button up here and it will throw an error if things aren’t right so
as we work our way through the configuration file keep in mind that
there are a lot of settings in here that aren’t crucial to running your printer
so I’ll be skipping those and focusing on the ones that are really important
for getting your printer running for the first time the first important setting
in here is the baud rate which is the speed at which your printer communicates
with the host the default is 250.000 if you’re having trouble
connecting to your printer try 115200 instead but for now we’re just going to
leave that at 250,000 as you scroll down the next important setting is picking
the right board each of the popular boards has a number assigned to it and
all you need to do is enter that number down here and Marlin will use the proper
settings for that board I’m using a Melzi board so that’s number 63 the next
crucial setting is picking the right thermistors the thermistor is the
temperature sensor in your hotend and your heated bed most manufacturers will
tell you which thermistor they’re using for example E3D uses number five the
semitech thermistor so down here where it says temp sensor zero that
is the first hotend so we’re going to be saying temp sensor zero is number five
temp sensor one which will be a second hot end is not used so that’s zero and
if you have a heated bed you can also enter the thermistor using there so for
example if you’re just using a generic 100k thermistor you can use temperature
table number one so the next important block of settings
are the PID settings the block up here are the PID settings for your hotend if
you don’t know the KP KI and KD values you should be putting here leave them at
the defaults and run PID auto-tune this is the spot where you’ll be entering
those values that the PID auto-tune gives you next up is the bed temperature
control now the bed works a bit different to the hotend by default
Marlin doesn’t use PID for the bed and it’s just switching it on and off
depending on where the temperature is too high or too low to get a much better
and more stable temperature control you can enable PID for a bit now you do this
by uncommenting this line up here where it says define PID temp bed however you
should not be using PID if you’re driving your bed through a relay or a
solid state really if you’re using the default transistor the mosfet on your
control board there’s going to be absolutely no problem in using PID now
the same thing as with the hot end applies here if you don’t know KP KI and
KD values that work for your bed run Auto Tune and use the values that that
gives you so the next block of settings is the
endstops settings regular printers have X, Y & Z min endstops which means that the endstops are sitting at the zero position of each axis now this setting right here
tells the firmware whether or not the endstop is putting out an inverted
signal or not usually for opto endstops you can set these settings to true if
you’re using micro switches set them to false if you don’t know which setting to
use just leave them at true and try it out the max endstops are normally not used
so we can just ignore those settings for now now the invert X Direction invert Y
direction and invert C Direction settings don’t matter much if your axis
is moving in the wrong direction you can just flip the motor connector around so
we’re just going to set all these to false for now and adjust the direction
with the motor connector so the next setting the x y&z Max positions are
going to tell the firmware how large your printer is so by default this is
set up for a Mendel or Ultimaker size printer where X Y and Z are about 20
centimeters long for now we’re just going to leave it at 200 millimeters
since that is a really common size next up is our bed leveling that is an
advanced feature and not crucial to running your printer for the first time
so so that’s going to be a separate video and the next block of setting that
sits interesting is the movement settings and the setting in here that is
most important is the default access steps per unit this is the steps per
millimeter settings that is often talked about so the values in here are
basically X Y Z & E for the extruder and what they
tell the firmware is how many steps it needs to send to the stepper driver and
motor to get one millimeter of movement out of the axis for X Y and Z use Prusas
calculator to get proper values the extruder steps per millimeter however
should be calibrated so as a basic starting value for a geared extruder use
500 steps per millimeters for a direct drive extruder or use 250 millimeters and then
do a calibration next up is the max feed rate which is the maximum speed your
printers axis will be able to run it so the default settings in here are set up
really fast almost none of the common printers can do 500 millimeters per
second so we’re going to reduce that to 200 for now again this is X this is Y
and this is the Z-axis if you have a regular lead screw driven Z-axis use 3
millimeters per second for now the next line is the max acceleration for each
axis that is the speed at which the axis accelerates at so again the defaults are
set fairly high 9,000 millimeters per second squared is something that an
Ultimaker can achieve but it’s going to be almost impossible for a regular
printer to manage so an acceptable value for these are 3000 millimeters per
second squared if you find that your printer starts skipping steps during
small moves reduce the acceleration for that axis if it’s skipping steps on
longer moves reduce max feed rate so the next setting down here is the default
acceleration which is the acceleration of the nozzle itself across the bed and
the retract acceleration does the same thing but for retracts you can leave
those at the default so as we’re scrolling down there is one more setting
that the Marlin firmware is known for and that is the jerk setting the default
of 20 is again set fairly high setting of 15 or 18 will give you fairly
nice prints at regular speeds if you’re printing really fast you should probably
also increase the jerk again keep in mind that that might lead to your
printer skipping steps so that’s basically it as it’s going down you’ll
find a couple more settings for LCD and encoder support and so on but again
those are not crucial to printing those are comfort features so we’re just going
to leave them as they are for now so that’s the very basic configuration but
wait there’s more there is one more setting that you really should enable
and that’s hidden in the configuration_adv.h file which is the
advanced configuration and that setting is the heating sanity check that’s
setting make sure that in the case of your thermistor failing or falling out
of the hotend it doesn’t melt your hotend or set your printer on
fire because it’s overheating so to enable that you move the comments here
and in the next line and that will be a basic but really effective protection
for your hotend so the filament is ready to be uploaded at this point
connect your control board via USB make sure you select the right serial port
and hit upload the firmware will compile and the Arduino software will upload it
to the board wait till the LED stop flashing and the Arduino says upload
completed now your board is basically ready to use here’s a couple of basic
checks that you can do to make sure you don’t have any major errors in the
configuration before you power up your 12 or 24 volt power supply connect to
the board with your RepRap host software and check that the temperatures
it’s reporting a plausible if not you probably selected the wrong thermistor
as you turn on the power supply make sure that the temperature is don’t start
rising on their own and that no part of the control board starts cooking when it
passes that test used to host to move each axis by a bit and check that it
moves in the right direction keep in mind that the movements are taken from
the nozzle relative to the bed so if you have a moving bed and move y positive the bed
should move towards you use the right hand rule to get a basic idea of which axis
has its positive direction at which end hold your right hand out like this and
from your point of view this is X this is Y and this is Z positive when you’re
looking at the printer from the front if an axis only moves in one direction you
probably have the endstop inverted sitting wrong if it always moves in the
wrong direction flip the motor connector around after
turning the power off or invert the axis in Marlins config next check the end
stops functionality by homeing one axis at a time but keep a finger on the power
switch if the axis starts moving away from the end stop the home direction is
set wrong when the axis moves towards the end stop try stopping it by
triggering the end stop by hand so that the axis doesn’t crash into the end stop
is something else to setup wrong if the axis doesn’t react to the end stop when
homing you probably have it hooked up to the wrong axis sending m119 to your
printer will tell you which endstop you’re actually triggering at the moment
now before you start printing anything you should also calibrate your extruder
if you use an estimate steps per millimeter value in the config also set
your Z endstop if you haven’t done so already and you should be able to get
your first print up so that’s basic process of getting mall and running on
your board I hope this video helped you getting started so as always please like
and subscribe and let me know in the comments what do you like to see next

79 Replies to “3D printing guides – Firmware basics

  1. Boy oh boy oh boy -at last someone who talks about the salient basics from start to finish without waffling [and with an accent I can understand and listen to], so thank you very much I am in debt to you. Long may you continue. Cheers!

  2. Thanks for the video Thomas.

    I have a doubt, you speak about calibrating the extruder but, what about the x, y and z axis?

    Would you advise calibrating them or just the extruder?

    Thanks in advance!

  3. This was very helpful Tom. Great tip for the prevention of the hotend critical meltdown. Keep up the great work.

  4. what is this error 
    Marlin_main.cpp:321: error: redefinition of 'float delta [3]'
    Marlin_main.cpp:294: error: 'float delta [3]' previously defined here

  5. Hi Thom great videos, they are really helpfull, I have a problem, I bought I kit to buil a 3D printer and it came with 2 little lightblue thermistors, from witch i cant find any info, is there a way to find out how to choose the right one on Marlin? and one more thing please, do i have to use a pull up circuit?

  6. Hi thomas. Question…is this video made for ultimaker settings or does it work in general for any printer, including homemade ones?

  7. Hey Thomas, I have an other problem and i cant find info in the internet, i hope you could help me, i bought mechanical endstops from makergeeks.com, they are those with a pcb, led, etc, this end stops come with a 3 pin conector, which I know is signal, gnd and V, if i conect it to the ramps 1.4, what changes do i have to make in marlin? most tutorials i find are for no pcb mechanical end stops with only 2 cables, so i dont know if i have to inver something, coment a line or what, specially the pull up resistor, i dont know if i should use it or not, im crosing my fingers hopping that you can help me

  8. Tom, love your video's, keep 'em coming.  Haven't gotten to all of them yet but am sure I will.  Just ordered a kit for a small printer that I know does not have end stops at all.  The research I've done to this point says bad things can happen if you hit the home button.  Is there a different set of setup things to do if you have no endstops?

  9. Hi Thomas, Thanks for your great videos.
    Recently none of the Marlin links are working 🙁 How can I get the same version back?

  10. Thanks Tom, great video.
    I have a question related to the firmware. I have a printer that uses a Gen6 dirver board and want to know which are the actual firmware settings it has loaded in, so that I can then do some adjustments and re load it.
    Thanks a lot.

  11. Hi Thomas. Thanks for the vids! They are very helpful! I have a ROBO 3D and I installed the E3D hotend. Now I want to update the firmware so I can change the temp settings for higher temps. I downloaded the latest firmware and Arduino software, then I followed your recommendations. I tried to compile but I got errors. I then deleted everything and tried again and tried to compile fresh before changing anything, then I received the error I'm writing about.
    I was wondering if you, or any of the viewers could help me with an arduino compiling issue? Here is a short list of the error report. I can provide the who report if needed.  Thanks.

    C:UsersPROMET~1AppDataLocalTempbuild1753382659974608065.tmpMarlin_6_10ultralcd.cpp.o: In function `menu_edit_long5()':

    C:UsersPrometheusDocumentsArduinolibrariesMarlin_6_10/ultralcd.cpp:901: multiple definition of `menu_edit_long5()'

    C:UsersPROMET~1AppDataLocalTempbuild1753382659974608065.tmpultralcd.cpp.o:C:UsersPROMET~1AppDataLocalTempbuild1753382659974608065.tmp/ultralcd.cpp:901: first defined here

    C:UsersPROMET~1AppDataLocalTempbuild1753382659974608065.tmpMarlin_6_10ultralcd.cpp.o: In function `lcd_buzz(long, unsigned int)':

    C:UsersPrometheusDocumentsArduinolibrariesMarlin_6_10/ultralcd.cpp:233: multiple definition of `lcd_status_update_delay'

    C:UsersPROMET~1AppDataLocalTempbuild1753382659974608065.tmpultralcd.cpp.o:C:UsersPROMET~1AppDataLocalTempbuild1753382659974608065.tmp/ultralcd.cpp:233: first defined here

    collect2: error: ld returned 1 exit status

    Error compiling.

  12. Marlin is still hosted at Github, but the links have changed from ErikZalm/Marlin to MarlinFirmware/Marlin. https://github.com/MarlinFirmware/Marlin

  13. Newbie here – I've loaded Arduino and installed my Sanguinololu hardware in the directory. My printer is already running good, but I'd like to load my firmware file from the printer into Arduino and have a copy of it for reference. How do I load the file from printer to Arduino?

  14. If you have a delta printer, do not follow this guide. I learn it the hard way. However his is a good video guide for Prusa type. Good job

  15. How do you fix the "okokokokokokokokokokokokokokokokok…" thing when hooking up to pronterface and octopring? I just want 1 ok

  16. I'm having an issue with firmware my printer will move one direction but not the other direction, this is on all axis. this is through pronterface. it's not limited to ramps 1.4 and does the same an azteeg x3, from my test code run on both boards it run in both directions on all axis. any suggestions on what it is, thank u. I would appreciate it

  17. I keep getting this error (pasted at the bottom of comment). I am fairly technically inclined, but I cannot decipher this at all, nor know how to correct this error. Could anyone possibly help me solve this error and get my printer running again? Any advice is appreciated! I'm using a Macbook Pro, and my printer is a Geeetech Prusa i3 Dual Extruder. I was able to use my printer for close to 2 months and the extruders stopped feeding filament. I've gone through some troubleshooting procedures and found that the nozzles are not plugged and the motors work fine. After searching forums on Geeetech's website, they told me to reinstall Marlin to the GT2560 board, and here we are with this error. Again any advice is truly appreciated!

    sketch/temperature.cpp: In function 'void manage_heater()':
    sketch/temperature.cpp:665:1: error: unable to find a register to spill in class 'POINTER_REGS'
    sketch/temperature.cpp:665:1: error: this is the insn:
    (insn 98 97 100 4 (set (reg/v:SF 103 [ pid_input ])
    (mem:SF (post_inc:HI (reg:HI 146 [ ivtmp.209 ])) [4 MEM[base: _110, offset: 0B]+0 S4 A8])) sketch/temperature.cpp:449 99 {*movsf}
    (expr_list:REG_INC (reg:HI 146 [ ivtmp.209 ])
    sketch/temperature.cpp:665: confused by earlier errors, bailing out
    Error compiling.

  18. Good tutorial i got a question can you help me with my solidoodle 2 settings with a E3d hot-end v6, i know is to much to ask but if you can send me the Marlin Configuration.h already configure so i can flash my solidoodle 2 please and Thank you.

  19. Hi Thomas. When i need to choose an electronic board, i don`t find the apropiate for the clone of mightyboard (makerbot Replicator 1). There is an equivalent? I would appreciate it. Daniel

  20. Hi TOM i'm having some problem with my Z axis it keep running into the print i'm using a M5 threaded rod and nema17 motors please help

  21. Awesome!!!! Great help for us newbies. Thanks for taking the time to help us. World Peace through liking each other!!!!

  22. Can't print on wanhao i3 printer went through all the steps took a print from thingiverse G code it throu slir3r on sdcard and it won't print why

  23. I need help please I got wanhao i3 duplicator and printed a few thing now it won't print do you have any suggestions it does a dry run but no print it heats up and all is there any thing too do when down load prints from thingiverse I run it throu slicer throu cura loaded it on sdcard into printer and nothing do you have any suggestions I'm desperate here please I got like 700 into this thing I would like to see a print something again I only got four prints and they were shitty please [email protected] or Tex me 250-644-0900

  24. can somebody help me ? i cant install the drivers for the melzi board, if i folow the instructions and copy the sanguino folder in the hardware folder, it cant seem to find the drivers. it cant find the boards and the programmers txt files. if i copy those in the subfolders it finds it, but 4 times. 🙁

  25. Nice video, It's kinda too basic sometimes and I feel like You have much more to say about things but I guess that's fine for people not into technical details so much.
    Great to have some go to resource to help.

  26. Can you do an update for Delta printers? For example just explain things that are different and delta specific things.

  27. Thomas Sanladerer, I looked but couldn't find a video for help, so I figured I'd ask. Do you have one on setting us dual extruders (want to add 1 along the X axis).

  28. Hello! really likeing your vides. atm im building a 3d printer, cnc hybrid on desktop size. its a very cool project and i learn a lot about everything. but i ahve 1 qeution. the EEPROM fucntion. it Maximum feedrates,
    Maximum Acceleration etc etc. you know what i mean. But what if i just dont wanne use it for 1 time? Does my program made by ultimaker override those settings? or do i need to turn off the peorm that sesion? i hope you understand what i mean and u can help me out with this!.

  29. Thomas Sanladerer – excuse my ingueles … I have a problem I think is the marlinRC December 2015 firmware … once installed … could set the X and Y axis Z axis can not configure firmaware … any value that goal in the #define DEFAULT_AXIS_STEPS_PER_UNIT 80,63.36,2560.00,500 {} Z axis always rises 10 cm should be 10 mm … why?
    when I do a simulation printing …. extruder asenta on the table … I set with G92 X0 Y0 Z0 in the middle of the table … the print never goes to the middle of the table.

    My endstop are induction to get to test the G29 table I had to do it in the marlin setting … inhibit defines ENDSTOPPULLUPS

    // Coarse Endstop Settings
    // #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the pullup resistors endstop

      // Fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
      // #define ENDSTOPPULLUP_XMAX
      // #define ENDSTOPPULLUP_YMAX
      // #define ENDSTOPPULLUP_ZMAX
      // #define ENDSTOPPULLUP_XMIN
      // #define ENDSTOPPULLUP_YMIN
      // #define ENDSTOPPULLUP_ZMIN

    this has some influence with Z axis?

  30. +Thomas Sanladerer How do I add a thermistor to the list? I bought a screw in modular thermistor called EPCOS 100K Thermistor B57560G1104F. I don't see it on the list. I tried using the default of 1 on the list, but when I start to print and the extruder heats up as it does the auto leveling it stops. Then the extruder temperature starts falling. I have a robo 3d R1 version.

  31. thomas, link to part 2 is broken, it should have been: https://www.youtube.com/watch?v=In93vVd1WDQ but google "trimmed" it…

  32. Nice job. Thanks. You mention sending commands, like "M119" and others. Is this a Linux console command? is there a file with a list of the commands?

  33. Your subtitles are weird for this video. haven't noticed any dramas with your other videos though… so far.

  34. Is there a difference in the settings between a Delta printer or others? What changes should be made or what things should be different? Thanks!

  35. What we need is a instruction video that treats us as if we just baught the printer and we are learning fir the first time how the printer works and how to write the code we need to the firmware.

    Every video I have seen acts like we are already experts, if we were we would not be watching the videos!

  36. how would I find which thermister i have for the heated bed as it was not listed in the kit I purchased. I tried setting 1 and 3 in Marlin without any luck. BTW thanks for the videos I have used your videos to build and understand my scratch built 3D printer.

  37. My printer manufacturer has provided me with a super old, pre configured version of marlin. It is quite old, and causes issues when I try to set up auto bed leveling. Is there anyway I can update my marlin version without making a completely fresh file based on the original? I thought I saw somewhere that you can put an old configuration.h with a new everything else.

  38. Can I use Merlin without a heated bed (I'm planning on building 90*90*90 cm print area printer) and only going to print PLA. Will be using Ramps 1.4. A question about using LCD-can I just plug the wires in or I will have to install/configure anything? Thank you, Thomas, for making such helpful videos!

  39. I can't get the host to control my printer. I've used 3 different host and was able to get each of them to connect but when I went to move the axis nothing. The board is a GT2560 from Geeetech and I'm running Windows 10. I had to use 115200 instead of the 250000 Geeetech recommended because I wasn't given the option to use 250000 when I changed the properties of COM6. Any help or insight is appreciated.

  40. hi Tom I m shashi from India . I want to know if I use 5mm pitch lead screw instead of 2mm pitch then which setting I have to change and how to calculate

  41. Why? I keep asking everyone WHY people must "upgrade" the OEM firmware? What is wrong with it? I wrecked my Tarantula controller because I listened to the "community".

  42. Tom. You mention using Repetier host after your firmware download. Is that purpose to view g-code? Is it necessary to download?

  43. If you turn on Arduino IDE line numbers we can follow along easier. Thanks for all the great videos – your doing it all right.

  44. Tom I know that this is not the place to ask but i need your help… I have been printing for 2 years and have cut my teeth on many printers I value your videos and have created a 3d printing business. But im stumped on this error. I have a printer that makes harry bottom / stringy bottom layer I have 52 printers running full time it's not a clog or PTFE tube issue or belt I have replaced the head extruder throat and it does this with all filliment. I can take the code to another printer and it prints fine… I have increased the retraction with no luckThe printer is a wan hao Plus. with the touch screen. . Helppppppp! I really dont want to trash it i would like to figure out the issue.

  45. I got a instone inventor pro desktop 3d. Everything work great until I download and install new firmware. But I think I should not update parameters. Now the extruder showing sensor error or power is not enough. 2 problems is when I manually move XYZ it goes wrong direction so I figured out on parameters note I changed I1 instead I-1 then it going the right direction but when I level it. X go to home but it doesn’t stop when it hit the switch then keep goging. I gues it will do the same on Y and Z. How do I change the parameters back.
    Does anyone can share the infor when it homing to see the actual # XYZ to set max limits or minimum limits or how to get all parameters back.
    Please help help

Leave a Reply

Your email address will not be published. Required fields are marked *