I am trying to drive two stepper motors NEMA23 with two DM542 microstep driver (one for each) and a Teensy 4.1 as controller: http://tinel.com/uploads/DM542.pdf
Please find datasheet of DM542 here: https://kitaez-cnc.com/f/dm542.pdf
I am able to drive both motors if I am using an Arduino Mega2560 as controller without issue. However when I switch to a Teensy 4.1 after changing some parameters in my software for compatibility between Arduino and Teensy, I thought to be able to drive my stepper motors. However with the Teensy the motors starts to run and then stops randomly.
Output of Arduino is +5V instead of +3.3V for Teensy, so I am using a LLC (transistor based), to convert +3.3V to +5V to feed input of DM542 which need (+5V to +24V as input).
My DM542 is connected in cathode mode. The only difference between the two configuration (the one with Arduino and the one with Teensy) is that my STEP signal is inverted and that I am using a LLC to convert my step signal +3.3V to +5V.
This image will explain better:
My questions/remarks:
output of LLC (HV1) has a pull up resistor 10 kohm and in the datasheet of DM542, if you drive with a +5V signal you must not have any resistance in the PUL(STEP) line and on the other lines (DIR and EN). Can it be my issue ? I put a resistor in parallel to decrease the value of the pull-up, it's working better but my motors still stop randomly before ending their respective cycles.
DM542 is currently in cathode mode, should I plug it in anode mode ? What is the better ?
output of my LLC (BOB-12009) is not +5V, why ? Should I use another LLC ?
the signal sent to DM542 is inverted because LLC transistor (BSS138) is closed when Teensy send no signal to LV1 and is open when Teensy send +3.3V signal to LV1. Can it be an issue to have the signal inverted if DM542 is connected in cathode mode ?
can it be a software issue ? My code is running without error and the libraries I am using are compatible between arduino and teensy.
Thank you a lot for your help, I am really stuck and I don't understand what I am doing wrong here...