Homing problem grbl

Hi, I had an interesting problem today, when I was doing the homing, the homing coordinates were equal to the coordinates of the end of each axis in a negative direction. I used the code G10 L2 P1 X-950Y-1450 to return the coordinates to zero, but then , The machine stopped without any error when engraving, but when I connected two parallel 22 microfarad capacitors with limit switchs, this problem was solved and the homing coordinates become zero without using G10 L2 P1 X-950Y-1450 code

Does anyone have any ideas in this regard?

The limit switches function very simply. Usually they are configured to pull the input down for active. They can be configured to work either way.

Adding capacitance would only slow down the transition from low to high when the switch opened. I’m assuming mechanical switches.

If it’s set up for homing, I would think it should have faulted as it didn’t seem to be able to home properly.

What exactly are you asking?

:slight_smile:

As I explained, the homing does the right thing, but returns the wrong coordinates (in the negative direction), I designed my own PCB for machin control board and developed the GRBL on a 32-bit ARM, I have put filters for all switches and considered all the esd and emi standards, but I do not understand exactly why without external capacitors the value of the homing becomes negative but with external capacitors the value becomes zero.

Maybe it’s over engineered… lol

Before and after the additional caps, did the head go to the same physical place?
You just had different coordinates displayed in Lightburn?

How did you ‘decide’ which corner to home?

:slight_smile:

Yes, it is in the same physical position, but the values ​​are different with and without capacitors.
Maybe my machine is infected with the Delta Coronavirus :crazy_face:

More like a poltergeist. :slight_smile:

Doesn’t sound like it’s hardware. I wouldn’t expect a change in memory from a cap. All they could do is slow down the detection of the head backing off the limit.

If you wrote the software, I’d start there. I don’t know how the hard/software could tell the difference of the caps being on or off. There has to be some kind of debounce for mechanical switches, but even then, it should not change your location.

Do you pull the limit up or down for active?
If you pull it down, who pulls it up?

Where did you port the grbl from?

Grbl configuration of limit sw are pull up.

So when it becomes active, switch opens, cap charges, delaying the detection by the cpu. Am I following the correct logic?

All of the machines I use are pull low, as were the CNC machines I worked with 20+ years ago :frowning:

I think you’d have to put a scope on it if you really think it rfi caused.

:slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.