The Axis That Crashed on Homing
We set up a linear axis with a home switch (a proximity sensor) at one end. The homing routine: move toward home at high speed until the home sensor triggers, then stop. On the first run, the axis moved at 500 mm/s toward the home sensor. It triggered the sensor, but the axis couldn’t stop in time — it overran the sensor by 50 mm and crashed into the mechanical end stop. The problem: the axis was moving too fast when it hit the home sensor. The deceleration distance (from 500 mm/s to stop) was longer than the distance from the sensor trigger point to the end stop. We slowed the homing speed to 50 mm/s. The axis stopped at the sensor. The mistake was homing at full speed.
Home position and limit switch design is about the homing sequence and switch placement. Get it wrong, and the axis crashes on startup. This article covers the design.
Three Switches: Home, Positive Limit, Negative Limit
A servo (or stepper) axis typically has three switches:
- Home (reference) switch: Defines the zero position. The axis moves to this switch on startup.
- Positive limit (+LIM): Stops the axis if it goes too far in the positive direction (overtravel).
- Negative limit (-LIM): Stops the axis if it goes too far in the negative direction.
The limit switches are safety (software or hardware) — they stop the axis if it exceeds the programmed travel. The home switch sets the zero point.
Step 1: Homing Sequence
The standard homing routine (power-up reference):
- Move toward the home switch at a slow speed (50–100 mm/s, not full speed).
- When the home switch triggers, stop.
- Set the current position as zero (or the home offset).
- Move to the working position at normal speed.
The key: home at slow speed. If the axis homes at 500 mm/s, it overruns the switch before it can stop. At 50 mm/s, it stops within a few mm.
Step 2: Switch Placement
The home switch is placed so that when it triggers, the axis is still within travel (not at the mechanical end stop).
Distance from home switch trigger point to the mechanical end stop: must be greater than the stopping distance at the homing speed.
d_stop = v_homing² / (2 × a_decel)
For v = 50 mm/s and deceleration = 500 mm/s²: d_stop = 50² / (2 × 500) = 2500 / 1000 = 2.5 mm. The switch must be at least 2.5 mm from the end stop. If the homing speed is 500 mm/s: d_stop = 500² / (2 × 500) = 25,000 / 1000 = 25 mm. The switch must be 25 mm from the end stop. Most designs put the home switch 20–50 mm from the end stop.
The homing rule: Home at a slow speed (50–100 mm/s). Place the home switch so the stopping distance at homing speed is less than the distance from the switch to the end stop. The axis that crashed on homing was moving at 500 mm/s when it hit the switch — it overran by 50 mm. Slow the homing speed.
Step 3: Limit Switches (Overtravel)
The limit switches (+LIM, -LIM) are placed just beyond the programmed travel. If the axis exceeds the software limit (due to a following error or programming bug), the limit switch triggers a hardware stop.
- Software limit: The PLC/drive limits the travel in software (e.g., 0–500 mm).
- Hardware limit: The limit switch stops the axis if it goes beyond the software limit (e.g., 510 mm and -10 mm).
The hardware limit is a backup. It shouldn’t trigger in normal operation. If it does, something is wrong (following error, missed step, encoder fault).
Switch Type: Proximity vs. Mechanical
Proximity (Inductive) Switch
No physical contact. The switch triggers when a metal flag passes near it. No wear (solid state). Fast. Standard for home and limit switches.
Mechanical (Roller Lever) Switch
A physical lever that the flag pushes. Positive actuation (the flag must physically hit the lever). Used for safety-rated limit switches (direct opening per IEC 60947-5-1). For hardware safety stops.
For home and general limit: proximity (no wear). For safety-related overtravel: mechanical (direct opening, safety rated).
| Switch | Type | Purpose |
|---|---|---|
| Home switch | Proximity (inductive) | Reference position on startup |
| +LIM / -LIM (general) | Proximity | Software overtravel backup |
| Safety overtravel (hardware) | Mechanical (safety rated) | Emergency stop on overtravel |
Homing Methods (Drive-Specific)
Servo drives have different homing modes:
- Switch + index pulse: The axis moves to the home switch, then continues until the encoder’s index pulse (one-per-revolution) triggers. This gives a repeatable home (within one encoder count). Most accurate.
- Switch only: The axis stops at the switch edge. Repeatable within the switch’s repeatability (about 1 mm for proximity). Simpler but less accurate.
- Current limit (stall): The axis pushes against a mechanical stop until the motor current rises. No switch needed. But it wears the stop.
For high precision, use switch + index pulse. For general use, switch-only is fine.
Flag (Actuator) Design
A metal flag (tab) on the carriage triggers the proximity switch. The flag should be:
- Thick enough (1–2 mm steel) to trigger the proximity sensor.
- Wide enough to cover the sensor’s sensing range (the flag must fully enter the sensor’s field).
- Adjustable (so the home position can be fine-tuned).
Fail-Safe: What If the Home Switch Fails?
If the home switch fails (broken wire, sensor dead), the axis doesn’t know where it is on startup. The homing routine should detect this:
- If the axis moves for X mm without seeing the home switch, fault out (the switch is broken or the axis is stuck).
- Don’t continue normal operation if homing fails.
A failed home switch means the axis could be anywhere. The machine should not run until homing succeeds.
A Homing and Limit Switch Checklist
- What is the homing speed? (50–100 mm/s.)
- Stopping distance: d = v²/(2a). Is it within travel?
- Is the home switch placed before the end stop? (With margin?)
- Are +LIM and -LIM placed beyond programmed travel?
- Switch type: proximity for home, mechanical for safety overtravel?
- Homing method: switch only, or switch + index pulse?
- Is the flag adjustable? (Home position fine-tuning?)
- What happens if homing fails? (Fault alarm?)
- Is the home switch signal wired to the drive (not just the PLC)?
- Is there a hardware (safety) overtravel stop? (Mechanical lever switch?)
- Does the axis home correctly on every startup? (Test.)
- Is the home position repeatable? (Measure over 10 cycles.)
The Bottom Line
Home position and limit switch design is homing slow enough and placing the switch far enough from the end stop. The axis that crashed on homing was moving at full speed when it hit the home switch — it overran. Home at 50–100 mm/s, calculate the stopping distance, and place the home switch with margin. Use proximity switches for home and general limits, mechanical safety-rated switches for hardware overtravel. The axis that homes cleanly every time wasn’t the fastest — it was homed slowly.