How Do I Make My Arduino Automatically Stop the Actuator at End of Stroke?
Standard PA actuators have internal limit switches that cut power at end of stroke — but when using an Arduino-controlled H-bridge, the internal switches may bypass Arduino control. This article explains how to implement reliable software end-stop detection.
Relying on Internal Limit Switches
Most PA actuators have NC (normally closed) internal limit switches wired in series with the motor circuit. When the rod reaches the end of travel, the switch opens and current stops — regardless of what the Arduino is commanding. This is the simplest approach: the actuator protects itself.
💡 Best practice: Even with internal limit switches, add software end-stop logic. The internal switches are mechanical and have finite life. A software backup ensures the Arduino stops commanding the motor before the mechanical limits trip, reducing wear on the switches.
Current-Based End-Stop Detection (No Feedback Sensor)
When the actuator stalls at end of stroke, motor current spikes sharply. You can detect this spike with a current sensor (e.g., ACS712) to detect the end of stroke without a position sensor:
%2014.11.08.png?width=626&height=523&name=Captura%20de%20Pantalla%202026-03-10%20a%20la(s)%2014.11.08.png)
Position-Based End-Stop (with Feedback)
If using a potentiometer or Hall effect actuator, end-stop detection is straightforward — stop the motor when the position reading reaches or exceeds the known stroke length:
%2014.11.45.png?width=627&height=126&name=Captura%20de%20Pantalla%202026-03-10%20a%20la(s)%2014.11.45.png)