Calibrado-ejesIf you are reading this, you have probably assembled your 3D printer and have printed your first object.  The process has been somewhat elaborate but there is nothing quite like seeing how it prints the first object, we all have that look on our faces like a 5-year-old child with brand new toys, seeing how it prints.

But of course, we want our objects to be perfect, just like our 3D design, and the first thing we look at is if the measurements are correct.  The firmware of your printer is fully adjusted and calibrated after carrying out various tests, but these tests are influenced by factors affected by your printer. The belt’s tension, the driver calibration, etc. In the original firmware, the parameters have been adjusted to obtain correctly printed objects, but if you would like your object to be just like your design, you would need to adjust the printer’s firmware…

What do we need to adjust?

The adjustments we need to make are found in the firmware. The basic idea is that when we tell the printer to move 20mm, it does just that, not a single millimetre more. The axis movement is dependent on the motors, which move the number of steps indicated by the firmware. If we want to move 10mm, the firmware is in charge of sending the amount of steps to the motor. Here is where the firmware and the value of the “DEFAULT_AXIS_STEPS_PER_UNIT” variable come into play, the latter converting the millimetres into steps. The variable shown in  braces has four numbers separated by commas that indicate the value of the four axes {X, Y, Z, E}.

Firmware variables that can be modified

Firmware variables that can be modified

To modify this variable, the firmware code needs to be downloaded, modified with the Arduino IDE and then loaded into the electronics. For this process, you can read the manual at this link.

What do we need?

To adjust this variable we need to make measurable prints, in order to know the cause of the inaccuracy. We recommend you use a cube to carry out these tests, for example, you can use the cube we have designed here http://www.thingiverse.com/thing:566876. The bottom side is a 20x20x20mm cube. To measure this, we recommend the use of a gauge, preferably digital, which will give us micron accuracy.

BQ Calibration cube

BQ Calibration cube

Now that everything is ready, the first thing we will do is print the calibration cube. Keep in mind that the sides of the cube must be parallel to the axes, meaning the cube should not be turned. Why? Because we are going to measure each axis and we need the sides of the cube to be the distance of the axes X, Y, and Z.

X and Y Axis

Detailed view of the X axis motor and the tension belt of the Y axis

Detailed view of the X axis motor and the tension belt of the Y axis

Once you have the printed parts, you need to measure the sides of the cube with a gauge. If the measurement given from the X axis is 22mm, this measurement would be incorrect, as it’s off by two millimetres. How do we adjust it? By using a rule of three. We know that the firmware-variable “DEFAULT_AXIS_STEPS_PER_UNIT”, for the X axis has a value of 80. So, if when we move 22mm we have a value of 80, when we move 20mm we can find out the X value. We apply the said rule of three with the expression (20*80)/22. A value will be given, adding every decimal will give us more precision (indicate the decimals separating them with a dot). We take the value and place it in the variable. We do exactly the same with the Y axis- Once you have done this, load the firmware and print it again. If the measurements are correct, fantastic, if not, please repeat the process.

Gauge with the correct calibration cube

Gauge with the correct calibration cube

Z Axis

What about the Z Axis? It won’t be necessary to calibrate it, as the formula takes into account the angle of the motors, the stepper settings and the metric values of the rods. In this case, given the Prusa i3 Hephestos rod is an M5, its value is 4000. If you want, you can calibrate the Z axis, but it never poses a problem.

E Axis (Extruder)

After this process, we will have a perfect 20x20x20 mm cube. But we still have one axis to check: the extruder, also called the E axis. We need to make sure that when the machine wants to extrude 30 mm, it does so. The extruder variable in the firmware has a lot of decimals, due to the extruder tests previously carried out. But you might indeed want to revise the variable. To do this you need to check that it extrudes the correct amount when extruding. The process is simple: mark the filament using the frame as a reference. After extruding 30mm, using a host like Cura, or using the jog option from the control menu, mark the filament again using the same reference. The distance between marks should coincide with the extruder, if not you would need to adjust it with the same law of three as the other axes.

Once the correct values are set into the variable and the firmware is loaded, the printer will have the correct settings to transform the distances into steps for the motor.

Ruben Sierra (@sgruben in Twitter) is an industrial engineer technician, specialising in Industrial Electronics. He is a maker and is passionate about programing, robotics, and 3D printing. He currently works in 3D tech support at BQ.