Nema 34 and dq860ma

We use nema 34 and DQ860 what is the best switch for DQ860 to satisfy the movement of the nema 34 sometimes it move smoothly and sometime it vibrates

I moved your topic to an appropriate forum category.
You posted in a section whose description says do not post here.

In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.
How to get the best out of this forum before you proceed any further.

This just tells us about the physical size of the motor mount, nothing else.

We need to know a lot more about what you have and how it is wired up and powered. So a schematic and your code is essential.

We only know what you tell us, and without knowing what you have, we don't stand a chance.

1 Like


this is the code
this is powered up by centralized power supply 12v 10A

#define x_step 22
#define x_dir 24
#define x_ena 26
#define y_step 28
#define y_dir 30
#define y_ena 32
const int lmtX = 2;
const int lmtY = 3;
int steps;

void setup() {
Serial.begin(9600);
Serial.println("AQUAPONICS");

pinMode(x_step, OUTPUT);
digitalWrite(x_step, 1);
pinMode(x_dir, OUTPUT);
digitalWrite(x_dir, 1);
pinMode(x_ena, OUTPUT);
digitalWrite(x_ena, 1);
pinMode(lmtX, INPUT);
pinMode(y_step, OUTPUT);
digitalWrite(y_step, 1);
pinMode(y_dir, OUTPUT);
digitalWrite(y_dir, 1);
pinMode(y_ena, OUTPUT);
digitalWrite(y_ena, 1);
pinMode(lmtY, INPUT);
}

void loop() {
tests();
}

void tests() {
while (1) {
if (Serial.available()) {
char rx = Serial.read();
Serial.println(rx);
if (rx == 'r')
{
steps = Serial.parseInt();
x_fwd(steps);
}
else if(rx == 'l')
{
steps = Serial.parseInt();
x_bwd(steps);
}
else if (rx == 'f')
{
steps = Serial.parseInt();
y_fwd(steps);
}
else if (rx == 'b')
{
steps = Serial.parseInt();
y_bwd(steps);
}
else if (rx == 'x')
{
x_home();
}
else if (rx == 'y')
{
y_home();
}
}
}
}
void x_home()
{
digitalWrite(x_ena,0); digitalWrite(x_dir,0);
while(1)
{
digitalWrite(x_step,1); delayMicroseconds(40);
digitalWrite(x_step,0); delayMicroseconds(40);
if (digitalRead(lmtX)==0)break;
}
digitalWrite(x_ena,1);
}
void x_fwd(long pulse)
{
pulse = pulse * 10;
Serial.println(pulse);
digitalWrite(x_ena, 0); digitalWrite(x_dir,0);
for(int x = 0; x < pulse; x++)
{
digitalWrite(x_step,1); delayMicroseconds(40);
digitalWrite(x_step,0); delayMicroseconds(40);
if(digitalRead(lmtX)== 0)break;
}
digitalWrite(x_ena,1);
}
void x_bwd(long pulse)
{
pulse = pulse * 10;
Serial.println(pulse);
digitalWrite(x_ena, 0); digitalWrite(x_dir,0);
for(int x = 0; x < pulse; x++)
{
digitalWrite(x_step,1); delayMicroseconds(40);
digitalWrite(x_step,0); delayMicroseconds(40);
if(digitalRead(lmtX)== 0)break;
}
digitalWrite(x_ena,1);
}
void y_fwd(long pulse)
{
pulse = pulse * 10;
Serial.println(pulse);
digitalWrite(y_ena, 0); digitalWrite(y_dir,0);
for(int x = 0; x < pulse; x++)
{
digitalWrite(y_step,1); delayMicroseconds(40);
digitalWrite(y_step,0); delayMicroseconds(40);
if(digitalRead(lmtY)== 0)break;
}
digitalWrite(y_ena,1);
}
void y_bwd(long pulse)
{
pulse = pulse * 10;
Serial.println(pulse);
digitalWrite(y_ena, 0); digitalWrite(y_dir,0);
for(int x = 0; x < pulse; x++)
{
digitalWrite(y_step,1); delayMicroseconds(40);
digitalWrite(y_step,0); delayMicroseconds(40);
if(digitalRead(lmtY)== 0)break;
}
digitalWrite(y_ena,1);
}
void y_home()
{
digitalWrite(y_ena,0); digitalWrite(y_dir,0);
while(1)
{
digitalWrite(y_step,1); delayMicroseconds(40);
digitalWrite(y_step,0); delayMicroseconds(40);
if (digitalRead(lmtY)==0)break;
}
digitalWrite(y_ena,1);
}

Thank you for that, but it is not a real schematic and the code is not posted in the correct way. As described in how to get the best out of this forum link I posted in my first post.

Also that wiring diagram is too low a resolution to see the wiring properly.

However one thing I did spot is that there is no common ground connected to the Arduino, so that is wrong for a start. Also you do not show where the power is coming from to drive those stepping motors and the controllers. So there is a big black hole in what that diagram shows. All I can see is the Arduino and that can't be the source of power, because you can't draw enough power and voltage from the USB connector to do this.

Still no information about the nature of your stepping motor either. As I said:-

We only know what you tell us, and without knowing what you have, we don't stand a chance.

here is the full wiring of it

Sorry but no it isn't. There is no information as to where the power comes from. Both the 5V and the 24V. Nor is there any information about what exact stepping motor you have, and what current you set the drivers to produce.

They are both powered by different power supplies. One is a centralized power supply with DC 24V 10A for the DQ860MAH, and another is a separate power supply for the Arduino Mega, providing 5V. The switch settings are SW1 (on), SW2 (on), SW3 (on), SW4 (off), SW5 (on), SW6 (on), SW7 (off), and SW8 (off).

You don't seem to "get it". Word salad will not do. I am asking for a schematic. You are not even supplying that are you? Just pictures connected by wires. That is not a schematic, that is a physical layout diagram, and it misses so much information.

Connected to where?

Setting your controller to provide how many amps?

This is a bit of progress at least. That is a very big motor, that requires a lot of current at some voltage to drive it.

Do you see the vibrations when driving it slowly? You do not say under what conditions it vibrates instead of moves. It sounds to me like it is just on the limit of working and you may be asking it to move too quickly.

As this is such a big motor, it is bound to set up mechanical resonances with either itself or anything it is connected to. In order to get a motor to move faster with more torque you have to supply it with more voltage. I think that 24V might just not be high enough.

Anyway running it slower should tell you if that is the cause.