principle Explanation
Kossel/rostock, such as delta (parallel/Delta) types of machines, can be consulted: HTTP://LEARN.MAKERLAB.ME/GUIDES/11
3d printing Printing The most important thing is the first layer of the effect, if the first layer can be very good adhesion to the printing platform, the back if not unexpected, can be completed smoothly. But the first layer of printing is not so easy, one of the reasons is whether the printing platform is a horizontal problem. If the platform is not horizontal, it may cause the first layer of the model to be very strong in one place, but not glued at all in another position. It can even damage the print head (uneven platform, moving from low to high position may crash the printhead).
This tutorial will show you how to add auto leveling to your 3d printer through graphics and video. No more manual leveling will be done in the future. Here is a description of the official Marlin firmware, not the Rostock or Kossel Delta version of the Marlin,delta version of the configuration may be launched later.
Limitations of automatic Leveling
Although automatic leveling, but now the leveling function has limitations, that is, your printing platform is flat (no bending or bump situation), but your platform is not placed in the horizontal position (or perpendicular to the print head). If your print platform is curved or uneven, it is theoretically ineffective or small in function. So it is recommended that the printing platform is a very high level of flatness such as glass.
Basic principle
In the electronic world, sensors are needed for any measurement. The leveling sensor is actually the Z-axis 0 position limit switch (z-min). To achieve z-min detection of different XY coordinates, the mounting position of the z-min needs to be moved along with the printhead, but z-min if it is next to the print head, it may damage the model if it is printed with the object printed. So in the standard XYZ three-axis printer, often by adding a small steering machine to control the z-min and drop, that is, the need to trigger z-min (back to 0 or leveling), through the steering gear down z-min, when not in the time will be put up z-min. Specific servo installation will be described in the next environment.
Since z-min is not used only for back zero, after turning on the automatic leveling function, back to 0 will be different. Take a look at the previous paragraph in the video below, send the G28 (xyz all back to 0) command, XY back to 0, and then XY to move to the center of the print platform, drop z-min, to complete the z-axis back to 0. And if the XY axis does not return 0, it cannot be a separate z-axis back to 0. The back 0 position of the z-axis is a datum point, which is the z 0 point at the (x, y) coordinate position. The subsequent ping du is determined by the offset of the point.
Please look at the second half of the video, send G29 (Auto leveling command) after the reflection, the printer's z-min will be moved to four different XY coordinates (firmware can be configured) for probing. And the four positions are compared and calculated relative to the z position of the datum points determined by the G28, and the tilt degree of the printing platform is obtained, so that the z offset of each position is compensated in the subsequent motion (the z axis may move when the same layer is printed), thus completing the automatic leveling function.
Http://v.youku.com/v_show/id_XNzAyMjkzOTY0.html
If you understand the basics, it's going to be nice to go back to work.
Hardware Preparation and configuration
Hardware installation
Required Hardware
1, a small steering machine, we can see that I use the servo is the 9G model. Theory to use what model can be, but small will not occupy too much space;
2, a small limit (mechanical), small limit switch can (mouse button), with a handle without a handle can be, I use the handle;
3, fixed the steering gear in the heating head moving parts of the small parts, I am printing, not quite suitable, and finally with 502 sticky;
4, fixed limit switch touch handle, I also print, this is basically the standard can be downloaded here: thingiverse;
5, support the servo interface of the printer control Board, here to Makerlab Mega Controller for example;
Installation
Since everyone's printer is different, don't say it. In short is to ensure that as little as possible the impact of other parts of the case, fixed servo, and the handle of the limit switch can be retractable freely, and after the end, the height of the print head is lower than the height of the limit, that is, the print time-limit switch servos and other parts can not hinder the printing process.
Note: When installing the limit switch touch handle, pay attention to the position of the servo's limit angle (0 degrees and 180 degrees), because we use the servo main two position the most critical, one is to put down the limit, the two positions are not too close to the servo's 0 and 180 degrees (that is, the limit position of the rudder), The rudder in the extreme position is unstable and can be easily burned. Attention, everyone.
Is the part of the rudder that secures the rudder:
Is the position after the limit switch is closed, and does not prevent the printing and other parts of the movement:
Is the limit switch down after the effect, put down, the limit switch of course, the position of the print head is lower, otherwise the print head crashed, the limit switch has not been triggered:
Wiring
Mega Controller has led the four-way servo interface, are standard interface, so the rudder line is connected to the position shown in the picture, marked 30, the main rudder line in the yellow signal line, the corresponding control board on the S mark. If:
Steering wheel Angle Determination
As the rudder is used for leveling, the accuracy of leveling directly affects the printing effect. Therefore, the angle control of the rudder is crucial, and this angle parameter (two angles, the angle at which the rudder is lifted and lowered) is very important and needs to be used for the configuration of the firmware.
Modify Firmware
The default Marlin firmware does not add support for the servos (the RAM and ROM space can be left). So first open your Marlin firmware, find the Configuration.h file, search for "Num_servos" keywords (about 670 lines), come to
C
#define NUM_SERVOS 1//Servo index starts with 0 for M280 command
Then the first//delete, and change the following number to 1, the default number may be 3.
After the modification is complete, the other parameters are unchanged and the new firmware is uploaded to the control board. After completion, open your use of the most comfortable PC software, I take printrun for example, choose Serial port and baud rate, connect. Once the connection is successful, it is possible to test whether the steering wheel is controllable. In the Send command area, enter the command M280 P0 S100, where M280 is used to control the servo's G code, P0 logo The first servo, if you have other servos, you can use P1, P2, etc. to control separately, s behind the number of the rudder movement angle, enter the command, click Send (Send) or ENTER.
At this point, if everything is properly configured, you should see the rudder of the opportunity to move, if you do not move and then try the other angle is to replace the number of s behind, if the other angle is still not moving, please check the wiring is the correct firmware. (Note that the ramps user directly connected to the servo interface position is not available, because the servo interface is not powered by default, you need to ramps reset button next to the two power supply together, labeled as VCC and 5V, the two terminals connected, you can power the rudder. )
Test angle
Because the rudder angle can not be obtained by other means, only need you to carry out the actual test, so by sending the above command, constantly modify the angle value behind s, to get two more perfect angle corresponding to the position of the collection and drop. Remember to spare.
I passed the test and found the angle as:
Put down the angle is: 125 degrees;
The lifting angle is: 42 degrees;
Your configuration is unlikely to be the same as mine, so be sure to test it yourself.
When in a drop state, the effect of entering the M280 P0 S42 command is this:
When in a closed state, the effect of entering M280 P0 S125 command is this:
If you get the angle you are satisfied, that does not affect the other part of the movement, but also can be lowered when the normal leveling, then you can enter the next step.
RAMPS1.4 Board Servo is where to go, trouble can say?
Note that the ramps user directly connected to the servo interface position is not available, because the servo interface is not powered by default, you need to ramps reset button next to the two power supply together can be labeled VCC and 5V, the two terminals connected, you can power the rudder.
Refer to the picture, where the purple box of two needles need to be joined together, or the rudder is not powered; the red box is where the first rudder should be connected:
OK, ask again, is this in the Mullins to change the pin to 11
Do not need to change, configure the number of servos, send command M280 P0 S42 in the P0 refers to this pin corresponding to the rudder machine
As modified on this page, when the host computer is turned on, the steering wheel is turned to an angle
But in the host computer input M280 P0 SX No response, here X represents a number, I use the RAMPS1.4 board, the upper machine is pronterface,
Are all the parameters configured correctly?
#define Num_servos 1 in your tutorial changed here
Then the 5V power is also jumper, I input M280 P0 SX no response
I input G28 xyz can go back to 0, Z back to 0 when the rudder opportunity to turn down, the steering gear on the limit switch touch the backplane rear steering gear to go up,
It looks like the rudder and the limit switch are working properly,
But M280 P0 S. This code doesn't work.
I searched the internet for posts abroad, as if in pins. H This file is set P11 interface? Isn't that the reason?
Can adjust the level to indicate normal. Is there a problem when you enter the command?
M280 P0 S34
This is the instruction I sent, the letters are all uppercase three together, the middle blank space open, is this it?
Yes, the rudder's not moving. Try other angles.
Don't move, I have tried a lot of values these two days, hehe
Yes, I put M280 P0 S34.
m to lowercase m yes, why can't I recognize uppercase, I started thinking that I was going to capitalize
It is very strange, I always remember the G code these are to uppercase, I entered the lowercase but the letter box is also uppercase
Firmware configuration
The full board firmware configuration instructions can be consulted here: HTTP://LEARN.MAKERLAB.ME/GUIDES/7/ARTICLES/43.
Only the parameters related to auto leveling are described here.
Servo-related
If you need a servo to pick up and drop the flat probe (z-min limit switch), then the servo-related parameters must be configured. If your board is a mega Controller (our Fit board), connect the rudder to the Servos interface and mark the 30 position.
Remember the last part of the point where you get the angle of lowering and closing the leveling probe by sending commands? My angles are:
Put down: 125 degrees;
Close: 42 degrees;
Everyone's data is unlikely to be the same, be sure to use your own data to get these two data after modifying the firmware configuration file:
Servo Endstops
//
This allows for servo actuated endstops, primary usage are for the Z Axis to eliminate calibration or bed height changes .
Use the M206 command to correct for switch height offset to actual nozzle height. Store that setting with M500.
Auto leveling probe which axis is installed,-1 means off, 0 identifies on this axis, respectively on XYZ, the following two lines of code the original "//" Delete, as follows
#define SERVO_ENDSTOPS {-1,-1, 0}//SERVO index for X, Y, Z. Disable with-1
#define Servo_endstop_angles {0,0, 0,0, 125,42}//x, Y, z Axis Extend and Retract angles
Defines the angle at which the servo is lowered and lifted on the XYZ three axes. Fill in the position of the previously obtained angle data on the z axis, i.e. the 5th (down angle) and the 6th (the angle of view) data.
After the above parameters are changed, the relevant parameters of the rudder are configured to complete.
Automatic leveling function opening and related parameters
The above has been configured with the relevant parameters of the rudder, but in order to achieve automatic leveling, you also need to configure the following section of the parameters:
============================= Bed Auto Leveling ===========================
Whether to turn on the automatic leveling function, if open, remove the front//
#define ENABLE_AUTO_BED_LEVELING//Delete the comment to ENABLE (remove/On the start of the line)
The following starts with the specific settings for the auto leveling function
#ifdef enable_auto_bed_leveling
These is the positions on the bed to do the probing
Automatically adjust the 4 position, in order to prevent the extruder beyond the XY axis of the range, you can adapt the following parameters, so that these parameters are close to the center of the print platform coordinates
#define Left_probe_bed_position 15
#define RIGHT_PROBE_BED_POSITION 135
#define BACK_PROBE_BED_POSITION 160
#define Front_probe_bed_position 20
These is the offsets to the prob relative to the extruder tip (hotend-probe)
Leveling the sensor and the extrusion head of the coordinate shift, the heating tip coordinate-leveling probe coordinates, the parameters here can not be adjusted, because the manual measurement of these data accuracy is too poor, temporarily retain the previous default value. The following parameters are my tune out, we do not use my parameters.
#define X_probe_offset_from_extruder-34
#define Y_probe_offset_from_extruder 8
#define Z_probe_offset_from_extruder-14.3
#define Z_RAISE_BEFORE_HOMING 4//(in mm) RAISE Z before homing (G28) for Probe clearance.
Being sure you has this distance over your z_max_pos in case
Before returning to the origin, the z-axis rises in the distance, placed too low, leveling the probe can not be put down
#define XY_TRAVEL_SPEED 8000//X and Y axis travel speed between probes, in Mm/min
The operating speed of the XY axis
#define Z_raise_before_probing//how Much the extruder would be a raised before traveling to the first probing point.
The distance the z-axis rises before running to the first leveling point
#define Z_raise_between_probings 5//how Much the extruder would be raised when traveling from between next probing points
The distance from the z-axis before running to the next leveling point
If defined, the Probe servo'll be turned on only during movement and then turned off to avoid jerk
The value is the delay of turn the servo off after powered on-depends on the servo speed; 300ms is good value, but can try lower it.
You must has the servo_endstops defined to use here a value higher than zero otherwise your code would not compile.
The rudder is closed for delay, so it is recommended to turn on this function in order to prevent jitter. Otherwise the rudder has a chance of shaking. The following parameters remain the default only.
#define PROBE_SERVO_DEACTIVATION_DELAY 300
If you have enabled the Bed Auto levelling and is using the same Z Probe for z homing,
It is highly recommended the z_safe_homing enabled!!!
Z-Axis safe back to 0 configuration. When on, the z-axis is back to 0 before XY must return to 0
#define Z_SAFE_HOMING//This feature are meant to avoid Z homing with probe outside the bed area.
When defined, it'll:
-Allow Z homing only after X and Y homing and stepper drivers still enabled
-If Stepper Drivers timeout, it'll need X and Y homing again before Z homing
-Position the probe in a defined XY point before Z homing when homing all axis (G28)
-Block Z homing only if the probe is outside bed area.
#ifdef z_safe_homing
#define Z_SAFE_HOMING_X_POINT (X_MAX_LENGTH/2)//X point for Z homing if homing all axis (G28)
#define Z_SAFE_HOMING_Y_POINT (Y_MAX_LENGTH/2)//Y point for Z homing when homing all axis (G28)
#endif
With accurate bed leveling, the bed was sampled in a accurate_bed_leveling_pointsxaccurate_bed_leveling_points grid and Least squares solution is calculated
Note:this feature occupies ' 206 byte
#define Accurate_bed_leveling
#ifdef accurate_bed_leveling
I wouldn ' t see a reason to go above 3 (=9 probing points on the bed)
#define Accurate_bed_leveling_points 2
#endif
#endif
Leveling related firmware configuration has also been completed, but there are several key parameters need to be determined again, otherwise the resulting data will not be correct, temporarily do not need to upload, the following parameters are configured and then uploaded. Please refer to the next section.
Determine specific parameters
The previous section has been configured with all parameters related to auto leveling, and has been measured by the rudder of the machine.
To use automatic leveling normally, we also need to accurately measure the following three parameters:
#define X_probe_offset_from_extruder-34
#define Y_probe_offset_from_extruder 8
#define Z_probe_offset_from_extruder-14.3
Before configuring the parameters, we recommend that you leave the above parameters at the default values. Now we need to test these parameters out.
To ensure a smooth test, you also need to configure the following parameter: #define MIN_SOFTWARE_ENDSTOPS true, this parameter defaults to true and needs to be false, otherwise you cannot run to a position less than 0 coordinates when you move the axis. You can upload the firmware after changing this parameter.
Methods for determining the above parameters
In order to be able to more accurately confirm the above three parameters, that is, the exact offset of the extrusion head and the leveling probe, we need to use this three-dimensional coordinate system of the 3d printer to determine, instead of using a ruler amount.
Note: If you use this method, the axes before the operation steps_per_mm The parameter must be calculated correctly, otherwise the resulting data is inaccurate.
First step, mark a reference point with a pen in the middle of the print platform
In order to be able to guarantee the accuracy, we need to determine a reference point, the reference point can be selected anywhere on the printing platform, but in order to ensure that the printhead and leveling probe can be easily reached, so the choice of Platform center position is better. Mark a small point, like this:
Second, drop the probe to move the leveling probe just to the mark point position and manually set zero
Drop the Probe (command: M280 P0 s125[125 to your down angle]), and through the manual Operation button on the upper computer, move the XY two axis so that the probe is just above the mark Point, and then move the z-axis (the last stage as far as possible with the 0.1mm button), so that the probe just hit the print platform. At this point in the host computer input command: G92 X0 Y0 Z0.
Step three, move the print head to the mark point position and get the offset
Close the probe and move the XY and Z axes so that the distance between the print head and the platform can pass through a A4 of paper. Then enter the command: M114 to get the current coordinates, you will get similar information with the following:
OK c:x:-34.00 y:8.00 z:-14.3 e:0.00
This data is the three offsets required in your firmware and adds these three data to your firmware location.
After modifying this parameter, you can change the previously changed # define Min_software_endstops false to true to ensure that the printer is safe. Then re-upload the firmware. The configuration of the auto leveling function has been configured on your printer. Start a real-machine test.
Question:
I don't have to change the rudder firmware.
Excuse me, the probe and the extrusion head between the Z-distance z_probe_offset_from_extruder, can be adjusted by the M command, each change 0.1 to brush once the firmware, good trouble, online debugging is convenient.
Real-Machine testing
After the firmware upload is complete, you can test whether it can be leveling function, in order to ensure the leveling probe smoothly down, it is best to lift the z axis to the appropriate position, to prevent the probe can not be put down in place, and caused the crash phenomenon. In the upper computer, click on the lower left corner of the small house, note that there is no letter marked the one, to carry out the xyz three axis back 0,
You will find that back 0 with no added automatic leveling function before there is a difference, now the back 0 is xy back to 0 after completion, came to (XMAX/2,YMAX/2) coordinate position, put down the z-Probe, z-axis back 0, and, can not be independent of the z-axis back to 0, back to 0 after the completion of input G29 automatic leveling command, You will see that you start leveling the 4 points configured in the firmware, and you should look closely to see if there is a hyper-bounded place, and if there is a need to modify the coordinates of the leveling point in the firmware. Back to 0 and leveling the operation video as follows:
Http://v.youku.com/v_show/id_XNzAyMjkzOTY0.html
If your printer can also complete the above action, it shows that your auto leveling function is successfully configured, Oh,yeah.
If you want to test whether the automatic leveling function is useful, you can deliberately slant the platform, for example, I raised the glass to the right of the height of a screw cap.
Then after 0, leveling operation, let z coordinate, adjust xy coordinates, you will find that although you are only changing the XY coordinates, but Z axis in order to adapt to the cause of uneven platform, Z axis will also move, and the position of the z axis and the direct distance between the platform will not change.
Question:
How to add G28 this leveling function to a real print file.
The boot code in the slicing software G28 with G29, like this:
I don't need a servo, 0 sensor is removable, so how to change the firmware, and I would like to 0 after the hot bed moved down a distance after the stop, so as to facilitate the reduction of 0 sensor, and then manually click Start printing
No automatic leveling of the print file, it will start zeroing
How does the z axis return to zero after installing the ostrich machine?
How to add auto leveling function to 3D printer