Day 16 - nikkiverre/Teacup_Firmware GitHub Wiki

Today, I want to talk about the config.h file in Teacup. You will have to edit/adjust this file according to your 3D printer hardware needs. When you are ready to 3D print, remember to make modifications to this file. If you look in the config.h file in the Teacup firmware, you will see a few important configurations. One of them is calibrating the steps per unit. There's a nice explanation on how to calculate the number of steps for needed per meter for each axis. This is from the config file:

steps per meter = ( steps per mm * 1000 )

calculate these values appropriate for your machine for threaded rods:

(steps motor per turn) / (pitch of the thread) * 1000

for belts:

(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)

all numbers are integers, so no decimal point, please :-)

T5=5mm, T2.5=2.5mm, MXL=0.08=2.032mm XL=1/5"=5.08mm

T2.5mm belt w small, 10 (of 10-15 tooth pulley: MXL 2.032 mm/tooth, 29 (steps/rev) / (tooth/rev) / (mm/tooth) * (mm/m)

X 200*4 / 29 / 2.032 * 1000 = 13575.89

Y 200*4 / 29 / 2.032 * 1000 = 13575.89

Z 200*2 / 1 / 1 * 1000 = 400000 # half-step for noise

Extrude through a Wades' 10:43 with a M8 hobbed bolt:

steps/revM * revM/revO / (dia * circ/rev) * mm/m

E 200 * 1 * 4 * 43/10 / (8 * 3.14159) * 1000 = 136873.4 mm/m / (mm/rev ext) (rev mot/rev ext) step/revmot

E 1000 / (8 * 3.14159) * 43/10 * 200 * 4 = 136873.4

In the config file, you will also see:

#define STEPS_PER_M_X 13576 // 54303 x16

#define STEPS_PER_M_Y 13576 // 54303 16x

#define STEPS_PER_M_Z 400000 // 16x

These steps per meter numbers are pretty important to get the 3D printer moving properly. So yesterday, I spent some time calibrating these numbers.

Here's what you need to know:

A) For calculating the steps per unit for X and Y axis

1. Figure out your stepper motor's steps per revolution

Alt Text

  • Know the step angle of your stepper motor -- it's usually 0.9 degrees or 1.8 degrees. The Ordbot has 5 NEMA17 1.6 A 1.8 degrees step angle stepper motors

  • Once your know the step angle, you divide 360 degrees by that angle -- On mine, it would mean:

360/1.8 = 200 steps per revolution

2. Figure out the number of teeth on your pulleys.

Alt Text

On the Ordbot, the pulleys have 18 teeth.

3. Figure out the belt pitch -- this is the width of the belt

Alt Text

The Ordbot has a 2.0 mm belt pitch

Now, we can put it together

The number of steps per meter = (steps per revolution / # of pulley teeth / belt pitch) * 1000

= (200 / 18 / 2.0) * 1000

= 5.5 steps per mm or 5555 steps per meter

After using these numbers for STEPS_PER_M_X and Y, the 3D printer still wasn't moving as nicely as it was moving with the original brain. I figured out why... there's something called microstepping and I have more on this on the next blog post.

B) For calculating the steps per unit for Z axis (if you have threaded rods)

1. Figure out your stepper motor's steps per revolution

Alt Text

  • Know the step angle of your stepper motor -- it's usually 0.9 degrees or 1.8 degrees. The Ordbot has 5 NEMA17 1.6 A 1.8 degrees step angle stepper motors

  • Once your know the step angle, you divide 360 degrees by that angle -- On mine, it would mean:

360/1.8 = 200 steps per revolution.

2) Know your Rod Pitch

Alt Text

Putting it all together:

The number of steps per meter = (steps per revolution / thread pitch) * 1000

Stay tuned... I'll get to calibrating the extruder. As I edit the config file, I'll make sure to include what I've changed in the blogs.

Alt Text

If you don't happen to know the specs for th)e pulleys or motors, you can always eyeball the numbers. For example, start with some number (say 40000 for your STEPS_PER_M_X) and then tell the X axis to move 10 mm and measure how much it actually moved. If it moved more than 10 mm, lower your STEPS_PER_M_X number and if it moved less than 10 mm, make your STEPS_PER_M_X number higher and so on. Adjust your numbers based on how much it moved or didn't move.

Next week, time to 3D print!!!!

Until next time...