5mm x 5mm square will size 6,2mm x 6,2mm

Hello,

I’m sorry if this has been asked and solved before but i did some research and couldn’t find something relevant.

To make a long story short, I have passed the crown test successfully and now I’m trying to measure simple squares to assure that my CNC moves as should. Unfortunately a simple 5x5 square end up being measured 6.2 x 6.2 on the actual print.

this is the gcode square.gcode (397 Bytes)

and this is the dxf file zipped square.zip (701 Bytes)

Can you please help me out solve this problem or point me to the right topic if this is already solved.

thank you in advance

Do you have 20T pulleys? The 100 steps/mm is for 16T, so these need 80 steps/mm. They will go 25% faster, but lose 25% torque.

1 Like

Yes you’re right, I have 20T pulleys! Do i need to edit config.h to make this right or is it a Repetier Host configuration i need to make?

Ok after your hint I changed my search wording and found this in the forum: Used wrong pulleys (20T) - where and what do I set in Marlin?
so with Creality 40-42 stepper motors that have Step Angle:1.8 and DRV8825 Stepper Motor Drivers set to 1/32-step using the jumpers as per build instructions, I used the calculator and ended up to this number…

…which i configured accordingly in Config.h file: #define DEFAULT_AXIS_STEPS_PER_UNIT { 160, 160, 800, 160 } //MPCNC

Now regarding Z… I’m using same motor and driver as for XY and I have a T8 lead screw with the following characteristics:
Diameter:8mm
Lead:8mm
Thread Pitch:2mm
Number of Starts:4 (any idea what this number is?)

In the config file i left the value for Z to 800 but in the calculator i cannot find such number…

is 800 ok for my setup? what layer height should that give me (0.3mm)?

Thank you again guys, your help is highly appreciated!

Oops… unfortunately that didn’t work for XY. My config.h file looks like this now
#define DEFAULT_AXIS_STEPS_PER_UNIT { 160, 160, 800, 160 }
but i’m still moving 6.2mm where i should be moving 5mm :frowning:

I triple checked that my Arduino SW is connected as should to the board and i do get the successful confirmation message after upload is completed. I also reboot the board after upload. Still, it seems that changing the values to 160 has no effect to my CNC as it still print over the same 6.2mm square like a carbon.

For what it’s worth, these are the commands from Repetier Host

10:20:40.190 : N47 G9035*
10:20:40.190 : N48 M3 S2400089*
10:20:40.190 : N49 G0 X0 Y0 Z0 F210058*
10:20:40.190 : N50 G0 Z5 F4809*
10:20:40.190 : N51 G0 Y50 F21004*
10:20:40.191 : N52 G0 Z0.5 F48021*
10:20:40.196 : echo:Unknown command: “M3 S24000”
10:20:40.196 : N53 G1 Z0 F180 S2400078*
10:20:40.199 : N54 G1 Z-1 F18032*
10:20:40.199 : N55 G1 X50 F90058*
10:20:40.203 : N56 G1 Y0 F90013*
10:20:40.208 : N57 G1 X0 F90013*
10:20:40.208 : N58 G1 Y50 F90054*
10:20:40.212 : N59 G0 Z5 F4800*
10:20:40.216 : N60 G0 Y0 F210051*
10:20:40.220 : N61 M517*
10:20:40.221 : N62 M140 S081*
10:20:40.236 : echo:Unknown command: “M5”
10:20:40.236 : echo:Unknown command: “M140 S0”

Problem solved! Solution, clear the EEPROM --> https://www.3dhubs.com/talk/t/default-axis-steps-per-unit-does-not-work/6935

I can now print 5 by 5 with no issues. Any help on the Z axis though would be appreciated

If your using a 4 start T8 leadscrew with a 1.8degree stepper the standard 800 setting should work. Of course it’s always best to test to be sure.

As a side note that calculator you are using is for determining the best setting for a 3d printer. It is set up to aligning your full step angle with the a specific layer height. This is helps in 3dp where you tend to use the same layer height most of the time. With cnc you don’t use the same layer height ever, because your starting height is based on the material your cutting which will very with each piece, and your depth of cut will vary greatly based on what your cutting into and the shape your cutting out. So the chances of you getting your cut height to be aligned with a full step is small and mostly based on luck.

1 Like

Thank you for the reply Atom and please excuse my ignorance but what should I do with Z? Based on the first and last lines of your reply and the difference of CNC and 3D printer, i should not bother changing for now; instead actual measure how far Z moves with these settings and take them into account when milling (?). Is this the way to move forward? Again thanks for the time

No excuse needed, sorry I didn’t make it more clear.
What you should do is leave the z steps/mm as is. Then on your machine measure the z distance, command it to move a specific distance in the z direction only. Then measure again and make sure it moved that far. (Just like you checked x and y with the square) just to be sure it is working properly. If it doesn’t move the expected distance come back here and we will help you figure it out.

The whole second paragraph above was me trying to say that the calculator you where using doesn’t apply well to cnc. It’s more for advanced tuning of a 3dp than for steps/mm on a cnc.

1 Like

160, 160, 800 is what I would expect.

The firmware prefers the value saved in eeprom because it doesn’t know you flashed it with something new. So you can rest to firmware defaults (M502) or don’t bother reflashing and just set it in eeprom (M92, then M500).

2 Likes

Hi again,

following up on the Z axis distance and sent the following command via Repetier (G1 Z10 F5000) and i get 20mm on my digital caliber.

when i press the manual control Repetier has and move it by the max value of 10 for Z axis, I get 10mm on my caliber.

Are these readings ok? I found this command on Internet and i was expecting a 10mm move also to be honest.

thanks in advance guys

1 Like

It is weird. But G1 is a movement to, but doesn’t include where to start from.

M115 will tell you where it think it is.

G1 Z10 tells it either to move 10 more mm, or go to Z=10mm.

What I would do to check is this:

G92 Z0
G1 Z10 F600

The G92 forces it to think it is at zero.

1 Like

You’re absolutely right Jeff,

after forcing it to think it is at 0 it moved 10mm. So G1 Z10 F600 is not forcing it to move 10mm up from where it is, it is forcing it to move 10mm up from point 0 i.e. if i run G1 Z10 F600 twice without G92 Z0 in between, the second time I run G1 Z10 F600 it should have no effect.

At any given time the machine can be set to run in G90 - Absolute positioning or G91 - Relative Positioning mode. The mode determines whether G1 Z10 means “move to 10 up from the Z origin” or “move 10 up from where you are right now.” Apparently (according to this Marlin gcode reference) G90 is the “default” but I don’t know if it resets to that on a reset.

The M503 command should tell you the current mode (and a lot of other stuff)

From what I’ve seen, most gcode creation programs include the G90 or G91 specifier at the top of the code.

2 Likes

Hello Tom and thanks your reply,

This is what M503 returns, but i cannot find the G90/G91. Do I have to first set it and then I’ll be able to see it?

16:07:42.994 : N17 M50319*
16:07:42.997 : echo: G21 ; Units in mm (mm)
16:07:43.001 : echo: M149 C ; Units in Celsius
16:07:43.001 : echo:; Filament settings: Disabled
16:07:43.001 : echo: M200 S0 D1.75
16:07:43.001 : echo:; Steps per unit:
16:07:43.005 : echo: M92 X160.00 Y160.00 Z800.00 E160.00
16:07:43.005 : echo:; Maximum feedrates (units/s):
16:07:43.010 : echo: M203 X50.00 Y50.00 Z15.00 E25.00
16:07:43.010 : echo:; Maximum Acceleration (units/s2):
16:07:43.014 : echo: M201 X180.00 Y180.00 Z80.00 E180.00
16:07:43.014 : echo:; Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>
16:07:43.018 : echo: M204 P180.00 R3000.00 T180.00
16:07:43.022 : echo:; Advanced: B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> J<junc_dev>
16:07:43.022 : echo: M205 B20000.00 S0.00 T0.00 J0.04
16:07:43.022 : echo:; Home offset:
16:07:43.026 : echo: M206 X0.00 Y0.00 Z0.00
16:07:43.026 : echo:; Material heatup parameters:
16:07:43.026 : echo: M145 S0 H180 F0
16:07:43.029 : echo: M145 S1 H240 F0
16:07:43.029 : echo:; PID settings:
16:07:43.029 : echo: M301 P22.20 I1.08 D114.00

It may be that M503 doesn’t show it if it isn’t stored in the eeprom. I don’t know how to find what it is currently set for, but issuing a G90 or G91 will definitely change to that mode.

2 Likes