background image

 

Appendix 

FM3 Family Math and Motor Control Library Quick Start Guide, Doc. No. 002-04766 Rev. *A 

16 

A.3 

Motor Parameter  

The motor parameters used for the sample project are shown in the following table. 

Pole pairs 

D-axis Inductance  

0.65mH 

Q-axis Inductance  

0.85mH 

Resistance(line to line) 

0.94 ohm 

Inductive voltage constant(line to line) 

2.86 V/krpm 

Saturation current 

2A 

Speed range 

360rpm~4000rpm 

Hall Number 

Hal line definition 

Red(Vcc),Black(GND) 

Yellow(Hall A),Green(Hall B),Blue(Hall 
C) 

Motor phase definition  

Yellow(U),Green(V),Blue(W) 

 

 

Summary of Contents for FM3 Series

Page 1: ... Microcontroller Math and Motor Control Library Quick Start Guide Doc No 002 04766 Rev A Cypress Semiconductor 198 Champion Court San Jose CA 95134 1709 Phone USA 800 858 1810 Phone Intnl 1 408 943 2600 www cypress com ...

Page 2: ...MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE To the extent permitted by applicable law Cypress reserves the right to make changes to this document without further notice Cypress does not assume any liability arising out of the application or use of any product or circuit described in this document Any information provided in this document including any sample design information or programm...

Page 3: ...ev A 3 Contents 1 Demo System 4 1 1 Demo System Introduction 4 1 2 Hardware Connect 4 1 3 Run the Motor 7 2 Additional Information 9 Appendix 10 A 1 Common Used Structure 10 A 2 Firmware Parameter Setting 10 A 3 Motor Parameter 16 Revision History 17 Document Revision History 17 ...

Page 4: ...You can use this sample project to control the low voltage PMSM or BLDC This chapter introduces one example of inverter motor control project and help you run a motor quickly 1 1 Demo System Introduction The connection diagram for the MMCL sample project which is used to control the low voltage inverter motor is shown in Figure 1 1 The sample project can be adaptive to the any type of low voltage ...

Page 5: ...all A and B line can be only connected to the inverter s Hall A and Hall B port Don t connect on the Hall C port on the board VCC and GND must be connected rightly otherwise the hall won t work right and the motor will also not run 2 Plug the U V W phase lines to inverter board shown as below Figure 1 3 Motor Line Connection 3 Connect JTAG to adapter shown as below Motor Phase Line Hall port ...

Page 6: ...no isolator between the J link and the HW it is recommended to unplug the AC power and use the battery of your note book 4 Connect DC power 24V to Inverter board shown as below The DC voltage can be from 24 48V according to the rated voltage of the motor and the current of the board must be lower than 2A Figure 1 5 AC Plug J Link SWD DC Power ...

Page 7: ... Click the button A that is shown in Figure 1 6 to connect the J link and download the FW into the MCU Cick the button B to execute the sample project You can enter the none zero speed value to start the motor in the structure that is shown as C after the firmware is executed about 2s later For example when the variable Motor_stcRunPar i32TargetSpeedRpm 1000 by your online input the drum speed of ...

Page 8: ... for the reference at Table 1 2 Table 1 2 Typical Running Status by the Command Speed Motor_stcRunPar i32TargetSpeedRpm Drum Direction Description 300 500 CCW The motor runs at 300 500rpm 300 500 CW The motor runs at 300 500rpm 1000 CCW The motor runs at 1000rpm 2000 CCW The motor runs at 2000rpm 4000 CCW The motor runs at 1000rpm 0 Stop motor The motor will stop running If you want to change the ...

Page 9: ...ore information on MMCL visit our website http www cypress com applications home appliances math and motor control library For more Information on Cypress semiconductor products visit the following website http www cypress com cypress microcontrollers Please contact your local support team for any technical question ...

Page 10: ...for the hall sensor capture Posi_stcCalHall The structure for the rotor position calculation for the hall sensor capture Motor voltage and current Motor_stcIuvwSensed 3 phase stationary axis current Motor_stcIabSensed Alpha beta axis current Motor_stcIdqSensed D Q axis current Motor_stcIdqRef D Q axis reference current Motor_stcVdqRef D Q axis voltage Motor_stcVabRef Alpha beta axis voltage PID Mo...

Page 11: ...function with hall sensor AdcSample The ADC process module based on the ADC ISR InitMcu c MCU system init include interrupt priority list ISR c The ISR file for all of the interrupt routine of the MCU MotorCtrl c The main file of the motor control including the main function of FOC process of motor and the start stop function of motor Motor_Startup c The motor start up module with hall sensor or s...

Page 12: ...2_t Motor_f32SpdAccelerationHz 10 1 0f acceleration speed UI_0102 ADC port and coefficient set float32_t Motor_f32IuvwSampleResistor 0 02 Iuvw sample resistor ohm float32_t Motor_i32IuvwAmplifierFactor 5 0 Iuvw calculation factor int32_t Motor_i32IuvwOffsetNormal 2048 the middle value of 12 bits ADC int32_t Motor_i32IuvwOffsetRange 100 ADC offset range of Iuvw sampling int32_t Motor_i32IuvwOffsetC...

Page 13: ... current at closeloop UI_0105 Filter float32_t Motor_f32BemfLpfkMinSpd 6 Hz float32_t Motor_f32BemfLpfkMaxSpd 120 Hz int32_t Motor_i32Q12_BemfLpfkMin Q12 0 05 int32_t Motor_i32Q12_BemfLpfkMax Q12 0 8 UI_0104 PID Parameter float32_t Motor_f32LowSpdKi 0 0002f 0 0003f speed PI regulator integral constant float32_t Motor_f32LowSpdKp 0 043f 0 15f speed PI regulator proportion constant float32_t Motor_f...

Page 14: ..._i16Q8CurrentMax Q8 Motor_f32IsMax motor phase current peak A uint16_t Motor_u16OverCurrentTimeSec 1 motor over current timer PWM uint16_t Motor_u16VbusMax 27 the maximum value of DC voltage uint16_t Motor_u16VbusMin 21 the minimum value of DC voltage uint8_t Motor_ErrorTime 10 s UI_0107 running control of open loop float32_t Motor_f32BemfLpfkMinSpd 6 Hz uint8_t Motor_u8RunLevel 4 1 orientation 2 ...

Page 15: ... 0 timer 0_0 define HALL_B_PORT PORT4 Port 4 define HALL_B_PIN PIN10 P4A define HALL_B_TIMER BT_CH_1 timer 1 define HALL_B_TIMER_CH 0 timer 1_0 define HALL_C_PORT PORT6 Port 6 define HALL_C_PIN PIN1 P61 UI_0201 ADC port and coefficient set define CLK_XTAL_FREQ 4 MHz define CLK_SYS_FREQ 9 System clock frequency CLK_XTAL_FREQ CLK_SYS_FREQ 1 define APB0_CLK_DIV APBx_CLK_DIV0 define APB1_CLK_DIV APBx_...

Page 16: ...re shown in the following table Pole pairs 2 D axis Inductance 0 65mH Q axis Inductance 0 85mH Resistance line to line 0 94 ohm Inductive voltage constant line to line 2 86 V krpm Saturation current 2A Speed range 360rpm 4000rpm Hall Number 3 Hal line definition Red Vcc Black GND Yellow Hall A Green Hall B Blue Hall C Motor phase definition Yellow U Green V Blue W ...

Page 17: ...ry Document Revision History Document Title FM3 Family 32 bit Microcontroller Math and Motor Control Library Quick Start Guide Document Number 002 04766 Revisio n ECN Issue Date Origin of Change Description of Change 09 19 2014 BOZH Initial release A 5275832 08 29 2016 BOZH Migrated to Cypress format ...

Reviews: