Go Down

Topic: 4 wires but 2 pins stepper motor (Read 645 times) previous topic - next topic

MorganS

Did you try the AccelStepper library? Use the "ConstantSpeed" or "Bounce" examples. Replace the line below...

Code: [Select]
AccelStepper stepper; // Defaults to AccelStepper::FULL4WIRE (4 pins) on 2, 3, 4, 5


with...

Code: [Select]
AccelStepper stepper(AccelStepper::DRIVER, 9, 8);
"The problem is in the code you didn't post."

nice_servo

Replaced line, still nothing. I see green light on driver and power supply which means everything is wired correct. But still no movement.

nice_servo

In the datasheet, under troubles:

....................
Motor doesn't run, but maintains holding torque (which in my case is true, its stiff wont turn if i tried with my hand but does run)
Reasons: without input pulse signal (whatever that means)
Measures: adjust PMW & signal level
......................

does that mean i need to move wires around?

FredScuttle

Looks like the +5V terminal in the signal group is the common "return" wire, connect to Arduino 5V pin, STEP and DIR will be LOW true.
Awww! Who needs an instruction manual to use a simple chain sa......

Robin2

#19
Jul 19, 2018, 09:28 am Last Edit: Jul 19, 2018, 09:29 am by Robin2
Ok, i tried it with different example codes and also tried "Simple Stepper Code". It doesnt move.
If that means the code from my link then stick with that until you get it working. If it won't work with that simple code it won't work with anything more complex. Just make sure there is a long interval between steps - at least 250 millisecs - so the motor is moving very slowly.

I presume you have made sure that the step and direction pins in the code match your physical connections.

Are you sure you have identified which pairs of motor wires belong to the different coils in the motor?

Be VERY CAREFUL never to disconnect the wires between the motor and the stepper driver while the driver is powered up. The driver will be instantly destroyed,


Have you set the current limit correctly to match your motor?

What micro-stepping setting have you set? For testing I recommend full steps.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

nice_servo

Looks like the +5V terminal in the signal group is the common "return" wire, connect to Arduino 5V pin, STEP and DIR will be LOW true.

Done that. Doesnt work.

If that means the code from my link then stick with that until you get it working. If it won't work with that simple code it won't work with anything more complex. Just make sure there is a long interval between steps - at least 250 millisecs - so the motor is moving very slowly.

I presume you have made sure that the step and direction pins in the code match your physical connections.

Are you sure you have identified which pairs of motor wires belong to the different coils in the motor?

Be VERY CAREFUL never to disconnect the wires between the motor and the stepper driver while the driver is powered up. The driver will be instantly destroyed,


Have you set the current limit correctly to match your motor?

What micro-stepping setting have you set? For testing I recommend full steps.

...R
250ms between steps done. checked all pins. current limit correct. tested with full steps.
I even tested with a same brand different motor and different driver.

I think Ill just have to buy a driver with dir+/- and step+/- .

Robin2

#21
Jul 19, 2018, 05:30 pm Last Edit: Jul 19, 2018, 05:31 pm by Robin2
I even tested with a same brand different motor and different driver.
Do you mean that you have two different examples of that stepper driver?

Quote
I think Ill just have to buy a driver with dir+/- and step+/- .
It may well be that your driver is damaged but I don't think the fact that it refers to the pins as PUL and DIR matters.

I don't think it makes any real difference but as the logic power is at 5v I presume a step is caused when the PUL pin is brought LOW.

Have you tried with the enable pin HIGH and with it LOW?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

nice_servo

#22
Jul 19, 2018, 10:54 pm Last Edit: Jul 19, 2018, 10:56 pm by nice_servo
When i run robin's "Simple Stepper Code" all i hear as soon as the arduino uploads the code is a teeny tiny tick coming from the motor

Do you mean that you have two different examples of that stepper driver?
It may well be that your driver is damaged but I don't think the fact that it refers to the pins as PUL and DIR matters.
i mean i have more than one of the same exact driver and motor, even if it was damaged i tried the other driver and motor. Same problem.

Have you tried with the enable pin HIGH and with it LOW?
am not sure what you mean here, or how to do that!  :smiley-confuse:

nice_servo

ITS FINALLY WORKING

Did you try the AccelStepper library? Use the "ConstantSpeed" or "Bounce" examples. Replace the line below...

Code: [Select]
AccelStepper stepper; // Defaults to AccelStepper::FULL4WIRE (4 pins) on 2, 3, 4, 5


with...

Code: [Select]
AccelStepper stepper(AccelStepper::DRIVER, 9, 8);

I tried this again and for some reason it worked. Maybe because i changed the driver and motor.

Thanks, many thanks to everyone for your help.

MorganS

"The problem is in the code you didn't post."

Go Up