Limit Switches |
|
The limit
switches can be micro switches with an
attached lever.
The ones shown on this page are from Mouser.com part number 101-1203, and RadioShack part number 275-017 (roller lever). They are single pole, double throw, and are wired to be Normally Closed, rather than Normally Open. (An open switch is not conducting; a closed switch is conducting.) In this configuration any open connection problems in the circuit will
trigger a stop. If wired Normally Open, an open circuit due to a faulty connection would not be noticed by the software, and no signal would be received when the switch was hit. All switches are wired in series with each other; therefore, only one pin of the parallel port is used for all switches. All motion ceases when any switch is struck. |
On the right is a
schematic
for a simple limit switch.
The idea is straightforward. The parallel port pin is connected to the computer's +5vdc power supply through a 4.7k to 10kΩ resistor; this can be a half watt unit from RadioShack. The resistor protects the parallel port from the excess current that it would receive were the pin directly hot wired to the power supply. The 5v pulls the pin high. |
Also wired to the same parallel port pin are the Normally
Closed limit switches linked in series.
One wire is connected to the pin and the other wire from the switches is grounded to the computer's power supply low voltage ground. When the switches are all closed, the parallel pin is grounded.
When any one of the switches is open, the current will travel to the parallel port pin, and the pin will be pulled high. The software is configured to stop the machine when the signal is high. |
|
This image is of the end of the Xylotex board with a pair of limit switches and a
pull-up resistor.
One end of the 10kΩ resistor is connected to the +5vdc terminal on the Xylotex board, and the other is connected to the same terminal as one wire from the limit switches; in this image it is terminal 10 (the red wire). The other wire (black) from the switches is connected to the ground terminal on the Xylotex board.
Xylotex limit switch wiring.
|
|
Sometimes
the parallel port's limit switch terminal will be signaled by the noise in the steppers’ wires.
This can be addressed by running the
wires separately, using shielded cables, or using an opto-coupler as shown below. |
![]() |
One side of the 4N25 opto-coupler is wired to the limit switches, and the other is wired to the parallel port terminal.
The optional LEDs in the circuit indicate the state of the connections. The green LED shows that the limit switches are ready (on) or hit (off), and the other LED indicates that the limits are disabled. The limit switches are disabled by connecting the circuit to ground via the double pole switch. The software sees this as a closed circuit and assumes the limit switches are ready, though they are now out of the circuit. This is done this way so the software settings do not have to be altered to temporarily disable the limit switches. |
A variety of switches can be used for the limits. The top image is of a Normally Closed push button switch (RadioShack 275-1548), which is cobbled to be hit by the gantry ends on the old trial table.
The switches for the chassis axis on the 25x25 machine can be mounted directly on top of the end boards as shown next. There is a switch at each end of the table, and each switch is activated when a bearing support strikes the lever. The image below shows a switch on the gantry axis. A switch is attached to the top of each gantry end-plate. The switches are activated by the sides of the carriage.
Switch triggered by carriage.
Push button switch.
Switch on table end.
|
In this shop, only one switch is used with the Z axis since the bottom travel will vary depending on the bit in the router. The right image shows a switch in a CNC cut housing that is used on the 18 x 24 machine. There is more information with links to the g-codes for the housing components on the 18 x 24 Limits Page.
Limit switch in CNC cut housing.
|
Limit
switches are not as critical with smaller motors as they are on more powerful machines.
The smaller steppers will stall before inflicting extreme damage to the table. However, they may pull the machine out of tune. Larger motors can strip threads, blow the drives, or otherwise pull the machine apart. With small machines that are not damaged by over-travel, it may be convenient to disable the limit switches during setups.
Triggering the limits while jogging is a nuisance since it requires resetting the software just to continue. Once setup is complete, the limits can be enabled. |
Disclaimer These circuits have worked well for me, but you assume all risk when using them on your machines. |
