Linear actuator, 12 V
A 12 V electric linear actuator: a motor and worm gear push a rod out and pull it back, and a limit switch stops it at each end.
Aliases: linear actuator, electric actuator, push rod actuator, PA-14. Two wires and no electronics: the polarity is the direction, so it needs an H bridge such as an L298N or an IBT-2, or two relays.
Pins
| Pin | What it does |
|---|---|
M+ |
Positive on M+ extends the rod (the red wire). |
M- |
Positive on M- retracts it. |
The limit switches
At each end of the travel a switch in series with the motor opens, and a diode across it lets current through the other way only. So at full extension, "out" does nothing at all (no current flows and the rod stays put), but "in" runs at once, through the diode, until the rod leaves the switch. The same at full retraction.
That is why a sketch can simply drive it out for longer than the stroke takes and let it stop itself, and why the current drops to zero at the end, which a current sensor such as an ACS712 can see.
const int IN1 = 8, IN2 = 9; // an L298N's inputs, ENA jumpered
void setup() {
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
}
void loop() {
digitalWrite(IN1, HIGH); digitalWrite(IN2, LOW); // out
delay(10000); // longer than the stroke takes
digitalWrite(IN1, LOW); digitalWrite(IN2, HIGH); // in
delay(10000);
}
Speed and current
The defaults follow Progressive Automations' PA-14 in its 150 lb (668 N) version:
12.7 mm/s (0.5 in/s) with no load at 12 V, a 100 mm (4 in) stroke and limit
switches inside. The motor is the dcmotor model, so the speed follows the
voltage: 6 V moves it at well under half speed. The winding (2.4 Ω) and the back
EMF (0.9) are assumptions that give 5 A stalled and about 0.5 A running free at
12 V, inside the PA-14's 5 A at full load.
Properties
| Property | What it sets |
|---|---|
voltage |
The rated voltage, 12 V. |
stroke |
The travel in millimeters, 100. |
speed |
The rod's speed at full motor speed, mm/s. |
resistance, back_emf, inertia |
The motor, as on a dcmotor. |
position |
Where the rod starts, in mm. |
The probe is the rod's extension in millimeters.
What is not simulated
A load on the rod (a real one slows down and draws more as it pushes), the duty cycle and heat, the motor's inductive kick, and position feedback: this part has no potentiometer or Hall sensor output.