Help Calibrating XYZ and Firmware settings

Hi all,

I need some help calibrating/ tuning the settings in the Marlin Firmware. Right now, when I do a 2cmx2cm square, I get about .85cmx.85cm and the Z axis is all over the place. I thought I followed all the configuration tips correctly, but I guess I made a wrong turn somewhere. So here is what I have got:

Mini-Rambo 1.3a board
on all axis: NEMA 17 Steppers (KL17H248-15-4A); bipolar, , 1.8 degrees
Z-axis: T8-2 8mm spindle/ lead screw (8mm per turn)
XY-aixs: GT2 belt with 20 teeth

Based on the documentation, I changed (or left unchanged):

#define MOTHERBOARD BOARD_MINIRAMBO
#define EXTRUDERS 1 # Even though I dont have one
#define USE_XMIN_PLUG # Even though I dont have endstops
#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
#define X_DRIVER_TYPE DRV8825 # Even though the documentation for the
#define Y_DRIVER_TYPE DRV8825 # NEMAS says KL-4030 or KL-8060
#define Z_DRIVER_TYPE DRV8825
#define DEFAULT_AXIS_STEPS_PER_UNIT { 40, 40, 800, 100 }

I calculated DEFAULT_AXIS_STEPS_PER_UNIT as (not caring about the extruder setting):

Motor steps per revolution (=1600) / Idler Teeth (20) / Belt bitch (2) = 40 for X and Y
Motor steps per revolution (=1600) / Rod pitch (=2) = 800

Further configuration:

#define DEFAULT_MAX_FEEDRATE { 120, 120, 30, 25 }
#define DEFAULT_MAX_ACCELERATION { 400, 400, 200, 2000 }

In the advanced config section, I did as follows:

#define MICROSTEP_MODES { 16, 16, 16, 16, 16, 16 } // [1,2,4,8,16]
#define PWM_MOTOR_CURRENT { 1012, 1012, 1012 } // Values in milliamps

The PWM_MOTOR_CURRENT was calculated as follows:

ITripMax = 70% of max rated Amps, which for my NEMAs seems to be 1.5A, so I used 1.05; even though the specifications for the motors also talk about 4A. Not sure what the right value would be here.
Vref = ITripMax 0.8 = 0.84
Wv = Vref / 1.66 * 255 = 129.03
Wv/255
2000 = 1012.05

MOTOR_CURRENT_PWM_RANGE is not set at all.

Now, as stated above, with these settings I am drawing a 2x2cm square in Inkscape, export as svg, import in Estelcam, cut on the outside and the resulting square is .85cm. The cutting tool is 3.2mm, so even if I screwed up the estelcam settings, I would assume to get 2cm-3.2mm or something the like.

The Gcode for the aquare is attached. Note that this one has an engraving in the middle, but that should make no difference for the dimensions.

Any suggestions would be deeply appreciated as I would love to be able to get consistent results in plywood for now.

Thanks!!!

20x20square.gcode (2.69 KB)

A couple of thoughts:

  1. I think your x and y steps are half of what they need to be for a typical machine which uses 1/16th stepping with 200 turns/rotation. Using the prusa step calculator, I came up with 80 steps per mm. What stepper motors are you using that you get 1600 steps per revolution?
  2. Your g-code would produce a box which is about 42mm square - range for X and Y is about 45mm, minus 1/2 the bit width times 2 = about 42mm.
  3. What do you mean the z-axis is all over the place? It should be moving up and down - it moves down to cut, then up to transit to the next start point.
  4. Post some pictures of your setup including the control board.

Hi BT,

wow. spot on. When I correct the steps per unit to 80, the square in the attached gcode is indeed almost exactly 2 cm square (sorry, the gcode before was the wrong file). 1.94 or so, but that is close enough for my purposes right now. Not sure where I got the 1600 from though… It must have been from some post somewhere. The website (https://www.automationtechnologiesinc.com/wp-content/uploads/downloads/2018/05/KL17H248-15-4A.pdf) does not mention it.

In any case. With the X/Y solved, what I mean by Z Axis is that in the attached gcode example, The Z-Axis first moves up the clearance plane value I set in ESTLCAM (=1mm). Then it moves around XY and then it goes up another 0.5 before going down 0.5; i.e. it is still at the clearance plane value of 1mm, milling air. Then it goes down by 1mm, which is way more than I gave it as a Z depth per pass (I set it to .5). In reality this 1mm it goes down though is more like 2mm, i.e. it drills straight into my base and then I have to cancel the job quickly :frowning:

What is strange to me is that if I use the jog controls in RepetierHost and press +1 and then -1 on the Z axis, it moves exactly as expected, the same amount up and then down.

Anyways, I attached pictures and the gcode … Maybe I am doing something wrong in ESTLCAM or Repetierhost?

Again, thanks for any suggestions…

Christian

20x20square-0.5-90-1.2-10000-25-1mm.gcode (908 Bytes)

Hi BT,

in case this helps, attached are screenshots of my settings in ESTLCAM and Repetierhost…

Christian

your
G01 Z-0.5000 F30 S10000
it’s not go down by 0.5. it’s go down to -0.5
unsure that you disabled software endstop for Z in the firmware. check can you go to negative Z coordinates by pressing - in the repetier host

Hi Guffy,

not sure what you mean; I have not touched the settings from the download; which means there are no software endstops, right? See below…

Repetierhost seems happy to keep going to minus coordinates… When I just use the jog controls from “home” it goes down as far as I want it.

Or did I misunderstand the question here?

Christian

 

/ Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 200

/**

  • Software Endstops
    • Prevent moves outside the set machine bounds.
    • Individual axes can be disabled, if desired.
    • X and Y only apply to Cartesian robots.
    • Use ‘M211’ to set software endstops on/off or report current state
      */

// Min software endstops constrain movement within minimum coordinate bounds
//#define MIN_SOFTWARE_ENDSTOPS
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
#define MIN_SOFTWARE_ENDSTOP_X
#define MIN_SOFTWARE_ENDSTOP_Y
#define MIN_SOFTWARE_ENDSTOP_Z
#endif

// Max software endstops constrain movement within maximum coordinate bounds
//#define MAX_SOFTWARE_ENDSTOPS
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
#define MAX_SOFTWARE_ENDSTOP_X
#define MAX_SOFTWARE_ENDSTOP_Y
#define MAX_SOFTWARE_ENDSTOP_Z
#endif

#if ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)
//#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
#endif

I think it would be best to start with my pre-configured firmware. You can make changes later after you verify everything works. At the same time you should test with my crown firmware at first as well. Way to many variable doing everything on your own at first.

yes, it disabled. i have no more idea
Ryan right, try to use his preconfigured firmware

The gcode for the square looks good. It is set to absolute positioning (G90), so it moves up to the clearance plane, moves to the start, moves z down to 0.5 before plunging at a slower rate (30 mm/min). You should also verify your z-axis steps, because it sounds like something is not right - should be 400 since you have the lead screw. Once you’ve done that, verify the movement is what it is supposed to be, i.e., if you use repetier to move it 10 mm, does it move 10mm - test it in each direction.

This is probably not related to your issues, but I also suggest filling in the rapid feed rates (see your picture above using the settings on Ryan’s page.

Hi all ad thanks for all the help. Things are getting much better. With Z axis I get consistent up/down. If I issue:
G0 Z10 F1200
I get exactly 10mm up/down by using the original Firmware and the values suggested here. So, I tried something new: I used the square (2x2cm) and told ESTLCAM to pocket it at 5mm. After 1.5 hours of (mostly air) cutting; attached is the result. Any idea how this is happening? The rifts on each side are appx. 5mm deep, the island in the middle got exactly one pass…

The X-Y dimensions, again, worked perfectly.

20x20square-Pocket-Linear.gcode (8.93 KB)

firstly you use too low feed rate. ensure that you set mm/min for marlin in the estlcam. marlin expects feed rate in mm/min.

for wood you easily can use 400mm/min or more. in your file it’s 48.
also using 0.5mm DOC for wood is too pessimistic. you may use 5mm. do not overcomplicate the test.

you can load you gcode to a visualizer (as example ChiliPeppr - Hardware Fiddle )
and it look not bad.

The gcode doesn’t look like a typical Estlcam output for Marlin. Additionally, your feed rates are really slow (30 mm/min for example) - I think they’d be more like 900 mm/min for X/Y and 180 mm/min for z. You should check Ryan’s pages on estlcam settings/2D cutting.

Do the crown demo, use my gcode and then make your own.

I think there is something wrong with my Z-Axis assembly. It works fine when there is no torque attached or I am cutting something really soft. When I cut through harder wood, it seems like it is slipping “up” and thus mills some parts in the air…

I will take it apart again and see whats wrong. Any hints maybe? Thinks people like to forget or do wrong on the middle assembly?

 

Christian

That could be cause by skipping steps if your gcode is trying to drive the z-axis too fast. Check the rapid feed rate setting in Estlcam.

Did you try the crown?