Professional Documents
Culture Documents
EXTERNAL USE
Application mapping: SW vs. HW
MotorGD DevKit 3-phase Inverter
MISO/MOSI/SCLK/CS
MC34GD3000
pre-driver
EN RST
Vdc Idc
ADC SPI GPIO
ADC
Initialization
GPIO HS LS HS LS HS LS
1 2 3 4 5 6
Desired PWM
Speed + Speed PI Duty cycle ON
FlexPWM Protection
-
Controller OFF
SVM
FreeMASTER
UART
DIR BLDC commutation LED
CW/CCW Control Sequence GPIO
CAN Position
Motor Hall A
Actual Speed Hall Measure Hall Time & Hall B
OpenSDA 1/T counts Position Recognition
eTIMER Hall C
1 MPC5744P
EXTERNAL USE DevKit
Motor Speed – Technical Background
T=1/f
2 EXTERNAL USE
Motor Speed – Technical Background
T=1/f
60 ∙ 𝑓
𝑁𝑠 =
𝑝
• Ns – rotor speed in RPM
3 EXTERNAL USE
Motor Speed – Technical Background
T=1/f
60 ∙ 𝑓
𝑁𝑠 =
𝑝
• Ns – rotor speed in RPM
• f – frequency in cycles per seconds (Hz)
4 EXTERNAL USE
Motor Speed – Technical Background
T=1/f
60 ∙ 𝑓
𝑁𝑠 =
𝑝
• Ns – rotor speed in RPM
• f – frequency in cycles per seconds (Hz)
• p – number of pole pairs
5 EXTERNAL USE
Speed Estimator Prerequisites
6 EXTERNAL USE
Speed Estimator Prerequisites
1. Need a “well defined” periodic signal
HALL A
HALL B
HALL C
7 EXTERNAL USE
Speed Estimator Prerequisites
1. Need a “well defined” periodic signal
2. Detect the periodic signal transitions
HALL A
HALL B
HALL C
8 EXTERNAL USE
Speed Estimator Prerequisites
1. Need a “well defined” periodic signal
2. Detect the periodic signal transitions
3. Need a simple counter to measure between signal transitions
HALL A
HALL B
HALL C
No of Counts
Counting
Window
10 EXTERNAL USE
Speed Estimator Implementation
• There are multiple approaches to measure the speed: HW or SW based
• We are going to use a SW based approach – measuring the period of the HALL A active HIGH signal
Th
4. Estimated Speed
𝑓 T = 2 • Th
𝑁𝑠 = 60 ∙ ൗ𝑝 (eq. 4)
11 EXTERNAL USE
FreeMASTER over CAN
• UART1(routed via OpenSDA micro USB port) shares the same pins as FET pre-driver
• Enable FreeMASTER to use the CAN0 interface
• NOTE! R38 is not places on the PCB. An external 120Ohm CAN termination resistor must be placed between
CAN-H and CAN-L signals
12 EXTERNAL USE
FreeMASTER over CAN - Setup
13 EXTERNAL USE
MODEL BASED DESIGN TOOLBOX
ENABLING FAST PROTOTYPING AND DESIGN
…you are now ready to design the next big thing. Good luck!
EXTERNAL USE