Hi everyone. I am working on a stepper motor control program. To write the program for the full-scale project, I made a development board using a Mega 2650 microcontroller, DM542T driver, and a Nema 17 motor. The power supply is set to 24v for the development system. The control program functions well with the DM542T and Nema 17.
Now that the program is functional, I have connected the microcontroller to the full-scale project, but have encountered a problem with the motor receiving no power. This system uses a CL86T stepper driver and a large closed-loop Nema 34. I believe I have all of the settings on the driver switched to the correct positions and I have 48 volts powering the driver and motor. I have double and triple-checked the pinout on the driver and motor combination and have tried different settings combinations on the driver. The wiring scheme is also identical to the development board setup.
The Nema 34 is not receiving power from the driver. The driver powers on and there are no error lights. I thought that the driver could be bad so I connected another CL86T in its place and there was no change.
I believe the problem is within the code setup. Hardware-wise, the key differences are the closed-loop functionality of the CLl86T (I am currently using open-loop mode), the operating voltage of the Nema 34, and the presence of the Nema 34’s internal encoder. The program runs as intended when I connect the microcontroller to the development board. I need help figuring out how to get the CL86T to respond to the microcontroller signal.
Is there anything in or missing from this setup that would cause it to run on one driver and not the other? Thanks.
I am using this circuit. This image closely resembles the driver on the development board. The CL86T driver has a terminal for the encoder wiring, but I am not using it yet. I have the driver set to open-loop mode.
This is the CL86T and shows how I have wired the power supply.
I have the power supply set to 48 volts and confirmed this with a multimeter.
Could the BRK/PEND be what is causing the driver to not function?
The motor coils are not even being energized (holding it in position) like the Nema 17 does when its driver is activated. Thanks.
I would also like to add that I am using the switch panel on the development board to control the larger setup. The microcontroller never leaves the board. I am simply wiring the larger motor and driver to the development board and increasing the voltage to 48v.
Are you talking about the void loop? I didn't post anything after what's shown because I didn't think it was relevant. The program run flawlessly on the smaller driver and stepper motor. Am I wrong to assume it's a problem activating the driver at a more basic level? I can post the rest of the code if necessary.
The Arduino GRD is connected to the ENA-, DIR-, and PUL-. If you are asking if the stepper driver high voltage ground and the arduino ground are connected, the answer is no.
Thank you. I've been trying to figure this problem out for a little over a month now so feel free to hop back in whenever. I have a mental block right now. I lurked on the forums and online for a while searching for clues, but finally decided to ask for help. I try not to ask for help until I'm hitting my head on my keyboard more than 5 times a day.
I don't see where you tell AccelStepper which pin is ENA.
setEnablePin(enablePin)
Specify the desired pin number to use to control the enable signal. If no enable pin signal is needed, there is no need to call this function. The pin will be configured as an OUTPUT, and the correct value will be set, when this function is called. For this reason, if the enable signal is to be inverted, setPinsInverted() should be called before setEnablePin(). As mentioned above, enableOutputs() and disableOutputs() will correctly manage the enable pin, along with any inversions. Example setting the enable pin to pin 7.
setEnablePin(7);
Hi JCA3AF,
The ENA circuit is connected. However, I am using the stepper.enableOutputs() as you mentioned. Thanks for the tip on placing the pin number and the ability to invert. I think I had left the enableOutputs() blank because of something I read about driver object default pins. I realize now that using 5,6,7 may be part of the problem as I have the smaller driver on pins 2,3,4 and changed the code to 5,6,7 for the larger driver. I will try what you suggested first just so I have a better grasp of the functionality. I am new to stepper control. With the sheer volume of information to comb through, it's nice to have someone who can look at your code and point out flaws.
Am I correct in assuming that leaving the ENA circuit open would be considered LOW, thus enabling the driver?
I'll read the document you provided, change the code, and report back.