Machine won't complete homing sequence

My machine has been working fine for the last 4 months. I have done many carves with no problems. Occasionally the machine would not complete the homing sequence. But most times it got pretty close to tripping the switches and a second home command did the trick.

Having a bit of down time, I set out to “fix” the problem by changing the wires and using 2 conductor shielded cable. I got 22 gauge wire.

After re-wiring I tried the machine and much to my surprise I got the same behavior as I was getting with the twisted pair. I read on the Forum about how to connect the shied on the cable properly and I although I thought I had it right, I could perhaps do better. Let me explain: After the wiring was installed I connected the shield of the cable to the ground on the gshield, This is negative of the 24V power supply.

Reading on the Forum I decided that I should really connect the shield on the cable to “real” ground, that is the green/yellow wire coming from the wall plug to the power supply.

Now, all I get is a couple of bursts of movement, in the right direction on Z first, then on X and Y. Not enough movement to reach the homing switches. UGCS seems to think the homing sequence completed as it shows an OK status and the red banner goes away.

I have checked the switches monitoring the gshield status, after setting $10=19, and there is no noise on any of the homing switches and when tripped manually they show the proper status, 001 for X, 010 for Y and 100 for Z. If I disconnect the ground to shield connection I do see noise from the switches.

Since the switches appear to be working and the signal is clean (and the behavior is exactly the same every time) I thought the gshield is fine as it can see the signals changing.

I have re-flashed the arduino and even tried a second one, no change. I hope this is not a gshield problem.

As a side note, I can move all axis in all directions with no hesitation at all. Homing switches remain noiseless when moving the gantry in all directions.

I don’t know what else to try and would appreciate any and all assistance.

Here are my GRBL settings:

**** Connected to COM5 @ 115200 baud ****

Grbl 0.9j [’$’ for help]

$0=10 (step pulse, usec)
$1=255 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=4 (dir port invert mask:00000100)
$4=0 (step enable invert, bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=19 (status report mask:00010011)
$11=0.020 (junction deviation, mm)
$12=0.002 (arc tolerance, mm)
$13=0 (report inches, bool)
$20=0 (soft limits, bool)
$21=0 (hard limits, bool)
$22=1 (homing cycle, bool)
$23=4 (homing dir invert mask:00000100)
$24=25.000 (homing feed, mm/min)
$25=750.000 (homing seek, mm/min)
$26=250 (homing debounce, msec)
$27=1.000 (homing pull-off, mm)
$100=40.000 (x, step/mm)
$101=40.000 (y, step/mm)
$102=320.000 (z, step/mm)
$110=8000.000 (x max rate, mm/min)
$111=8000.000 (y max rate, mm/min)
$112=500.000 (z max rate, mm/min)
$120=500.000 (x accel, mm/sec^2)
$121=500.000 (y accel, mm/sec^2)
$122=50.000 (z accel, mm/sec^2)
$130=790.000 (x max travel, mm)
$131=790.000 (y max travel, mm)
$132=100.000 (z max travel, mm)

Proper grounding can be a bit of an art. What you are trying to accomplish is to get a clean signal to the gShield from the homing switches.

Unless you have an oscilloscope you cannot tell if you are getting a clean signal.

Assuming you are using normally open connections on your homing switches, hook the black wire from each switch together along with the shield wire from each switch wire together and then hook that whole mess together and to the ground wire connection on the gShield at the homing switch connector. At the homing switch end do not connect the shield from the wires to anything. Just leave that end open as far as the shield is concerned.

Check that out and see how it works.

It that doesn’t work then, as a test, disconnect the shield from the stepper motor cables from the ground at the power supply end of things and see if that changes the behavior (the shields on the shield wire should also be open ended at the stepper motor end of the wire).

I found it usually has more to do with your connections you soldered to your gshield causing the noise rather than your grounding, it’s a pretty common issue with the stock machine. I developed a noise filter that will address both issues as well as having your homing switches work as limit switches as well + some other great easy connections. They are for sale here or if you’re up to making your own pcbs I have posted the schematic on the forum as well.

Hey Larry, thanks for the suggestions. Here is what I’ve done:

  1. I opened the connection between the stepper motors shield and the Homing switches shields.

This produced a semi-weird result. all axis directions reversed, but only during the homing cycle. I then reset the homing direction $23 to a value that produced the right direction on all 3 axis. I really don’t understand why but now $3=4 and $23=3 now and produces the right results. I would have thought that they should be the same…

Now homing worked fine.

  1. I connected the Homing switches shield to the -24V cable, the same one the black Homing switch wire connects to.

Homing still worked fine.

  1. Connected the Stepper motors shield to the Homing switch shield.
    Homing still worked most of the time, but failed to reach the homing position some other times.

I’m tempted to break this connection again, but that would mean the Stepper motor shield cables would not be connected to anything.

Any further suggestions? Any idea why the direction changed after separating the motor and Homing shields?

And yes the shield cables are only connected at the power supply ends.

Thanks again for your help.

BTW when I said the switch signals were clean I was referring to the scrolling display on the UGCS console. When “Show verbose output” is checked, if you have $10=19 it continually displays the, among other stuff, the limit switches status.

Thank Brian, I think I got it working now. I looked at your post but did not see the schematic for the filter, could you point me to it please, just in case I decide to make one.


Here you go Peter [Link]


There is something wrong here (or not quite right to be more specific). If you wired up your stepper motors as the Inventables instructions suggest then $3 and $23 should be equal to 3. I would check your wiring of the motors. At least for this part of the testing be careful and have your finger on the 24 volt power supply switch to turn it off if things go badly. Also, set $20=1 to enable soft limits. Once the testing is done you can decide if you want to keep soft limits. Since you are homing I recommend that you always run with soft limits turned on. It helps in two ways. Once the homing sequence is complete then the switches are no longer in the picture. So no false triggers. And also it keeps your system from executing any commands that would cause the spindle to leave the machine space. Which spindle/router do you have?

Probably need to work out he motor issues first.

They don’t really have to be connected. I run with the stepper motor shields not connected on either end. Some people will jump all over this, but it works. When you have large currents flowing in a wire the grounding problems become much more complex, especially when you are dealing with low voltage logic signals. Even a small resistance in a ground path that carries large currents can raise the voltage on a ground wire to the point where it can trigger a logic circuit to change state. That’s why I recommend the grounding for the homing switch system be connected directly to the logic inputs on the homing switch connector and then connect things like motor shielding directly to the power supply lines.

[quote=“Peter_Jakab, post:5, topic:20757”]
BTW when I said the switch signals were clean I was referring to the scrolling display on the UGCS console[/quote]

The reason I mentioned this is that the UGCS output is sampled at a very slow rate. Noise signals that can cause a false trigger are down in the nano-second range, which UGCS will never see.

Thank you Brian. I see it now.

Hi Larry.

I took a quick look at the wiring and it loos OK to me, at least as far as the colors being consistent at both ends go. I will look at this in more detail later.

I disconnected the stepper motor shields, they are connected together, but are not connected to -24V or earth ground. I was getting intermittent failures when I connected them to -24V along with the Homing shields. Now homing works “perfectly” in the limited testing I was able to do. For example homing from the diagonal opposite extreme several times (x=750, y=750).

Thanks again for your all your help.

1 Like

You guys love to over complicate things :slight_smile: just head over to Radio shack if you can still find an open one, or the parts online and build the filter or buy one from me . You’ll be up and running in no time. Trying to zero in on noise without a good oscillator and a lot of experience is like trying to find a needle in a haystack. It’s so much easier to just filter it out.

My machine is working well now, but if starts acting up again I will do just that :slight_smile: