24byj-48 bipolar mod not working with esp 8266

Hello,
I recently tried to automate my blind using an esp 8266 and some 24byj48. After my first prototype, I realized that the motor was short of a little bit of torque. I found online that converting it to a bipolar motor could solve my issue.

I ordered what was needed for the conversion and to power everything and tried to power my motor but it did not work. I know it is possible because I have seen some people doing it online but mine won't.
Here's my schematic

And here is the simple code (only used to test the motor):

#include <Stepper.h>

// Configuration des broches
const int stepPin = 5;    // Broche pas du moteur
const int dirPin = 6;    // Broche direction du moteur   (pin inferieur)
const int sleepPin = 7;  // Broche sleep du driver

// Configuration du moteur
const int step = 2048;
const int speed = 1000; // Vitesse du moteur en pas par seconde

// Création de l'objet Stepper
Stepper stepper(64, stepPin, dirPin);

void setup() {
  // Configuration des broches en sortie
  pinMode(stepPin, OUTPUT);
  pinMode(dirPin, OUTPUT);
  pinMode(sleepPin, OUTPUT);

  // Activation du driver (en mettant la broche sleep à HIGH)
  digitalWrite(sleepPin, HIGH);

  // Définir la vitesse du moteur
  stepper.setSpeed(speed);
}

void loop() {
  // Faire avancer le moteur d'un tour
  stepper.step(step);

  // Attendre 1 seconde
  delay(1000);
  // Faire reculer le moteur d'un tour
  stepper.step(-step);

  // Attendre 1 seconde
  delay(1000);
}

Please note
-I managed to make it work on my arduino Uno R3 with the same schematic (except that the ground of the a4988 is on the second board's ground and I I adjusted the voltage to 7V).
-I don't think that my esp 8299 is dead because I have the same issue with an esp32.
-As you can see in the code I tried to connect the sleep and reset pin to the arduino but it did not change.
-I also tried to use a 100uF capacitor on the 12v circuit and a 10uF on the 3.3v but it did not resolve the issue.

Thanks for your help

bipolar mod i saw (uused for blinds with an arduino uno)
same thing with an esp 8266 (basically what i am trying to do)

Didn't you forget to connect D7->SLP/RST?
Or is it a mistake in the schematic?

I did not draw it in the schematic because as I understand, it isn't necessary. However I tried with the connection and without it with no luck

The simulation in wokwi runs well on ESP32 (it does not simulate ESP8266).
I do not know what the problem might be, I have several 8266s but I don't have the A4988 to be able to test it. :anguished:

try this

I'm using 5V (not 12 or 24 V !) BYJ48 for my blinds both with ESP8266 and ESP32, but with ULN2003 driver and it is quite OK. I remember having problems with the Stepper library with ESP32 board for it didn't calculate modulus as with other Arduino boards. I had to fix this.

@azurion28
Did you cut the trace on the motor like they show in the link you provided?

Another cause of low torque may also be if the speed is too high.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.