Hello everyone, I have been having a problem on my old Arduino setup with a NEMA 23 motor and the HY-DIV268N-5A driver as described on my previous post - the motor will work fine for a few hours or days and then stalls and grinds randomly. A few folks here recommended replacing the stepper motor and/or driver.
So, I've replaced the NEMA 23 motor with an identical new one, and switched out the stepper motor driver to a KL-5056-E which I've heard good things about. I connected this driver to my Arduino Mega and the NEMA 23 stepper motor, making sure to copy the same wiring as I did with my HY-DIV268N-5A. However, the motor does not seem to turn at all (and instead it will eventually get hot to the touch after a while). This heating up did not happen with the old driver/motor combo.
Attached is my wiring setup, which is the same as that for the old driver and motor (apologies for the MS Paint lol work computer here is quite old). I hope you can help me figure out why this is not working as I am still very new to this -
First, I connected the Arduino to the Driver like so:
DIR+ is connected to Arduino digital output port 7 (green line above)
PUL+ is connected to Arduino digital output port 8 (purple line above)
PUL- is connected to Arduino PWR GND (red line)
DIR- is connected to another Arduino PWR GND (brown line)
Red power cable (42 V, 2A) to DC+
Black power cable ground (42 V, 2A) to GND
Next, the KL-5056-E driver is connected to the new NEMA-23 motor: one pair to A+ and A-, the other pair to B+ and B-.
I am using the following Python code to control the Arduino, the KL driver, and motor - user inputs 0 or 1 and then the motor should move 4060 blocks in one direction or the other (only one axis of movement). This is the same code I used on the HY-DIV driver setup with mostly no problems, except of course when it started grinding out of nowhere.
Here are the misc. details of my current setup:
My power supply is DC 42V, 2A. The KL-5056-E operates between 20-50 VDC.
The DIP switches on the 5056-E are currently set to:
1 ON
2 ON
3 OFF
4 ON
5 ON
6 OFF
7 ON
8 ON
which correspond to 3.2V peak/2.3 V RMS, standstill current = 100% of selected dynamic current, and 1/4 microstep per the manual attached. I have tried decreasing the microstep to as far as 1/16 (3200 steps/rev) and tried many voltages without any luck.
The NEMA 23 motor runs on 2.8 A, nominal voltage 9-24 V I believe.
Please let me know what I should try next to get the NEMA motor to spin properly.
For PUL-, DIR- and EN-, the video mentions to combine the jumpers together and connect to one singular GND on the Arduino. I currently have: PUL- to GND and DIR- to a different GND using individual separate jumpers, and nothing connected to EN-. Is using individual jumpers OK? If not, what joining device do I need to combine the three jumpers together into one?
Speaking of EN, I've seen a few videos (this one included) where EN+ and EN- are connected to something on the Arduino. However, on my old setup with the HY-DIV, I never connected anything to EN+ and EN-. Furthermore, the manual for the KL says that EN- and EN+ are usually kept disconnected (enabled by default). This is consistent with some of the forum posts I've seen on here (something to do with "negative logic"...no clue, way above my head). Should I nonetheless try connecting EN+ and EN- on the KL-5056 as directed in the video? What do the EN pins even do on that driver?
I'm using 7 and 8 for the digital out pins instead of 24,25,26 or 30,31,32. I only have one relevant axis of movement (forward and back) though I don't know how to check which is which (X, Y or Z). Does it make a difference which Arduino pins I connect if I only have one axis of movement? How do I check which is the actual axis of movement, or does it not even matter?
Regarding the switching power supply: the 42V/2A power supply is actually taken from an electric scooter charger. However, it has the same round power connector needed for this application (sorry don't know what the technical name is) and the green power light on the driver lights up without the red alarm light turning on. So I am assuming (maybe wrongly) that the application of the charger doesn't matter, as long as there is sufficient voltage (the current is adjusted automatically)? What are some cheap power supplies recommended for the KL-5056-E?
Interconnect all (-)inputs on the driver with short pieces of wire, so you can run a single common wire to the Arduino.
Normally you don't connect the EN pins.
Using them gives you the option of turning the driver and motor off.
Not sure why you mention xyz. I see one driver, one motor. Two pins are required per motor, step and direction. Almost any Arduino pin can be used for that.
A 24volt/2-5Amp supply should be ok. If you want cheap, then use an old 19volt laptop supply from a secondhand store.
Leo..
That driver can take up to 50volt. The driver works like a constant current buck converter, giving the motor the right current. Motor voltage falls then automagically into place.
A high voltage is only needed when you want torque at high speed. Normally a 24volt supply will be enough.
The laptop chargers I have seen are just 19volt power supplies.
The charging/protection parts are all inside the laptop/battery.
Leo..
that is why it is a PSU, not a "charger".
but now i am not sure about his 42V/2A device: it may be PSU too.
anyway i would prefer to use 3 19V/3.65A pieces instead of one 42V/2A.
Update: the motor spins great using the following 24V 1.6A power supply and the new KL driver! I did not change any wiring.
The following power supplies, not pictured, also worked:
18V 2A
24V 0.75A
It is running backwards for some reason, but it is fast enough for my application.
Now for the bad news, I don't understand what's going on here at all. Why does a lower voltage, lower current power supply work but 42V 2A one won't? Maybe it has to do with the kind of power supply used, since the 42V 2A one was for charging an electric scooter? Also, my NEMA 23 is supposed to require 2.8A but seems to run just fine on lower currents...is the KL driver correcting for current mismatch by reducing the voltage? And most importantly, is there any danger in running my driver and motor setup at lower voltage and current than recommended? Since I'll probably stick with the 24V 0.75A supply for now.
I would appreciate it if someone could spoonfeed me an explanation here thank you!
OK. I guess charging power supplies might regulate voltage/current delivered differently than those that just always supply power. Thank you everybody for the help.