User manual

F1 LV EVALUATION PLATFORM
MOTOR CONTROL ADD-ONS
2012 Microchip Technology Inc. DS41629A-page 55
Appendix B. Conversion Factors
B.1 SYSTEM CONSTANTS
Many of the conversion factors are based on operating parameters of the PIC
®
micro-
controller. Those parameters are determined at compile time and are assumed to be
fixed. The fixed parameters and their associated values are as follows:
B.2 START-UP: SPEED
The start-up commutation speed is the initial commutation period expressed as Timer1
counts. The number entered in the Speed box is the inverse (16-bit number negative)
of initial commutation period divided by 256 (upper 8 bits of a 16-bit number). The use
of the inverse can be explained as follows: Because it is natural to think of small values
as slow and large values as fast, the open-loop speed control starts at 0 and tops out
at 255. The commutation time counter, however, operates on the inverse of the Speed
Control value, because long commutation times result in slower speeds than short
commutation times. The RPM derived from the commutation period is computed as
follows:
EQUATION B-1:
B.3 SLOW STEP
The slow-step dwell time is measured in TimeBaseManager() time-ticks which are
derived from Timer0. The TimeBaseManager() sets time-elapsed flags at every 10 mil-
lisecond time-tick. The various routines monitor the TimeBaseManager() flags to deter-
mine when to perform their service. Divide the Slow-Step time by the
TimeBaseManager() time-tick to determine the TIMEBASE_SLOW_STEP count.
EQUATION B-2:
TABLE B-1:
Parameter Value
F
OSC 32 MHz
System Frequency F
OSC/4
Timer 1 Prescale 8
Timer 1 Frequency System Frequency/Timer 1 Prescale
Timer 2 Prescale 4
Timer 2 Frequency System Frequency/Timer 2 Prescale
BLDC Phases 3
Max. Speed Request 255
Commutation Period = 65536 – (Speed Control Value * 256)
RPM = 60 * Timer1 Frequency / (NumberOfPoles * BLDC Phases * Commutation Period)
TIMEBASE_SLOW_STEP = Slow Step Time (ms) *TimeBaseManager() time-tick