Firmware

The main board of a printer has a computer on it. The firmware is the program that runs on it and controls the printer.

You compile the firmware on some other computer, take statements about things like what thing on the board controls a fan, and produce a program, tailored for the printer, that will control stuff. Then you take that binary file, not intended for humans, and flash it on to the printer. Now next time the printer starts it will read the firmware you just flashed and use it.

The firmware came from a compile of some statements. Those statements say that #4 supplies power and controls the speed of the part cooling fan. If the firmware gets a gcode command to spin the fan at 80% it will send the command to #4. If, on this board, #4 controls the extruder things will not be good. A printer can come with board A where #4 controls the fan. You could replace A with B cause B is supposed to be better but on B #5 controls the fan and #4 does the extruder. Not usually a problem cause you put new firmware on that was compiled from statements that said #5 controls the fan so when you get the same gcode command to spin the fan at 80% the command goes to #5 and things are fine.

There are whole bunches of things for a specific printer in the firmware. For example the size of the bed, how to figure out where the bed is, and a whole lot more.

Most printers will have available some already compiled firmwares. A printer might have one firmware that uses a switch to find Z0 and another firmware that uses an ABL probe to find Z0. If you take your printer and add the ABL probe you then will have to flash the firmware that uses the ABL. The firmware from the manufacturer for the ABL probe will have the X and Y offset if you use the standard mounting hardware. If you used stuff of your own design those values in the firmware are probably wrong and the manufacturer will not have matching firmware. You have to take the statements, set you X and Y offsets, and compile your own firmware and flash that.

This can get real complicated. Different printers have different requirements for the names of firmware, the SD cards the binary files are on, and a lot more. I can not help in specific instances. I can not tell you where to find firmware you want. I can not tell you how to compile firmware. I can not tell you how to load firmware on your printer. Please do not ask me and make me feel bad when I tell you no.

Sources

Most printers have firmware from two sources, Marlin and Klipper. Both of these are open source and are available for free. The source is available and, I have no idea why, can be modified by you.

Some printers, I’m looking at you Bambu, have firmware that is proprietary. Marlin and Klipper will not work. If you flash one of them you will have a rather large paperweight.

Marlin is “simpler”, runs on the board in the printer, and just reads gcode and makes the printer do stuff.

Klipper is “more complex” and usually runs on the board in the printer and another computer. This is because the board in the printer is inexpensive and does not have the compute power to do all the stuff Kliper wants. The other computer is usually a raspberry pi or a proprietary thing that is a lot like a raspberry pi. The other computer usually runs a web server for Mainsail or some other thing whose name escapes me. This web server exposes a bunch of stuff for the user, like the ability to move the head and information about the printer like temperatures. The other computer reads the gcode. It may give it a think and change the gcode commands. A popular change is to the motion so it can damp out vibrations. The changed, or unchanged, gcode is then passed on to the computer in the printer.

Companies who have proprietary firmware can do what they want. They could put a more powerful computer in the printer and have it do some of the stuff the two computers did for Klipper.