I have been playing with the CNC machine and all too often I’ve accidentally hit both X and Y extreme limits of travel. I don’t know if there is any damage being done but felt I should do something about it. The controller software has a panel in the setting menu for both positive and negative limit switches for all three axis so I needed to find the associated hardware connections. The company I bought the machine from claimed not to have hardware schematics for the CNC controller or the USB interface. However, I did receive an image of the CNC Driver Board board indicating where limit switches may connect (top left).
Through trial and error, I found that the model of my controller only provides one input per axis for a limit switch. This means that in the X and Y axes, a limit switch only works when the unit is traveling in a positive direction (i.e. towards the back and right edge). For the Z-axis, the limit switch only works when the spindle moving downwards. In normal operation the limit switch input is open circuit. If and when the machine moves to a limit, the switch shorts the input to GND and this stops the movement immediately.
I soldered in three three-pin headers onto the driver board and wired the three limit inputs and a ground connection to a 4-pin panel connector mounted through the rear of the case. The cables for the ground and the limit inputs for the X- and Y-axis are threaded through the umbilical to the machine. The ground connection is soldered to a tag underneath one of the chassis bolts. The cable for the Y-axis runs along the back of the machine while the cable for the X-axis is threaded through the flexible cableway up to and across to the left side of the gantry.
I drilled and tapped holes into the left side of the gantry for the X-axis limit switch and did the same on the back right side of the base unit for the Y-axis limit switch. Each micro-switch has a pivoting arm with a roller at the sensing end. This engages when the gantry (or spindle mount) reaches its positive limit. Bending the arm allows some fine-tuning of the point at which the switch activates. I programmed the absolute working limits of the table into the software. Now, pressing the “HOME” button sends the spindle to both X and Y limits (287mm and 394mm respectively) and then moves to the centre of the work-surface.
The Z-axis limit switch works quite differently and doubles up as a means to set the accurate height of the tool bit. I ran a wire up to the spindle (along with power to a gooseneck LED light to illuminate the spindle) to ensure that it, and consequently the tool bit is connected to GND. I soldered the Z-axis limit input to a strip of copper-clad circuit board (1.43mm thick). To operate, this board is placed underneath the stationary spindle. When the carriage is lowered and the tip of the bit touches the copper, the Z-axis limit input is grounded and the carriage stops dead. I entered the board thickness into the software. Pressing the “TOOL OFFSET” button, the carriage is automatically lowered until contact is made. The height of the tool is then reset to the board thickness and the carriage lifted to a safe height.
Now, on the CNC USB Controller there is a 14 pin connector. With a bit of trial and error I found that it contains inputs to jog the machine along each of the three axis. There is also an input that allows control of the jog speed. While I await the arrival of some meaty momentary toggle switches ( (ON)-OFF-(ON) ) I “breadboarded” what will become a JOG box that will allow me to position the spindle at the machine without using the software. There will be three way switches (and corresponding LEDs) for each of the X- and Y-axis (left/right, forward/backwards respectively) and a rotary jog speed control. There will also be a special switch to control Z-axis movement. The switch will raise the bit at the rate determined by the jog speed control. However, in the other direction, the spindle carriage will be lowered very slowly (overriding the jog speed control) and stop when the spindle contacts the strip of copper-clad circuit board (similar to the software-based limit switch system described above). This will also allow me to set bit height accurately and at any time right at the machine. I’ll post something as and when I actually build the box… Please standby.
Looking good, huh!