
3.4
Hardware and software setup
This section describes the hardware and software setup procedure for executing the provided examples and to
develop new applications based on the motor driver expansion board.
3.4.1
Common setup for all configurations
The
development board has to be configured with the following jumper position:
•
JP1 off
•
JP5 (PWR) on UV5 side
•
JP6 (IDD) on
3.4.2
REF pin setup on X-NUCLEO-IHM12A1 expansion board
development board, the REF pin setup has to be adapted to the
expansion board.
With
or
, the default configuration of the board is: R22
(200 kΩ) mounted and R23 not mounted.
With
, R23 (200 kΩ) has to be mounted and R22 not mounted. If you want to keep the default
board configuration, you can simply put a wire between the Arduino UNO R3 CN5-1 and CN8-1 connector pins.
3.4.3
Setup to drive two bidirectional brush DC motors
Step 1.
Plug the
expansion board on top of the
the Arduino UNO R3 connectors.
Step 2.
development board to a PC with the USB cable through USB connector
CN1 to power the board.
Step 3.
Connect the leads of the first dual brush DC motor to the
connector A+/A- and the second to connectors B+/B-.
Step 4.
expansion board by connecting its connectors Vin and Gnd to
the DC power supply. The DC supply must be set to deliver the required voltage to the three-phase
brushless motor.
Step 5.
Open your preferred toolchain.
Step 6.
Depending on the used STM32 Nucleo board, open the software project from:
–
\stm32_cube\Projects\Multi\Examples\MotionControl\IHM12A1_ExampleFor2BiDirMotors\
YourTo
olChainName
\STM32F401RE-Nucleo for NUCLEO-F401RE
–
\stm32_cube\Projects\Multi\Examples\MotionControl\IHM12A1_ExampleFor2BiDirMotors\
YourTo
olChainName
\STM32F334R8-Nucleo for NUCLEO-F334R8
–
\stm32_cube\Projects\Multi\Examples\MotionControl\IHM12A1_ExampleFor2BiDirMotors\
YourTo
olChainName
\STM32F030R8-Nucleo for NUCLEO-F030R8
–
\stm32_cube\Projects\Multi\Examples\MotionControl\IHM12A1_ExampleFor2BiDirMotors
YourTool
ChainName
\STM32L053R8-Nucleo for NUCLEO-L053R8
Step 7.
Adapt the default parameters used by the
to your motor characteristics by modifying the
parameters in stm32_cube\Drivers\BSP\Components\stspin240_250\stspin240_250_target_config. h.
Step 8.
Rebuild all files and load your image into target memory.
Step 9.
Run the sample application.
Step 10.
Push the user button to start the motor.
Step 11.
Open main.c to watch the detailed demo sequence. Each time you press the user button, a different
demo sequence step appears.
UM2110
Hardware and software setup
UM2110
-
Rev 2
page 9/14