Calibration and Sending G-code

Today I calibrated each axis of the laser cutter. A good place to go to figure out how to do that is the RepRap Calculator, but instructions are also included in the Teacup config.h file:

/** \def STEPS_PER_M
steps per meter ( = steps per mm * 1000 )

calculate these values appropriate for your machine

for threaded rods, this is
(steps motor per turn) / (pitch of the thread) * 1000

for belts, this is
(steps per motor turn) / (number of gear teeth) / (belt module) * 1000

half-stepping doubles the number, quarter stepping requires * 4, etc.

valid range = 20 to 4’0960’000 (0.02 to 40960 steps/mm)

#define    STEPS_PER_M_X                    1440000
#define    STEPS_PER_M_Y                    1007874
#define    STEPS_PER_M_Z                    320000

Here’s the process I went through:

X-axis: My motor is pretty standard. 1.8 degrees per step, 200 steps per revolution. However, the motor has a compound gear train, so there’s an extra step. 10 teeth on the first gear, 30 teeth on the second, 10 on the third (which is locked to the second), and 30 on the fourth. So there are two gear pairs with a ratio of 3/1, making a ratio of 9/1. So it takes 9 revolutions or 1800 steps to turn the outside gear one time. The pulley attached to the outside gear, which drives the belt with a pitch of 2mm, has 40 teeth. The pitch is multiplied by the number of teeth to get 80.

360°/1800=0.2°/step    0.2°X80=16mm/rotation. That would make 112500 steps/meter.

The part that got me was that the Easydrivers use 1/8th microstepping by default, which multiplies the number of steps per rotation by 8. That gives us 1600 steps per rotationon on the motor itself. Multiply that by the gear ratio (9) and we get 14400 steps per rotation or 0.025° per step.

So 14400 steps X 1/(1/8 microstepping) / 80(belt pitch x tooth count) gives us 1440 steps/mm or 144000 steps per meter…I think.


Y-axis: The x-axis was considerably easier. However, I bought my leadscrew from a hardware store in the US, and the RepRap calculator only uses metric. So I counted the number of threads per inch, which is 16, meaning one turn of the screw moves the axis 1/16″. Still having 200 steps per revolution 1600 steps per revolution, There are 25600 steps per inch. That means there are 25600 steps for every 25.4 mm.



25,600,000/25.4=1,007,874.015748031 steps per meter.

I just rounded it off to 1,007,874 steps per meter.


About teslasmoustache

I am an artist currently pursuing a degree in Fine Arts at a college in the Midwestern United States. My art is heavily influenced by technology and tech-culture. my (future) laser cutter is a work of art as well as a tool that will help me make more art in the future.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: