Hello,
First of all - I've been working on this for 2 days, searching the web without success.
The goal is to run a stepper motor.
Here's what we have:
2 stepper motors, Arduino Uno, CNC shield, DRV8825 driver, 24V 4.5A power supply.
Motor 1: STP-43D034 Nema 17
Motor 2: 28HB30-401A Nema 11
I set up the DRV8825 driver for Nema 11 with a ratio of 0.3.
I connected the driver to the Y connector on the CNC shield.
Here's the test program.
#include <Stepper.h>
// Ustawienia silnika krokowego
#define STEPS_PER_REV 200 // Liczba kroków na obrót silnika
#define STEPPER_PIN_1 8 // Pin 8 dla kierunku silnika krokowego
#define STEPPER_PIN_2 9 // Pin 9 dla kierunku silnika krokowego
#define STEPPER_PIN_3 10 // Pin 10 dla kierunku silnika krokowego
#define STEPPER_PIN_4 11 // Pin 11 dla kierunku silnika krokowego
// Inicjalizacja obiektu Stepper
Stepper stepper(STEPS_PER_REV, STEPPER_PIN_1, STEPPER_PIN_3, STEPPER_PIN_2, STEPPER_PIN_4);
void setup() {
// Ustawienie prędkości silnika
stepper.setSpeed(100);
}
void loop() {
// Przesunięcie silnika o 10 kroków w prawo
stepper.step(10);
delay(500);
// Przesunięcie silnika o 10 kroków w lewo
// stepper.step(-100);
// delay(500);
}
The problem is how to connect the motor cables to the shield to make the motor move?
I know how to pair the cables - AA BB - but I don't know which one is AA and which one is BB. The attempt to assign A- A+ B- B+ didn't work for me because the resistance fluctuates during the tests and I can't draw any meaningful conclusions.
Motor 1 has a small connector with strange colors and moving the cables in the connector configuration doesn't help.
Motor 2 has supposedly standard colors (cables not terminated with a plug), but I've tested many combinations and it didn't help.
I don't know how to find out how to properly connect the motor.
Thanks in advance




