UM2299 User manual 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 October 2017 DocID031121 Rev 1 1/16 www.st.com Contents UM2299 Contents 1 2 Getting started ................................................................................. 5 1.1 Board overview ................................................................................. 5 1.2 Hardware and software requirements ............................................... 5 1.3 Board setup ....................................................................................... 5 1.3.1 Nucleo Using the X-NUCLEO-IHM14A1 expansion board with an STM32 5 1.3.2 Using the X-NUCLEO-IHM14A1 expansion board alone ................... 6 Hardware description and configuration ....................................... 9 2.1 pins X-NUCLEO-IHM14A1 expansion board switches, connectors and 9 2.2 Selecting the STSPIN820 direction and step clock lines ................. 11 3 Schematic diagram........................................................................ 12 4 Bill of materials .............................................................................. 13 5 Revision history ............................................................................ 15 2/16 DocID031121 Rev 1 UM2299 List of tables List of tables Table 1: S1, S2, S3 step mode switches .................................................................................................... 7 Table 2: S4 step mode switches ................................................................................................................. 8 Table 3: Arduino UNO R3 connector description ....................................................................................... 9 Table 4: ST morpho connector description ............................................................................................... 10 Table 5: CN1 connector, switches and test point description ................................................................... 11 Table 6: Direction selection ...................................................................................................................... 11 Table 7: Step clock selection .................................................................................................................... 11 Table 8: X-NUCLEO-IHM14A1 expansion board bill of materials ............................................................ 13 Table 9: Document revision history .......................................................................................................... 15 DocID031121 Rev 1 3/16 List of figures UM2299 List of figures Figure 1: X-NUCLEO-IHM14A1 expansion board ...................................................................................... 1 Figure 2: X-NUCLEO-IHM14A1 expansion board: switches and connectors ............................................ 9 Figure 3: X-NUCLEO-IHM14A1 circuit schematic .................................................................................... 12 4/16 DocID031121 Rev 1 UM2299 Getting started 1 Getting started 1.1 Board overview 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 Arms 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: a PC with Microsoft Windows (R) (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: 1 Check the jumper position on the basis of your configuration (refer to Section 2.1: "X-NUCLEO-IHM14A1 expansion board switches, connectors and pins" ) 2 Connect the X-NUCLEO-IHM14A1 to the STM32 Nucleo board via the Arduino UNO R3 connectors (CN5, CN6, CN8 and CN9). 3 Power the board through the CN1 connector inputs 5 (VS) and 6 (GND). DocID031121 Rev 1 5/16 Getting started UM2299 The D5 (red) LED turns on. 4 1.3.2 Develop your project using the sample applications bundled with the X-CUBESPN14 software package.a Using the X-NUCLEO-IHM14A1 expansion board alone The X-NUCLEO-IHM14A1 expansion board is able to drive a stepper motor without an STM32 Nucleo board. The following equipment is required: 1.3.2.1 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) b a stepper motor connected to the motor phase CN1 connector (A+, A-, B+, B-) Operating mode You can adjust the following application parameters: 6/16 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"c 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 valued 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 a Further details on the STSPIN820 and other STM32 Nucleo support material are available on www.st.com. b Refer to the STSPIN820 datasheet for amplitude and frequency limits. c Refer to the step mode selection table in the STSPIN820 datasheet. d Refer to the PWM current control section in the STSPIN820 datasheet. DocID031121 Rev 1 UM2299 Getting started Table 1: S1, S2, S3 step mode switches S1 - MODE1 S2 - MODE2 S3 - MODE3 Step mode Full step 1/2 step 1/4 step 1/8th step 1/16th step 1/32nd step 1/128th step 1/256th step DocID031121 Rev 1 7/16 Getting started UM2299 Table 2: S4 step mode switches S4 Decay mode Mixed decay Slow decay 8/16 DocID031121 Rev 1 UM2299 Hardware description and configuration 2 Hardware description and configuration 2.1 X-NUCLEO-IHM14A1 expansion board switches, connectors and pins Figure 2: X-NUCLEO-IHM14A1 expansion board: switches and connectors CN7 & CN10 ST Morpho connectors CN5 & CN6 Arduino UNO R3 connectors S1-S2-S3 Step mode selection S4 decay mode selection TP6 GND test point TP7 VDD test point D5 Fault LED (red) R7 Motor max. torque adj TP1 VREF test point R25-R28 STCK selection U1 STSPIN820 stepper driver R27-R29 DIRselection TP8 GND test point TP2-TP3-TP4-TP5 Power outputs test points TP9 VS test point D1-D2-D3-D4 Power outputs LED (yellow) CN1 Power connector CN1 Motor connector CN8 & CN9 Arduino UNO R3 connectors Table 3: Arduino UNO R3 connector description Connector Pin Signal 1 STBY 2 REF 4 MODE3 5 MODE2 6 MODE1 7 Ground 3 EN_FAULT 4(1) STCK1 5(1) DIR2 6 DECAY 7(1) STCK1 8(1) DIR1 CN5 CN9 DocID031121 Rev 1 9/16 Hardware description and configuration Connector CN6 UM2299 Pin Signal 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 CN10 CN7 Pin Signal 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 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. 10/16 DocID031121 Rev 1 UM2299 Hardware description and configuration Table 5: CN1 connector, switches and test point description Name Pin Label Description 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) VS Motor power supply CN1 TP9 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 Signal R29 R27 Connector Remarks DIR1 0 Not mounted CN9 pin 8 Default DIR2 Not mounted 0 CN9 pin 5 Table 7: Step clock selection Signal R25 R28 Connector Remarks STCK1 0 Not mounted CN9 pin 4 Default STCK2 Not mounted 0 CN9 pin 7 DocID031121 Rev 1 11/16 MODE1 REF_PW M NM DocID031121 Rev 1 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 CON-2x19 CN7 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 R17 47k 1 R21 10k STCK MODE3 MODE2 MODE1 STBY R6 47k R4 VDD 3 . VDD 2 2 1 3 DIR Q2 R1 5k6 MODE1 S1 R18 47k CON-1x6 1 2 3 4 5 6 CN8 CON-1x8 1 2 3 4 5 6 7 8 R5 GND GND 3.3V Roff R26 0 . VDD 2 1 3 VDD DECAY 220n C5 TP1 VREF R22 10k 22k R19 22k TOFF R7 1k Vref MODE2 CN6 2 3 1 C7 220n VDD TP7 MODE2 S2 VREF 2 1 18 24 20 19 23 22 21 16 MODE3 C3 38 36 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 . 37 35 33 31 29 27 25 23 21 19 17 15 13 11 9 7 5 3 1 VDD CON-2x19 CN10 R23 10k STSPIN820 DECAY TOFF DIR STCK MODE3 MODE2 MODE1 STBY GND VREF U1 330 n/50 V 1 33 F/50 V 10 2 1 3 MODE3 SNSB SENSEB2 SENSEB1 OUTB2 OUTB1 SNSA SENSEA2 SENSEA1 OUTA2 OUTA1 EN_FAULT 1 2 3 4 5 6 7 8 CN9 1 2 3 4 5 6 7 8 9 10 CON-1x10 M3 M2 M1 GND CN5 MODE3 MODE2 MODE1 STBY REF_PW M DECAY EN_FAULT R24 10k . R2 1k VDD R28 2 1 3 R14 0.68/0.5W EN_FAULT R13 0.68/0.5W OUTB2 OUTB1 OUTA2 OUTA1 CON-1x8 DIR DEC EN CLK DECAY 15 13 14 11 12 4 6 5 8 7 17 STBY REF C2: Through Hole footprint option C1: SMD footprint option S3 VS VS 1 33 F/50 V R25 DECAY S4 NM 0 0 NM VDD 1n C6 18k R20 DIR STCK VDD 1 STBY R16 0.68/0.5W C4 10n R3 39k R29 R27 R15 0.68/0.5W VDD 2 3 C2 2 D5 RED R8 330 Q1 GND TP8 GND TP6 VS R9 10k/0.5W D1 YELLOW OUTA1 OUTA2 OUTB2 OUTB1 R10 10k/0.5W D2 YELLOW VS TP9 Vs GND VS A+ 6 A- B- B+ 5 CN1 R12 10k/0.5W 4 3 2 1 R11 10k/0.5W D3 YELLOW D4 YELLOW TP5 OUTB2 TP4 OUTB1 TP3 OUTA2 TP2 OUTA1 2 1 9 VS GND 3 EPAD 25 2 1 + 2 OUTA1 1 OUTA2 2 12/16 OUTB1 1 + OUTB2 2 3 1 C1 2 Schematic diagram UM2299 Schematic diagram Figure 3: X-NUCLEO-IHM14A1 circuit schematic UM2299 4 Bill of materials Bill of materials Table 8: X-NUCLEO-IHM14A1 expansion board bill of materials Item Q.ty Ref. Part/Value Description Manufacturer 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 1k Resistor 23 1 R8 330, 0603 Resistor 4 R9, R10, R11, R12 10 k/0.5 W 0805 Resistors 24 DocID031121 Rev 1 Bourns Order code 3223J 13/16 Bill of materials 14/16 UM2299 25 4 R13, R14, R15, R16 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 0.68/0.5 W 1206 Resistors DocID031121 Rev 1 Yageo ST RL1206FR7W0R68L UM2299 5 Revision history Revision history Table 9: Document revision history Date Version 17-Oct-2017 1 DocID031121 Rev 1 Changes Initial release. 15/16 UM2299 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. (c) 2017 STMicroelectronics - All rights reserved 16/16 DocID031121 Rev 1