STM32 motor-control pack using the FOC algorithm for three-phase, low-voltage,
and low-current motor evaluation
Introduction
The P-NUCLEO-IHM03 pack is the motor-control kit based on the X-NUCLEO-IHM16M1 and NUCLEO-G431RB boards. The
power board with the STSPIN830 driver in the STPIN family provides a motor-control solution for three-phase, low-voltage,
PMSM motors with the addition of the STM32 Nucleo board through the ST morpho connector as illustrated in Figure 1. P-
NUCLEO-IHM03 is provided with a power supply unit also shown in Figure 1.
The device used on the power board is the STSPIN830. It is a compact and versatile FOC-ready driver for a three-phase motor.
It supports both single- and three-shunt architectures and embeds a PWM current controller based on user-settable values of
reference voltage and OFF time. Thanks to a dedicated MODE input pin, the device offers the freedom to decide whether to
drive it through 6 inputs (one for each power switch) or a more common 3 PWM direct-driving inputs. In addition, it integrates
both the control logic and a fully protected low-RDSon triple-half-bridge power stage. The NUCLEO-G431RB board provides an
affordable and flexible way for users to try out new concepts and build prototypes with the STM32G4 microcontroller. It does not
require any separate probe as it integrates the STLINK-V3E debugger and programmer.
This motor-control evaluation kit is fully configurable to support the closed-loop control (FOC only). It can be used with either a
speed sensor mode (Hall or Encoder), or speed sensorless mode. It is compatible with both 1-shunt and 3-shunt current-sense
topologies.
Figure 1. P-NUCLEO-IHM03 pack
Picture is not contractual.
UM2538 - Rev 1 - April 2019
For further information contact your local STMicroelectronics sales office.
www.st.com
1Features
•X-NUCLEO-IHM16M1
–Three-phase driver board for BLDC/PMSM motors based on STSPIN830
–Nominal operating voltage range from 7 V dc to 45 V dc
–Output current up to 1.5 A rms
–Over-current, short-circuit, and interlocking protections
–Thermal shutdown and under-voltage lockout
–BEMF sensing circuitry
–Support of 3-shunt or 1-shunt motor current sensing
–Hall-effect-based sensors or encoder input connector
–Potentiometer available for speed regulation
–Equipped with ST morpho connectors
•NUCLEO-G431RB
–
STM32G431RB 32-bit microcontroller based on the Arm® Cortex®-M4 core at 170 MHz in LQFP64
package with 128 Kbytes of Flash memory and 32 Kbytes of SRAM
–Two types of extension resources:
◦
◦ST morpho extension pin headers for full access to all STM32 I/Os
–On-board STLINK-V3E debugger/programmer with USB re-enumeration capability: mass storage,
Virtual COM port, and debug port
–1 user and 1 reset push-buttons
•Three-phase motor:
–Gimbal motor: GBM2804H-100T
–Maximum DC voltage: 14.8 V
–Maximum rotational speed: 2180 rpm
–Maximum torque: 0.981 N·m
–Maximum DC current: 5 A
–Number of pole pairs: 7
•DC power supply:
–Nominal output voltage: 12 V dc
–Maximum output current: 2 A
–Input voltage range: from 100 V ac to 240 V ac
–Frequency range: from 50 Hz to 60 Hz
UM2538
Features
Arduino™ Uno V3 expansion connector
The STM32 32-bit microcontrollers are based on the Arm® Cortex®-M processor.
Note:Arm is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or elsewhere.
UM2538 - Rev 1
page 2/27
2Ordering information
To order the P-NUCLEO-IHM03, refer to Table 1. Additional information is available from the datasheet and
reference manual of the target STM32.
Order codeBoardsTarget STM32Additional content
P-NUCLEO-IHM03
2.1Product marking
Evaluation tools marked as “ES” or “E” are not yet qualified and therefore not ready to be used as reference
design or in production. Any consequences deriving from such usage will not be at ST charge. In no event, ST will
be liable for any customer usage of these engineering sample tools as reference design or in production.
“E” or “ES” marking examples of location:
•On the targeted STM32 that is soldered on the board (for illustration of STM32 marking, refer to the STM32
datasheet “Package information” paragraph at the www.st.com website).
•Next to the evaluation tool ordering part number that is stuck or silk-screen printed on the board.
This board features a specific STM32 device version, which allows the operation of any bundled commercial
stack/library available. This STM32 device shows a "U" marking option at the end of the standard part number
and is not available for sales.
In order to use the same commercial stack in his application, a developer may need to purchase a part number
specific to this stack/library. The price of those part numbers includes the stack/library royalties.
•X-NUCLEO-IHM16M1
•NUCLEO-G431RB
Table 1. List of available products
STM32G431RBT6U
UM2538
Ordering information
•Power supply (12 V dc, 2 A)
•Gimbal motor (GBM2804H-100T)
2.2Codification
The meaning of the codification of the Nucleo board is explained in Table 2.
NUCLEO-XXYYZTDescriptionExample: NUCLEO-G431RB
XXMCU series in STM32 32-bit Arm Cortex MCUsSTM32G4 Series
YYMCU product line in the seriesSTM32G431
Z
T
The order code is mentioned on a sticker placed on the top side of the board.
Table 2. Nucleo-board codification explanation
STM32 package pin count:
•R for 64 pins
STM32 Flash memory size:
•B for 128 Kbytes
64 pins
128 Kbytes
UM2538 - Rev 1
page 3/27
3Development environment
3.1System requirements
•Windows® OS (7, 8 and 10), Linux® 64-bit, or macOS
•USB Type-A to Micro-B cable
Note:
macOS® is a trademark of Apple Inc. registered in the U.S. and other countries.
UM2538
Development environment
®
3.2
Note:
Development toolchains
•Keil® MDK-ARM (see note)
•IAR™ EWARM (see note)
•GCC-based IDEs
On Windows® only.
3.3Demonstration software
The demonstration software, included in the X-CUBE-MCSDK STM32Cube Expansion Package, is preloaded in
the STM32 Flash memory for easy demonstration of the device peripherals in standalone mode. The latest
versions of the demonstration source code and associated documentation can be downloaded from www.st.com.
UM2538 - Rev 1
page 4/27
4Getting started (basic user)
4.1System architecture
The P-NUCLEO-IHM03 kit is based on the usual four-block architecture for a motor-control system :
•Control block: it interfaces user commands and configuration parameters to drive a motor. The PNUCLEO-IHM03 kit is based on the NUCLEO-G431RB board that provides all needed signals to perform the
proper motor-driving control algorithm (for instance FOC).
•Power block: the X-NUCLEO-IHM16M1 is based on a 3-phase inverter topology. The core of the power
block embedded on board is the STSPIN830 driver, which embeds all the necessary active power and
analog components to perform a low-voltage PMSM motor control.
•DC Power supply unit: it provides the power for the other blocks (12 V, 2 A).
Figure 2. Four-block architecture of the P-NUCLEO-IHM03 pack
UM2538
Getting started (basic user)
Power supply unit
ControlPowerPMSM
UM2538 - Rev 1
page 5/27
UM2538
Configure and run the motor control from the STM32 Nucleo motor-control pack
4.2Configure and run the motor control from the STM32 Nucleo motor-control
pack
The P-NUCLEO-IHM03 Nucleo pack is a complete hardware development platform for the STM32 Nucleo
ecosystem to evaluate a motor-control solution with a single motor.
For operating the standard pack, follow these hardware configuration steps:
1.The X-NUCLEO-IHM16M1 must be stacked on the NUCLEO-G431RB board through the CN7 and CN10 ST
morpho connectors. There is only one position allowed for this connection, in particular the two buttons on
the NUCLEO-G431RB board (blue button B1 and black button B2) must be kept out, as shown in Figure 3.
Figure 3. X-NUCLEO-IHM16M1 and NUCLEO-G431RB assembled
UM2538 - Rev 1
The interconnection between the X-NUCLEO-IHM16M1 and the NUCLEO-G431RB board is designed for full
compatibility with many control boards. No modification of solder bridges is required for the use of the FOC
algorithm.
page 6/27
Configure and run the motor control from the STM32 Nucleo motor-control pack
2.Connect the three motor wires U,V,W on the CN1 connector as shown in Figure 4.
Figure 4. Motor connection with X-NUCLEO-IHM16M1
UM2538
UM2538 - Rev 1
page 7/27
UM2538
Configure and run the motor control from the STM32 Nucleo motor-control pack
3.Select the jumper configuration on the power board to choose the desired control algorithm (FOC) as
described below:
a.On the NUCLEO-G431RB board, check the jumper settings: JP5 on position [1-2] for 5V_STLK source,
JP8 (VREF) on position [1-2], JP6 (IDD) closed.
b.On the X-NUCLEO-IHM16M1 board
(2)
:
◦Check jumper settings: J5 closed, J6 closed
◦For FOC control, set jumper settings as: JP4 and JP7 solder bridge left open, J2 closed on
position [2-3], J3 closed on position [1-2]
4.Connect the DC power supply (use the power supply provided with the pack or an equivalent one) on CN1
or J4 connector and power-on (up to 12 V DC for the Gimbal motor included in the P-NUCLEO-IHM03 pack,
as shown in Figure 5.
Figure 5. Power-supply connection for X-NUCLEO-IHM16M1
(1)
UM2538 - Rev 1
5.Press the blue button on NUCLEO-G431RB (B1) to start spinning the motor.
page 8/27
6.Rotate the potentiometer on X-NUCLEO-IHM16M1 to regulate the motor speed.
1. To supply the NUCLEO-G431RB from the USB, the jumper JP5 must be connected between Pin 1 and Pin 2. For further
details on Nucleo settings refer to [3].
2. Supply voltage must be off before changing the control mode.
4.3Hardware settings
Table 3 shows the jumper configuration on the X-NUCLEO-IHM16M1 board as shown in Figure 6. According to
the jumper selection, it is possible to choose the 1-shunt or 3-shunt current-sensing mode, the Hall encoder with
pull-up, or the external supply for the NUCLEO-G431RB board.
UM2538
Hardware settings
Table 3. Jumper settings
JumperPermitted configuration
Default
condition
J5Selection of the FOC control algorithm.CLOSED
J6Selection of the FOC control algorithm.CLOSED
JP4 and JP7
J2
Selection of the HW current limiter threshold (disabled in 3-shunt configuration by
default).
J3Selection of fixed or adjustable current limiter threshold (fixed by default).
(1)
Selection of 1-shunt or 3-shunt configuration (3-shunt by default).OPEN
[2-3]
CLOSED
[1-2]
CLOSED
1. JP4 and JP7 must have both the same configuration: both left open for 3-shunt configuration, both closed for 1- shunt
configuration. On the silkscreen, the correct position for 3- or 1-shunt is indicated together with the default position.
Table 4 shows the main connectors on the X-NUCLEO-IHM16M1 board.
Table 4. Screw terminal table
Screw terminal
J4Motor power supply input (7 to 45 Vdc)
CN13-phase motor connector (U,V,W) and Motor Power Supply input (when J4 is not used)
Function
The X-NUCLEO-IHM16M1 is stacked on ST morpho connectors, male pin headers (CN7 and CN10) accessible
on both sides of the board. They can be used to connect this power board to the NUCLEO-G431RB board. All
signals and power pins for the MCU are available on the ST morpho connectors. For further details refer to the
“ST morpho connectors” section in [3].
UM2538 - Rev 1
Table 5. Connector description
Part reference
CN7, CN10ST morpho connector
CN5, CN6, CN9, CN8Arduino Uno connector
U1STSPIN830 driver
U2TSV994IPT op. amp.
J4Power-supply jack connector
J5, J6Jumpers for FOC use
SPEEDPotentiometer
CN1Motor- and power-supply connector
Description
page 9/27
Loading...
+ 18 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.