Auto Bed Leveling with SG90 Servo for Tevo Tarantula (or every other 3D printer)

12 (likes)
12136 (views)
This product is available only if you have an account in My Mini Factory service
×
Color:

The MKS Base does not have any exposed pins that are compatible with servos (PWM). So you have to use the x-max pin-out, which is defind as digital pin 2.To do so, we have to change the assigned pins in the firmware. Open up Marlin and go to the 'pinsRAMPS14.h' tab (pinsMKS-13.h redirects you to pinsRAMPS14EFB.h redirects you to pinsRAMPS14.h). A quick demonstration can be found here:https://www.youtube.com/watch?v=0fFdSMcWNZM    What do you need? - SG90 servo (and the accessoires it came with)- the printed parts (arm + servo mount)- a ready to use configuration of Marlin or your prefered firmware    Setting up the sensor and servo in Marlin 1.1.0 Search for (without ' '): '#define XMAXPIN 2'and change it to: '#define XMAXPIN -1'then search for '#define SERVO0PIN 11'and change it to: '#define SERVO0PIN 2'Go to configuration.h and uncomment the following: '#define NUMSERVOS 3'(Note: I had to change the line to: '#define NUMSERVOS 1' otherwise my x-Axis had problems moving - don't know why, just for your information)Also you have to uncomment (in configuration.h):'#define AUTOBEDLEVELINGFEATURE'And define the 'spots' where the probe should level (I use this values with the large bed): '#define LEFTPROBEBEDPOSITION 30' '#define RIGHTPROBEBEDPOSITION 130' '#define FRONTPROBEBEDPOSITION 30' ' #define BACKPROBEBEDPOSITION 240'Define the probes offset from nozzle (especially the ZPROBEOFFSETFROMEXTRUDER is important and should be accurate to about 0.1mm, I ended up using -9.1, your value may differ): ' #define XPROBEOFFSETFROMEXTRUDER -55' '#define YPROBEOFFSETFROMEXTRUDER -35' '#define ZPROBEOFFSETFROMEXTRUDER -8'Define the angles which the servo has to 'hold' for probing and parking (the last two numerics, the values depend on how you mount the servo arm - use M280-command to find the right values): '#define ZENDSTOPSERVONR 0' '#define SERVOENDSTOPANGLES {{0,0}, {0,0}, {80,180}}'Also change: '#define ZRAISEBEFOREPROBING 5'toAlso change: '#define ZRAISEBEFOREPROBING 20'At last, make sure the following is uncommented, or the servo will 'wobble' around while printing: '#define DEACTIVATESERVOSAFTER_MOVE'Upload your new firmware. Plug in the servo. Be carefull, you have to change the servos wires (the plug is s/+/-, the pins on the board are s/-/+).Now you can use the M280-command to test the servo, e.g. M280 P0 S20 (sets servo 0 to position 20). With this command you can also find the correct values for the servo angles.After homing your X and Y-Axis (G28 X0 Y0) and running the auto bed leveling process you cann use G1 Z0 to lower the nozzle onto the bed. If the Nozzle is to far away from your bed, lower the value, if the nozzle crashes into your bed, raise the value. At last, change the start script in your slicer. Replace:G28 //home all axiswith: G28 X0 Y0 //home X and Y-axis G29 //auto level build plate

About the author:
MacNite
I am an engineer from germany and passionate about technical stuff. Primary in the fields of internal combustion engines, cars, robotics and everything around video games.

Reviews

This model have no reviews. Would you like to be the first to review? You need to print it first.