Hi all, does anyone know why I can't get a 28BYJ stepper motor with ULN2003 driver connected to a Nano ESP32 board to work?
If I replace the board with a Nano RP2040 Connect (leaving everything else the same: circuit, pins used, sketch, external power supply) everything works
I use four 1.5 volt batteries, so in theory 6 volts total.
However, if I measure with the tester I have a real voltage of 5.10 volts total.
that's the problem?
I'm taking a wild guess here - can you try changing the 'GPIO mode' to 'By GPIO number (Legacy)' as per this document and see if the situation improves?
If not, please post your sketch and a map of the connections so we can be more helpful. Thanks!
Yes, I had already read the article and already made the proposed changes but nothing....
#include <Stepper.h>
const int stepsPerRevolution = 2048; // change this to fit the number of steps per revolution
// for your motor
// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 7, 9, 8, 10);
int stepCount = 0; // number of steps the motor has taken
void setup() {
// initialize the serial port:
Serial.begin(9600);
}
void loop() {
// step one step:
myStepper.step(1);
Serial.print("steps:");
Serial.println(stepCount);
stepCount++;
delay(1000);
}
The circuit is composed of the board, 28BYJ-48 stepper motor, ULN2003 driver and is powered by four 1.5 volt batteries with ground connected to the board.
It works with the RP2040 Connect card
It doesn't work with Nano ESP32 card
That I can't do so easily... I don't know what those numbers are. That is why I was asking for a schematic or a map of the connections can you sketch up something for us?
But generally, if you for example want to refer to the pin labeled "D7" on the PCB, just use D7 in the sketch code. It will work regardless of the "Pin Numbering" setting, and you will not need to scratch your head with GPIO numbers and such.
Hi 59alby,
I am experiencing the same exact problem as you. Did you manage to find a solution for the stepper problem, or are you just using the rp2040 for the stepper?
I had the same problem as 59alby and maximilianseiler. Stepper worked with Arduino Nano Avery, but it did not work with Arduino Nano ESP32. I got it working by redefining pins for controlling stepper as outputs
I guess there is a problem with the library "Stepper". I had a look but I didn't see anything out of ordinary. Probably is something specific to ESP32.
even using the same code as @sslajpah I still can't get it to work. Are you using a voltage converter? it looks like the ULN2003 should be able to take the 3.3V level.
J'ai me même problème.
A force d'avoir des pb de chargements avec la nano ATmega328, j'ai essayé la ESP32 et cela ne fonctionne plus. Apparemment, le pb vient de la tension de 3.3 V sur l'ESP32 alors qu'il a 5 V sur les autres cartes. Maintenant, je ne vois pas pourquoi.