Extension board · Motors

Three-channel A5984 stepper driver board

Three bipolar stepper motor drivers on one 90 mm square board, for example for the X, Y and Z axes. Each channel is an A5984 driver with its own current trimmer, controlled by STEP and DIR from a single ten-way cable. Motor power of 8 to 36 V comes in on a screw terminal.

Top view of the Three-channel A5984 stepper driver board: two ten-pin connectors and a green power terminal on the left, three driver channels in a column with their capacitors, chips, trimmers and four-pin motor headers.
Top view, drawn from the board’s design files. This is a drawing, not a photograph.
3 motorsbipolar stepper channels
A5984Allegro driver on each channel
1.65 Apeak at the top of the trimmer, calculated
8 to 36 Vmotor supply
1/32finest microstep setting
90 × 90millimetres, four layers
The motor power input has no protection against reversed polarity or over-voltage. Check plus and minus before every first connection, never exceed 36 V, and fit a fuse in the supply lead. Never connect or disconnect a motor while motor power is on. Set each trimmer before connecting motors: the top of the range is 1.65 A peak with nominal parts and up to 1.96 A with part tolerances, close to the chip’s 2 A absolute maximum. Cool the board with a fan from underneath.

Tech specs

PurposeDrive three bipolar stepper motors from STEP and DIR signals
DriversThree A5984GLP, each with two 0.1 Ω sense resistors
Motor power8 to 36 V DC on a two-way screw terminal, common to the three channels
Motor currentOne trimmer per channel. Peak current = VREF / 0.8 Ω, 0 to 1.65 A nominal (calculated)
MicrosteppingFull step to 1/32, set per channel with three 0 Ω positions
ControlSTEP and DIR per motor and one shared active-low enable, 3.3 V logic
ConnectorsINPUT Y and CHAIN Y, 2×5 at 1.27 mm (Gadgeteer type Y); three 1×4 motor headers at 2.54 mm; 3.5 mm screw terminal
ProtectionIn the driver chip: overcurrent latch, thermal shutdown, undervoltage lockout. On the board: none for the power input.
CoolingFan under the board; four fan holes on a 60 mm square
Size90 × 90 mm, four copper layers, eight 3 mm holes
Works withSmoothieboard V2 Prime, or any controller with 3.3 V STEP and DIR outputs
LicenceOpen hardware, CERN OHL v1.2

Every figure with its basis is in the electrical specifications appendix; hole positions are in the mounting dimensions appendix.

Board tour

The numbers on the drawing match the list below it. The board is shown from the component side; channel X is at the top, Y in the middle and Z at the bottom.

  1. 1
    Input connector (INPUT Y) — a 2×5, 1.27 mm Gadgeteer Y connector that brings STEP and DIR for all three motors, the shared enable line, 3.3 V and ground from the controller.
  2. 2
    Chain connector (CHAIN Y) — a second connector wired contact for contact to the input. It passes all seven control signals on.
  3. 3
    Motor power terminal — a two-way screw terminal for 8 to 36 V DC. Plus is the upper screw, minus the lower one. There is no reverse-polarity protection.
  4. 4
    Motor X header — four pins for one bipolar motor: coil 1 on 1B and 1A, coil 2 on 2A and 2B.
  5. 5
    Motor Y header — the same four pins for the second motor.
  6. 6
    Motor Z header — the same four pins for the third motor.
  7. 7
    Driver chips — three Allegro A5984 stepper drivers, one per motor, X at the top. Each has an exposed pad soldered to the board on its underside.
  8. 8
    Current trimmers — one trimmer below each driver sets that motor’s current. The single pad on the side facing its driver chip is the wiper, where you measure VREF.
  9. 9
    Microstep positions — three 0603 positions above each driver, from left to right MS3, MS2 and MS1. A fitted link makes that input high.
  10. 10
    Sense resistors — two 0.1 Ω resistors per driver that measure the coil current.
  11. 11
    Supply capacitors — two 47 µF, 63 V capacitors next to each driver.
  12. 12
    Fan holes — four non-plated 3 mm holes on a 60 × 60 mm square, for a fan under the board.
  13. 13
    Board mounting holes — four plated 3 mm holes in the corners, connected to ground.
Point at a number, or tap it, to read what the part is; the same text is in the list. On a small screen, scroll the drawing sideways.

Pinout

INPUT Y: control connector

Connect INPUT Y to the header labelled G_F (J37) on the Smoothieboard V2 Prime (Prime2590 and Prime2660 designs) with a straight ten-way cable. The last column is the name you use for each pin in the configuration file.

PinSignalWhat it doesPrime pin (header G_F)
13.3 VLogic supply for the current trimmers and links3.3 V
2Not connectedThe board does not use 5 V—
3X STEPMotor X moves one microstep on each rising edgePB1
4X DIRMotor X directionPJ4
5Y STEPMotor Y stepPA4
6Y DIRMotor Y directionPG0
7Z STEPMotor Z stepPJ3
8Z DIRMotor Z directionPG1
9ENABLEAll three drivers; low enables, high or unconnected disablesPJ2
10GNDGround, shared with the motor supply minusGND
INPUT Y seen from above: odd pins 1 to 9 in the left column beside the notch, even pins 2 to 10 in the right column, pin 1 at the top. notch13V32not used3X STEP4X DIR5Y STEP6Y DIR7Z STEP8Z DIR9ENABLE10GND
INPUT Y seen from above, in the same orientation as the board tour. CHAIN Y has the same layout. The drawing is enlarged; the real pins are 1.27 mm apart.

Motor headers: X, Y and Z

The pin names are printed beside each header. Pin 1 is 1B, at the bottom of each header.

PinPrintedCoilDriver output
4 (top)2BCoil 2OUT2B
32ACoil 2OUT2A
21ACoil 1OUT1A
1 (bottom)1BCoil 1OUT1B

Power terminal

MarkingSignalNotes
+ (upper screw)Motor supply8 to 36 V DC. No polarity protection.
− (lower screw)GNDCommon with controller ground and the four corner holes

What you need

Controller

A Smoothieboard V2 Prime, or another controller with seven free 3.3 V outputs.

Ribbon cable

Ten ways, 1.27 mm connector pitch 2×5, wired pin 1 to pin 1.

Motors

Up to three bipolar stepper motors with four leads, with 1×4 2.54 mm plugs.

Power supply

DC, between 8 and 36 V, with a fuse sized for your motors and wiring.

Fan

A fan blowing on the underside of the board, which carries no parts. The holes form a 60 mm square; a standard 60 mm fan frame has holes 50 mm apart, so check yours and use a bracket if it differs.

Tools

A multimeter and a small insulated screwdriver for the trimmers.

Get started

The controller connects to INPUT Y with a ten-way ribbon cable, three motors connect to the motor headers and a DC supply connects to the power terminal. SmoothieboardV2 Primeheader G_FStepper driverboardINPUT Y · powerMOTOR X, Y, ZMotor XMotor YMotor Z10-way ribbon cablepin 1 to pin 14 wires eachDC power supply8 to 36 V+−
Minimal wiring: one ribbon cable, up to three motors and the motor supply. Add the fan under the board.
  1. Mount the board and the fan

    With all power off, mount the board on spacers with the fan underneath, blowing towards the board.

  2. Check the microstep positions

    Look at the three positions above each driver and note which are fitted. This decides steps per millimetre.

    With all three fitted on a channel, that channel runs at 1/8 step.

  3. Connect the controller only

    Plug the ribbon cable from G_F into INPUT Y and power the controller. Leave motor power and motors disconnected.

    About 3.3 V is present between pin 1 of INPUT Y and the minus screw.

  4. Set the three currents

    Follow Set the current for X, Y and Z.

  5. Connect motors, then power

    With everything off, plug in the motors, then connect the supply to the screw terminal, plus to plus. Add the configuration, power up and make a short slow move.

    The motor holds firmly once enabled and moves the commanded distance.

Set the current

Each driver limits its peak coil current to VREF / (8 × 0.1 Ω), so VREF in volts = peak current in amperes × 0.8. VREF comes from the 3.3 V logic supply through the trimmer, so you can set it with only the controller connected. Measure between the trimmer’s single pad (the wiper) and the minus screw, and turn slowly while watching the meter. Take care not to touch a neighbouring pad.

Peak current you wantSet VREF toHeat in each sense resistor
0.4 A0.32 V0.02 W
0.6 A0.48 V0.04 W
0.8 A0.64 V0.06 W
1.0 A0.80 V0.10 W
1.2 A0.96 V0.14 W
1.4 A1.12 V0.20 W
1.65 A (top of range, nominal)1.32 V0.27 W

Motor ratings are usually given as current per phase. Start at about 70 % of that figure, never above it, and check how warm the motor and the board get. The A5984 accuracy is ±5 % at the larger microstep levels.

Configuration

You wantModuleExample
Three axes on this boardActuator, external driver1
An axis that turns the wrong wayActuator reversed2
A different microstep settingActuator steps_per_mm3
Speed and acceleration limits per axisActuator4
Only the X channel, other axes unchangedActuator5
Motor current set from the configurationNoneNot possible: use the trimmers
A separate enable per motorNoneNot possible: one enable line serves all three

These blocks are for SmoothieV2 on a Smoothieboard V2 Prime. Merge them into your existing config.ini, replacing the matching lines; the motors then move off the Prime’s own drivers and onto this board, so unplug them from the Prime. Make sure nothing else in the file uses the G_F pins.

1. X, Y and Z on this board

The step values assume 1/8 microstepping, 200-step motors, a 20-tooth, 2 mm pitch belt on X and Y, and an 8 mm lead screw on Z. The ! on the enable pin matches the active-low input. The enable pin belongs to the first actuator, and it switches all three drivers. The longer step pulse gives margin over the driver’s 1 µs minimum.

[actuator]
alpha.driver = external
alpha.step_pin = PB1
alpha.dir_pin = PJ4
alpha.en_pin = PJ2!
alpha.steps_per_mm = 40

beta.driver = external
beta.step_pin = PA4
beta.dir_pin = PG0
beta.en_pin = nc
beta.steps_per_mm = 40

gamma.driver = external
gamma.step_pin = PJ3
gamma.dir_pin = PG1
gamma.en_pin = nc
gamma.steps_per_mm = 200

[system]
step_pulse_us = 2

After a restart, M17 enables the motors and M84 disables them. M18 X disables all three here, because they share the enable line.

2. Reverse an axis

[actuator]
beta.reversed = true

3. Steps per millimetre for another microstep setting

Steps per millimetre = motor full steps per turn × microsteps ÷ millimetres moved per turn. For a 200-step motor at 1/16 with a 40 mm-per-turn belt drive, 200 × 16 ÷ 40 = 80.

[actuator]
alpha.steps_per_mm = 80
beta.steps_per_mm = 80

4. Limit speed and acceleration

max_rate is in millimetres per minute and acceleration in millimetres per second squared. Start low and raise the values once the axis moves reliably.

[actuator]
alpha.max_rate = 6000
alpha.acceleration = 500
gamma.max_rate = 600
gamma.acceleration = 100

5. Use only the X channel

Y and Z keep their existing settings. Leave the unused motor headers empty.

[actuator]
alpha.driver = external
alpha.step_pin = PB1
alpha.dir_pin = PJ4
alpha.en_pin = PJ2!

[system]
step_pulse_us = 2

Motors and power

A bipolar motor has two coils. With the motor unplugged, a multimeter shows a few ohms between the two leads of one coil and an open circuit between coils. Put one coil on 1B and 1A and the other on 2A and 2B. If the motor runs backwards, use example 2, or swap the two leads of one coil with power off.

A higher supply voltage helps a motor keep torque at speed, and does not raise the current set by the trimmer. Leave headroom below 36 V: a motor being slowed or pushed by hand feeds energy back and can raise the supply voltage, and the board has no clamp.

How it works

The controller sends step, direction and enable signals to three A5984 drivers. Each driver switches two H-bridges from the motor supply and compares the voltage on two sense resistors with the reference from its trimmer. ControllerSTEP, DIR ×3ENABLE, 3.3 V3 × A5984translator andcurrent chopper6 H-bridgestwo per driverMotorsX, Y, ZTrimmersVREF sets thepeak currentSense resistors0.1 Ω, measurecoil currentMotor supply
All three channels follow the same path: logic in, motor power switched out, current measured and limited on the board.

Each rising edge on STEP advances the A5984 by one microstep; its internal translator works out the two coil currents, so the controller only sends pulses and a direction level.

The driver switches each coil on until the voltage on its sense resistor reaches the level set by VREF, then lets the current decay for a short off time and repeats. This is current chopping. On this board a 0 Ω link ties each ROSC pin to ground, which selects the chip’s adaptive decay mode with a 16 µs off time.

All three enable pins share one line with a 10 kΩ pull-up to 3.3 V, so the outputs stay off until the controller drives it low.

Microstep positions

Each driver has three 0603 positions above it, from left to right MS3, MS2 and MS1. Fit a 0 Ω resistor or a solder bridge to make the input high; leave it open for low, since the chip has its own pull-down resistors. The parts list fits all nine, giving 1/8 step. Change them only with all power off, then update the steps per millimetre.

MS3 (left)MS2 (middle)MS1 (right)Resolution
openopenopenFull step
openopenfittedHalf step
openfittedopen1/16
openfittedfitted1/32
fittedopenopenFull step (modified)
fittedopenfittedHalf step (modified)
fittedfittedopen1/4
fittedfittedfitted1/8 (parts list)

Chaining

CHAIN Y is joined to INPUT Y contact for contact, with no links to cut. This board uses all seven signal pins, so anything plugged into CHAIN Y receives the same signals: a second identical board would repeat the same three movements. Do not connect a device that needs its own pins.

The controller's ribbon cable goes to the connector INPUT Y of the stepper driver board. Inside the board each of the ten pins runs straight to the connector CHAIN Y, where a second ribbon cable continues to the next board. Controller one ten-pin port stepper driver board INPUT Y CHAIN Y pin 3, X STEP passed on pin 4, X DIR passed on pin 9, ENABLE passed on Next board sees what is passed on
Chaining: one port of the controller serves two boards. Pin 1 of INPUT Y leads to pin 1 of CHAIN Y, pin 2 to pin 2, and so on. The three lines stand for the ten pins. Two boards must never drive the same pin, and a pin that one board uses for a signal is not free for the next. Every signal is shared with whatever is connected to CHAIN Y.
PinSignalOn CHAIN Y
13.3 VPassed on
25 VNot connected on either connector
3 to 8STEP and DIR for X, Y, ZPassed on, used by this board
9ENABLEPassed on, used by this board
10GNDPassed on

Troubleshooting

The board has no indicator lights. A multimeter on the power terminal and on INPUT Y is the first check.

SymptomCheck
No motor moves or holdsMotor supply of at least 8 V on the terminal; 3.3 V on pin 1; pin 9 goes low after M17; the enable pin line ends in !.
Motors are released when they should holdRemove or add the ! on the enable pin so that enabled means pin 9 low.
Motor buzzes or shakes without turningCoil wiring: each coil on its own pair (1B/1A and 2A/2B). Lower the speed and acceleration.
Motor is weak or loses stepsVREF on that channel, then speed, acceleration and supply voltage.
Distance is wrong by a factor of 2, 4 or 8The microstep positions and steps_per_mm disagree.
One motor stops until power is cycledThe driver latched on overcurrent. Remove motor power, look for a short between motor leads or to ground, then power up again.
Motors pause after a while, then resumeThermal shutdown. Check the fan and reduce the current.
Nothing works after wiring the supplyDisconnect it and check polarity. A reversed supply can destroy the drivers and capacitors.

Still stuck? Read how to ask for help or see the general troubleshooting guide.

Compare the stepper driver boards

Five boards drive stepper motors.

Pololu breakoutAllegro A5984Trinamic TMC2660Leadshine-like TMC2590Three-channel A5984
Specifications
DriverUp to three Pololu A4988 modulesAllegro A5984Trinamic TMC2660Trinamic TMC2590 with external transistorsThree Allegro A5984
Motors per boardUp to threeOneOneOneThree
Motor power connectorXT60XT30XT30Screw terminalScrew terminal
Supply range8 to 16 V12 to 24 V9 to 26 V18 to 32 V regulated8 to 36 V
Driver settings made byTrimmer on each moduleTrimmer RV1 and host linesSTEP, DIR and SPI registersSee its pageA trimmer per motor and microstep links
Features
Input protection stage with fault lights
Host and motor sides isolatedFunctional isolation only
Chain socket passes the lines onTen solder linksDirect, no links
More than one motor per boardUp to threeThree
Test points table on its pageTwelve

Downloads

FileWhat it is
Schematic (PDF)The circuit diagram
Parts list (CSV)Every component with its value, footprint and part number where one is chosen
Board drawing (PNG)The top view used on this page
3D view, top (PNG)Rendered from the design files; the trimmers have no 3D model
3D view, angled (PNG)Rendered from the design files; the trimmers have no 3D model
Angled three-dimensional rendering of the board with capacitors, driver chips, motor pin headers and the power terminal.
Rendering from the design files. The trimmers have no 3D model, so only their pads show.

Appendix: mounting dimensions

For drilling a mounting plate or designing an enclosure. Positions are hole centres, in millimetres, measured from the top-left corner with the board seen from the component side. The corner holes are connected to ground: a metal screw or spacer there ties your frame to the supply minus. The inner four are the fan holes and are not connected.

Mounting drawing of the three-channel A5984 stepper driver board, component side: outline 90 by 90 millimetres with 8 mounting holes. Hole positions are listed in the table below. COMPONENT SIDE · millimetres 90 90 0, 0 X Y 1 5.00, 5.00 2 85.00, 5.00 3 15.00, 15.00 4 75.00, 15.00 5 15.00, 75.00 6 75.00, 75.00 7 5.00, 85.00 8 85.00, 85.00 Numbered rings are mounting holes. Positions are hole centres, X then Y, from the marked corner.
Board outline 90 × 90 mm, square corners, board thickness 1.6 mm. Drawn from the design files, component side up, in the same orientation as the board tour.
HoleX (mm)Y (mm)DiameterUse
15.005.003 mm, plated, connected to GNDBoard mounting
285.005.003 mm, plated, connected to GNDBoard mounting
315.0015.003 mm, not platedFan
475.0015.003 mm, not platedFan
515.0075.003 mm, not platedFan
675.0075.003 mm, not platedFan
75.0085.003 mm, plated, connected to GNDBoard mounting
885.0085.003 mm, plated, connected to GNDBoard mounting

Appendix: electrical specifications

The last column gives the basis for each figure. Datasheet values are for the driver chip at 25 °C unless stated.

ParameterApplies toLowerNominalUpperBasis and conditions
Motor supplyPower terminal8 V24 V (example)36 VBoard limit; the chip operates from 8 to 40 V
Undervoltage lockout, risingEach driver6.3 V—6.85 VDatasheet
Logic supplyPin 1—3.3 V—Design value
Logic supply currentPin 1—under 1 mA—Calculated: trimmers, microstep links and enable pull-up
Logic input highSTEP, DIR, ENABLE2.0 V——Datasheet
Logic input lowSTEP, DIR, ENABLE——0.8 VDatasheet
Step pulse, high and lowSTEP1 µs——Datasheet
Direction setup and holdDIR—400 ns—Datasheet, typical
VREFEach trimmer0 V—1.32 VSimulated with nominal parts
Peak current setting, top of trimmerEach motor—1.65 A1.96 ASimulated; upper value with all tolerances at their worst. A setting, not a continuous rating.
Output on-resistance, high plus low sideEach coil—0.64 Ω0.86 ΩDatasheet, at 2 A
Conduction heat per driver at 1.0 / 1.65 A peakEach driver—0.64 / 1.7 W—Calculated for sine microstepping with typical on-resistance; switching losses extra
Driver supply currentEach driver—7.5 mA10 mADatasheet, chopping below 50 kHz, motor current excluded
Fixed off timeEach driver13 µs16 µs19 µsDatasheet, ROSC to ground
Overcurrent tripEach output2.6 A——Datasheet minimum; latches off
Thermal shutdownEach driver—165 °C—Datasheet, junction temperature; 20 °C hysteresis

Component stress limits

PartLimitUse on this board
Driver supply and outputs40 V absolute maximumAt most 36 V supply, leaving 4 V for transients
Driver output current±2 A absolute maximumSetting up to 1.96 A at the worst corner
Sense pins±0.5 V absolute maximum0.20 V at the worst corner (simulated)
Sense resistors, 0.1 Ω, 1 W1 W0.27 W at 1.65 A (calculated with continuous peak current)
Supply capacitors, 47 µF63 V36 V maximum supply
100 nF capacitors100 V36 V maximum supply

Appendix: simulation

The current-setting divider of one channel (3.3 V, 75 kΩ, 50 kΩ trimmer) was solved with ngspice, and the datasheet relation applied to the result. The sweep moves the trimmer across its travel. The corner run combines 3.3 V ±3 %, resistors ±1 % and the trimmer’s end-to-end value ±25 %.

Simulated peak coil current rises linearly with the trimmer position from zero to 1.65 amperes; the worst tolerance corner at maximum is 1.96 amperes. 0 A0.5 A1 A1.5 A2 Achip absolute maximum, 2 Aminimum¼half¾maximumtrimmer position (fraction of its electrical travel)0.41 A0.82 A1.24 A1.65 Aworst-case tolerances 1.96 A
Simulated peak current of one channel against trimmer position. Blue: nominal parts. Yellow: all tolerances at their worst at the top of the range.
ResultSimulated valueLimitOutcome
Largest peak current, nominal parts1.65 A2 A absolute maximumWithin
Largest peak current, worst corner1.96 A2 A absolute maximumWithin, with 2 % margin
Sense voltage, worst corner0.198 V0.5 VWithin

The corner result does not include the driver’s own current-accuracy error. Motor current waveforms, supply transients, heating and signal integrity were not simulated, because no usable simulation model of the driver was available and thermal results depend on the fan and mounting.

Appendix: datasheet

The first page of the driver chip’s datasheet. Click the page to open the PDF.

First page of the A5984 datasheet
A5984 DMOS microstepping driver with translator and overcurrent protection — Allegro MicroSystems, 28 pages.

See also the earlier single description of this three-channel design. See all boards on the extension boards page.

This is a wiki! If you'd like to improve this page, you can edit it on GitHub.