Sculpfun S9 with limit switches

Hello Everyone!
I’m at a loss and after hours reading posts I figure it would be best to ask. I have a Sculpfun s9 that I am attempting to add limit switches from Sculpfun on to. I watched the Sculpfun how to YouTube video which instructs the user to flash a new firmware to the machine. I did that but after reading many posts I’m not sure that was the right thing to do since my laser is brand new with the newest firmware on it. My issue is this, I turn the machine on and have the laser manually set to x0 y0, I then use light burn to move the laser to x50 y50 and then attempt to home the laser. The laser moves back to the limit switch and makes a horrible clicking like it’s waiting to push past it. I have verified that both limit switches are working and registering with light burn. What is odd is that when I look at the position before shutting the machine off it is x-429 and y-429. I have my switches as the lower left corner for the y (on the y rail) and left of the laser for the x.

Any help would be much appreciated.

Sounds like the switch isn’t being contacted. Can you visually verify this?

It is making solid contact with the switch, fully depressing it.

That was wrong, indeed. You should never flash a firmware of the current lasers for limit switches.
Anyhow, since it has already been done: reset the firmware settings by sending $RST=* via console first. Your limit switches don’t seem to work, did you do the test using the question mark command? You can’t register them in LB, LB is not interested in any switches. The frimware does that.

I reset the firmware and then did the question mark and the console read this:
?

<Idle|MPos:0.000,0.000,0.000|FS:0,0|Pn:XY|WCO:0.000,0.000,0.000>

ok

My switches are always closed so I assume I need to update the GRLB $5 to 1

Yes. Did you try?

Yes, and it homes towards the lower left corner as anticipated but hits the limit switches and grinds. When the machine stops the laser position on LightBurn shows as x-423.5 and y-423.5. It’s almost like GRBL has my homing position in the top right corner.

I noticed that I had $5 set to 7 so I changed it to 3 in hopes that would help but it did not. If I jog the laser out from the lower left corner (my x0 y0) to 100x 100y and then click home the laser moves towards the lower left corner but contacts the limits switch and grinds. If I let the machine grind and stop I finally get this error:
ALARM:9

Homing fail. Could not find limit switch within search distance. Defined as 1.5 * max_travel on search and 5 * pulloff on locate phases.

The machine comes to rest now at x-423.5 and y-423.5 and when I enter ? into the console this is displayed:
<Idle|MPos:-423.500,-423.500,0.000|FS:0,0|Pn:Y|WCO:0.000,0.000,0.000>

In this case it triggered the Y switch as you can see. The machine is registering that it is at the work coordinate offset of 0.00,0.00,0.00 but Machine Position of -423.50,-423.50,0.00. Should these be different or does it matter?

Here are my GRBL settings:
$$

$0=10

$1=25

$2=0

$3=4

$4=0

$5=1

$6=0

$10=1

$11=0.010

$12=0.002

$13=0

$20=0

$21=1

$22=1

$23=3

$24=100.000

$25=1500.000

$26=250.000

$27=100.000

$30=1000.000

$31=0.000

$32=1

$41=0.000

$40=0.000

$100=80.000

$101=80.000

$102=250.000

$103=100.000

$104=100.000

$105=100.000

$110=6000.000

$111=6000.000

$112=1000.000

$113=1000.000

$114=1000.000

$115=1000.000

$120=1000.000

$121=1000.000

$122=1000.000

$123=200.000

$124=200.000

$125=200.000

$130=385.000

$131=385.000

$132=200.000

$133=300.000

$134=300.000

$135=300.000

Which firmware did you flash? Maybe you should first flash the latest version again, make sure it’s the 32bit version, as newer S9 have the S30 mainboard included.

Do not let the machine grind, this will damage the belts, switches, and mechanics. Not a good thing.
So, the limit switches are not detected. At least, the x-switch is not detected as the output suggests. Do the manual test. Activate one switch and send the question mark command. Check the output. Then do the same for y. Does it recognize both correctly? Make sure that the cables are correct, the y-switch is the one sitting on the frame front-left.

This should be ok then, as long as the world coordinates are 0,0. But you need to set $10=0 to report the correct value to LightBurn. Anyhow, the machine position is still set incorrectly, since it’s bigger than the workspace size.
What’s the output of the $# command?

The firmware that I flashed was from this page:

Under the Sculpfun S30 + S9 with new boards category. I noticed that this file differs from what is on Sculpfun’s website under the Firmware Download section.

The console shows this when the laser is plugged in:
Waiting for connection…

[VER:1.1h.20221226:]

[OPT:V,15,128]

Pressing the X switch (the one to the left of the gantry) and ? on the console results in this:
?

<Alarm|MPos:0.000,0.000,0.000|FS:0,0|Pn:Y|WCO:0.000,0.000,0.000>

ok

Pressing the Y switch (the one on the left Y rail) and ? on the console results in this:
?

<Alarm|MPos:0.000,0.000,0.000|FS:0,0|Pn:X>

ok

It looks like the switches are inverted, which I realize is due to $5=1. I traced the wires back to the control board and the X switch wire is plugged into the X plug on the board, and the Y switch wire is plugged into the Y plug on the board.

I changed $5=0, and the switches register accurately but the show triggered when they are not. The console shows this with neither switch pressed:
?

<Idle|WPos:0.000,0.000,0.000|FS:0,0|Pn:XY|WCO:0.000,0.000,0.000>

ok

Pressing the X switch results in this:
?

<Idle|WPos:0.000,0.000,0.000|FS:0,0|Pn:X|WCO:0.000,0.000,0.000>

ok

Pressing the Y switch results in this:
?

<Idle|WPos:0.000,0.000,0.000|FS:0,0|Pn:Y|WCO:0.000,0.000,0.000>

ok

Pressing both switches results in this:
?

<Idle|WPos:0.000,0.000,0.000|FS:0,0|Ov:100,100,100>

ok

It seems like I need to invert the signal that the GRBL is seeing when they are both open and both closed, as it looks like when one or the other is closed and the other is open it sees it correctly. Does this make any sense?

I set $10=0 and then typed $# into the console which resulted in this:

$#

[G54:0.000,0.000,0.000]

[G55:0.000,0.000,0.000]

[G56:0.000,0.000,0.000]

[G57:0.000,0.000,0.000]

[G58:0.000,0.000,0.000]

[G59:0.000,0.000,0.000]

[G28:0.000,0.000,0.000]

[G30:0.000,0.000,0.000]

[G92:0.000,0.000,0.000]

[TLO:0.000]

[PRB:0.000,0.000,0.000:0]

ok

Thank you for your continued help.

Update: I left all of the settings alone with the exception of $10=0 as stated above and switched y cord to the x plug on the board and the x cord to the y plug on the board. This seems to fix everything. When the y switch is depressed the console shows the correct switch being depressed and same thing with the x switch when depressed. I can send the machine to any coordinates and then home it successfully.

2 Likes