AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Explainer

Why a 24 V PTO needs more than a resistor into a 5 V stepper driver

Servo and stepper motion Published 11 min read By AutomateDirectUSA engineering team

Short answer

A series resistor into a stepper driver's 5 V input is only correct if the manual documents a current-driven optocoupler, and then it is computed from rated input current and internal resistance; a logic-threshold input needs a pulse-rated level-shifting interface instead. Pulse count times driver resolution sets commanded travel, and an encoder-less axis stays trustworthy only with a home switch and measured verification.

On this page
  1. Can a 2.2 kΩ resistor turn 24 V pulses into the 5 V the driver wants?
  2. What is the driver's input actually made of?
  3. How do you size the series resistor when the input is an optocoupler?
  4. What works when the input is a voltage-sensing pin?
  5. How many pulses does a move need, and how fast must they arrive?
  6. What do you check on the PLC side before the first move?
  7. How do you home and position an axis with no encoder?
  8. When does an open-loop stepper lose position, and how do you catch it?
  9. What is the final wiring and setup decision?
  10. Questions asked

A pulse-train output from the PLC and a 5 V stepper driver input connect through exactly one prior decision: what the driver's input circuit is. If the manual documents a current-driven optocoupler, a computed series resistor is the correct interface, and the 2.2 kΩ guess from the bench is in the right neighborhood. If the manual documents a logic-threshold input, that same resistor leaves the pin overvolted and a pulse-rated level-shifting interface is the answer instead. Yes, commanded travel equals pulse count times driver resolution, and yes, an encoder-less stepper runs open loop by design — trustworthy once you add a home switch, conservative speed and acceleration, and measured verification. This article gives the arithmetic for both interface cases and the order of checks that keeps the axis honest.

Can a 2.2 kΩ resistor turn 24 V pulses into the 5 V the driver wants? #

Only into a current-driven optocoupler input, where a series resistor sets the light-emitting diode's current and is the manufacturer-documented way to feed controller signals; into a voltage-sensing logic input the same resistor drops almost nothing, and the pin sits near the full supply voltage, well past its rating.

A series resistor does not divide voltage on its own; it limits current through whatever loop exists, and which of those two jobs is needed is decided by the input, not by the resistor. Optocoupler inputs are current devices: the manual rates the current the internal LED may carry — 5 to 20 mA is the normal working range for common types, with absolute maxima around 50 mA — and every added ohm exists to hold that current from the PLC's supply. Logic inputs are voltage devices: they draw microamps, so almost no voltage develops across even a large series resistor. That is why the resistor idea, which comes from legitimate optocoupler practice, transfers only to optocoupler inputs.

What is the driver's input actually made of? #

Open the driver manual to the input circuit diagram and look for an optocoupler symbol with any resistance drawn inside the driver; its rated input current, internal resistance, polarity and maximum pulse frequency decide the whole interface, and no wiring decision is safe before that page is identified.

The 2M982-AC on the bench is the case in point: only the manual page decides whether its inputs are current-driven optocouplers or voltage-sensing logic, and the two need different interfaces. An optocoupler input appears on the drawing as an LED symbol, usually with resistance drawn inside the driver, and pulse and direction each arrive on a terminal pair with a documented common: common-anode, common-cathode or differential hookup. A logic-threshold input appears as a voltage table instead: a minimum high level, a maximum low level, and an absolute maximum the pin must never see. From the optocoupler page, take four numbers before any wiring: rated input current, internal resistance, the loop polarity the terminals expect, and the maximum pulse frequency the input follows.

What the manual shows Correct interface Confirm before wiring
Optocoupler with internal resistance and a rated input current PLC output through a computed series resistor Input current inside the rating in both logic states, resistor power, loop polarity
Logic input with high and low voltage thresholds A pulse-rated level-shifting interface Threshold match, propagation delay, rise and fall times, maximum pulse rate
Input circuit not identified Nothing yet The exact manual for that driver model and hardware revision

Whatever the page shows, the review is the same terminal-by-terminal discipline as working out what a stepper driver control connector needs from a PC: signal type, polarity and return path, taken from the driver's drawing rather than assumed.

How do you size the series resistor when the input is an optocoupler? #

Compute it from the driver's stated input current and internal resistance, never from the supply-to-logic voltage ratio: for an example optocoupler input specified at 10 mA, the external resistor for a 24 V output comes out near 2 kΩ, rated at half a watt or more.

The formula is R_ext = (V_out − V_f) ÷ I_in − R_int, where V_out is the PLC's output voltage, V_f the optocoupler's forward drop, I_in the driver's rated input current and R_int the resistance shown inside the driver. Use the manual's values; this worked example uses typical illustrative values so the arithmetic can be checked:

  • Inputs: V_out = 24 V, V_f = 1.2 V, I_in = 10 mA = 0.010 A, R_int = 270 Ω.
  • Loop resistance needed: (24 V − 1.2 V) ÷ 0.010 A = 22.8 V ÷ 0.010 A = 2280 Ω.
  • External resistor: 2280 Ω − 270 Ω = 2010 Ω; fit the next standard value, 2 kΩ.
  • Resistor power: P = I² × R = (0.010 A)² × 2010 Ω = 0.2 W; fit at least a 0.5 W part so it does not run near its limit in a warm cabinet.
  • The 2.2 kΩ bench guess: I = 22.8 V ÷ (270 Ω + 2200 Ω) = 9.2 mA, with P = (0.0092 A)² × 2200 Ω ≈ 0.19 W — workable for this example input, which is why the guess keeps resurfacing, and correct only where the manual confirms this topology and these magnitudes.

Two side checks finish the calculation: with the output off, current must fall to near zero so the LED releases, and each PLC output's rated load current must comfortably cover the input current, plus any cable resistance on long runs. The same current-setting arithmetic, at a different supply, is what lets you run a 5 V stepper motor from a 12 V supply through series resistors.

What works when the input is a voltage-sensing pin? #

Fit a pulse-rated level-shifting interface — an opto-isolated converter module built for PLC interfacing, with square-wave ratings in the megahertz class such as the 10 MHz figures such modules publish — because a logic input's microamp draw leaves a series resistor nearly inert.

A converter that actually switches moves the signal the whole way: supply-level input, logic-level output, isolation included. Specifying one is a four-line check: input and output voltage ranges, maximum pulse rate with margin above the fastest planned speed, propagation delay and rise and fall times, and channel-to-channel skew so direction still settles before the pulse edge. Modules marketed for PLC-to-controller interfacing publish conversion rates around 10 MHz, far above any stepper axis, but an interface board without published timing is a risk at speed. Route pulse and direction through matched channels and keep the driver's documented direction setup and hold times satisfied at the highest pulse rate.

How many pulses does a move need, and how fast must they arrive? #

Multiply commanded distance by the pulses the driver needs per millimeter: for a 200-full-step motor with the microstep switch at 8 — 1600 pulses per revolution — on a 5 mm lead screw, 25 mm of travel is 8000 pulses and 60 mm/s is a 19.2 kHz pulse train.

The worked example, for that motor, switch setting and screw:

  • Pulses per revolution: 200 full steps × 8 microsteps = 1600 pulses/rev.
  • Pulses per millimeter: 1600 pulses/rev ÷ 5 mm/rev = 320 pulses/mm.
  • Travel: 25 mm × 320 pulses/mm = 8000 pulses — which answers the second question from the bench: yes, pulse count times driver resolution gives commanded travel.
  • Pulse frequency: 60 mm/s × 320 pulses/mm = 19,200 Hz = 19.2 kHz.

Change any term and the scale changes with it: a different microstep setting divides the same revolution into more pulses, a gearbox or belt ratio divides or multiplies travel per revolution, and the PLC's distance-per-pulse parameter must match the real switch settings, not the intended ones. Higher microstepping does not by itself improve mechanical accuracy; it raises the frequency demanded from the PLC and the driver input for the same axis speed, bringing both closer to their documented maxima — the trade-off between a stepper drive's pulse frequency limit versus microstep demand is its own subject. Check the pulse budget before committing to a microstep setting.

What do you check on the PLC side before the first move? #

Confirm the pulse-capable transistor outputs, the sinking or sourcing match and the pulse and direction polarity in the axis configuration before any motion, because DC/DC/DC only tells you the outputs are transistors, not that the assigned terminals support the motion function or that the driver sees the intended edge.

  • Assign outputs the PLC documentation lists for the pulse function on that exact CPU — an S7-1200-class controller here — since a transistor output card does not make every terminal pulse-capable.
  • Match the loop polarity the driver drawing shows, common terminal and current direction, to the PLC output type, sinking or sourcing.
  • Set the active level and edge from the driver manual; a wrong edge silently halves counts or reverses direction.
  • Check direction setup and hold time against pulse spacing at top speed.
  • Wire with the cabinet powered down; then, with motion disabled, apply test levels and measure at the driver terminals: valid high and low states, plausible pulse width, steady direction level between pulses.
  • The order of configuration inside the PLC — axis resource assigned and scaled before the first commanded move — is laid out in configuring a PLC pulse-output axis before its first moves.

For the first powered motion, run at reduced speed with everyone clear and a hand on the stop, and prove the axis stops on command before trusting it.

How do you home and position an axis with no encoder? #

Home the axis on a physical sensor at a known machine position and treat the PLC's position register as a command counter rather than a measurement: with no encoder, the only trustworthy positions are the home reference and the distances counted from the latest successful homing.

An inductive proximity switch at a repeatable machine location is the standard reference. Configure the homing sequence the axis resource offers — search direction, search and creep speeds, and the offset from sensor edge to machine zero — and make it handle the awkward cases: sensor already covered when homing starts, sensor never found, homing into a limit. Keep separate travel limits; a home switch is not a limit switch.

Re-establish the reference after every power-up that leaves position invalid, after any drive fault, after anyone has moved the axis by hand or jogged it, and after any suspected stall. A pulse-output axis cannot close the loop with an external encoder — the counting side has no feedback path in its motion loop — so the sensor plus re-homing discipline is the whole position strategy. Where the application needs verified position at all times, converting the axis to closed-loop control is the right move rather than more resistor arithmetic.

Verify homing the practical way: trip the sensor with the axis parked and watch the input change state with the configured polarity; then run the homing sequence several times and measure the physical stop position — the spread must sit inside the machine's positioning tolerance.

When does an open-loop stepper lose position, and how do you catch it? #

It loses position when demanded torque exceeds available torque — most often from an acceleration ramp set too aggressively, a top speed beyond the torque curve, mechanical binding or a driver current set too low — and without an encoder, the PLC counts every pulse it sent regardless.

Check in this order, cheapest first. Verify the driver's current setting against the motor's rated current on its datasheet, because an underset current starves torque everywhere. Lengthen the acceleration ramp and retest, since acceleration multiplies torque demand by inertia. Cut top speed and compare against the torque-speed curve for that motor and driver at the set current. With power off, turn the mechanism through full travel by hand and check couplings, set screws and guides for binding. Confirm each suspicion with a stall test at increasing ramp and speed until the axis loses position, then set the ramp and speed margin below that point, and close the check with a measured comparison: mark the axis, command a known travel, measure the result. The controller cannot see any of these failures — it counts its own pulses either way.

What is the final wiring and setup decision? #

Read the driver manual's input page first: a documented current-driven optocoupler makes the series-resistor path valid once you compute it from the manual's numbers, a documented logic-threshold input means a pulse-rated level-shifting interface instead, and either way you prove scaling and homing by measurement before production.

  • Optocoupler documented: compute the external resistor from the rated current, forward drop and internal resistance — near 2 kΩ at the example's numbers, with the 2.2 kΩ guess landing around 9 mA — and set the power rating by the same arithmetic.
  • Logic-threshold input documented: the pulse-rated level-shifting interface, sized for pulse rate and channel timing; the series resistor is not the part.
  • No input documentation: wire nothing, and get the manual for the exact 2M982-AC hardware revision, because a model number and a favorable reply are not an input specification.
  • Scaling: pulses times resolution, 8000 pulses for 25 mm at 320 per millimeter in the example axis; rescale whenever the microstep switch or the transmission changes.
  • Open loop: home switch at a known position, separate travel limits, re-home after power-up, faults and manual moves, verify by measurement, and move to closed-loop hardware when position must be known continuously.

Questions asked

What happens if the PLC pulse reaches the driver input with no resistor at all?

Into an optocoupler, current is then limited only by whatever resistance the manual shows inside the driver, and it can exceed the LED's rating enough to destroy it on the first pulse. Into a logic-threshold input, the pin sees a voltage far above its rating and the input stage can fail immediately. Either fault can take the PLC output transistor with it.

Does a higher microstep setting improve positioning accuracy?

No. Microstepping divides each full step into smoother increments, which reduces resonance and audible noise and can improve surface finish. Mechanical accuracy still comes from the screw, guides, couplings and structure. The higher setting also multiplies the pulse frequency needed for a given speed, moving the PLC output and the driver input closer to their maximum rates.

Can an encoder be added later to check position on this pulse-train axis?

A plain pulse-output axis has no feedback path in its motion loop, so an external encoder cannot correct its own count. The encoder can still be wired to the PLC as an independent measurement, or the axis can move to a closed-loop stepper drive, which reads its own encoder and recovers missed steps internally.

How do you choose the resistor's wattage instead of guessing?

Compute it: square the input current in amperes, multiply by the external resistance in ohms, and pick the next standard rating above the result. In the worked example the dissipation is about 0.2 W, so a half-watt part runs cool while a quarter-watt part runs hot. Never park a resistor near its rated power inside a warm cabinet.

Keep reading

  • Explainer

    What a Stepper Driver Control Connector Needs From a PC

    A PC can drive a stepper driver's control inputs only when the step and direction signals meet the driver's documented input voltage and current, and the current-select inputs are grounded or pulled high to match the motor's rated current before power-up. Buffer the PC outputs whenever their levels or drive current are uncertain.

    Servo and stepper motion

  • Explainer

    Convert an open loop stepper to closed loop control

    Converting an open loop stepper to closed loop control means a rotary encoder on the motor shaft, a drive mode that uses it for commutation and position, a position-tracking-error threshold that turns lost motion into a fault, and a non-zero recovery setting that returns the axis to the commanded setpoint after the fault clears. The motor's back EMF still sets the top speed.

    Servo and stepper motion

  • Explainer

    Mapping 5 stepper axes and 3 encoder inputs on a motion controller

    Four step and direction outputs go on JP7 pins 15-22, the fifth on JP5 pins 1-8, the three encoder inputs on JP7, and the 11 input bits on JP4 and JP6's 20 general-purpose 3.3 V I/O points. The generators and encoder inputs are fixed hardware functions that cannot be moved to other pins, and every limit-switch run belongs behind 24 V opto-isolation instead of on the non-isolated pins.

    Servo and stepper motion