Lightburn home button doesn’t work

Machine: K40

Board: Cohesion3D

Firmware: Smoothie

Problem/ Question: Home button on Lightburn doesn’t work correctly

Hi guys,

I’m using lightburn to work with my K40.
After a week of configuring the config file, everything works perfectly and I can do almost everything on my laser. That wouldn’t be possible without this forum from where I took all the information I needed.
The only catch regras the home button on lightburn. After lots of tweaking I’m kind of lost and I can’t make the home button work.
The problem is: everytime I hit the home button the laser head moves only up without going left to the rear left corner. I check the get position button and it reads x=0 y=227 ( my work space is x=315 x Y=227) which would be correct if the head were at rear left corner, but it isn’t! It seems,no matter where the laser head is that it looses the X and goes only to the Y position.
Every other command it works fine: it goes to the origin position(0,0), obeys the arrows orders (left,right up and down) the go to position coordinates I want with go to position button.
The only problem is really the home thing.
I’m tottaly lost here, and after reading I guess more than 3000 topics in this wonderful forum, I have to ask for your help here since I feel I reached the top of my skills in this subject.
Hope my English is clear enough…
Thank you very much!

Regards,
Mário

My best guess is it thinks the X limit switch is triggered so doesn’t attempt to move. Input M119 in the console and see what the results are. Default on K40 is X_min=1 & Y_Max=1 when at home position. It should be something similar to this. X_min:1 Y_max:1 Z_min:1 pins- (X)P1.24:1 (X)P1.25:1 (Y)P1.26:1 (Y)P1.27:1 (Z)P1.28:1 (Z)P1.29:1

To test your switches you can use this documentation located here. https://cohesion3d.com/knowledgebase/testing-endstops-homing-sensors-on-laserboard/

If your switches test out good you might verify your config.txt is setup correctly. Default aside from my table size should look similar to this:

## Endstops
endstops_enable                              true             # the endstop module is enabled by default and can be disabled here
#corexy_homing                               false            # set to true if homing on a hbot or corexy
alpha_min_endstop                            1.24^            # add a ! to invert if endstop is NO connected to ground
alpha_max_endstop                            1.25^            # NOTE set to nc if this is not installed
alpha_homing_direction                       home_to_min      # or set to home_to_max and set alpha_max
alpha_min                                    0                # this gets loaded after homing when home_to_min is set
alpha_max                                    325              # this gets loaded after homing when home_to_max is set
beta_min_endstop                             1.26^            #
beta_max_endstop                             1.27^            #
beta_homing_direction                        home_to_max      #
beta_min                                     0                #
beta_max                                     225              #
gamma_min_endstop                            1.28^            #
gamma_max_endstop                            1.29^            #
gamma_homing_direction                       home_to_min      #
gamma_min                                    0                #
gamma_max                                    200              #k40

Hi,
Many, many thanks for your answer!
I did all the tests and inverted the alpha-min-end. Now it goes home but when it reaches the sensor it keeps wanting to go further more to the left and keeps bouncing against the rail with a terrible noise.
Now, the get position button says -500 but the y is correct saying 227. Seems the x is inverted and with wrong with but the y axis is perfect. Any thoughts?

Correction:
On the “get position” button it reads x-500 andY500.
Also, no matter where the laser head is, the M119 code always states the x=1…

Hi Mario, you mentioned that you’ve edited your config file, so at this point I think it would be helpful to see the changes you’ve made. Can you post your full config file so we can look for anything that might be causing an issue?

To post the config file in a reply here please surround it with 3 backticks (that’s the key at the top left of your keyboard where the tilde is) like so:

```

paste your config file here

```


It will make the code nicely formatted like this
This is Line 2
I might be enjoying this var when (I say I am)

Alternatively, you may paste the config file to Pastebin, Dropbox, or Google Drive and provide the link here.

Once we have a look at your config file we may gain some insight into the behavior you are seeing. (If your files looks good, we can move on to how your laser is setup in LightBurn, but first, let’s start with the config file.)

Thanks!

Thanks, Tim! I noticed your link to testing the endstops wasn’t correct, so here it is. :slight_smile:

1 Like

Thanks, I’ve corrected my link. Think I’m going nutty sometimes with the blunders I make. :slight_smile:

I think we all are, given the times.

I had a similar problem with mine, was told to find the line in the Config file for homing, you can specify the sequence of homing. Whichever axis now homes first, select the other one to home first. If your file looks like this, with a # in front of homing_order it will attempt to home all axes at the same time (which is the default behavior.) If you uncomment the line by removing the # so the line starts with homing_order it should home one axis at a time, in the order specified by the XYZ on that line. You can change the order to YXZ to see if that helps.


config.txt (25.3 KB)

@Fred
Thank you very much!
I was really hopping for this one, but no joy…:(((

Please note that, as per M119 code, the X axis, no matter wich position it is on the workspace it always says X=1…
On the other hand, the Y axis changes to zero acording to it’s position…

Here are the results for the test switch :

M119 - HOME POSITION (UPPER LEFT CORNER)

X_min:1 Y_max:1 Z_min:1 pins- (X)P1.24:1 (X)P1.25:1 (Y)P1.26:1 (Y)P1.27:1 (Z)P1.28:1 (Z)P1.29:1

ok

ok

M119 - MIDDLE OF WORKSPACE

X_min:1 Y_max:0 Z_min:1 pins- (X)P1.24:1 (X)P1.25:1 (Y)P1.26:1 (Y)P1.27:0 (Z)P1.28:1 (Z)P1.29:1

ok

ok

M119 - MIDDLE OF THE RAIL BUT TOUCHING THE RIGH SIDE RAIL
X_min:1 Y_max:0 Z_min:1 pins- (X)P1.24:1 (X)P1.25:1 (Y)P1.26:1 (Y)P1.27:0 (Z)P1.28:1 (Z)P1.29:1

ok

ok

Pictures of how you have the board wired up and the limit switches connected might help. It looks like the X limit switch is always triggered so doesn’t attempt to move home. If you have mechanical switches you can test it with a continuity tester or DMM. I’m not sure if they are normally open or normally closed but depressing the switch you should get a change in continuity. If you don’t get a continuity change you need to replace the switch, if you do you need to trace that up the wire to the laserboard to identify where the link is broken.

Giiii! I don’t have the skills for that…

Mario, it does sound like your X switch is not working properly. If it always shows 1 when you do the M119 endstop test then it has probably failed in the “on” position or it may be “stuck” somehow, or even shorted out.

Can you locate the X switch and try to trigger it by pushing it with your finger? Does it move? Do you hear a clicking sound?

Also, if you can post some photos of the X limit switch from a few angles, the LaserBoard showing the wiring, and even a short video of you clicking X limit switch with your finger, that might help diagnose the problem.

(I’ve got a few ideas, but testing the X limit switch and providing photos/ video will help before we move to the next step.)

Hi,
First I would like to thanks to all of the guys who tryed to help me.
After many tests the only conclusion I reached is that the x axis limit switcher is somehow out of order.
What still puzzles me is, if I invert the alpha-min-end the X axis moves correctly as it is supposed to, this means it goes up and left to the home position when I hit the home button. In this case the get position button reads X-500 and y500 (instead of X0 Y227) and I can’t fix the correct workspace even with the gcode G10 L2 P1Xxx Yxx (tryed every possibility including negative workspace).
Other than that I’m in the market looking for new limit sensors for my k40…

Mario, if you’re wondering about the 500 value, you have this in your config file:

alpha_max_travel                             500              # max travel in mm for alpha/X axis when homing
beta_max_travel                              500              # max travel in mm for beta/Y axis when homing

This means when your laser homes it will attempt to move a maximum of 500mm in X and Y (X going down, Y going up) until it gets to home in the back left. If the endstop switches are triggered it will stop and assume where it stops is 0 for X and 227 for Y.

Here’s something you can try. Power off your laser, then using your hand, manually move the head to the back left corner. When you power up the laser, wait for the head to home (even though it’s already there) and then use the Get Position button to see what X and Y are at. Now, jog the head around, but do not click the Home button. Instead, set the Move to Position to X: 0 and Y: 227 and click the Go button. Does it move back to “home”?

Try the above, and let us know what happens. Again, you’ll most likely need to replace the X endstop switch, but we can take a look at any photos or videos you can capture to see if it’s something obvious and easily fixable.

It goes to home position…

Good to hear. So this method of “homing” should work for now and allow you to use your laser normally. Then once you replace the X endstop switch you should be able to go back to using the Home button.