Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Y and Z Axis move in one way only #287

Closed
gblanco opened this issue Nov 19, 2013 · 11 comments
Closed

Y and Z Axis move in one way only #287

gblanco opened this issue Nov 19, 2013 · 11 comments

Comments

@gblanco
Copy link

gblanco commented Nov 19, 2013

Hi,

I'm running Grbl on an Arduino uno (tried 0.9a and 0.8c) with the same results. Axis X moves back and forth, Axis Y moves one way only.

Tried already reversing the wiring, reversing one phase, 2 different arduinos....

I can see with my multimeter that Y Dir pin doesn't change it's state (always 0V), I believe is the root of my problem (and Z axis is the same).
I understand that here lays my problem, any suggestion on why can this be happening?

I have no limit switches at all.

Switching Driver for X and Y, makes no difference.

Regards

Gustavo

@chamnit
Copy link
Member

chamnit commented Nov 19, 2013

@gblanco : Sorry to hear that you are having problems. Grbl shouldn't be doing that. Can you send us your Grbl $ settings and briefly describe your machine? Also, are you using the pre-compiled version of Grbl or compiling it yourself? If the latter, can you tell us what you changed? Thanks!

@gblanco
Copy link
Author

gblanco commented Nov 19, 2013

Hi

Here are my Grbl $ settings

$0=1.250 (x, step/mm)
$1=2.000 (y, step/mm)
$2=2.000 (z, step/mm)
$3=10 (step pulse, usec)
$4=2000.000 (default feed, mm/min)
$5=1200.000 (default seek, mm/min)
$6=192 (step port invert mask, int:11000000)
$7=25 (step idle delay, msec)
$8=100.000 (acceleration, mm/sec^2)
$9=0.050 (junction deviation, mm)
$10=0.100 (arc, mm/segment)
$11=25 (n-arc correction, int)
$12=3 (n-decimals, int)
$13=0 (report inches, bool)
$14=1 (auto start, bool)
$15=0 (invert step enable, bool)
$16=0 (hard limits, bool)
$17=0 (homing cycle, bool)
$18=0 (homing dir invert mask, int:00000000)
$19=25.000 (homing feed, mm/min)
$20=250.000 (homing seek, mm/min)
$21=100 (homing debounce, msec)
$22=1.000 (homing pull-off, mm)

Hardware-wise it's a XY table.

a) One Arduino UNO
b) One Pololu , one Stepstick (for X and Y)
c) One Nema23 motor for X
d) Two Nema17 motors (oposite to each other, so one phase is inverted)
e) One Hacked PC PSU feeding 12V and 5V

I have tried inverting which motor is attached to which driver with the same effect.

Downloaded Grbl pre-compiled
grbl_v0_8c_atmega328p_16mhz_9600.hex
grbl_v0_9a_edge_328p_16mhz_9600_build20121210.hex

Apparently PIN 6 and 7 on the arduino never change their state. Always reads 0V, while X on the other hand changes depending on the direction of motion requested.

I have wired, PINs 2 and 5 for X (dir and step); 3 and 6 for Y; Both Reset Pins together to A0; both Enable to PIN 8; All GND (arduino, 12v and 5V) together.

Hope any of this helps.

Gustavo

@chamnit
Copy link
Member

chamnit commented Nov 19, 2013

@gblanco : For the most part things look ok… but there are a few things that I'm unsure about. Your steps/mm settings are unusually low, are these correct that there are only two or less steps to move 1 mm on your machine?

What do you mean by the two NEMA 17 motors are opposite of each other and one is phase inverted? And do all of your stepper drivers work on the X-axis? or is it a particular driver that works on it?

Your A0 Grbl Reset pin shouldn't be connected to anything but a NO external switch to ground, if you want to have a physical soft-reset button. It shouldn't be connect to the Arduino reset pin.

Lastly, can you give some example g-code that you using to test this? Just want to rule this out.

@gblanco
Copy link
Author

gblanco commented Nov 19, 2013

Hi,

First, thanks for the quick response.

My Steps/mm are low because i don't have microstepping and I have a large pulley.
About the G-Code, I'm testing from and Arduino Serial Monitor,

If I issue (say)

G92 X0 Y0 Z0
G1 X100 /// X moves correctly 100 mm in one direction
G1 X0 /// X goes back to the previous position 100mm in the other direction

BUT
G1 Y100 /// Moves 100 mm in one direction
G1 Y0 /// Moves 100mm in the SAME direction
G1 Y-100 /// Moves 100 mm in the SAME direction

About the opposite motors.

I'll describe it for reference, but the issue is the same with only ONE motor attached,

They are in a back-to-back layout. Since my machine is a FOAM cutter, I need to move two drive trains parallel to each other. Similar as one would do with a RepRap (i2 or i3) I have 2 motors,but one the first turns CW the other turns CCW (and viceversa)
To do that they are wired

Motor 1 Motor 2 Driver
A A- A
A- A A-
B B B
B- B- B-

Both motors perform in the desired manner, but as with only one; the both move always in the same direction.

If I disconnect A0, nothing moves at all.
It's wired according to this tutorial (sorry it's in Spanish) http://www.youtube.com/watch?v=lvaBb-rPepY#t=31

Thanks

Gustavo

@chamnit
Copy link
Member

chamnit commented Nov 19, 2013

@gblanco : Ok that clarifies some things. First, I think this is something electrical and weirdness caused by this. You shouldn't be experiencing this direction issue with a typical setup. This is the first I've heard of something like this. Can you verify that your direction pins on your Arduino aren't fried? You can do this with the Arduino IDE and just set them high and low and check if they still do it.

Secondly, I find it very strange that if A0 isn't connected that nothing moves. This is not the purpose of A0, which is held high with an internal pull-up resistor. I'm unsure what you mean by "both reset pins" are connected to it, but I imagine this is your stepper driver reset pin and the Arduino reset pin all wired into A0? If so, I think this is incorrect. If I can recall, the stepper driver reset pins don't need to be wired into the Arduino. Just the step, direction, enable, and ground. On the other hand, your stepper driver reset pin may need to held high to operate. Check this and if it is, it needs to be wired into the Arduino 5V(or 3.3V) pin.

I don't have any experience with wiring your stepper motors in the way you are describing. It seems a little strange to me. I wonder if this has something to do with the problems you are experience, but I can't say for sure. From what I heard, people have used two stepper drivers to drive their dual Y-axes and shared the same step and direction pins to move them in sync.

@Sualc
Copy link

Sualc commented Nov 20, 2013

Hello,

Swap all controls axes pins from the Arduino to the drivers (DirX for DirY, StepX for StepY).
If you have "enable" signals swap that also.
Easy swap if you have the same stepper drivers for X and Y, only need to swap connectors.

If the problem swaps also, then your problem is at the hardware side (initial DirY).
I hope this help you.

@gblanco
Copy link
Author

gblanco commented Nov 20, 2013

chamnit,

A0 connects to Both pololu and stepstick RST (not arduino's)

I have gone through the process o thinking that "the two motors thing is the issue", but again; with only one motor nothing changes.

I have gone through the "swaping ports" process with no luck.

I "suspect" the Stepstick was either burned (at least some functionality) or was faulty from start.

I took it apart, replaced the Stepstick with a new one, and re-assembled everything to find it working.

Both motors move back and forth (YESSSS!!!!) with the same controller and as described, they turn in opposite directions.

Thnks for all your help.

Gustavo

@chamnit
Copy link
Member

chamnit commented Nov 20, 2013

@gblanco: Congrats! Good to hear everything is working. Thanks for keeping us updated on your progress too.

My bad on the A0 pin. Coincidentally the A0 pin is also on the Arduino and is used for the Grbl soft-reset feature. I hadn't realized that there were A0 pins on your stepper drivers.

I'm just curious how your Stepstick got fried in the first place, via over voltage or something else like the two motor setup. If you find out more, let us know!

@chamnit chamnit closed this as completed Nov 20, 2013
@Neevan1991
Copy link

hi sir, i am using GRBL laser ver 0.9. when i am controlling the direction in the grbl for X axis. the stepper motor it rotates in same direction for all axis movement. please help me on this

@jahnj0584
Copy link

jahnj0584 commented Sep 20, 2017 via email

@epworth2
Copy link

epworth2 commented Feb 3, 2018

All this and the driver trans is probably smoked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants