AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Selection guide

DC Motor or Stepper for Signal-Based Train Speed Control

Motors, gearboxes and drives sizing Published 7 min read By AutomateDirectUSA engineering team

Short answer

Choose a brushed DC motor driven by PWM with wheel-speed feedback. Your requirement is speed regulation under changing load and a reliable stop, and an open-loop stepper counts commanded steps, not measured speed; lost steps and load droop break both. Size the drive by wheel speed, torque and stall current, and measure the stopping distance.

On this page
  1. What the three signal states actually command
  2. Why an open-loop stepper fails at this job
  3. What a DC motor with PWM gives you
  4. The four numbers that decide it
  5. Worked example: 60 mm wheels, 0.3 m/s running speed, 20:1 gearbox, 12 V supply
  6. Stop on red: a measured distance, not a zero command
  7. The decision
  8. Questions asked

Use a brushed DC motor with a PWM drive and a speed feedback signal. Your requirement — stop on red, slow on yellow, hold running speed on green — is closed-loop speed regulation under changing load. A stepper is built for the opposite job: following commanded position increments. Run one open-loop against a train's changing load and the step count quietly stops matching what the wheels do, so neither the slowdown nor the stop can be trusted. The deciding quantities are wheel speed, running and stall current, and a measured stopping distance — not the resolution of the pulse train. This article works each one through and ends with the drive, sensor and stop behavior to build.

What the three signal states actually command #

The signal pole does not drive the motor; it selects a speed target. Green selects the running target, yellow a reduced target, red zero reached under control — and anything ambiguous or missing must select the stop as well, because a broken lamp or a broken wire must never leave a stale run command alive. Write that mapping into the logic before you touch any hardware.

Signal state What the speed loop must hold What proves it
Green the running-speed target measured speed holds that target as grade and friction change
Yellow a reduced speed target measured speed decelerates to and holds the lower target
Red zero speed, reached under control the train comes to rest within the measured stopping distance
Missing or contradictory indication the stop target loss of the input cannot leave a run command active

Why an open-loop stepper fails at this job #

A stepper moves one step for every pulse, and its driver sets speed by changing the interval between pulses; nothing is measured. That gives two failures, and either one sinks this project.

Speed is commanded, not regulated. A stepper's available torque falls as the step rate rises, and the load a model train sees — grade, curve friction, the weather demonstration itself — moves underneath it. With no feedback, nothing corrects the result, so train speed follows the load instead of the target.

Lost steps are silent. When the load exceeds the torque available at that step rate, the rotor slips and the pulse count stops matching wheel rotation. Your logic believes the train slowed; it did not, or it is coasting toward something. The winding is usually unharmed — why a stepper that loses steps after a stall is usually not damaged — which is exactly why the fault is dangerous here: nothing complains until the train misbehaves.

Closing the loop with an encoder fixes the principle — how to convert an open-loop stepper to closed-loop control — but by then you have built the feedback the application needs around the less natural motor. Note too that a red state leaving the stepper energized at standstill pours holding current into motor and driver for no force you need; de-energize after the stop.

What a DC motor with PWM gives you #

For a permanent-magnet brushed DC motor, speed rises with average winding voltage and droops as load rises, and developed torque is approximately proportional to armature current. PWM delivers that average voltage efficiently and lets a controller trim it continuously — but duty cycle is an actuator command, not a measurement. The same duty produces a different speed on a grade than on level track, which is why voltage reduction alone was never the fix.

Close the loop: measure wheel or motor speed, compare it with the target, adjust the duty. Measuring, comparing and correcting is the whole structure of servo control — what a servo motor is: closed-loop control, not one construction — and it is what turns three colored lamps into actual speed regulation.

At standstill there is no rotational back-EMF opposing the supply, so starting and stalled current are set by winding resistance alone. That number, not the running current, is what sizes the drive and the supply.

The four numbers that decide it #

Wheel speed, from the target train speed and the wheel diameter, sets motor speed through the gear ratio. Running torque and current, from rolling resistance, grade and acceleration, set what the motor must deliver. Stall current sets the drive and supply ratings and the current limit. Stopping distance is the fourth number, and it is a measurement you take, not one you compute. The worked example below turns the first three into arithmetic.

Worked example: 60 mm wheels, 0.3 m/s running speed, 20:1 gearbox, 12 V supply #

These inputs are an example build; measure your own wheel, gearing and winding before you size anything:

  • wheel diameter 60 mm (0.060 m)
  • running-speed target 0.3 m/s
  • gear reduction from motor to axle 20:1
  • a 12 V brushed motor whose winding measures 6 Ω across the terminals

The rules, in words: wheel speed in rpm equals sixty times the speed in metres per second, divided by pi times the wheel diameter in metres; motor speed is wheel speed times the gear ratio; stall current is supply voltage divided by winding resistance; and the heat that current dumps into the winding is current squared times resistance.

  • Wheel speed: 60 × 0.3 / (π × 0.060) = 18 / 0.1885 ≈ 95.5 rpm
  • Motor speed: 95.5 × 20 = 1910 rpm
  • Stall current: 12 V / 6 Ω = 2 A
  • Stall heating: 2² × 6 = 24 W

The decision: the wheels must turn about 95.5 rpm at running speed, so pick a motor whose speed-torque curve still carries the track's torque demand near 1910 rpm under load — read that from the curve, never from the no-load rating; a slower motor means a lower gear ratio or a lower running-speed target. Size the drive and the supply to source the 2 A stall current without the supply sagging, and set the drive's current limit at or just below that stall value: it is the protection ceiling, not an operating point, because a blocked train dumps 24 W into a winding with nothing turning to cool it.

Stop on red: a measured distance, not a zero command #

Removing drive power is not stopping — the train coasts. IEC 60204-1, the electrical standard for machinery, sorts stop functions into categories: Category 0 removes power immediately and the load coasts to rest; Category 1 brings the load to rest under power and removes power once it stands still. Your red state wants the Category 1 behavior: brake under power, hold at zero, then drop the enable rather than holding torque at standstill.

Measure the stopping distance instead of assuming it:

  1. Run on a test track or a restrained base, clear of people and property.
  2. Trigger the red input at the highest running speed and the heaviest intended load.
  3. Measure from the instant of the input change to full rest, and repeat after the drive has warmed through normal running.
  4. Compare the worst result with the travel your demonstration models; if the worst stop does not fit, lower the running-speed target until it does.

One safety note: this is a bench or classroom demonstrator. A real rail vehicle's braking and signalling are engineered fail-safe systems under railway-specific rules; a signal input wired to a motor drive is not that, and nothing here is a safety validation.

The decision #

Requirement Pick Why
Hold a speed under changing load DC motor with PWM and wheel-speed feedback the loop measures speed and corrects duty as the load moves
Bring the train to rest on red the same drive with a controlled stop and a current limit decelerates under power; stopping distance is measured, not assumed
Commanded position increments with holding a stepper the native skill of the technology — and not part of this project
Position and speed both needed under load a closed-loop stepper or small servo with an encoder feedback supplies what open-loop steps cannot

For this project, the pick is a brushed DC motor, a PWM drive rated above the stall current with its limit at or just below it, a tachometer or encoder on the motor shaft or an axle, and a red state that brakes under power to a measured stop inside the block your demonstration models.

Questions asked

Can I add an encoder to a stepper and still use it?

Yes. Fit an incremental encoder on the motor shaft or an axle, count its pulses to measure real speed, and close the loop the same way you would with a DC motor. Run that way, the stepper regulates speed properly, but you have added the sensor and controller the application needed all along, and a brushed DC motor does the same job with fewer parts.

Does a higher PWM duty cycle always mean a higher speed?

No. Duty cycle sets the average winding voltage, and speed follows it only while the load stays constant. If the train slows on a grade at unchanged duty, that is normal load droop, not a broken drive. Measure speed with a tachometer or encoder and let the controller raise the duty as needed to hold the target.

What sensor can measure a model train's wheel speed?

Common choices are a slot-type optical encoder on the motor shaft, or a Hall sensor with a small magnet on an axle. Either gives a fixed count of pulses per revolution. Divide pulses per second by pulses per revolution to get revolutions per second, then apply the gear ratio to convert between motor speed and wheel speed.

How should the drive's current rating relate to the motor?

At least as high as the motor's stall current at your supply voltage, which is supply voltage divided by winding resistance. Set the drive's current limit at or just below the stall value so a blocked rotor cannot cook the winding, and make sure the supply holds voltage while sourcing that current. Stall current is a protection ceiling and a sizing input, never a continuous operating point.

Keep reading

  • Selection guide

    NEMA 34 steppers on a woodworking CNC: what decides

    Yes — a NEMA 34 stepper is a sound axis motor for a woodworking CNC, but the frame size fixes only the mounting flange. The axis works when the motor's torque at your rapid speed, read from the curve at your drive voltage, still covers calculated friction, cutting and acceleration torque with margin. Buy or define the machine first, then pick motor, drive and supply as a matched set.

    Motors, gearboxes and drives sizing

  • Explainer

    Stepper motors on a friction wheel driven cutting machine

    Friction drive does not rule out stepper motors. The wheel must transmit the peak axis force, the friction coefficient times the normal force pressing it to the rail, without slipping, and the motor must hold synchronism through every commanded acceleration. Check wheel slip and lost steps as two separate limits, demand at least a two-to-one traction margin, and add feedback that reads the carriage before trusting open-loop position on a cutting machine.

    Servo and stepper motion

  • Selection guide

    Choosing Servo or Stepper to Replace a VFFS Main Drive Motor

    A 550 W, 1400 rpm main motor implies about 3.75 N·m of rated shaft torque, and stepper torque falls to a fraction of its holding value well before that speed. Use a 750 W-class servo, about 5.1 N·m at 1400 rpm, when you must control timing within each revolution; a stepper only fits at roughly one-third cycle speed. Size the replacement from measured RMS and peak torque, not from the wattage.

    Motors, gearboxes and drives sizing