Getting started with the X-NUCLEO-IHM14A1 stepper motor
driver expansion board based on STSPIN820 for STM32 Nucleo
Introduction
The X-NUCLEO-IHM14A1 motor driver expansion board is based on the STSPIN820 monolithic driver
for stepper motors.
It represents an affordable, easy-to-use solution for driving stepper motors in your STM32 Nucleo
project, implementing motor driving applications such as 2D/3D printers, robotics and security cameras.
The STSPIN820 implements a PWM current control with constant OFF time adjustable via an external
resistor and a microstepping resolution up to the 256th step.
The X-NUCLEO-IHM14A1 expansion board is compatible with the Arduino UNO R3 connector and the
ST morpho connector, so it can be plugged to the STM32 Nucleo development board and stacked with
additional X-NUCLEO expansion boards.
Figure 1: X-NUCLEO-IHM14A1 expansion board
Page 2
Contents
UM2299
2/16
DocID031121 Rev 1
Contents
1 Getting started ................................................................................. 5
The X-NUCLEO-IHM14A1 expansion board for STM32 Nucleo is a stepper motor driver
covering a wide range of applications.
The key features are:
Operating voltage: 7 to 45 V
Output current up to 1.5 A
Fine tuning microstepping up to the 256th step
Current control with adjustable OFF time
Full protection set:
Overcurrent protection
Short-circuit protection
Under voltage lock out
Thermal shutdown
Compatible with Arduino UNO R3 connector
Compatible with STM32 Nucleo boards
RoHS compliant
1.2 Hardware and software requirements
To use the STM32 Nucleo development boards with the X-NUCLEO-IHM14A1 expansion
board, the following software and hardware specifications are required:
rms
a PC with Microsoft Windows ® (XP, Vista, 7, 8 and 10) to install the software package
(X-CUBE-SPN4)
an STM32 Nucleo development board
a type A to Mini-B USB cable to connect the STM32 Nucleo board to the PC
the X-CUBE-SPN4 software package (available on www.st.com)
an IDE among:
IAR Embedded Workbench for ARM (EWARM)
Keil microcontroller development kit (MDK-ARM)
System Workbench for STM32 (SW4STM32)
a stepper motor with compatible and current ratings for the STSPIN820 driver
an external power supply or external battery suitable for the stepper motor used
1.3 Board setup
1.3.1 Using the X-NUCLEO-IHM14A1 expansion board with an STM32
Nucleo
When used with an STM32 Nucleo board, to set up the X-NUCLEO-IHM14A1 expansion
board:
Check the jumper position on the basis of your configuration (refer to Section 2.1:
"X-NUCLEO-IHM14A1 expansion board switches, connectors and pins" )
Connect the X-NUCLEO-IHM14A1 to the STM32 Nucleo board via the Arduino
UNO R3 connectors (CN5, CN6, CN8 and CN9).
Power the board through the CN1 connector inputs 5 (VS) and 6 (GND).
Page 6
Getting started
UM2299
6/16
DocID031121 Rev 1
The D5 (red) LED turns on.
4
Develop your project using the sample applications bundled with the X-CUBESPN14 software package.
a
1.3.2 Using the X-NUCLEO-IHM14A1 expansion board alone
b
c
d
a
b
c
d
The X-NUCLEO-IHM14A1 expansion board is able to drive a stepper motor without an
STM32 Nucleo board. The following equipment is required:
a suitable external power supply (or battery) for the stepper motor used, connected
between CN1 connector pins 5 (VS) and 6 (GND)
a secondary power supply providing 3.3 V (recommended) or 5 V, connected between
TP3 (VDD) and TP6 or TP8 (GND)
a waveform generator providing the signal step clock, connected between CN9 (CLK
line) connector pin 4 and TP6 or TP8 (GND)
a stepper motor connected to the motor phase CN1 connector (A+, A-, B+, B-)
1.3.2.1 Operating mode
You can adjust the following application parameters:
Step mode: to set the desired step mode through the position of S1, S2 and S3
switches as listed in Table 1: "S1, S2, S3 step mode switches"
Decay mode and OFF time: to set the decay mode current recirculation through the
position of switch S4 Table 2: "S4 step mode switches" and the OFF time changing
the R9 resistor value
Motor torque (according to the motor requirements): to set the voltage value at the
STSPIN820 REF input using the R7 trimmer (the maximum value is 0.5 V with VDD =
3.3 V).
Motor speed: to be adjusted through the step clock signal frequency
Further details on the STSPIN820 and other STM32 Nucleo support material are available on www.st.com.Refer to the STSPIN820 datasheet for amplitude and frequency limits.Refer to the step mode selection table in the STSPIN820 datasheet.Refer to the PWM current control section in the STSPIN820 datasheet.
Page 7
UM2299
Getting started
DocID031121 Rev 1
7/16
Table 1: S1, S2, S3 step mode switches
S1 - MODE1
S2 - MODE2
S3 - MODE3
Step mode
Full step
½ step
¼ step
1/8th step
1/16th step
1/32nd step
1/128th step
1/256th step
Page 8
Getting started
UM2299
8/16
DocID031121 Rev 1
Table 2: S4 step mode switches
S4
Decay mode
Mixed decay
Slow decay
Page 9
UM2299
Hardware description and configuration
DocID031121 Rev 1
9/16
2 Hardware description and configuration
Connector
Pin
Signal
CN5
1
STBY
2
REF
4
MODE3
5
MODE2
6
MODE1
7
Ground
CN9
3
EN_FAULT
4
(1)
STCK1
5
(1)
DIR2
6
DECAY
7
(1)
STCK1
8
(1)
DIR1
CN7 & CN10 ST Morpho connectors
CN5 & CN6 Arduino UNO R3 connectors
U1 STSPIN820
stepper driver
R7 Motor
max. torque adj
TP7 VDD
test point
TP8 GND
test point
TP1 VREF
test point
TP9 VS
test point
CN8 & CN9 Arduino UNO R3 connectors
CN1 Power
connector
S1-S2-S3
Step mode selection
CN1 Motor
connector
S4 decay mode
selection
TP6 GND
test point
D5
Fault LED (red)
R25-R28
STCK selection
R27-R29
DIR selection
D1-D2-D3-D4
Power outputs LED (yellow)
TP2-TP3-TP4-TP5
Power outputs test points
2.1 X-NUCLEO-IHM14A1 expansion board switches, connectors
and pins
Figure 2: X-NUCLEO-IHM14A1 expansion board: switches and connectors
Table 3: Arduino UNO R3 connector description
Page 10
Hardware description and configuration
UM2299
10/16
DocID031121 Rev 1
Connector
Pin
Signal
CN6
2
VDD
6
Ground
7
Ground
Notes:
(1)
Refer to Section 2.2: "Selecting the STSPIN820 direction and step clock lines"
All the non-listed pins are not connected.
Table 4: ST morpho connector description
Connector
Pin
Signal
CN10
9
Ground
11
MODE1
13
MODE2
15
MODE3
19
REF
21
STBY
23
(1)
DIR1
25
(1)
STCK2
27
DECAY
29
(1)
DIR2
31
(1)
STCK1
33
EN_FAULT
CN7
12
VDD
20
Ground
22
Ground
Notes:
(1)
Refer to Section 2.2: "Selecting the STSPIN820 direction and step clock lines"
All the non-listed pins are not connected.
Page 11
UM2299
Hardware description and configuration
DocID031121 Rev 1
11/16
Table 5: CN1 connector, switches and test point description
Name
Pin
Label
Description
CN1
5 - 6
VS - GND
Motor power supply
1 ÷
4
B+, B-, A-, A+
Motor phases connection
S1, S2, S3
-
MODE1, 2, 3, 4
Step mode selection (stand-alone operation)
S4 - DECAY
Decay mode current recirculation (stand-alone
operation)
TP1 - VREF
Reference voltage
TP2, TP3, TP4,
TP5
-
OUT A+, A-,
B+, B-
Power bridge outputs
TP6, TP8
GND
Ground
TP7
VDD
Digital power supply (by default 3.3 V coming from the
STM32 Nucleo board)
TP9 - VS
Motor power supply
Signal
R29
R27
Connector
Remarks
DIR1
0 Ω
Not mounted
CN9 pin 8
Default
DIR2
Not mounted
0 Ω
CN9 pin 5
Signal
R25
R28
Connector
Remarks
STCK1
0 Ω
Not mounted
CN9 pin 4
Default
STCK2
Not mounted
0 Ω
CN9 pin 7
2.2 Selecting the STSPIN820 direction and step clock lines
The STSPIN820 direction and step clock lines can be selected via dedicated resistors as
listed in the following tables.
Table 6: Direction selection
Table 7: Step clock selection
Page 12
Schematic diagram
UM2299
12/16
DocID031121 Rev 1
3 Schematic diagram
Vs
GNDA-A+B+B-
3.3V
GND
GND
EN
DIR
REF
CLK
DEC
GND
STBY
M1
M2
M3
....
Roff
C1: SMD
footprint
option
C2: Through
Hole footprint
option
OUTA1
OUTA2
OUTB1
OUTB2
OUTB1
OUTB2
OUTA2
OUTA1
EN_FAULT
EN_FAULT
VREF
REF_PWM
REF_PWM
STBY
MODE1
MODE2
MODE3
STCK
DIR
DECAY
MODE1MODE2MODE3
MODE1
MODE3
MODE2
STBY
STBY
DECAY
DECAY
STCK
DIR
OUTA1
OUTA2
OUTB2
OUTB1
TOFF
VS
VS
VDD
VDDVDD
VDD
VDDVDDVDD
VDD
VDD
VS
R24 10k
D3
YELLOW
21
TP8
GND
R3
39k
R14
0.68/0.5W
R13
0.68/0.5W
R12
10k/0.5W
S2
MODE2
123
+
C2
12
R20
18k
CN8
12345
6
TP2
OUTA1
S3
MODE3
123
R6
47k
S4
DECAY
123
TP3
OUTA2
R11
10k/0.5W
R15
0.68/0.5W
C7
220n
Q2
1
23
R19
22k
TP4
OUTB1
R7
1k
13
2
R26 0
Q1
1
32
R10
10k/0.5W
R25 0
TP5
OUTB2
R18
47k
S1
MODE1
123
R29 0
CN10
CON-2x19
135791113151719212325272931333537
246
8
101214161820222426283032343638
C5
220n
CN7
CON-2x19
13579
11131517192123252729313335
37
2468101214161820222426283032343638
R1
5k6
R4 NM
C3
TP7
VDD
D2
YELLOW
21
R27NM
U1
STSPIN820
VREF1GND
2
GND
3
SNSA
4
SENSEA1
5
OUTA17OUTA2
8
VS
9
VS
10
OUTB211OUTB1
12
SENSEB2
13
SENSEB1
14
SNSB
15
STBY
16
EN_FAULT
17
DECAY
18
STCK19DIR
20
MODE121MODE222MODE323TOFF
24
SENSEA2
6
EPAD
25
R5 22k
D4
YELLOW
21
+
33 µF/50 V
12
R22 10k
CN1
12345
6
CN5
123456789
10
CN9
1234567
8
R23 10k
TP6
GND
R16
0.68/0.5W
R8
330
D5
RED
21
C6
1n
R9
10k/0.5W
TP1
VREF
R17
47k
TP9
VS
C4
10n
CN6
1234567
8
R2
1k
R28NM
R21 10k
D1
YELLOW
21
Vref
C1
33 µF/50 V
330 n/50 V
CON-1x6
CON-1x10
CON-1x8
CON-1x8
Figure 3: X-NUCLEO-IHM14A1 circuit schematic
Page 13
UM2299
Bill of materials
DocID031121 Rev 1
13/16
4 Bill of materials
Item
Q.ty
Ref.
Part/Value
Description
Manufacturer
Order code
1 1 CN1
MKDS1/6-5.08
MORSV-508-6P
Capacitor
Phoenix Contact
2
2
CN7,
CN10
CON-2x19
STRIP254P-M19X2
Capacitors
Samtec
SSQ-119-04-L-D
(Do not mount)
3
2
CN6,
CN9
CON-1x8
STRIP254P-F-8
Capacitors
Samtec
SSQ-108-04-F-S
4 1 CN5
CON-1x10
STRIP254P-F-10
Capacitor
Samtec
SSQ-110-04-F-S
5 1 CN8
CON-1x6
STRIP254P-F-6
Capacitor
Samtec
SSQ-106-04-F-S
6 1 C1
33 µF/50 V SMD
Capacitor
Wurth Elektronik
865080645010
7 1 C2
33 µF/50 V DNM
Capacitor
8 1 C3
330 n/50 V 0805
Capacitor
9 1 C4
10 n 0603
Capacitor
10 2 C5, C7
220 n 0603
Capacitors
11 1 C6
1 n 0603
Capacitor
12
4
D1, D2,
D3, D4
805
Yellow
LEDs
Wurth Elektronik
150080YS75000
13 1 D5
805
Red LED
Wurth Elektronik
150080RS75000
14 1 Q1
NX3008PBKW
NPX
15 1 Q2
NTA4001N
ONSemiconductors
16 1 R1
5k6 0603
Resistor
17 1 R2
1 k 0603
Resistor
18 1 R3
39 k 0603
Resistor
19 1 R4
DNM
Resistor
20 1 R5
22 k 0603
Resistor
21
3
R6,
R17,
R18
47 k 0603
Resistors
22 1 R7
1 k
Resistor
Bourns
3223J
23 1 R8
330, 0603
Resistor
24
4
R9,
R10,
R11,
R12
10 k/0.5 W 0805
Resistors
Table 8: X-NUCLEO-IHM14A1 expansion board bill of materials
Page 14
Bill of materials
UM2299
14/16
DocID031121 Rev 1
25
4
R13,
R14,
R15,
R16
0.68/0.5 W 1206
Resistors
Yageo
RL1206FR7W0R68L
26 1 R19
22 k 0805
Resistor
27 1 R20
18 k 0603
Resistor
28
4
R21,
R22,
R23,
R24
10 k 0603
Resistors
29
3
R25,
R26,
R29
0 0805
Resistors
30
2
R27,
R28
DNM
Resistors
31 1 S1
MODE1
Switch
Wurth Elektronik
32 1 S2
MODE2
Switch
Wurth Elektronik
33 1 S3
MODE3
Switch
Wurth Elektronik
34 1 S4
DECAY
Switch
Wurth Elektronik
35 1 TP1
VREF SMD
Test point
Harwin
S1751 Series
36 1 TP2
OUTA1 SMD
Test point
Harwin
S1751 Series
37 1 TP3
OUTA2 SMD
Test point
Harwin
S1751 Series
38 1 TP4
OUTB1 SMD
Test point
Harwin
S1751 Series
39 1 TP5
OUTB2 SMD
Test point
Harwin
S1751 Series
40
2
TP6,
TP8
GND SMD
Test points
Harwin
S1751 Series
41 1 TP7
VDD SMD
Test point
Harwin
S1751 Series
42 1 U1
STSPIN820
ST
Page 15
UM2299
Revision history
DocID031121 Rev 1
15/16
5 Revision history
Date
Version
Changes
1
Initial release.
17-Oct-2017
Table 9: Document revision history
Page 16
UM2299
16/16
DocID031121 Rev 1
IMPORTANT NOTICE – PLEASE READ CAREFULLY
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications , and
improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST
products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order
acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the
design of Purchasers’ products.
No license, express or implied, to any intellectual property right is granted by ST herein.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. All other product or service names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.