Home
F²MC-8FX FAMILY MB95330 SERIES
Contents
1. change arm delay C D change arm mask off period Sta Sib S2a S2b S3a S3b S4a S4b S5a S5b S6a S6b lt Ka Upper S Ki Cc 5 Lower arm PD2 PD1 Position Detect PDO MCU AN 500067 E 12 Page 8 2 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 FUJITSU 3 Library Installation 3 1 Components The library package contains 3 files File name motor lib Library file contains all function modules Motor h Header file contains prototypes of the modules and global variables myvect h Header file contains the interrupt vector table declaration 3 2 Procedure There are 3 steps to begin using the Motor lib C library v In F2MC 8L 8FX SOFTUNE after creation of a new project use PROJECT ADD MEMBER to add motor lib as a member v Include Motor h header file into C main program for external references v Include myvect h header file into the module which uses directive pragma to generate the interrupt vector table Thus a project including Lib file is ready for the caller program MCU AN 500067 E 11 Page 9 Pa FUJITSU 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 4 Library Functions and External Variables There are 4 global variables in the library v Rotation Direction v Start Motor v Driver Mode v Motor State There are 8 functional modules for library control Motor Init Sensor Less Start Mot
2. 5 14 Stop e e E 17 6 SAMPLE PROGRAM oom nana 18 7 ADDITIONAL INFORMATION nana 19 MCU AN 500067 E 11 Page 3 Pa FUJITSU 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 1 Introduction This document describes the implementation of 120 conduction hall sensor sensorless brushless DC motor control using the provided F2MC 8L 8FX SOFTUNE C library and the Fujitsu MB95F330 8 bit micro controller The operation principles specification library installation library function description and operation of library functions are included MB95F330 series 8 bit Micro controller can be used to control the operation of a 3 phase brushless DC motor using the 120 conduction inverter control solution MCU AN 500067 E 12 Page 4 tes 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 FUJITSU 2 Operation Principles and Theory 21 Hall Sensor Drive Below is the brief working principle for MCU to drive motor with hall sensor A multi pulse generator outputs six switch signals to drive IGBT inverter Three channel hall sensor signals are detected by MCU input capture to achieve motor position One channel over current signal is output by IGBT inverter to MCU to protect the whole system Ise Generator Phase voltage and reference levi MCU AN 500067 E 11 Page 5 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 One electrical cycle is divided into 6 states The relations
3. Variable extern unsigned char Motor_State Description Motor operation mode MOTOR_READY 1 motor ready for accepting start command Value MOTOR START 2 motor in startup stage MOTOR NORMAL 3 motor in normal run stage MOTOR FAILURE 4 motor which cannot run Variable extern unsigned char Rotation Direction Description Motor running direction Value ANTICLOCKWISE 0 motor anticlockwise running CLOCKWISE 1 motor clockwise running Variable extern unsigned char Driver Mode Description Motor drive method Value HALL SENSOR 0 hall sensor drive SENSOR LESS 1 sensorless drive Variable extern unsigned char Start Motor Description Start motor signal Value FALSE 0 the motor cannot be started TRUE 1 the motor can be started MCU AN 500067 E 12 Page 14 2 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 FUJITSU 5 Usage of Library Functions In general user should follow the following steps to control the motor Set global variables with suitable values Initialize the MCU resource Start the motor with suitable startup speed Modify motor synchronous speed accelerating speed and decelerating speed by changing values of the global variables Stop the motor ELAS 51 Operation Flow 5 1 1 Start Motor This can be done by calling the following successively using appropriate parameters Is Driver Mode SENSOR LESS Is Start Motor TRUE Is Start M
4. 10kHz carrier frequency gt 800 x 125ns normal run carrier period MCU AN 500067 E 11 Page 11 Fujitsu 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 Syntax Description Input parameters Return Example Syntax Description Input parameters Return Example Syntax Description Input parameters Return extern void Motor Parm unsigned long speed con unsigned short csd unsigned short cad unsigned short camaskt unsigned short stmaskt Define runtime parameters with sensorless drive e Define speed constant for speed checking e Define commutation delay duration e Define the duration between change state and change arm e Define the mask off period just after change arm e Define the mask off period during startup speed_con 60 2us x number of pole pair csd in x100 electric angle cad in x100 electric angle camaskt in x100 electric angle stmaskt in 1us unit Void Motor_Parm 15000000 0 200 200 2000 2 pole pair gt 60 2us x 2 15000000 0 change state delay after back EMF zero crossing gt 0 2 change arm delay after back EMF zero crossing gt 200 After change arm mask time gt 200 During startup 2ms 2000 x 1us gt 2000 extern void Motor_Set_Change_Speed unsigned short speed Set or change target rotational speed in RPM whenever sensorless drive or hall sensor drive is used speed in RPM Void Motor_Set_Change_Speed 6000 Set target sp
5. code which can drive a sensorless brushless or hall sensor DC motor with motor EV Board PN MB2146 440 E V1 2 Please refer to Motor EV Board MB2146 440 E HW User Manual Tested configuration DC motor Fulling FL28BL26 15V 8006AF Number of phases 3 Number of poles 4 Supply voltage 15VDC Minimum tested speed 1000rpm Maximum tested speed 7000rpm MCU work load 8 30 Motor speed from 1000 rpm to 7000 rpm with sensorless drive 2 10 Motor speed from 1000 rpm to 7000 rpm with hall sensor drive MCU AN 500067 E 12 Page 18 2 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 FUJITSU 7 Additional Information For more information on how to use MB9595330 EV Board BGM adaptor and SOFTUNE please refer to Motor EV Board MB2146 440 E HW User Manual or visit Website http www fujitsu com en fmc services mcu MCU AN 500067 E 11 Page 19 Pa FUJITSU 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 me FUJITSU MCU AN 500067 E 12 Page 20
6. Fujitsu Microelectronics Shanghai Co Ltd Application Note MCU AN 500067 E 12 F2MC 8FX FAMILY 8 BIT MICROCONTROLLER MB95330 SERIES 120 Hall Sensor Sensorless DC Inverter Control F2MC 8L 8FX SOFTUNE C Library APPLICATION NOTE O FUJITSU Pa FUJITSU 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 Revision History Date Author Change of Records 2009 11 20 Kevin Wang V1 0 First draft 2009 11 30 Kevin Wang V1 1 Modify 2010 01 11 Kevin Wang V1 2 Modify This manual contains 20 pages MCU AN 500067 E 12 Page 2 2 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 FUJITSU REVISION HISTORY moon ena 2 1 INTRODUGTION RE 4 2 OPERATION PRINCIPLES AND THEORY oo Woman 5 2 1 Hall Sensor El EE 5 2 2 SensorleSS Drive 7 224 Sensorless Startup ooo Wo WoWoooWo WoWoW oom WWW Wo Woo 7 222 Normal RUM soekamti 8 3 LIBRARY INSTALLATION oo oom nenen maa 9 31 eelere IT 9 Bel HEEN eebe 9 4 LIBRARY FUNCTIONS AND EXTERNAL VARIABLES oo momo 10 AM Function SYnta Xena Sean an an aan tik RAN ARA NA 11 4 2 External Variables oooooooooooco Woo Woo oo oo Wc co W W W W W W W W nana 14 5 USAGE OF LIBRARY FUNCTIONS oo Wo aan 15 5 1 Operation Flow Woo WWW mm mna 15 5 1 1 lath Moto ee EE 15 5 1 2 Change Motor Speed iarsirc sinici om Wen 16 5 1 3 Set Motor Rotation DirectiOn ooooocoooooWooooocccc 16
7. eed to 6000rpm extern void Motor_Stop void Stop motor without brake e All driving outputs are inactivated e Speed checking timer is stopped e Multi function timer is reset e Input capture edge detection are disabled MCU AN 500067 E 12 Page 12 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 2 FUJITSU Syntax Description Input parameters Return Syntax Description extern void Sensor Less Normal Work void Control motor running normally with sensorless drive e Count change arm time Void Void extern void Hall Sensor Start unsigned short duty on unsigned short period Start motor from reset with hall sensor drive e Start motor will be MOTOR READY e Parameters are initialized duty_on Carrier frequency duty on duration in Input parameters 125ns unit period Carrier period in 125ns period unit Return Void Hall Sensor Start 150 800 Example 18 75us on time during startup 150 x 125ns gt 150 10kHz carrier frequency gt 800 x 125ns startup carrier period Syntax extern void Hall Sensor_Normal_Work void Control motor running normally with hall sensor drive Description e Count motor speed Input parameters Return e Control motor speed e Check hall sensor signal and change arm Void Void MCU AN 500067 E 11 Page 13 Pa FUJITSU 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 4 2 External Variables
8. hip between three channel hall sensor signals H1 H2 H3 and six channel inverter switch signals Up Un Vp Vn Wp Wn is shown as below State 1 2 3 4 5 6 1 2 3 4 MCU AN 500067 E 12 Page 6 2 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 FUJITSU 2 2 Sensorless Drive 2 2 1 Sensorless Startup The suggested startup method is forced startup The following is the driving pattern The marker A and A are the state change while A B is the position detect mask off period used to mask off unwanted interrupt when the back EMF is very weak during startup U gt V U gt W V gt W V gt U W gt U W gt V WFalling V Rising UFalling W Rising V Falling U Rising CHOPPING CHOPPING upper arm control lt Kai CHOPPING P CHOPPING p Vn CHOPPING lower arm control CHOPPING lg MCU AN 500067 E 11 Page 7 Pa FUJITSU 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 2 2 2 Normal Run The normal run consists of 12 different driving patterns and 6 different states The following shows the relationship between the driving patterns and the expected interrupts from the position detection circuit Marker explanation A position detection interrupt B change state C change chopping arm D position detection interrupt enable A next position detection interrupt A B commutation delay B
9. or Parm Motor Set Change Speed Motor Stop Sensor Less Normal Work Hall Sensor Start Hall Sensor Normal Work SS SS SS SS MCU AN 500067 E 12 Page 10 2 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 FUJITSU 4 1 Function Syntax Syntax Description Input parameters Return Syntax extern void Motor Init void Initialize MCU resources to be ready for start and stop commands e Initialize port configuration Initialize multi function timer resources Initialize speed check timer Initialize interrupt Initialize motor state to MOTOR_READY Void Void extern void Sensor_Less_Start unsigned short start_duty_on unsigned short start_period unsigned short normal_duty_on unsigned short normal_period Description Start motor from reset with sensorless drive e Start motor will be MOTOR READY e Startup and normal run parameters are initialized Input parameters Return Example start duty on startup carrier freguency duty on duration in 125ns unit Start period startup carrier period in 125ns period unit Normal duty on carrier duty on duration when startup changes to normal run in 125ns unit normal duty carrier period in normal run mode Void Sensor Less Start 400 1600 200 800 60us on time during startup 400 x 125ns gt 60000 5kHz carrier frequency gt 1600 x 125ns startup carrier period 25us on time just after startup 200 x 125ns gt 25000
10. otor TRUE Is Motor State MOTOR NORMAL Is Motor State MOTOR NORMAL YES Start Motor FALSE Motor Init Start Motor FAI SF Motor Set Change Speed Hall Sensor Start Hall Sensor Normal Work MCU AN 500067 E 11 Page 15 vi FUJITSU 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 5 1 2 Change Motor Speed To change motor speed please ensure that the motor is running under normal status The following flow chart shows how to change the motor speed NO Is Motor State MOTOR NORMAL Motor Set Change Speed 5 1 3 Set Motor Rotation Direction To set motor rotation direction please ensure that the motor is under ready status The following flow chart shows how to set the motor rotation direction NO Is Motor State MOTOR READY Rotation Direction ANTI CLOCKWISE Or Rotation Direction CLOCKWISE MCU AN 500067 E 12 Page 16 2 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 FUJITSU 5 1 4 Stop Motor To stop a motor please ensure that the motor is under normal or startup status The following flow chart shows how to stop the motor Is Motor State MOTOR NORMAL Or Is Motor State MOTOR START Motor Stop MCU AN 500067 E 11 Page 17 Pa FUJITSU 120 DC Inverter Control SOFTUNE C LIB Application Note V1 2 6 Sample Program Motor zip is a sample project containing source
Download Pdf Manuals
Related Search
Related Contents
ハナクリーンS - ハナクリーンの東京鼻科学研究所 A Tutorial for Pari/GP LG WT5101HW Specification Sheet - Microem Olympus i-10 User's Manual Princess Classic Health Grill Bollettino Tecnico Technical Guide Copyright © All rights reserved.
Failed to retrieve file