How-to
Why a sourcing PLC output needs a resistor at a stepper drive input
Short answer
A sourcing 24 V PLC pulse output can drive a 5 V opto-isolated stepper drive input through a series resistor sized for the input's rated current — about 2.2 kΩ at 0.5 W for a 10 mA example — wired common-cathode with the input's minus terminals tied to the PLC's 0 V. The resistor fixes current and polarity only: the output must also be a dedicated pulse output rated above your computed step frequency.

On this page
- Can a sourcing PLC output drive a stepper drive input directly?
- Does the optocoupler input actually care about sinking or sourcing?
- What resistor value does a 24 V pulse need at a 5 V input?
- How fast does the output have to switch for your step rate?
- How do you wire a sourcing output to the step and direction inputs?
- How do you check the wiring before you run the motor?
- When is a series resistor not the fix?
- Questions asked
Yes, with two conditions. A sourcing 24 V PLC pulse output can drive the 5 V opto-isolated step input of a typical stepper drive, but only through a series resistor sized to the drive's rated input current, and only if that output is a dedicated pulse output fast enough for your step frequency. The resistor answers current and polarity; it cannot make a slow output fast. Below: the sizing arithmetic with its assumptions stated, the common-cathode wiring for step and direction, the pulse-rate calculation, and the checks that confirm the wiring before the motor turns. Where the manual for your exact drive disagrees with an assumed value here, the manual wins.
Can a sourcing PLC output drive a stepper drive input directly? #
Yes: a sourcing pulse output can drive a stepper drive's opto-isolated input, but only through a series resistor that sets roughly 10 mA through the input LED, and only if the output also switches fast enough for your step frequency.
Direct connection overdrives the input. The step input on this class of drive is an optocoupler LED whose rated current the manual states on its input page; at full control voltage the current is set only by whatever small resistance sits inside the input circuit — several times that rating — and the LED can fail at first power-up or degrade quietly over weeks. The exception runs the other way: some drives specify their inputs across the full control-voltage range with the current set internally, and for those the manual's wiring diagram shows no external resistor. Read the input page before wiring anything.
Does the optocoupler input actually care about sinking or sourcing? #
No: the input is an LED and a phototransistor, so it only needs current flowing through it in the direction the terminals are marked; sinking and sourcing describe where your controller puts the switch, not what the LED needs.
The LED conducts one way, from its plus terminal to its minus terminal. A sourcing output feeds current in through the plus side while the minus side returns to the controller's 0 V — the arrangement most manuals call common cathode. A sinking output is the mirror image: the plus sides tie to a positive common and the output pulls each minus side down — common anode. The naming is not uniform across manuals: some label the arrangement from the drive's terminals, some from the controller's output type, so follow the drive's wiring diagram for your output type rather than the label alone.
This covers the single-ended opto input most small drives use. A differential step input is a different interface with its own wiring rules; if your drive has that input instead, start with why a differential step input voltage drop stops a stepper.
What resistor value does a 24 V pulse need at a 5 V input? #
About 2.2 kΩ at a 0.5 W rating: that series resistor sets roughly 10 mA through a 5 V-rated input from a 24 V supply, and the worked example below shows the arithmetic with every assumption named.
Worked example, with the assumptions stated so you can substitute your manual's figures:
- Target input current: 10 mA — an assumed target for this class of input; the exact rating sits on the drive's input page.
- Supply voltage: 24 V DC — the sourcing output's on-state level.
- Input rated control voltage: 5 V — from the drive's manual.
- Input LED forward drop: 1.5 V — an assumed typical value; take the real figure from the manual.
R = (24 V - 1.5 V) / 0.010 A = 22.5 V / 0.010 A = 2,250 Ω
The nearest standard value is 2.2 kΩ. Wired instead of the exact 2,250 Ω it carries 22.5 V / 2,200 Ω = 10.2 mA, about two percent above the target. Resistor power is current squared times resistance: 0.0102 A × 0.0102 A × 2,200 Ω = 0.23 W, so a 0.5 W part runs below half its rating.
Two overrides beat this arithmetic. If the manual publishes its own external-resistor values for higher control voltages — many do — use its values, because they account for the internal resistor and LED drop you cannot see from the terminals. And if the manual specifies the input across the control-voltage range with the current set internally, leave the resistor out entirely. The direction input takes a resistor from the same calculation.
How fast does the output have to switch for your step rate? #
Compute the worst-case pulse frequency as full steps per revolution × microsteps per step × revolutions per second; a 1.8° motor at eighth-step resolution and 3 rev/s needs 200 × 8 × 3 = 4,800 Hz, so the output must cleanly make and break 4,800 pulses every second.
The motor side sets the target. A common hybrid stepper marked 1.8° has 200 full steps per revolution, and microstepping multiplies the demand — the same shaft speed at eighth-step resolution needs eight times the pulses, the trade-off set out in how the drive's pulse-frequency limit compares with microstep demand. Push the example harder and the target climbs fast: the same motor at 10 rev/s needs 16 kHz.
The output side decides. A relay output never qualifies. A general-purpose transistor output is built to switch loads, not to clock a drive: its turn-on and turn-off times round the edges until pulse widths fall below what the input registers — the mechanism behind why a plain PLC digital output cannot make a stepper pulse train. A dedicated pulse output is rated for this duty in kilohertz on its datasheet; take the figure for your exact model and keep margin — a workable rule of thumb is at least twice the computed worst case.
Decision: if the rated pulse frequency sits below your computed rate, the wiring is not the problem — move the step line to a rated pulse output before wiring anything.
How do you wire a sourcing output to the step and direction inputs? #
Wire the drive's input in a common-cathode arrangement: tie the drive's minus input terminals to the PLC's 0 V common, feed each plus terminal through its own series resistor from the sourcing output, and keep step and direction on two separate outputs.
Make the connections with the machine locked out and the drive disabled, under your site's electrical safety procedure and its risk assessment; this article does not validate a machine's safety functions.
- Read the drive's input page and write down four figures: the rated input current, the maximum input pulse frequency, the minimum pulse width, and the terminal names of the step and direction opto pairs.
- Assign the outputs: step pulses from the controller's dedicated pulse output, direction from an ordinary transistor output, because direction changes state rarely and carries no speed requirement.
- Tie the commons: connect the controller's output common to the minus terminal of the step input and of the direction input, so each sourcing output pushes current through its LED to one return.
- Install the series resistor between the step output terminal and the plus terminal of the step input: the 2.2 kΩ, 0.5 W result of the worked example, or the value from the manual's own table for this control voltage.
- Install a second resistor from the same calculation between the direction output and the plus terminal of the direction input.
- Check polarity before energizing: the LED inside the input survives only a few volts in reverse, so a swapped pair can destroy the input at first power-up.
How do you check the wiring before you run the motor? #
Before commanding motion, measure the input current with a meter in series while the output sits on, and scope the pulse line to confirm clean edges at your full frequency; those two checks catch most wiring and sizing errors.
- Static current: with the drive enabled and the controller holding the step output on, put a meter in series in the step line. Expect the calculated current, 10.2 mA in the example; a reading near zero means an open circuit or a swapped pair, and a reading far above the manual's rated input current means the resistor is missing or wrong.
- Edge quality at full rate: run the pulse output at the computed frequency and look at the voltage across the input terminals with a scope if you have one; edges should stay square and every pulse should sit well above the manual's minimum pulse width.
- Position check: command a known count at low speed with the motor coupled and confirm the shaft lands where the count says it should; repeat over many revolutions, because drift that grows with distance is lost pulses.
- Ramp test: raise the speed until the motor stalls, then keep the working speed well below that point.
If a reading disagrees with the calculation, work through the wiring checks in troubleshooting STEP/DIR spindle wiring to a stepper drive before changing the resistor.
When is a series resistor not the fix? #
If your computed step frequency exceeds the output's rated pulse frequency, or the datasheet only gives generic switching times rather than a pulse-rate rating, change the controller or add a dedicated pulse module: no resistor fixes edge speed, and lost pulses appear as lost steps.
Three cases send you past the resistor:
- The frequency does not fit. Nothing in this circuit makes edges faster. If the computed rate sits above the output's rated pulse frequency, pulses are lost and the motor stalls, drifts, or lands short of position without an error message; the fix is a controller or pulse module whose datasheet rating clears the computed rate. The fuller walk-through is why a resistor alone is not the whole fix for a fast pulse train into a stepper drive.
- The input is not a simple opto pair. Differential and line-driver inputs need matched signalling on both wires; the series-resistor method belongs to single-ended opto circuits only.
- The manual already covers the control voltage. Wide-range inputs with the current set internally take the full control voltage by specification, and the manual's wiring diagram for those models shows no resistor.
Decision: wire the calculated series resistor in the common-cathode arrangement when the input is a rated low-voltage opto pair and the output's pulse rating clears your computed frequency with margin; change the output when the frequency does not fit; leave the resistor out when the manual says the input takes the full control voltage; and treat the drive's input page as the deciding document in every case.
Questions asked
Can step and direction share one series resistor?
No. Each opto input is its own LED circuit and must carry its rated current on its own, so each gets its own resistor from the same calculation. A shared resistor couples the two inputs: the current through one depends on the state of the other, and the step line's current changes whenever the direction output switches.
What fails if I skip the resistor and connect the sourcing output straight to the input?
The input LED then sees the full control voltage, and current is limited only by whatever small resistance sits inside the input circuit — several times the rated current. The LED can fail immediately or degrade over weeks, and the input's noise margin suffers even before that. If the manual states the inputs accept the full control voltage range with the current set internally, that model needs no resistor.
My drive manual lists its own resistor values for higher control voltages. Which do I use?
Use the manual's value. A published table is calculated from the internal resistor and LED drop of that exact input, which you cannot measure from outside the terminals, so it beats any generic arithmetic. The 2.2 kΩ worked example applies only when the manual gives no table and the input is a plain low-voltage opto pair rated near the example's target current.
Does the same calculation work for a 12 V control signal?
Yes, same method with the supply halved: 10.5 V across the resistor at the same target current gives 1,050 Ω, so the nearest standard value is 1 kΩ and it dissipates about 0.11 W, a quarter-watt part. Keep the same assumptions, and take the real input current and LED drop from the drive's manual before trusting the result.


