I am using a NodeMCU to control a BTS7960b motor driver. (datasheet of the BTS7960) This driver controls a 12v dc motor. This image shows my wiring (without the display and the buttons and with a NodeMCU instead of the Arduino nano).
My problem is, when the driver is set to maximum speed (the pins L_EN and R_EN set to high, as well as either LPWM or RPWN to 255 [pin naming visible on this page]) the output voltage to the motor is consistently only 3v instead of 12v. Because of that my 180 RPM high torque motor just runs with about ~42 RPM. Decreasing the speed also decreases the output voltage. E.g. setting the speed to 150 decreases the voltage to ~1.8v. It doesn't matter in which direction the motor is turning.
The motor, NodeMCU and driver are powered by the same power supply with a buck converter. I get the same behavior with 3.3v and 5v on the NodeMCU and the driver. What am I doing wrong?
Thanks for the help! :)