BLDC motor not responding to ESP32 PWM via logic level shifter

Hi, I am trying to control a BLDC motor (A2122 930KV) connected to a Simonk 30A ESC using an ESP32. I understand that this motor requires a 5V PWM signal, which is why I use a level shifter to convert the ESP32’s 3.3V GPIO (pin 4) to 5V PWM. However, the motor does not seem to respond. Previously, I tested the motor with an Arduino UNO, and it worked perfectly.

The Code

//ESP32 CODE
#include <ESP32Servo.h>

#define ESC_PIN 4

Servo esc;

void setup() {
  esc.attach(ESC_PIN, 1000, 2000);
}

void loop() {
  esc.writeMicroseconds(1200);
  delay(20);
 
}

The Schematic

I also tested the output of the ESP32 Code(Listed Above) with the Arduino UNO board(Code Listed Below) to make sure that the ESP32 is outputting a proper PWM Signal, which after testing, it is.

The Schematic Connection Between Esp32 and Arduino UNO

//Receiving End Arduino UNO CODE
const int pwmPin = 2;  // Input from ESP32
unsigned long duration;

void setup() {
  Serial.begin(115200);
  pinMode(pwmPin, INPUT);
}

void loop() {
  // Measure the HIGH pulse duration
  duration = pulseIn(pwmPin, HIGH, 25000); // timeout 25 ms
  Serial.print("PWM width: ");
  Serial.print(duration);
  Serial.println(" us");
  delay(20); 
}

The Code for Arduino UNO controlling BLDC motor is this link(lessons/BLDC_Motor/BLDC_Speed_Control.ino at main · un0038998/lessons · GitHub)
I apologize if my post is not up to the standard, as this is my first post on this Forum and I am not familiar with how this Forum works. Thanks
Specs:
Esp32: ESP32-S3 N16R8
Level Shifter: Bi-Directional Logic Level Converter (4 Channel) 3.3V/5V
Arduino: Arduino UNO board
BLDC: A2122 930KV
ESC: Simonk 30A
Battery: Lipo 3S 5300mAH

Using a level shifter like this?

Yes

That could be a problem. Those shifers are basically designed for use with open drain signals like I2C. They may not be able to drive the signal input on the ESC
You might try one of these ICs
SN74ACT244N
SN74ACT241N

Your esp code doesn't have the "calibration" on setup like your arduino code has:

void setup() 
{
  esc.attach(ESC_PIN,  1000, 2000);
  esc.write(0);
  delay(2000);
//ESP32 CODE
#include <ESP32Servo.h>

#define ESC_PIN 4

Servo esc;

void setup() {
  esc.attach(ESC_PIN, 1000, 2000);
  esc.writeMicroseconds(1000);
  delay(2000);
}

void loop() {
  esc.writeMicroseconds(1200);
  delay(20);
 
}

Before you buy the ICs I recommended, you might first try powering the level shifter and the ESP from only one of the ESC 5V outputs and don't use the 5V output on the other ESC.

Thanks, I forgot I need to ARM the BLDC motor before using it. After arming the BLDC motor, it works fine.

That's why pullup resistors are required for proper operation of the level shifter - of course.

The open drain applies to the output drivers, not to the signals.

of what?