Hi everyone,
I've been trying for the past three days to control a 25BYJ412-45 stepper motor using an H-bridge configuration with bipolar transistors applied to each coil, all controlled by an Arduino Uno (refer to attached schematic/figure). However, the motor only vibrates without rotating.
For testing purposes, I also tried using an L298N board, but I encountered the same issue. I am using this Arduino code (see attached), but so far, I haven't found any useful information online about commanding this specific type of stepper motor.
Has anyone had any experience with controlling the 25BYJ412-45 stepper motor (or a similar model) using bipolar transistors? Any insights, guidance, or recommendations you could share would be greatly appreciated. Additionally, if you have any advice or best practices for commanding this type of stepper motor, it would be extremely helpful.
Thanks in advance for your help!
Stepper Motor datasheet
25BYJ412-45.pdf (115.1 KB)
![Sens cmd moteur avec Transistor|626x500]
electrical diagram
(upload://2RR1QHopqxAXsGcXWW46wk7bHu3.png)
Code
int IN1 = 8; // A
int IN2 = 9; // A/
int IN3 = 10; // B
int IN4 = 11; // B/
void setup() {
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
}
void loop() {
//step_1
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW);
delay(100);
//step_2
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, LOW);
delay(100);
//step_3
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
delay(100);
//step_4
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
delay(100);
}