Revenge of the jumpers

Searching for two hours why my X and Y direction stepper motors where not travelling the same distance when evoking the same amounts of steps. Turned out to be 'interesting'. By closer inspection of my jumpers which controlled the step sizes, it turned out one was 'empty'.

By replacing the jumper all where happy again. During my testing I noticed that the steps where also limited to 200um instead of 100um. By closer inspection this is caused by slack on the timer-belt. I am hoping to improve it by the means of using different belt.

I used a very simple test program for testing purposes, this basic framework is also nice if you want to play with single steps and all kind of other accuracy settings.

1// Pin headers for Megatronics v2.0 (MOTHERBOARD 701 in Marlin Firmware)
2#define X_STEP_PIN         26
3#define X_DIR_PIN          27
5#define Y_STEP_PIN         4 // A6
6#define Y_DIR_PIN          54 // A0
8#define Z_STEP_PIN         56 // A2
9#define Z_DIR_PIN          60 // A6
11unsigned long prevMillis;
12int steps = 0;
13bool dir = HIGH;
15void loop () {
16   // Reverse direction after 100 steps
17   if (steps == 100) {
18     dir  = !dir;
19     steps = 0;
20   }
22   digitalWrite(X_DIR_PIN, dir);
23   digitalWrite(Y_DIR_PIN, dir);
24   // digitalWrite(Z_DIR_PIN, dir);
25   steps += 1;
27   digitalWrite(X_STEP_PIN, HIGH);
28   digitalWrite(Y_STEP_PIN, HIGH);
29   // digitalWrite(Z_STEP_PIN, HIGH);
30   delay(5);
32   digitalWrite(X_STEP_PIN ,LOW);
33   digitalWrite(Y_STEP_PIN ,LOW);
34   // digitalWrite(Z_STEP_PIN ,LOW);
35   delay(3);

Attachments (1)

Download all attachments as: .zip


1. anonymous -- 5 months ago

You were supposed to be more careful while replacing jumpers. It was your relentless and carelessness which have caused these faults. I always visit source for more help in essays. I have also seen some mistakes in your test program.

3. Hope Jacob -- 3 months ago

I bet there are still jumper stocks installed for this project idea.

Add New Comment