Not sure if this info will help others or not - Iām gradually getting the limit switch thing closer to a resolution. Much of the info below is from another thread on the same subject.
On my machine (1000x1000 X Carve) Iāve installed additional limit switches, so I now have a switch on each end of both the X and Y axis and a single switch on the top of the Z axis. These are all Normally Open switches, wired in parallel pairs (the two X switches in parallel and ditto for the two Y switches)
Using Easel (through the Inventables site) I ran the Machine setup program which (for me) was the easiest way to āenableā the homing switches in GRBL. Iāve no doubt thereās probably a simple command for doing this via Universal Gcode Sender (UGS), however Iām all for taking the simple path wherever possible.
The advantages of using Easel to set up Homing is that it has a series of test sequences which allows you to
- Enable homing
- Test each switch
- reset the homing direction if itās wrong etc
Having enabled homing, I can now use the ā$Hā homing command to home the machine (ignore the āā)
I then set up āSoft Limitsā by
- Homing the machine to find X0, Y0, Z0
- Using the ājogā feature in UGS (arrow keys on my keyboard) to move each axis to what I considered as its safe maximum travel and then recording the X, Y and Z position for each.
- Entering each soft limit via the UGS command line (ā$130=790ā for the X axis, ā$131=790ā for the Y axis and ā$132=80ā for the Z Axis - without the inverted commaās of course). GRBL should respond with āokā after entering each command. Note these limits are all unique to my machine - yours WILL be different.
- These settings are confirmed by sending the $$ command - GRBL will respond with a list of all current settings where youāll be able to check your entries have been added.
I then enabled āHard Limitsā in GRBL by sending the ā$21=1ā command (GRBL should again respond with āokā)
- Now when I manually ājogā the machine along an axis to the point where one of the limit switches is closed, the machine will stop and generate an alarm.
- To reset this alarm, I have to manually move the machine away from the offending limit switch, reset the alarm (ā$Xā) and re-set the machine (āSoft Resetā in UGS)
Note Iāve only played with this briefly - there may be a better way to reset the alarm.
So to summarise, Iāve now got:
- Homing enabled - the command $H will send the machine to 0, 0, 0,
- Soft Limits are enabled - This means the controller will not accept commands the exceed the maximum limits set for each axis, in theory, avoiding crashing into the end axis for X, Y and (sometimes) Z
- Hard Limits are now enabled - If I manually move an axis too far, the machine will stop & generate an alarm
- Important note - the Z axis āsoft limitā will be pretty much useless unless you use the same tool and tool length every time. Anytime you put a longer tool into the machine, youāll either need to reset the limit, or just make sure youāre not likely to cut into your table/waste-board
Is this the final setup - certainly not. Iāve already had problems with false alarms due to noise issues with the switch wiring (I did use shielded cable for the new switches, but Iāve not yet connected to the controller - I assume this would go to ground, but thatās TBA). Iāll shortly be adding a DeWalt unit to replace the current tiny spindle, so Iām kinda hoping that running the power cable for this separately will reduce the noise a little also. Finally, Iām exploring the option of waiting in a capacitor & some additional resistors to reduce noise even further.
For reference, see here for a list & description of some of the GRBL commands and what they do Configuring Grbl v0.9 Ā· grbl/grbl Wiki Ā· GitHub
For interest, below are a couple of images on how I fitted the additional switches - not the neatest or best option, however it suited some of the restrictions I have with the way Iāve configured my machine.
Please also excuse the somewhat crude table set-up Iām using at the moment which is an odd combination of T Slot channels, threaded holes and multi-piece wasteboard. Iāll get around to something better when I stop tinkeringā¦
