Strange homing behaviour Arduino GRBL

Hi All,
I have Arduino uno grbl 0.9j and easel 0.4.0. I have my own firmware settings.

On my recently rebuilt machine that has operated for many months without issue, I noticed an issue with the homing cycle. Y and z axis homing functions as expected, x does not. The x axis stalls on the “homing feed” “$24” cycle. I have had a look at all the grbl settings and cannot find why. I put my ear up to the motor and can hear a signal change through a small window of time, <1sec, during this signal change the motor stops moving. The y motor completes “homing feed” cycle for y and the x motor imitates it but not actually hitting its limit switch (because of the frameshift error introduced earlier). X homes without hitting a limit switch and gains the frameshift error from when it was not operating and should have been, very messy! Anyone any suggestions or observations greatly appreciated!

My grbl settings:
• $132=100.000 (z max travel, mm)
• $131=600.000 (y max travel, mm)
• $130=450.000 (x max travel, mm)
• $122=10.000 (z accel, mm/sec^2)
• $121=10.000 (y accel, mm/sec^2)
• $120=10.000 (x accel, mm/sec^2)
• $112=1500.000 (z max rate, mm/min)
• $111=1500.000 (y max rate, mm/min)
• $110=1500.000 (x max rate, mm/min)
• $102=200.000 (z, step/mm)
• $101=200.000 (y, step/mm)
• $100=200.000 (x, step/mm)
• $27=5.000 (homing pull-off, mm)
• $26=25 (homing debounce, msec)
• $25=500.000 (homing seek, mm/min)
• $24=100.000 (homing feed, mm/min)
• $23=3 (homing dir invert mask:00000011)
• $22=1 (homing cycle, bool)
• $21=0 (hard limits, bool)
• $20=0 (soft limits, bool)
• $13=0 (report inches, bool)
• $12=0.002 (arc tolerance, mm)
• $11=0.010 (junction deviation, mm)
• $10=3 (status report mask:00000011)
• $6=0 (probe pin invert, bool)
• $5=0 (limit pins invert, bool)
• $4=0 (step enable invert, bool)
• $3=4 (dir port invert mask:00000100)
• $2=0 (step port invert mask:00000000)
• $1=25 (step idle delay, msec)
• $0=10 (step pulse, usec)

Just thinking here. Can you swap motors and determine if that makes a difference? Obviously, you have to avoid a crash or accident. What about moving the switch locations temporarily? How about changing a new arduino?

Swapping motors and adjusting switch locations are reasonable troubleshooting steps. Ensuring safety during any adjustments is crucial. Trying a different Arduino could also help isolate the issue.

Thanks for the reply, it fantastic!!
The motor runs the x axis sweet and sounds great so I do not think it is motor.
I do not think it is the switch because it does not touch it.
I swapped out the old worn out Arduino with proper Arduino uno that was flashed to run a sainsmart, tested, same issue. I swapped pin 9 and 10 on the uno and crash goes the y. luckily my dm556’s are turned right down and the machine crashes with no damage. I swapped 9 and 10 back and it homed properly, i homed it again and slowly each time i home the machine the x axis drifts further and further away from the switch. I am wondering if the issue is in the wiring but one would think that would raise its ugly head in jogging, which it does not as the motor sounds great. To me this is truly a baffling problem. I will re-wire the whole x axis and get back when done!

I swapped the x and y motor plugs and the x axis crashed on the homing cycle. Tomorrow i will swap out the switches and the wiring for x and get back.

Did you check to make sure the coupler is not loose?

I slept on it and woke up fresh to realise that swapping switch 9 and 10 on arduino without swapping the motor cabling will cause crashing because the “stop” signal for x does not stop the x motor and visa versa, My excuse was a long days work and a tipple of Sake in the shed, lesson, never swap only one, always swap signal and power!!

This morning I swapped x motor and switch with y motor and switch and cannot replicate the problem, the machine seems fixed. i swapped them back and again, cannot replicate the problem. It would seem that unplugging and replunging the power and signal cables has fixed this perplexing problem for the moment though I am skeptical the issue is truly resolved. i have never come across an electrical issue that seemed to be so regular and controlled and yet caused by a seemingly random misconnection of wires, weird! Thanks MartinW.Mcclary and Alsopp for your ideas and suggestions and hopefully this discussion will help others with a similar issues.

1 Like