Controllino MEGA - STEPPER DRIVER

Hi, I'm trying to run a NEMA 17 stepper motor (2.3 Amps/phase) using DM332T Stepper driver and CONTROLLINO MEGA board. I attach an schemattic of what I'm trying (it shows ARDUINO MEGA instead of CONTROLLINO MEGA, but I'm replicating it exactly the same) and the code that I'm using.
For the switches of the driver:

  • As the motor runs with 2.3 Amps, I have switches 1, 2 & 3 on OFF, OFF, OFF position that refers 3.2 peak current | 2.29 RMS current. Is it correct??
  • As you can see on the code, I'm trying to run it at 400 steps/rev, so the switches 4, 5 & 6 are in ON, ON, ON position. Is it correct?? (I think it is)

I'm using a 24DC V Power supply.

I've got very limited experience on ARDUINO and Stepper drivers, but I'think that I'm doing somethin wrong with CONTROLLINO MEGA. Nothing happens when I execute.

Thanks for the help!!

CODE:
int x;

void setup() {
pinMode(8,OUTPUT); //Set Pin 8 as PUL
pinMode (9,OUTPUT); //Set Pin 9 as DIR

}

void loop() {
digitalWrite(9,HIGH); //Set high level direction
for (x=0; x<400;x++) //Repeat 400 times a revolution when setting is 400 on driver
{
digitalWrite(8,HIGH); //Output high
delayMicroseconds(500); //Set rotate speed
digitalWrite(8,LOW); //Output low
delayMicroseconds(500); //Set rotate speed
}

digitalWrite(9,LOW); // Set high level direction
for(x=0;x<400;x++)
{
digitalWrite(8,HIGH);
delayMicroseconds(500);
digitalWrite(8,LOW);
delayMicroseconds(500);
}
delay(1000);

}

There is no GND connection between controller and driver.
Driver EN is not connected. Thus might disable the driver.
Too fast stepping rate. Change one of the two delays from 500 to 10000 as a test. 5000 might work.

1 Like

Thank You!!
You're right, the schematic is wrong. However, I build the circuit connecting both controller and driver on GND.
ENA is not connected as I understood is it not necessary from the manual (https://www.omc-stepperonline.com/download/DM332T.pdf) .
Still not working.
Will change the stepping rate.

Thank you!!!

Reading the manual I understand that ENA must be connected to either +5 or GND depending on the type of logic used, NPN or PNP. Likely there is a strap selecting which one.
You can make a test. Turn on all power and try to turn the stepper by hand. If You can turn it, the driver is NOT enabled.

1 Like

I think it is the same problem as in your other topic: D8 and D9 on CONTROLLINO is not the same as pin 8 and pin9 on Arduino Mega.

1 Like