Setting up your linear delta printer for Machinekit

In the previous page I have explained just a tiny bit of the .hal file. The .hal file connects as said the software to the hardware. I'm now going to explain which values you want to change in your .ini file. Unless something is very wrong you don't have to mess with your .hal file.
  
Assuming that you use a BeagleBone Black with a cape (have a look here at all the possibilities for the BeagleBone Black) you will have to modify the configuration files.
  
In my situation I have a BBB with a BeBoPr-Bridge cape. Configured as a linear delta 3D printer. So I use the lineardelta.hal and the lineardelta.ini from here.
When starting LinuxCNC you get to pick a configuration. Want to have your own name? copy both files to files of your naming, and make sure you have the right filename in you .ini file, like line 148 in lineardelta.iniHALFILE = lineardelta.hal
  
I assume you know how to calibrate your printer. There is a lot of info on the internet. Have a search for it (http://minow.blogspot.com). If you don't know why you need to calibrate your printer or have never done so because you only used auto calibration then you're in for a hard time.
  
No, really, nothing beats a properly calibrated printer which has built with TLC and a calliper. I have never used autolevel. If you have mechanical discrepancies in your build, correct them in the mechanical sense.
  
The first things to look for in your .ini file and adjust to your situation are:
  
[MACHINE]
DELTA_R = 158.55
CF_ROD = 326.37
  
Further on are the settings for all of the axes, sample below is of AXIS_0, which is my C-column. I prefer to call my vertical actuators columns A, B or C instead of X, Y and Z because they are not the cartesian X, Y and Z axes. It gives IMO a lot of miscommunication. When I'm standing in front of my machine, I have the A-column at my left hand, the B-column at my right hand, and the C-column is at the back of the machine in the positive Y-direction.
  

[AXIS_0]
# column C
#
TYPE = LINEAR
MAX_VELOCITY = 350.0
MAX_ACCELERATION = 3000.0
# Set Stepgen max 20% higher than the axis
#
# 1us steptime with 1us steplen gives 2us step perios (stepstick)
# 2us is a stepfreq of 500kHz
# BUT
# PRU gives 10us steptime with 10 us steplen and
#
# scale = 128 steps/mm so max vel = 50kHz/128 = 390.625 mm/s
STEPGEN_MAX_VEL = 390
STEPGEN_MAX_ACC = 3600
#
BACKLASH = 0.000
#
# Scale is 128 steps/mm
SCALE = 128
#
MIN_LIMIT = -1.0
MAX_LIMIT = 785.0
#
FERROR = 5.0
MIN_FERROR = 1.0
#
HOME = 779.05
HOME_OFFSET = 779.05
HOME_SEARCH_VEL = 100.0
HOME_LATCH_VEL = -1.0
#HOME_USE_INDEX = YES
#HOME_IGNORE_LIMITS = YES
#
# these are in nanoseconds for Allegro A4988
#DIRSETUP = 200
#DIRHOLD = 200
#STEPLEN = 1000
#STEPSPACE = 1000
#
# these are in nanoseconds for DRV8825
DIRSETUP = 650
DIRHOLD = 650
STEPLEN = 1900
STEPSPACE = 1900
#
HOME_SEQUENCE = 0

You need to specify the numbers above, for all of your motors, including the extruder motor. Then when you home all the axes (that's where HOME_SEQUENCE = 0) is for the carriages travel to the endstops and the value of HOME = 779.05 and HOME_OFFSET = 779.05 (or whatever is correct for that specific column) gets assigned to the axis. That value is then calculated to the cartesian X, Y and Z position. So it's pretty normal that X and Y is not 0.
  
Remember that the positions of the joints differ from the cartesian X,Y and Z positions. More explanation is here.
  
This little trick when you calibrate will save you a lot of restarting LinuxCNC. It is the adjustment of the delta radius in real time.
  
open a terminal and type:
halcmd setp lineardeltakins.R whateverdimensionyouwant
  
Make sure the difference with the original distance that was loaded (value in your .ini file) does not differ very much, or you'll get a joint following error. But increase in steps of 0.10 or something.
  
You'll immediately see that the height of the nozzle will correct. Proceed until you are satisfied with the calibration. Update the value of the radius in your .ini file and you are ready.
  
I hope this has sped up your configuration. Take some time to understand what's going on, and have a look at the documentation mentioned at the beginning since you are now officially a System Integrator.
  

Please have a read of this post from Brandon Heller. It's about setting up a Cramps board (which I don't have).
Questions, Remarks, corrections? leave something in the comments!

Share

One thought on “Setting up your linear delta printer for Machinekit

  1. Pingback: MachineKit Delta configuration + calibration | Design | Make | Share

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.