gnea / grbl

An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino
https://github.com/gnea/grbl/wiki
Other
4.04k stars 1.61k forks source link

Smashing into limit switches while homing after autolevel #1214

Open WesBrenner opened 1 year ago

WesBrenner commented 1 year ago

The title is the symptom but the solution was to override the defaults for grbl. Originally I thought the error was a artifact of doing a autolevel in bCNC because I had never had a problem with homing until I tried to home after an autolevel. After replacing the Z limit switch a number of times (had ordered plenty) I discovered the culprit was the homing defaults in grbl. The default for debouncing is 250 microseconds and the speed of approach was 500mm/min. In .250 seconds the movement will be 2.08mm. That means that the machine must read the switch and stop within 2mm or do damage. That was on the border of my micro-switch's movement so a little inertia and the micro-switch was toast. After reading the grbl how to on the home debounce switch it recommended 5 to 25 microseconds. After changing the the debounce to 25 micro seconds ($26=25) and for added safety changing the homing travel speed from 500mm to 250mm ($25=250), I have no further problems with homing.

Don't know if this belongs in issues or a pull request to change the default for $26 to something more like the 25 microseconds suggested.