ST STEVAL-ESC002V1 Manuale utente

Introduction
The STEVAL-ESC002V1 electronic speed controller (ESC) reference design can be used with different kind of drones, from
small racing ones to bigger light drones used for surveying and any 3-phase BLDC application requiring a compact form factor
and high speed rotation performance.
Together with the STSW-ESC002V1 firmware package, it implements a sensorless voltage mode six-step driving.
The board is based on the STSPIN32F0A advanced 3-phase brushless motor controller that embeds an ARM® Cortex®-M0
processor, voltage regulators, signal conditioning circuitry and gate drivers in a small 7x7 mm2 QFN package.
Power stage is based on the low resistance (2.8 mΩ) and high speed STL140N6F7 MOSFETs, designed in STripFET™ F7
technology and able to deliver up to 20 A of continuous current.
Figure 1. STEVAL-ESC002V1 reference design: top view with bulk capacitors mounted
Getting started with the STEVAL-ESC002V1 electronic speed controller reference
design
UM2518
User manual
UM2518 - Rev 1 - December 2018
For further information contact your local STMicroelectronics sales office.
www.st.com

1Safety precautions
Warning:
Some of the components mounted on the board could reach hazardous temperature during
operation.
While using the board:
• Do not touch the components
• Do not cover the board
• Do not put the board in contact with flammable materials or with materials releasing smoke when heated
After operation, allow the board to cool down before touching it.
UM2518
Safety precautions
UM2518 - Rev 1 page 2/19

2Main features and target applications
The STEVAL-ESC002V1 reference design features:
• Based on the STSPIN32F0A:
– Extended operating voltage from 6.7 to 45 V
– Three-phase gate drivers with 600 mA sink/source capability and integrated bootstrap diode
– 32-bit ARM® Cortex®-M0 core operating up to 48 MHz clock frequency
– 4-kByte SRAM and 32-kByte Flash memory with option bytes used for write/readout protection
– 3.3. V buck converter with overcurrent, short-circuit, and thermal protection
– 12 V LDO linear regulator with thermal protection
– 3 rail-to-rail operation amplifiers for signal conditioning
– Comparator for overcurrent protection with programmable threshold
– UVLO protection on each power supply
– Extended temperature range: -40 to +125 °C
• Designed for sensorless six-step driving with BEMF sensing through operational amplifiers embedded in the
STSPIN32F0A
• 2S to 6S LiPo battery pack
• Output current up to 20 ARMS
• Overcurrent protection
• Battery voltage sensing
• UART and I²C interfaces
• RGB LED
• SWD interface to program and debug
• Embedded bootloader
• Very compact and light design: 25 x 40.5 mm PCB size
• RoHS and WEEE compliant
The STEVAL-ESC002V1 reference design mainly targets light drones for professional and recreational purposes,
and any 3-phase brushless application requiring a high speed rotation performance.
UM2518
Main features and target applications
UM2518 - Rev 1 page 3/19

3Hardware overview
The STEVAL-ESC002V1 drives a single three-phase brushless motor.
Figure 2. STEVAL-ESC002V1 components (top view)
Battery positive input PWM input
RGB LED
SWD connector
UART/I2C
TP1, TP2, TP3
BEMF sensing
outputs
Positive lead of the bulk capacitors
Bulk capacitors
(to be mounted)
Battery negative input
Bootloader connector
Power output W
Power output V
Power output U
LMV321L
TP6, TP7
PA5 and PA7 debug GPIOs
To the motor
To the motor
To the motor
To the battery
To the battery
STSPIN32F0A
Figure 3. STEVAL-ESC002V1 components (bottom view)
Bypass capacitors
STL140N6F7 Power MOSFETs
Bulk capacitors
(to be mounted)
Shunt resistor
(overcurrent protection and current sensing)
Negative lead of the bulk capacitors
UM2518
Hardware overview
UM2518 - Rev 1 page 4/19

Table 1. Test points and connectors
Connector/ Test point Pin Signal GPIO Description
CON1 1 OUTU Power output U.
It has to be connected to one of the motor phases
CON2 1 OUTV Power output V
It has to be connected to one of the motor phases
CON3 1 OUTW Power output W
It has to be connected to one of the motor phases
CON4 1 VBUS Supply voltage
It has to be connected to the battery positive lead
CON5 1 GND Ground
It has to be connected to the battery negative lead
J1
1 SWD_CLK PA14 SWD interface clock signal
2 GND Ground
3 SWD_IO PA13 SWD interface data signal
J2
1 TX/SCL PB6
PB6 GPIO:
• UART interface TX signal
• I²C interface SCL signal
2 RX/SDA PB7
PB7 GPIO:
• UART interface RX signal
• I²C interface SDA signal
J3
1 TX PA14 UART TX signal when the bootloader is running
2 RX PA15 UART RX signal when the bootloader is running
3 BOOT0 Boot mode enabler (force high at power-up/reset)
TP1 1 OP3O PF1 BEMF comparator output (phase U)
TP2 1 OP2O PF0 BEMF comparator output (phase V)
TP3 1 OP1O PB1 BEMF comparator output (phase W)
TP4 1 PWM_IN PA6 Ground
It has to be connected to the FCU PWM output
TP5 1 GND Ground
It has to be connected to the FCU PWM output
TP6 1 PA5 PA5 To debug
TP7 1 PA7 PA7 To debug
UM2518
Hardware overview
UM2518 - Rev 1 page 5/19

4Setup
Step 1. Mount the bulk capacitors (included in the package) on the dedicated pads as shown in Figure 1 and
Figure 2
Capacitors must be mounted as follows: negative lead (short one) on the bottom side and positive lead
(long one) on the top side.
Warning:
Do not operate without the bulk capacitors properly mounted to not damage the board and the
battery.
Step 2. Solder the motor phases to the board as shown in Figure 1.
Color sequence is not important and affects only the rotation direction.
Step 3. Solder the FCU PWM output to the board as indicated in Figure 1: positive on TP4 (round pad) and
negative on TP5 (square pad).
Figure 4. STEVAL-ESC002V1 PWM input from FCU connection details
PWM
Step 4. Connect the board to the battery or to a DC power supply as indicated in Figure 1 (supply range is from
2S to 6S).
Step 5. Supply the board.
Step 6. Program the board through the SWD interface as described in the following section.
The board is ready to use.
4.1 Programming the board
The board is programmed through the microcontroller SWD interface. J1 and the included cable provide access to
the SWD interface.
UM2518
Setup
UM2518 - Rev 1 page 6/19

Figure 5. STEVAL-ESC002V1 SWD connection details
Included connector
SWCLK
GROUND
SWDIO
When the board is connected to the SWD programmer, you can program it in two ways.
Step 1. Write the binary included in the STSW-ESC002V1 firmware package or
Step 2. Compile and download the project included in the STSW-ESC002V1 firmware package (IAR
Embedded Workbench for ARM 8.22).
UM2518
Programming the board
UM2518 - Rev 1 page 7/19

5Board PWM flowchart and interface parameters
After the setup procedure (see Section 4 ), the board is operative.
The STSW-ESC002V1 firmware monitors the pulse duration of the PWM input setting according to the voltage
applied to the motor.
Note: The firmware does not monitor the PWM signal frequency. The algorithm considers only the duration of the
positive pulses.
The STEVAL-ESC002V1 default behavior is described below.
1. At power-up the motor is stopped.
2. The ESC waits for at least BSP_BOARD_IF_TIMx_ARMING_VALID_TON pulses before arming (that is
allowing the motor driving) the board. Even if the board is armed, the motor is not driven yet.
3. When at least BSP_BOARD_IF_TIMx_START_VALID_TON pulses longer than
BSP_BOARD_IF_TIMx_MIN_SPEED_TON_US μs are detected, the motor is started.
4. When more than BSP_BOARD_IF_TIMx_STOP_VALID_TON pulses shorter than
BSP_BOARD_IF_TIMx_MIN_SPEED_TON_US μs are detected, the motor is stopped.
5. When the motor is running, the speed is proportional to the PWM pulse duration. The maximum speed is
achieved when the pulse duration is BSP_BOARD_IF_TIMx_MAX_SPEED_TON_US μs.
6. If no pulses are detected for more than BSP_BOARD_IF_TIMx_STOP_MS ms, the motor is stopped and the
board is disarmed, that is motor driving is not allowed.
UM2518
Board PWM flowchart and interface parameters
UM2518 - Rev 1 page 8/19

Figure 6. STEVAL-ESC002V1 default behavior: PWM interface flowchart
Disarmed
Stop
1500 ms timeout
expired?
Update speed
NO
Stop count = 0
expired?
NO
> Min. pulse
Stop Count = 0
Pulse detected
NOYES
YES
NO
YES
Arm. Count ++
Start
NO
NO
NO
Armed
Pulse detected
> Min. pulse Stop Count ++
Pulse detected
YES
1500 ms timeout
expired?
NO
Arm. Count = 0
YES
YES
Start Count > 10
Stop Count > 1000
1500 ms timeout
Start Count ++
Start Count = 0
Arm. Count > 10
NO
NO
NO
YES
YES
YES
YES
YES
The default values for the PWM monitoring code are listed in the following table.
UM2518
Board PWM flowchart and interface parameters
UM2518 - Rev 1 page 9/19

Table 2. PWM interface parameters
Parameter Description Default
BSP_BOARD_IF_TIMx_STOP_MS No-PWM timeout in ms 1500
BSP_BOARD_IF_TIMx_ARMING_VALID_TON Number of valid PWM pulses (any duration) arming the board 10
BSP_BOARD_IF_TIMx_START_VALID_TON Number of PWM pulses above minimum duration starting the
motor 10
BSP_BOARD_IF_TIMx_STOP_VALID_TON Number of PWM pulses below minimum duration starting the
motor 1000
BSP_BOARD_IF_TIMx_MIN_SPEED_TON_US Minimum pulse duration (corresponding to minimum speed) in
μs 1060
BSP_BOARD_IF_TIMx_MAX_SPEED_TON_US Maximum pulse duration (corresponding to maximum speed) in
μs 2084(1)
1. The value is calculated according to the following formula (BSP_BOARD_IF_TIMx_MIN2MAX_BITS = 10):
BSP_BOARD_IF_TIMx_MIN_SPEED_TON_US + 2BSP_BOARD_IF_TIMx_MIN2MAX_BITS. It is not possible to set an arbitrary
value: the range changes according to the BSP_BOARD_IF_TIMx_MIN2MAX_BITS parameter.
UM2518
Board PWM flowchart and interface parameters
UM2518 - Rev 1 page 10/19
Indice
Altri manuali ST Controllori

ST
ST UM2520 Manuale utente

ST
ST L6917BD Manuale utente

ST
ST STM32F101 series Manuale utente

ST
ST STM32F101xx series Manuale del proprietario

ST
ST P-NUCLEO-IHM001 Manuale utente

ST
ST ST5-Q Manuale utente

ST
ST STM8AF6223 Manuale utente

ST
ST STEVAL-A6983NV1 Manuale utente

ST
ST STEVAL-IHM037V1 Manuale utente

ST
ST EVLSPIN32G4-ACT Manuale utente

























