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)