Controlling Nema23 with Esp32 (and SN74LS07, custom pcb))

Hello Everyone,
For my current project I need to drive 6 Nema23 stepper motors. I'm using 6 DM556Y drivers and an ESP32. I already discussed my problem in another topic (Controling stepper motor from 3.3V transisitor , electric issue).
There I was told to use two SN74LS07 to turn the 3.3V from the esp32 to a 5V signal to communicate with the stepper motor drivers. @jim-p helped me to design a circuit and i got a pcb manufactured. While testing the pcb the stepper motors did not move correctly, all of the motors and drivers work, which I tested with an Arduino Uno.

Here's the sketch:


I tried using the pcb with my esp32 but it did not to work as I expected (Youtube link):

Here's the code:

byte directionPin = 7;
byte stepPin = 6;
int microsteps = 200;
int ratio = 1;
long int pulseWidthMicros = 5;  // microseconds
long int microsbetweenSteps = 5000;
long int degreesToMove = 90;
int microstepsRatio = round(microsteps * ratio);
float steps = degreesToMove*microstepsRatio/360;
int stepsRounded = round(steps);

void setup() 
{ 
  pinMode(directionPin, OUTPUT);
  pinMode(stepPin, OUTPUT);
  delay(500);

digitalWrite(directionPin, LOW);
  for(int n = 0; n < stepsRounded; n++) 
  {
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(pulseWidthMicros);
    digitalWrite(stepPin, LOW);
    
    delayMicroseconds(microsbetweenSteps);
  }
  delay(500);

    digitalWrite(directionPin, HIGH);
  for(int n = 0; n < stepsRounded; n++) 
  {
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(pulseWidthMicros);
    digitalWrite(stepPin, LOW);
    
    delayMicroseconds(microsbetweenSteps);
  }

}

void loop() { 
}

I tried using the basic bounce sketch included in the AccelStepper library, but the stepper neither moves nor makes a clicky noise.
I tried reloading the uploaded sketch by pressing the reset button on the board itself. The resetting didn't do anything but sometimes a red status led next to a green one lit up.
Can anyone solve my problems?

There are certain ESP32 pins you should never use:

GPIO 6 (SCK/CLK)
GPIO 7 (SDO/SD0)
GPIO 8 (SDI/SD1)
GPIO 9 (SHD/SD2)
GPIO 10 (SWP/SD3)
GPIO 11 (CSC/CMD)

See this page:

Thank you, I'll try that.

Thanks a lot, you saved my day. Now i just need to bridge some connections. Enjoy your weekend.

You too!

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