Hi,
i am building a Project with multiple X27 steppers (datasheet) and im having trouble controling the steppers.
The problem is, that the stepper i am testing with is loosing steps and sometimes not reacting at all.
Wiring of the test rig:
Code of the test:
My questions are:
Thanks already to anyone who tries to help me with my mess
i am building a Project with multiple X27 steppers (datasheet) and im having trouble controling the steppers.
The problem is, that the stepper i am testing with is loosing steps and sometimes not reacting at all.
Wiring of the test rig:
Code of the test:
Code:
#include <SwitecX25.h>
#include <Metro.h>
// standard X25.168 range 315 degrees at 1/3 degree steps
#define STEPS (315 * 3)
// For motors connected to digital pins 21, 20, 23, 22
SwitecX25 motor1(STEPS, 21, 20, 23, 22);
// Metro for timing 1 sec
Metro testMetro = Metro(1000);
void setup(void) {
// run the motor against the stops
motor1.zero();
}
bool toggle = false;
void loop(void) {
motor1.update();
if (testMetro.check() == 1) {
if (toggle) {
motor1.setPosition(100);
toggle = false;
} else {
motor1.setPosition(900);
toggle = true;
}
}
}
My questions are:
- Can i drive the X27 stepper with the Switec library? (github) It is meant for the X25 stepper (datasheet) and that one seems to have a different step pattern(?), but everyone online is using this library for other X27 projects.
- Is my choice of the L293D H-Bridge a problem?
- Did i make a mistake wiring it?
Thanks already to anyone who tries to help me with my mess