Bi Directional Level Shifter Unexpected Output

Thread Starter

xThornx

Joined Apr 5, 2021
6
Hi, I'm currently trying to get a 3.3V microcontroller (Freenove ESP32 WROOM) to work with a stepper motor controller that requires 5V control signals (DM542T) and I am trying to use Sparkfun's Bi-Directional Logic Level Converter which has a design based on 4 BSS138 N Channel mosfets. When I test the level converter by itself I get the expected 3.3V input to 5V output when using a DMM to measure the voltage but when I connect the board to the stepper controller I only get an output of about 2.8V. Initially I thought this may be some sort of loading issue (which is odd because its only drawing ~5mA again tested with a DMM) and I believe these mosfets should be able to drive the load but the stepper motor controller works? I know its a strange question but I'd really like to understand what is happening because I need this circuit to last and if there is as problem thats just temporarily working thats kind of an issue.


ESP32 pin 14 -> LV1 HV1 -> DIR pin of stepper controller
ESP32 pin 13 -> LV2 HV2 -> PUL pin of stepper controller
ESP32 pin 12 -> LV3 HV3 -> EN pin of stepper controller
3.3V -> LV
5V -> HV
GND -> GND

Kind of a rough explanation of the schematic but I could draw something up if there is confusion. I'm assuming I'm just not understanding something about the level shifter or how it works, or some misunderstanding of the circuit dyrnamics on the controller side.
 
Last edited:

Thread Starter

xThornx

Joined Apr 5, 2021
6
Hi,
Has your 5v supply got enough power to operate the stepper motor?
The stepper motor itself or the controller aren't powered by 5V but rather a 24V power supply, I probably should've included that in the initial post but the controller just requires 5V control signals.
 

AlbertHall

Joined Jun 4, 2014
12,619
When the 5V side output is high, the current drawn by the load on that side is not supplied by the MOSFET but by the pull-up from that output to the 5V supply. I think that resistor is 10k on the Sparkfun board and this may not be low enough to get full voltage going to the stepper driver. You could add a supplementary pull-up resistor to bring the voltage up but note that when that output is driven low that extra current must be sunk by the drive to the low voltage side.
 

Jon Chandler

Joined Jun 12, 2008
1,560
The stepper motor itself or the controller aren't powered by 5V but rather a 24V power supply, I probably should've included that in the initial post but the controller just requires 5V control signals.
The converter circuit requires a 5v supply. It can't magically boost 3.3v to 5v.

I have used that circuit many times – it works well.

Level Shifter Explanation
 
Last edited:
Top