(…continued)
I can’t find the exact source, but I have read that for NEMA-23 motors, I should give between 24V - 48V. The G540 has a limit of 50V, so I definitely won’t exceed that. I am currently setting the power unit to give 30V (This has worked before, with no issues. I just disconnected and reconnected stuff and now it’s not working).
I connect the power supply terminals to the G540 terminals (as instructed in the manual), insert the E-Jumper and switch on the supply. The Green LED on the driver lights up, so the wiring seems fine, but the power supply unit indicates that the voltage is about 11 V (with CC being displayed. I read up that CC is constant charge, and I would need CV, constant voltage, but it doesn’t seem to be a setting on the power supply unit). This is without even connecting the motor yet.
The motor has a rated current of <3.5A, so I have soldered a 1.5kohm resistor across the terminals of the DB9 connector that I use. Once I plug that in, and switch on the supply, the green LED lights up again, and the holding torque engages on the motor (I tried physically turning the shaft and it stays put). The voltage on the supply unit still says about 11 V (exact number in the images). I further connected the GND (pin 25) and the step and direction pins (8 and 9, I use the A-axis on the driver) to the Arduino, with the help of a DB25 connector. I run the following code:
#include <Stepper.h>
int bottomSPR = 200; // Number of steps per revolution
// initialize the stepper library on pins 8 through 11:
Stepper bottom(bottomSPR, 8,9); // A axis => Step pin is 8 and Direction Pin is 9 (from G540 manual)
void setup()
{
// set the speed __ rpm:
bottom.setSpeed(60);
// initialize the serial port:
Serial.begin(9600);
}
void loop()
{
bottom.step(1000); //Turn 1000 steps CW
delay(1000);
bottom.step(-1000); //Turn 1000 steps CCW
delay(1000);
}
The above test code does not make the motor turn. When I use 10V instead of 30V, the supply unit is able to achieve constant voltage and shows CV. It does so for 11V as well. With the supply on, when I change the voltage to 12V, the stepper motor starts vibrating violently.
I have read through Robin2’s very helpful post and tried to search the forum, but can’t seem to resolve this. From what I can understand, the problem is not the Arduino Due, since just connecting the driver to the supply is resulting in lower voltage.