Selecting Stepper Driver Circuits for Parallel-Port CNC Boards

James Nishida16 min read
Motor ControlOther ManufacturerTechnical Reference
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Decision Sequence and Prerequisites

A discrete unipolar stepper driver built from 4030 (XOR), 4013 (dual D flip-flop) and 4093 (Schmitt NAND) logic, with power MOSFETs driven straight from a PC parallel port, runs a motor supply near 35 VDC (24 VAC rectified) at up to about 3 A. That topology fails in a small set of repeatable ways. Work the checks below in order; each one gates the next.

Check Reading to take Pass: go to Fail: action
1. Port drive Loaded port pin voltage and current on the target PC Check 2 Add a buffer or an optoisolated breakout
2. Step rate Required steps/s vs. loaded ceiling (about 600 steps/s in the reference build) Check 3 Move to a chopper driver
3. Fault path Whether motor supply can reach logic or port pins Check 4 Isolate the port, separate driver and I/O boards
4. Output FET Part number, Vds, Id, pinout vs. library symbol Check 5 Replace with an IRFZ44-class HEXFET
5. Board fabrication Board size, trace width, isolation gap vs. process capability Check 6 Change process or panelize
6. Layout hygiene Floating inputs, motor current path, pad copper Check 7 Revise layout
7. Power-up probe Logic states with the probe LED, no motor connected Final verification Trace the bad node

Prerequisites before Check 1: a multimeter, the datasheet of every power FET you will fit, the motor's rated phase current and lead count, and the documented port pinout for your control software. Confirm the motor supply and ballast resistors are wired off-board; on this design they are not on the PCB, and the hookup must be documented for whoever builds it.

Check 1: Parallel Port Drive Capability

Ports differ in both output level and source current. Most desktop ports drive 5 V high; some drive 3.3 V. Some source about 25 mA; laptops generally do not. In a comparison of a similar direct-drive circuit on two laptops and four desktop PCs, only two desktops ran it. The laptops and the branded desktops failed. One working PC used an add-in LPT card and the other was a home-built machine with a brand-name motherboard. The design has no margin for port variation.

  1. Connect the driver inputs to the port with the board logic supply on and the motor supply off.
  2. Set one step or direction pin high from the control software's pin test.
  3. Measure that pin at the driver input, referenced to port ground. Read the input-high threshold of the logic family from the datasheet at your logic supply voltage.

Outcomes: if the loaded voltage sits comfortably above the threshold on every target PC, go to Check 2. If it sags or reads near 3.3 V, the board will work on some PCs and not others. Add a buffer or an optoisolated breakout before continuing. The logic in this class of board is powered from the port side, and the port-side logic supply (5 V on a typical desktop) sets the switching threshold. On an optoisolated breakout built around a 6N138, the threshold can be adjusted by changing the supply voltage on the port side. The 6N138 also allows a much lower LED current than a driver-array stage, so the port can source it reliably, and that may let you remove the 2003 driver-array stage.

Check 2: Step Rate Ceiling of the Non-Chopper Driver

A non-chopper unipolar stage limits current with series ballast resistors. The winding's L/R time constant then caps how fast current can build between steps. On a comparable 4030/4013 circuit, the maximum step rate was about 6000 steps/s with no motor connected. With a motor and resistor on 35 VDC (24 VAC rectified), the usable rate fell to about one tenth of that.

rpm = steps_per_s x 60 / steps_per_rev
loaded ceiling = 6000 / 10 = 600 steps/s
rpm = 600 x 60 / 200 = 180 rpm  (200-step motor, full step)

Compute your required rate from the axis: required steps/s = rpm x steps_per_rev / 60. If it is at or below the loaded ceiling, continue. If it exceeds it, adding optoisolators does not help. Optos add parts and still leave a non-chopper driver with the same speed limit. Go to the chopper branch below.

Check 3: Fault Path from Motor Supply to Port

A board with 35 VDC and up to 3 A on the same copper as the port-connected logic has a direct failure path. A stray connection in a dirty shop can put motor voltage on the logic or the parallel input. A dead port on a PC is a typical result.

  1. Trace each power FET drain, tab and motor lead on the layout. Confirm none crosses or sits adjacent to a logic trace or a port pin.
  2. Confirm the motor power entry sits on the output side of the board, so heavy motor current does not flow through the small-signal area.
  3. If the board connects to the port with no isolation, decide whether the exposure is acceptable. If not, insert an optoisolated breakout and keep the driver, power supply, I/O and breakout on separate plug-in boards.

Separate boards limit damage: a shorted driver takes out one module instead of the port and the I/O together.

Check 4: Output FET Selection and Heatsinking

The board must use a HEXFET-class device. A substitute chosen because it matched an available library footprint changes the result.

Part Rating (as given) Use in this driver
IRFZ44 60 V, 50 A, fast switching Required class; drives the motor
IRF512 100 V, 4.9 A Pin and tab compatible but unsuitable as a motor driver; do not build with it

Both parts have an internal body (clamp) diode, so the flyback spike from the switching states is handled by that diode. Not every MOSFET has one; read the datasheet of any other part before dropping external clamp diodes. Rated up to about 35 V, an IRFZ44 probably needs no heatsink at this current.

Verify the physical pinout, not the library symbol. If the schematic symbol and the fitted device differ, check gate, drain and source against the actual part orientation on the board. A library part with the same package but different pin assignment produces an instantly dead or shorted stage.

The TO-220 tab is the drain. On a shared heatsink, the drains of different phases are tied together only if they connect to the same node. In a unipolar driver each FET drain connects to a different winding end, so drains sit at different potentials during switching. Isolate each tab with an insulating pad, or use a heatsink per device, unless the schematic puts the drains on a common node. Check the tab connection in your schematic before choosing.

Gate drive options: a logic-level FET can be driven from 5 V. Standard FETs are more rugged, and you can drive them with 12 V gate drive using a transistor level shifter (or an optoisolated breakout) and a 12 V regulator. To keep that option open, lay out a cuttable track for a series resistor at each MOSFET gate so darlington transistors can be fitted instead. The same idea works with wire pads in the FET position to allow device substitution.

Check 5: Board Fabrication Route and Size Limits

The freeware layout tool limits board area to 3 x 4 in. A three-axis board with a DB25 does not fit comfortably at that size once traces are drawn at real widths. Choose the route by what the board needs:

Constraint Mechanism Response
Three drivers on one board Board exceeds the free size limit Build three single-channel boards, or combine the copper artwork graphically, and link common power, motor power and ground with wire jumpers to pads
Isolation milling Requires a 1-2 thou channel and about 2-3 thou positional accuracy; a 60 degree carbide bit copper-burs unless the bit is very sharp and the feed rate is right Not practical between closely packed pads; use toner transfer and etching for dense layouts
Trace-outline milling Cutter follows the outline of the trace, so the cutter must be narrower than the trace; an 8 mil trace is too small Set trace and pad sizes in the layout, then run a cut simulator
Drilling and outline Toner-transfer boards still need holes and a cut-out Use the generated drill and outline G-code with double-sided tape holding the board; drill before etching
Multiple identical boards Same milling code repeated Tile by shifting an axis (about 1.5 in for the example) and repeating the code

For drilling, generate a drill file from the layout with your hole sizes. The output G-code then includes a section for each drill size with a tool-change pause. Check printer scaling against what your machine drills for inter-pad spacing, and adjust the layout scale to match. Carbide bits from a discount source served for both drilling and milling to size.

Check 6: Layout Rules That Prevent Field Failures

  1. Terminate unused gate inputs. Floating CMOS inputs can oscillate and misbehave. The reference schematic leaves two gates of the 4030 and two of the 4093 unused (one 4093 gate in the single-driver version), so tie each to a defined level.
  2. Move the power connector to the output side so motor current stays out of the signal area.
  3. Keep traces thick where a component leg joins. Thin pads lift when the board is drilled.
  4. Add copper fill with a polygon around ground leads to reduce etching, and enlarge pads on resistors and the 10-pin IDC for more copper. Prefer a polygon to loose airwires, so the design rule check can remain valid.
  5. Clearance. 24 thou between DIP pins worked for toner transfer. Printed layouts show more clearance than the screen suggests, and a knife corrects a bridge more easily than a broken track can be repaired.
  6. DB25 mounting. Through-hole DB25 connectors are tight to mill and hide top-layer pads. A straight solder-cup connector clamped over the board edge, with the board between the two rows, gives top and bottom pad access. The tradeoff is that the connector has no other mounting point.

The design rule check does not catch every error. A single trace that terminates early passed the checker on one board and led to a destroyed 44-pin surface-mount part during troubleshooting. Build one board first and debug it before making copies.

Parallel port pin assignment

Any pinout works if it is documented and the control software is set to match. Two mappings appear in this design class:

Function Mapping A (reference board) Mapping B (common breakout)
Spindle Pin 1 Outputs on 1, 16, 14, 17 (enable, spindle relay, etc.)
X step / dir 2 / 3 2 / 3
Y step / dir 5 / 6 4 / 5
Z step / dir 8 / 9 6 / 7 (axis 3), 8 / 9 (axis 4)
Inputs Home Z, Y, X on 13, 12, 11; stop on 15 10, 11, 12, 13, 15

Mapping A skips pins 4 and 7. Mapping B uses them for the Y and third-axis step/direction pairs. Pick one, document it on the board, and match the software port configuration to it.

Check 7: Power-Up Logic Probe Sequence

These steps assume the board carries the 7805 and the built-in logic probe LED, with no motor connected.

  1. Apply supply. With the 5804 fitted, the supply range is 8 to 35 VDC. A 9 V adapter lit the board's LEDs, so it is enough for a logic power-up check. Choose the motor supply from the motor and driver rating, not from the logic test.
  2. Confirm the probe LED is lit with the probe pin open. It lights in open air. Solder a wire to the probe pin and touch it to ground: the LED must go out. To make it stay dark on an unconnected probe, add a 10K resistor from the probe pad to ground.
  3. Probe each IC pin with no motor connected, and compare against the expected state. Use a 74HC14, not a plain 7414.
  4. Check for step-input clocking. Touching pins can clock the state machine, more so with a non-HC part. Note the pin states before and after probing.
  5. Inspect output nodes for etch bridges to adjacent signals.

Use these logic rules to interpret a reading:

Device / pins Rule Fault indication
74HC14 pin 3 tied high Pin 4 (its inverter output) must be low Pin 4 high: wrong part (7414), or a coupling fault in the chip
4030 (XOR) pins 8, 9, 10 Pin 10 is high only when pins 8 and 9 differ All three high: bridged trace or a bad gate
4013 pins 12 and 13 Not both low (flip-flop output pair) Both low: state machine clocked by probing, or a bridged output

In one reported probe set, pins 3 and 4 of the 74HC14 were both high, pins 8, 9 and 10 of the 4030 were all high, and pins 12 and 13 of the 4013 were both low. Each violated the rules above. Repair those nodes before connecting a motor.

The 5804 variant of this design had a schematic miswire: pins 3 and 5 were reversed, which swaps step and direction. Correct that in the artwork before building. If the fitted layout differs from the documentation (for example a 7414 location that does not appear on the 5804 version), work from the revised artwork and update documents, not from the older copy.

Chopper Branch: When Check 2 or 3 Fails

Move here if the required step rate exceeds the non-chopper ceiling, or if the port and fault-path checks need isolation anyway.

Option Characteristics Constraint
A3977-based board Built-in step/direction translator; performance comparable to a commercial hobby driver; used as separate plug-in driver, I/O and breakout modules Fine-pitch surface-mount part; a single trace error can be fatal to the part
A3951 DC PWM motor driver usable on a bipolar stepper (two winding DC motor); two chips per motor; 2 A and 50 V maximum No step/direction translator, so a microcontroller is required; part is going obsolete; 2 A is on the low side for many steppers
L297 sequencer plus analog chopper Bipolar chopper using the L297 for sequencing and its analog portion for current chopping Power FETs need higher gate voltage; use a charge pump for high-side gate drive
Discrete half-bridge bipolar chopper Cheap, no rare parts, single-sided board, unlimited current by FET choice Many parts; needs positive and negative rails plus a 5 to 10 V supply above the positive rail for high-side drive; FET voltage rating must be twice the stepper supply

High-side drive for a full H-bridge

A discrete three-transistor high-side drive with a charge pump gives Vgs on the high-side FETs of Vmotor + 12 V from a 12 VDC supply. That removes the need for logic-level FETs. Low-side FETs are driven by a 12 V gate driver of the MC3415x or TC442x type, and a low-side driver such as the MC34152 also works. The boost input needs a squarewave of 2 to 20 kHz, not critical. FET choices that fit: IRF540 and IRF550 for up to 60 V motor supply, RFD3055 for about 30 V. The 1N4148 diodes in that circuit can be replaced with UF4002 types. Use an opamp with faster slew than an LM324 in any AC current-sense stage.

Decay modes and current sensing

In slow decay, winding current recirculates through the top or bottom pair of the bridge and the sense resistor does not see it. In fast decay, winding energy returns to the supply and sense-resistor current reverses. With a fixed off-time chopper that reversal does not matter. A half bridge cannot do slow decay through a bridge pair, so it is limited to fast-decay behavior. A programmable micro-based controller can set stepper type, motor current, microsteps, mixed-mode decay percentage and chopper frequency.

Final Verification of the Unipolar Branch

This resolves the branch where the port, rate and isolation checks passed and the board uses IRFZ44-class FETs. Run each step and confirm its reading before the next.

  1. Port levels. With the logic supply on and motor supply off, cycle each step and direction pin from the control software. The measured pin at the driver input crosses the logic threshold on the target PC. If it does not, stop and fix Check 1.
  2. Probe LED behavior. The LED is lit with the probe open and goes out when the probe is grounded (or stays out with the 10K to ground fitted).
  3. Logic map. 74HC14 pin 4 is low with pin 3 high, 4030 pin 10 follows the XOR of pins 8 and 9, and 4013 pins 12 and 13 are never both low.
  4. FET orientation and part. Every fitted power FET is an IRFZ44 or equivalent HEXFET, gate/drain/source verified against the physical part, and each tab is either insulated from the heatsink or confirmed to be on a common node.
  5. Low-current motor test. Connect a small motor (for example a 5-wire, 0.32 A motor) with the ballast hookup in place. Step at a low rate and confirm rotation, then reverse the direction line and confirm reversal. A swapped result points to the step/direction pin swap known in the 5804 schematic.
  6. Rate check. Raise the step rate toward your requirement. Rotation must hold to your required rpm, with a loaded ceiling in the region of 600 steps/s for the non-chopper reference. Skipping or stalling below the requirement moves you to the chopper branch.
  7. Thermal and isolation check. After a run at the motor supply and current, the FETs are cool enough to touch without a heatsink at 35 V or below (as rated for the IRFZ44), and no motor-supply node measures on any logic or port-side pin.

FAQ

Can I run a direct-drive 4030/4013 stepper board from a laptop parallel port?

Usually not. Laptops and many branded desktops fail to source the roughly 25 mA these circuits want or drive only 3.3 V; in one comparison across two laptops and four PCs, only two desktops worked. Use a buffer or an optoisolated breakout, and measure the loaded pin voltage first.

Does an IRF512 work in place of an IRFZ44 in the driver stage?

It fits the footprint and tab, but at 100 V and 4.9 A it is not suitable to drive a motor here. The IRFZ44 is rated 60 V and 50 A and is fast switching. Use the IRFZ44 or a similar HEXFET.

Can I power the board with a 9 V adapter for a first power-up?

Yes for a logic-only check; a 9 V adapter lit the board and its LEDs. With the 5804 fitted the supply range is 8 to 35 VDC. Set the motor supply from the motor and driver ratings, not from that test.

Does the probe LED light when the probe pin is not connected?

Yes. It lights in open air and goes out when the probe wire touches ground. To keep it dark on an unconnected probe, solder a 10K resistor from the probe pad to ground.

Can I use an A3951 as a bipolar stepper driver?

Yes, two chips per bipolar motor, since a bipolar stepper is a two-winding DC motor. It has no step/direction translator, so a microcontroller must generate the drive signals. It is limited to 2 A and 50 V and is going obsolete.

Back to blog