After installing your Arduino controls and setting up your machine, you can also install limit switches to stop the machine from moving past its limits, and/or an emergency stop button to immediately shut off power to the machine.
PLEASE NOTE: The limit switch mounting brackets shown in the photos below are not included with the Zen Toolworks CNC Kits. You can make similar brackets, search the forums for other examples, or mount them directly to the CNC frame.
Table of Contents:
- Installling the Limit Switches
- Step 1: The overall setup
- Step 2: X-axis switches locations
- Step 3: Y-axis switches locations
- Step 4: Z-axis switches locations
- Step 5: Tripping the Z-axis switches
- Step 6: Arduino shield ports for the limit switches
- Step 7: Connecting the switches to the Arduino shield
- Step 8: How the wires should be soldered to the switches
- Step 9: Configuring the Arduino to work with the switches
- Note: Resetting the Arduino after tripping the switches
- Installing the Emergency Stop Button
- Step 1: Attaching the E-stop button to the driver base
- Step 2: Finding the Normally Closed connection on the E-stop
- Step 3: Inserting the E-stop between the power supply unit and the drivers
- Step 4: How the whole assembly looks when the E-stop not pressed
- Step 5: How the whole assembly looks when the E-stop is engaged
How to Install Limit Switches
1. You will need to install 6 limit switches on your machine, 2 switches for each axis. These switches should be placed where the lever will be pressed once an axis limit has been exceeded. Using the standard 3D coordinate system FOR THE SPINDLE where positive X is to the right, positive Y is to the back, and positive Z is up, label your switches as X-home, X-limit, Y-home, Y-limit, Z-home, and Z-limit.
2. The X-axis switches should be installed so that the bearing on the lever will contact the closest perpendicular surface. The red line denotes what the bearing should line up with.
3. The same principle applies for the Y-axis switches, which should be installed so that the lever will contact the vertical surface, underneath the work platform...
4. … and also for the Z-axis switches.
5. For the Z-axis switches, you will have to add tabs to be able to press the switches. The tabs must be long enough to go past the line of action for the bearings, but also be rigid enough not to deflect when pressing the lever.
6. This is where each limit switch will connect to on your Arduino shield.
7. Using 3 sets of 4-wires (red, blue, green, black; the same as those connecting the three drivers to the Arduino), connect the Arduino to each of your limit switches. You will need to extend the wires to connect the two items. If soldering, please remember to wear safety glasses and create a safe, non-flammable work area.
8. The red and green wires connect to the limit switches, and the blue and black wires connect to the home switches. Attach the green and black wires to the COM ports on the switches, and the red and blue wires to the NC ports on the switches.
Make sure that all your wires are not in the way of any moving parts on your machine.
9. Now that the switches have been installed, you will need to configure your Arduino so that your switches will have effect. Turn your hard limits setting on by entering $16=1. (To turn limits off, enter $16=0.)
NOTE: When your limit switch has been engaged, you will need to reset it by pressing the brown RESET button on your Arduino before you can move the spindle again.
How to Install the E-stop Button
1. Place the button through the keyhole slot on the base, and screw on the two collars.
2. Find the two ports on the stop button that are Normally Closed (allows current through when the button is not pressed) using a multimeter. In the photo above, the two connected ports that are NC are marked with a red pen.
3. Connect the +V port that the drivers were originally directly plugged into to one of the ports on the stop button. Connect the other port on the stop button to the three positive power cords to the motors. Here, the connections have been soldered. If you solder your connections, remember to consider your safety during the process.
4. Here are photos of the drivers ON (E-stop button connected, but not pressed)…
5. … and of the drivers OFF (E-stop pressed).