SOLVED: Limit switches functioning, homing sequence isn't

I just finished setup on a 1000x1000 xcarve and I’m having an issue getting the homing sequence to complete in the setup. I confirmed with a multimeter that the switches are all reading a steady 5V when released and drop to zero when pressed. When the homing sequence begins the Z raises until the Z limit is engaged, then lowers a bit and creeps back up to the click. When the X and Y reach the switches the steppers cut out like they should but dont exhibit the same behavior (reversing direction ever so slightly then creeping back towards the switch). I dont know if this is normal, but at any rate all three steppers halt as soon as the switches engage, but the homing sequence never finishes and just keeps saying “starting homing sequence” indefinitely. I tried to execute a carve to try the homing feature there thinking it was just a little setup glitch - running that homing function I just get a message saying that homing failed. Is this what happens when the electrical noise issue I’ve heard mentioned here is especially bad with the unshielded limit switch wire maybe?

Thanks for any advice, I’m sure a lot of you are sick of hearing about limit switches about now.

Normally the “noise” issue causes the homing sequence to terminate prematurely. The X and Y axis switches depend on having a screw mounted in the MakerSlide to activate the switch when the carriage reaches the appropriate point for the home position. Do you have these screws installed and adjusted?

Hmm. I do have the screws installed (socket head with post assembly insertion nut) and they make good contact with the X and Y, and the Z makes good contact with the Z carriage. All of them engage during the test and the corresponding motor stops when they do. Ive also wrapped a finger around the X and Y slides to engage the switches manually at an earlier stopping point and again the corresponding steppers stopped the instant the relevant switch engaged. But I still get stuck with the unending “Starting homing sequence” in the machine setup sequence.

Let’s take a look at your grbl settings to see if something is messed up there.

You can use UGS, a terminal program such as HyperTerminal or Putty, the serial monitor in the Arduino IDE or the Machine Inspector in Easel.

Get the $$ output from grbl and post it here. If you don’t know what that is then I can elaborate.

Hopefully this is what you’re looking for. I have these settings showing up in the machine inspector.

$0=10 (step pulse, usec)
$1=255 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=3 (dir port invert mask:00000011)
$4=0 (step enable invert, bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=3 (status report mask:00000011)
$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=3 (homing dir invert mask:00000011)
$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=188.976 (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)

Your grbl settings look good.

The more I think about it, this could be the noise issue. Try running the homing setup again through Easel. Start with the carriage a good distance from the home position for X and Y. After the Z axis finishes and the X and Y axes are moving press the X switch multiple times and then press the Y switch multiple times and see if that makes the homing sequence complete.

I ran a couple of test carves (the same design twice on the same workpiece) and had a bad offset between the runs. I discovered my X axis belt had slipped and become pretty loose so I re-tensioned everything, re-adjusted all the adjustable v wheels and jogged the machine around the work area until I had consistent, smooth travel in all directions. Then I re-ran the limit switch operation and everything went well. I guess with a somewhat loose belt the machine was hitting the switches and then when it tried to jog back and reapproach the switch (like the Z was doing all along) it wasn’t getting good enough traction for such a small move back, hence the failed operation. Glad it was something simple! Wish there was a better way to describe to new people what adequate belt tension feels like.

Yes, that is a re-occurring problem. Glad you got it worked out.

I have been researching a problem I created for myself… I feel that you might have an answer to my problems. I believe I have uploaded a bad hex file to my machine. Am I able to run the machine with both easel and UGS back to back? I had to reflash my UNO and I believe I put the wrong hex file on. My homing cycle is going backwards, and it was correct before I started blaming belt tension on vwheels, voltage and software.

This is out of UGS:
$0=250.000 (x, step/mm)
$1=250.000 (y, step/mm)
$2=188.976 (z, step/mm)
$3=10 (step pulse, usec)
$4=250.000 (default feed, mm/min)
$5=500.000 (default seek, mm/min)
$6=96 (step port invert mask, int:01100000)
$7=25 (step idle delay, msec)
$8=10.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=1 (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)

Wrong Hex file?

Thanks much.

Yep, that is an old grbl release.

When you connect to the serial port (OPEN in UGS) the console output should start out with the grbl version.

I think you want v0.9j.

You can only have one program accessing the serial port at a time. So, no, Easel and UGS cannot run at the same time.

Not to revive an old post - just wanted to say thanks. All my limit/homing switches were working fine after building my 1000mm X-carve. The X-axis switch stopped working suddenly. I noticed that the belts had loosened quite a bit and the screw going into the T-slot nut was completely loose (like lots of other nuts on the machine after a couple uses). Tightening the belts fixed the limit switch. Thanks!

That’s great! Glad to hear the post helped somebody out.

Just be sure to use the right kind if case you need to re-adjust later - I’ve been told you want the weaker formulation (I think it’s the blue, as opposed to the red with Loctite brand).

I used 242 and 220.

Someone on the forum calculated that the M5 should have 25 in/lbs in aluminum. Don’t know the source of the information.

Before seeing this I had assembled my X-carve and I used 20 in/lbs (just seat of the pants guess based on the Inventables suggestion of tight but not too tight).

So far, things are working well.

1 Like

Yes, I was thinking mainly of the Makerslide, however, I used the same torque throughout since my build was based on a guess anyway and the instructions didn’t say tighten the nuts more than the Makerslide.

I just didn’t want to strip out the Makerslide as I have a tendency to over tighten.