Welcome! Log In Create A New Profile

Advanced

NEMA motors turn both ways with single direction command

Posted by paulkoan 
NEMA motors turn both ways with single direction command
May 22, 2018 10:11AM
Hi, I just bought a couple of these to replace the existing motors on my printer (JK42HS40-1704):

[www.banggood.com]

I am driving these from a RAMPS 1.4 with A4988 drivers.

The existing motors turn fine, but these ones (once I figured out the coil pairs) vibrate heavily, but they do turn. The weird thing is that given the same command they might turn one way or turn the other way. Or turn a bit one way, then turn back a bit then turn the other way again. I am using octoprint, they are wired to the Z axis and I have Z set to the middle of the range so I am not involving endstops.

So it doesn't seem like a coil pair mix up - I had it wrong in the beginning and they just vibrate.

I don't have any load on there, just a spider coupler to see which way they spin easily.

Any ideas why this would happen?
Re: NEMA motors turn both ways with single direction command
May 22, 2018 09:43PM
Quote
paulkoan
Hi, I just bought a couple of these to replace the existing motors on my printer (JK42HS40-1704):

[www.banggood.com]

I am driving these from a RAMPS 1.4 with A4988 drivers.

The existing motors turn fine, but these ones (once I figured out the coil pairs) vibrate heavily, but they do turn. The weird thing is that given the same command they might turn one way or turn the other way. Or turn a bit one way, then turn back a bit then turn the other way again. I am using octoprint, they are wired to the Z axis and I have Z set to the middle of the range so I am not involving endstops.

So it doesn't seem like a coil pair mix up - I had it wrong in the beginning and they just vibrate.

I don't have any load on there, just a spider coupler to see which way they spin easily.

Any ideas why this would happen?

You need bi-polar steppers, sometimes you get universal, which also works if you are careful about the windings. If you have unipolar steppers they won't work. If you can ohm out only two coils, then they are bi-polar. Regardless, your description is a clear case of incorrect wiring. Ohm out the windings on your old steppers, then arrange your wires to match the two windings on your new ones. If they run backwards, swap the polarity of one of the windings.

DLC
Re: NEMA motors turn both ways with single direction command
May 23, 2018 03:46AM
Most steppers used in 3D printers can be used as bipolar or unipolar, hence the 6 connections on the stepper side. DLC is right that it's probably a wiring issue considering the stepper is reversing direction in the middle of a single command. Can you post a pic of the way you've wires the connector on the stepper end, it seems like you might have the center tap of a coil connected.
Re: NEMA motors turn both ways with single direction command
May 23, 2018 08:12AM
The motor doesn't have a plug, the four wires are referred to as A+ A- B+ B- in the spec and directly wired in.



The end was bare so I put a dupont on to work out the wiring:



This is connected to four individual wires so I can re-order easily, and then connects to the four wires that lead to the RAMPS.



Alternate pairs blue + red and black + green ohm together. I tested also with the "connect them and the motor get stiffer" test. So that matches the spec.

I have done the "random wiring start", "switch an end pair", "switch the middle pair" a few times as well as just matching the A and B on the ramps to the spec.

Edited 2 time(s). Last edit at 05/23/2018 08:15AM by paulkoan.
Re: NEMA motors turn both ways with single direction command
May 23, 2018 09:31AM
Ok, definitely wiring as everyone suspected.

Same motor, different set of wires, all works well.

Funnily enough, I don't think it is the wiring I did, but an issue with the connection to the RAMPS that coincidentally arose at the same time.
Re: NEMA motors turn both ways with single direction command
May 23, 2018 09:51AM
It sounded to me like one of the two coils was unconnected, so the motor would make a random 180 electrical rotation. Without a multi-meter you are just guessing though.
Re: NEMA motors turn both ways with single direction command
May 23, 2018 11:36AM
Cold solder joints on Ramps or the driver perhaps? Or just crappy connectors?
Re: NEMA motors turn both ways with single direction command
May 23, 2018 05:49PM
Crappy connections. I moved things around and one of the wires popped out of the dupont. The entire thing was metering right, continuity where it should have and none where it shouldn't. But I guess when actually connecting it, the wire was loose enough it got pushed out enough to not connect right.
Re: NEMA motors turn both ways with single direction command
May 23, 2018 09:26PM
That's a lot of connectors/jumpers between the motor and ramps. I personally have had a lot of experiences with dupont ended jumpers being faulty and glitchy (i.e. don't work at all and have a broken connection, work intermittently). I'd suggest soldering some connectors onto the motor wires and plugging those straight into the ramps. Less sources for error.
Re: NEMA motors turn both ways with single direction command
May 23, 2018 09:36PM
For sure - this was just set up this way to work out the wiring.

I have that now, so I can simplify.

Agree with the dupont jumpers, seems however careful you are they can be or become crappy. But they are quick to set up and tear down.
Re: NEMA motors turn both ways with single direction command
June 10, 2018 07:20PM
Thanks for the great discussion. This newbie learned some good stuff here. thumbs up
Sorry, only registered users may post in this forum.

Click here to login