Datasheets.org.uk - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine
  
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

AN1083


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet


three phase bridge inverter in 180 degree and 120 - three phase bridge inverter in 180 degree and 120  
step motor dsPIC - step motor dsPIC  
sensorless bldc c source code PIC - sensorless bldc c source code PIC  
sensorless bldc c source code dspic - sensorless bldc c source code dspic  
sensorless bldc c source code - sensorless bldc c source code  
schematic inductive proximity sensor - schematic inductive proximity sensor  
schematic diagram 48v dc motor speed controller - schematic diagram 48v dc motor speed controller  
schematic diagram 48v bldc motor speed controller - schematic diagram 48v bldc motor speed controller  
processor bldc sensorless 12v dc brushless motor - processor bldc sensorless 12v dc brushless motor  
PID motor speed control - PID motor speed control  
PID control dsPIC dc motor speed control - PID control dsPIC dc motor speed control  
PID control dsPIC - PID control dsPIC  
PID control - PID control  
PIC dc motor variable speed control - PIC dc motor variable speed control  
PIC dc motor speed control 5V to 24V - PIC dc motor speed control 5V to 24V  
PIC bldc motor speed control - PIC bldc motor speed control  
motor speed control by using dsp - motor speed control by using dsp  
mosfet cross reference inverter - mosfet cross reference inverter  
mosfet cross reference - mosfet cross reference  
MOSFET cross - MOSFET cross  
ESC tower pro - ESC tower pro  
drive motor 10A with transistor - drive motor 10A with transistor  
dc motor speed control circuit diagram with dsPIC - dc motor speed control circuit diagram with dsPIC  
Brushless Motor Speed Control - Brushless Motor Speed Control  
brushless dc motor speed control simple circuit d - brushless dc motor speed control simple circuit d  
brake mosfet hall switch BLDC Motor - brake mosfet hall switch BLDC Motor  
bldc sinusoidal dspic30f - bldc sinusoidal dspic30f  
bldc sensorless sinusoidal zero speed - bldc sensorless sinusoidal zero speed  
bldc sensored c code - bldc sensored c code  
AN1083 - AN1083  

AN1083
Sensorless BLDC Control With Back-EMF Filtering
Author: Reston Condit Microchip Technology Inc. resources used dsPICDEM Development Board are: Processor: MIPS: Program Memory: RAM: dsPIC30F6010A MIPS 2089 24-bit instruction words bytes(1)
This application note describes sensorless brushless (BLDC) motor control algorithm, implemented using dsPIC® digital signal controller (DSC). algorithm works digitally filtering back-Electromotive Force (back-EMF) each phase motor determining when commutate motor windings based filtered back-EMF signals. This control technique precludes need discrete, low-pass filtering hardware off-chip comparators. BLDC motors used variety applications. algorithm described this application note targets BLDC motors that operate 100k electrical range. Some BLDC motor applications that this range model motors, fans, hard drives, pumps dental drills. algorithm described this application note implemented Microchip development board platforms: PICDEMMC Development Board dsPICDEMMC1 Development Board PICDEMMC Development Board includes dsPIC30F3010 DSC. described algorithm implemented this device because included with PICDEMMC Development Board. However, cost reduction, dsPIC30F2010 substitute processor. default configuration, this board includes crystal. 7.37 crystal used during testing this algorithm. resources used PICDEM Development Board are: Processor Type: MIPS: Program Memory: RAM: Crystal: dsPIC30F3010 dsPIC2010 MIPS 2000 24-bit instruction words bytes 7.68
Note With signal buffers enabled, usage 4400 bytes. These specifications common both hardware platforms: Maximum Motor Speed: 100,000 Electrical Tunable Speed Control Loop Configurable Open-Loop Start-up Ramp Supports DMCI Tool (see "Implementing Algorithm" section this document)
FIGURE
PICDEMMC DEVELOPMENT BOARD
FIGURE
dsPICDEMMC1 DEVELOPMENT BOARD WITH ATTACHED POWER MODULE
2007 Microchip Technology Inc.
DS01083A-page
AN1083
BLDC MOTOR CONSTRUCTION
This algorithm been tested these motors: 4-pole, 12V, motor with maximum speed 29,000 14-pole, model airplane motor with maximum speed 13,000 4-pole, 24V, Hurst BLDC motor model DMB0224C10002 These motors have been tested with loads that proportional speed they have light loads speed full loads high speed. Y-connected BLDC motor (see Figure motor three leads, each connected winding. Each winding series windings) connected common point shared three windings, shown upper portion Figure basic construction simple BLDC motor shown lower portion Figure outer layer motor, which houses motor windings, stator. inner part motor rotor. rotor consists opposing magnetic poles located around circumference motor. Figure shows rotor with only poles, north south. reality, most motors have more than magnetic poles rotor. motor turns when current passed through motor windings, shown arrow Figure this example, positive potential applied lead, negative potential applied green lead. Charging motor windings this manner generates magnetic field stator, noted designations. rotor then turns that north pole rotor aligns with magnetic south generated stator. Likewise, south pole rotor aligns with magnetic north generated stator.
FIGURE
FIGURE
Y-CONNECTED BLDC MOTOR
CURRENT FLOW THROUGH WINDINGS
Y-Connected BLDC Motor Schematic
Current Flow
Common
Current flow through windings generates magnetic field (designated stator, causing north south poles rotor align with south north poles, respectively, stator.
BLDC Motor Construction
DS01083A-page
2007 Microchip Technology Inc.
AN1083
SIX-STEP (TRAPEZOIDAL) COMMUTATION
method energizing motor windings sensorless algorithm described this application note six-step trapezoidal 120° commutation. Figure shows six-step commutation works. Each step, sector, equivalent electrical degrees. sectors make electrical degrees, electrical revolution. arrows winding diagram show direction current flows through motor windings each steps. graph shows potential applied each lead motor during steps. Sequencing through these steps moves motor electrical revolution. Step Commutation winding driven positive. Green winding driven negative. Blue winding driven. winding remains positive. Blue winding driven negative. Green winding driven. Green winding driven positive. Blue winding driven negative. winding driven. Green winding driven positive. winding driven negative. Blue winding driven. Blue winding driven positive. winding driven negative. Green winding driven. Blue winding driven positive. Green winding driven negative. winding driven.
FIGURE
SIX-STEP COMMUTATION
every sector, windings energized winding energized. fact that windings energized during each sector important characteristic six-step control that allows sensorless control algorithm.
This application note uses these terms describe motor speed: Electrical revolutions minute (RPMElec) Electrical revolutions second (RPSElec)
easier discuss motor speed these terms rather than mechanical because when talking about electrical RPM, number motor poles does have factored relationship between mechanical electrical seen these equations:
+VBUS -VBUS
EQUATION
Winding
MECHANICAL/ELECTRICAL RELATIONSHIP
RPMElec) (No. Motor Poles) (RPMMech Motor Poles) RPMElec
RPMMech
+VBUS -VBUS +VBUS -VBUS
RPMElec
Green Winding
RPSElec
Blue Winding
Sector
keep magnetic field stator advancing ahead rotor, transition from sector another must occur precise rotor positions optimal torque. next section discusses rotor position determined sensored BLDC control application.
2007 Microchip Technology Inc.
DS01083A-page
AN1083
SENSORED BLDC CONTROL
most sensored BLDC control applications, Hall effect sensors used determine rotor position. Hall effect sensors positioned motor housing such that each sensor output changes state every electrical degrees (see Figure rising edge Sensor offset electrical degrees with respect Sensor rising edge Sensor offset electrical degrees with respect Sensor sensors positioned that they change state when time motor commutation occur.
FIGURE
SENSORED CONTROL
HALL EFFECT SENSOR
Winding
HALL EFFECT SENSOR Green Winding HALL EFFECT SENSOR
Blue Winding
DRIVE CIRCUIT FIRING Sector Hall States
Q3,Q5
Q1,Q5
Q1,Q6
Q2,Q6
Q2,Q4
Q3,Q4 Q3,Q5
Q1,Q5
Q1,Q6
basic drive circuit BLDC motor shown Figure Each motor lead connected high-side low-side switch. correlation between sector switch states noted drive circuit firing shown Figure
FIGURE
BLDC DRIVE CIRCUIT
DS01083A-page
2007 Microchip Technology Inc.
AN1083
SENSORLESS CONTROL?
sensored control, sensors determine position motor rotor with respect motor stator. This makes fairly simple control motor. processor need only wait Hall effect sensor change state, determine which sector rotor based output three Hall effect sensors commutate motor windings appropriately. Sensored control several drawbacks: Sensors cost money. addition sensor itself, there further cost mounting sensors motor during manufacturing well cost sensor wires. Sensors another potential failure point motor. sensor fails, motor fails. some environments just practical sensors. instance, environment where motor flooded (like compressor pump), sensors subject failure before rest motor. these other reasons, sensorless BLDC control desirable many applications. next section introduces theory behind sensorless BLDC control technique described this application note.
SENSORLESS BLDC CONTROL
determining appropriate moment when motor winding should commutated, transition from sector another, rotor position. With sensored control, rotor position immediately evident. However, sensorless control, rotor position must determined means other than sensors. method chosen this algorithm analyze back-Electromotive Force (EMF) from motor. simplest terms, back-EMF voltage generated stator winding permanent magnet motor when rotor motor turning. magnitude back-EMF proportional speed motor. Figure will help explain back-EMF. This figure shows potential three leads motor turns using sensored control. shape three signals very similar trapezoidal shape shown Figure Vertical lines have been added graph help identify sectors. signal providing power each winding. During every third sector, Phase example, being driven. However, some voltage still seen lead motor during non-driven sector particular phase. This voltage back-EMF.
FIGURE
BACK-EMF
Phase
Phase
Phase
Note:
These waveforms were captured using dsPIC3F6010A sample signals leads running BLDC motor. samples displayed using Data Monitor Control Interface (DMCI) tool available MPLAB® IDE. DMCI tool discussed greater detail "Implementing Algorithm" section this document.
2007 Microchip Technology Inc.
DS01083A-page
AN1083
back-EMF signal during undriven sector actually being generated magnetized rotor moving past windings stator. back-EMF signal three characteristics that important sensorless control. These are: speed increases, magnitude back-EMF signal increases. speed increases, slope back-EMF signal becomes greater. back-EMF signal symmetrical around (assuming drive rails plus/minus some voltage). third characteristic shown greater detail Figure which shows back-EMF signal during non-driven sector Phase this example, motor driven ±12V. back-EMF signal symmetrical about drive rails were signal would symmetrical about 6V.) back-EMF signal straight line, signal would cross line halfway through sector, electrical degrees, into sector. This point called zero-cross event. zero-cross event always occurs degrees before next commutation should occur. Therefore, given algorithm that identify zero-cross event accurately, rotor position estimated motor windings commutated correct time. Ideally, undriven sector back-EMF signal would straight line. actuality, back-EMF signal noise from driven sectors coupled onto signal. signal used vary voltage therefore, speed motor. Because motor windings proximity another, drive signal from winding coupled onto back-EMF signal another winding. difficult detect zero-cross event coupled noise. instance, microcontroller instructed identify first time back-EMF signal crosses threshold undriven sector particular phase, microcontroller does detect crossing electrical degrees into sector because noise causes signal cross threshold prematurely. Figure apparent that back-EMF signal crosses line times before 30-degree mark. Detecting zero-cross event accurately implementing this sensorless algorithm.
FIGURE
ZERO-CROSSING VOLTAGE
High Driven Sector Undriven Sector Driven Sector +12V Zero-Cross Event
Result (10-bit resolution)
-12V
Sample Number
DS01083A-page
2007 Microchip Technology Inc.
AN1083
DIGITAL FILTERING
reiterate, back-EMF signal clean signal. Coupled noise from other phases makes difficult accurately detect zero-cross event. Figure shows actual back-EMF signal with ideal signal transposed using dsPIC® implement digital filter, filtered back-EMF signal generated that looks more like ideal signal. This premise algorithm described this application note given filtered back-EMF signal, easier detect actual zero-cross event electrical degree mark) more accurately. When zero-cross event detected, dsPIC then timer count down until time commutate motor windings. Filtering signal does have drawback, however. Whether done digitally hardware, filtered signal exhibits some phase delay compared actual signal. phase delay illustrated Figure
FIGURE
ACTUAL IDEAL BACK-EMF SIGNAL
Ideal back-EMF Actual back-EMF
Zero-Cross Threshold
FIGURE
IDEAL SIGNAL WITH PHASE DELAY
Zero-Cross Threshold
Ideal back-EMF Actual back-EMF
Phase Delay
2007 Microchip Technology Inc.
DS01083A-page
AN1083
Fortunately, when digital filter used, phase delay calculated given filter specifications frequency back-EMF signal. calculated phase delay then subtracted from count-down timer. this algorithm, Microchip dsPIC Digital Filter Design tool used design back-EMF filter. This design tool automatically calculates phase delay filter. next paragraphs describe dsPIC Digital Filter Design tool used design filter signal. Digital Filter Design tool requires following inputs: Filter Type Sampling Frequency Pass-Band Frequency Stop-Band Frequency Pass-Band Ripple (db) Stop-Band Ripple (db) Filter Order dsPIC Digital Filter Design tool provides several graphs showing response filter. These graphs include: Magnitude Frequency Magnitude Frequency Phase Frequency Group Delay Frequency Impulse Response Time Step Response Time
special interest algorithm described this application note Group Delay Frequency graph. This graph shown Figure
FIGURE
GROUP DELAY PLOT
this implementation, filter chosen instead filter because filter takes less time execute. filter requires much higher order when compared filter with similar response characteristics. addition, phase delay period much less filter verses filter with similar response. filter parameters used this algorithm listed Table group delay plot shows much delay seconds) filtered signal will have when compared actual back-EMF signal given electrical revolution frequency. Assuming maximum motor speed 100,000 electrical RPM, maximum electrical revolutions second 1666. According group delay plot, 1666 filtered signal will have phase delay approximately phase delay approximately difference delay time negligible, phase delay treated constant over entire speed range motor. next section explains phase delay factored into sensorless BLDC motor control algorithm.
TABLE
Filter Type
FILTER PARAMETERS
Value Low-Pass Butterworth 49152
Parameter Sampling Frequency
Pass-Band Frequency 4000 Stop-Band Frequency 8000 Pass-Band Ripple Stop-Band Ripple Filter Order Note:
filters actually used sensorless BLDC algorithm. reason filters their specifications covered later document.
Once these parameters specified, dsPIC Digital Filter Design tool calculates filter coefficients generates necessary source header files implementing filter. These files have been added sensorless BLDC motor control project MPLAB® IDE.
DS01083A-page
2007 Microchip Technology Inc.
AN1083
CHARACTERISTICS BACK-EMF
characteristics back-EMF signal quite different when motor turning slowly versus turning fast. result, sensorless BLDC control algorithm analyzes back-EMF ways, based speed motor. understand there implementations, necessary look characteristics back-EMF signal both high motor speeds. motor commutated blindly until back-EMF signal starts exhibiting trapezoidal shape, shown Figure back-EMF signal motor turning speed shown Figure speeds, there high probability detecting zero-cross event some point other than half-way through sector shallow slope backEMF signal. noise back-EMF signal, even filtered signal, result premature zero-cross event detection. important sensorless algorithm sample analyze three back-EMF signals. looking zero-cross events three phases motor, algorithm recover next sector from premature commutation initiated early detection zero-cross event. Figure shows phase delay ideal filtered signal. speed, phase delay small comparison sector length. Note that zero-cross event filtered back-EMF signal occurs well before next commutation should occur. This important, because speed, once algorithm determines zero-cross event occurred, next commutation planned for.
Low-Speed back-EMF Characteristics
very speed, noticeable back-EMF generated. back-EMF signal essentially flat during non-driven sector particular phase. Consequently, zero-cross point indistinguishable. motor turns faster, back-EMF signal eventually begins have some slope. sensorless algorithm will work unless there sufficient slope back-EMF signal allow zero-cross event determined accurately. this reason, sensorless BLDC algorithms must have open-loop start-up ramp before sensorless algorithm able take over commutate motor windings. During open-loop start-up ramp,
FIGURE
BACK-EMF MOTOR SPEED
Non-Driven Sector Detected Zero-Cross Point
Zero-Cross Threshold
Actual Zero-Cross Point
Phase Delay
2007 Microchip Technology Inc.
DS01083A-page
AN1083
High-Speed back-EMF Characteristics
Back-EMF different characteristics when motor turning fast, shown Figure obvious difference large voltage spike back-EMF signal start sector. This voltage spike caused inductive kickback. higher speeds, more energy stored motor windings. When phase motor transitions from being driven being tristated, energy winding somewhere; hence, large voltage spike. high speed, back-EMF signal slope much steeper. result, much easier detect zero-cross event. motor speed increases, time spent each sector becomes shorter. This effects: Because electrical revolution frequency higher, phase delay filter much longer comparison sector width. Consequently, detection zero-cross event filtered signal occurs after next commutation should transpire. Given constant sample frequency over entire speed range motor, fewer samples BEMF taken sector higher motor speeds. This means that, relation sector length, resolution detecting zero-cross event decreases with motor speed.
FIGURE
BACK-EMF HIGH MOTOR SPEED
Undriven Sector
Detected Zero-Cross
Actual Zero-Cross
Characteristics: Magnetic field "collapses" from inductive kickback causing large voltage spikes Distortion immediately after commutation Filter phase delay significant Samples sector greatly reduced
DS01083A-page
2007 Microchip Technology Inc.
AN1083
SENSORLESS IMPLEMENTATION
Based characteristics back-EMF high motor speeds, implementations were created optimize both low-speed high-speed performance sensorless algorithm. Transition from low-speed high-speed implementation (and vice versa) seamless built-in hysteresis. motor speed increases, transition from lowspeed high-speed implementation occurs electrical revolutions second default. motor speed decreases, transition from highspeed low-speed implementation occurs electrical revolutions second default. transition speed configurable user (see "Tuning Procedure" section more information). Sampling done during sectors, driven nondriven, each phase. With sampling performed greater than times frequency, filtered signal reflects average potential applied motor winding during sectors when phase energized signal. This helps create filtered signal that resembles trapezoidal shape. Note: Technically, back-EMF refers only potential motor leads that results from motor acting generator. other words, when signal applied motor this backEMF. sake simplicity, however, this document describes continuous sampling each phase "sampling back-EMF signal".
Low-Speed Implementation
low-speed implementation algorithm, three motor phases sampled dsPIC30F module. After three samples obtained, interrupt generated. samples then through three identical filters, each phase, generate three filtered samples. Sampling occurs frequency 49,152 each phase, which more than times faster than frequency kHz).
Figure shows sampled back-EMF signal from phases. ideal filtered signal transposed onto each (with phase delay). Zero-cross events determined comparing filtered signal against zero-cross threshold. phase that algorithm currently analyzing, whether signal rising falling, depend which sector motor currently
FIGURE
LOW-SPEED IMPLEMENTATION
Detected Zero-Cross Point
PHASE
Actual Zero-Cross Point Ideal back-EMF Signals with Phase Delay
Timer1
PHASE
Timer3
Commutate Motor when Timer3 Times
2007 Microchip Technology Inc.
DS01083A-page
AN1083
dsPIC30F digital signal controllers have five onboard, 16-bit timers. Timer1 used measure amount time elapsed from zero-cross event next. This time equivalent electrical degrees. Assuming there phase delay when zero-cross event detected, next commutation should occur degrees. Dividing Timer1 capture value gives time electrical degrees. Theoretically, this value loaded into Timer1 Period register another timer, referred commutation timer. When interrupt commutation timer occurs, time commutate motor windings next state. Several sources delay must subtracted from 30-degree time. first phase delay digital filter. Using dsPIC filter design tool, this delay approximated Another source delay time takes process interrupt. Interrupt Service Routine (ISR) executes three filters before determining whether zero-cross event occurred. This process takes approximately Each these delays must subtracted from time before loaded Commutation Timer Period register. Timer3 used commutation timer. When zerocross event occurs, Timer3 Period register loaded with value specified Equation
EQUATION
TIMER3 PERIOD SPEED
DFILT DPROC Where: Timer3 Period register value Value computed electrical degrees
DFILT Low-speed filter phase delay DPROC Low-speed interrupt processing delay Phase advance (see "Phase Advance" section more information)
Timer3 Timer3 interrupt then enabled. motor windings commutated next state when Timer3 interrupt occurs. result low-speed implementation shown Figure
FIGURE
LOW-SPEED RESULTS
UNFILTERED BACK-EMF (LOW SPEED)
DIGITALLY FILTERED BACK-EMF (LOW SPEED)
DS01083A-page
2007 Microchip Technology Inc.
AN1083
summary, low-speed implementation works follows: three motor phases sampled module sample rate 49,152 sps. samples three phases filtered. Based current motor state, filtered sample from appropriate phase analyzed zero-cross event occurred. When zero-cross event detected, value Timer1 saved Timer1 reset. saved Timer1 value, which equivalent time electrical degrees, divided filter phase delay, processing delay phase advance subtracted. This result represents amount time until next commutation should occur. result loaded into Timer3 Period register, Timer3 turned Timer3 interrupt enabled. When Timer3 interrupt occurs, Timer3 turned reset Timer3 interrupt disabled. motor windings commutated next state.
FIGURE
FLOWCHART LOW-SPEED IMPLEMENTATION
Sample back-EMF
Interrupt
Filter Samples
Zero-Cross Detected?
Exit
Calculate Time Sector Change
Load Timer3 Turn Timer3
Figure flowchart that illustrates low-speed implementation sensorless BLDC algorithm.
Timer3 Interrupt
Perform Sector Change
Turn Timer3
Exit Timer3
2007 Microchip Technology Inc.
DS01083A-page
AN1083
High-Speed Implementation
high-speed implementation this algorithm shown Figure this implementation, only phase sampled filtered. sampling frequency increased 81,940 sps. low-speed implementation will spin motor faster than about 40,000 electrical (assuming phase advance). higher speeds, filter processing delays become larger than electrical degrees time). Running faster causes zero-cross event detection occur after motor windings should have been commutated. low-speed implementation, three phases motor sampled shallow slope back-EMF signal motor speeds. shallow slope back-EMF signal means higher likelihood detecting zero-cross event prematurely. Looking every zero-cross event minimizes likelihood sensorless algorithm getting lost. high motor speeds, zero-cross event detection much more accurate steeper back-EMF signal slope. Therefore, sampling three phases necessary. addition, sampling only motor phase frees bandwidth sample phase faster. This increases accuracy zero-cross event detection.
FIGURE
HIGH-SPEED IMPLEMENTATION
Timer3 Timer1
Commutate Here
PHASE
Zero-Cross Threshold
PHASE
Figure zero-cross point filtered signal occurs more than degrees after actual zero-cross event. Rather than commutate motor windings sector immediately following actual zero-cross event, high-speed implementation commutates next sector. other words, algorithm looks forward electrical degrees instead Timer1 measures time elapsed between zero-cross events just phase. This time equivalent electrical degrees. Timer3 then just low-speed implementation, except Timer3 Period register loaded with time electrical degrees minus applicable delays. Equation shows this relation.
EQUATION
TIMER3 PERIOD HIGH SPEED
DFILT DPROC Where: DFILT Timer3 Period register value Value computed electrical degrees High-speed filter phase delay Phase advance delay (see "Phase Advance" section more information)
DPROC High-speed processing delay
DS01083A-page
2007 Microchip Technology Inc.
AN1083
When Timer3 interrupt occurs, motor windings commutated appropriate sector. Timer3 interrupt only commutating motor every third sector. other sectors commutated Timer2. After each zero-cross event detection, Timer2 Period register loaded with value equivalent time degrees. Timer2 runs background, incrementally, commutating motor windings next sector. Timer2 free-running background, referenced actual zero-cross event? answer that Timer3 interrupt always forces commutation every third sector particular sector state. When Timer3 interrupt event occurs, Timer3 zeroed turned off. addition, Timer2 also reset during Timer3 interrupt. Therefore, Timer3 synchronizes Timer2 sector borders. Figure illustrates this works. inductive kickback seen back-EMF signals motor when turning high speed discussed earlier. This disturbance back-EMF signal large filter out. "removed" from prefiltered signal will cause faulty zero-cross detection. remedy this problem, sensorless algorithm configurable parameter called blanking count. blanking count number samples that algorithm should ignore start each sector (see Figure 20).
FIGURE
TIMERS HIGH-SPEED MODE
Timer1 180° Timer3
Timer2
Timer2: Runs background, commutating motor intervals. Timer3: Keeps algorithm track forcing every third commutation based zero-crossing location (Timer2 zeroed).
FIGURE
BLANKING COUNT
Blanking Count
Blanking count number samples affected inductive kickback. last filtered sample substituted during this time.
2007 Microchip Technology Inc.
DS01083A-page
AN1083
actuality, algorithm does ignore backEMF signal during blanking period. Instead, start each sector, digital filter last filtered sample rather than actual back-EMF sample duration blanking count. results high-speed implementation shown Figure
FIGURE
HIGH-SPEED IMPLEMENTATION RESULTS
UNFILTERED BACK-EMF (HIGH SPEED)
DIGITALLY FILTERED BACK-EMF (HIGH SPEED)
DS01083A-page
2007 Microchip Technology Inc.
AN1083
summary, high-speed algorithm works follows: motor phase sampled using module sample rate 81,940 sps. samples filtered. Note: digital filter used high-speed implementation same filter described "Digital Filtering" section with exception sampling frequency 81,940 instead 49,152
FIGURE
FLOWCHART HIGH-SPEED IMPLEMENTATION
Interrupt Filter Sample
When zero-cross event detected, value Timer1 saved Timer1 reset. Timer1 value, which equivalent time electrical degrees, divided two, filter phase delay, processing delay phase advance delays subtracted. This result represents amount time until next commutation should occur degrees after actual zero-cross occurred). result loaded into Timer3 Period register, Timer3 turned Timer3 interrupt enabled. Timer2 Period register loaded with time electrical degrees. Timer2 runs continuously background. When Timer2 interrupt occurs, motor windings commutated next sector. When Timer3 interrupt occurs, Timer3 turned reset Timer3 interrupt disabled. motor windings commutated predetermined sector. Timer2 also reset. This ensures Timer2 brought back sync with actual zero-cross event.
Zero-Cross Detected? Calculate Time
Exit
Calculate Time Minus Delays Load Timer2 Turn Timer3
Timer3 Interrupt
Perform Sector Change Reset Timer2
Figure flowchart high-speed implementation sensorless BLDC algorithm.
Turn Timer3
Exit Timer3
Timer2 Interrupt
Perform Sector Change
Exit Timer2
2007 Microchip Technology Inc.
DS01083A-page
AN1083
Phase Advance
Phase advance used turn motor faster than rated speed. When phase advance implemented, motor windings commutated early every sector. Phase advance quantified electrical degrees. degrees phase advance possible this algorithm. Figure illustrates phase advance. Under ideal conditions, channel will sample voltage this result divided (with positive zero voltage drive rails) determine zero-cross threshold. This threshold what back-EMF filtered samples compared against determine whether zero-cross event occurred. filtered signal symmetrical about zero-cross threshold, then zerocross events cannot determined accurately. Figure shows what would happen this were case.
FIGURE
PHASE ADVANCE
Phase Advance
FIGURE
FILTERED BACK-EMF SIGNAL SYMMETRICAL ABOUT ZERO-CROSS THRESHOLD
Commutate Here
Instead Here
Ideal Filtered Signal
increased motor speed that achieved when phase advance implemented does come cost. motor draws more current than rated for, which cause overheating, thereby shortening life motor. Note: Refer Equation Equation previous section phase advance factors into low-speed high-speed implementations, respectively.
Zero-Cross Threshold
There filter sources back-EMF signal: filter feedback circuit (see Figure filtering high-frequency transients digital low-pass filter With low-pass filtering, signal always symmetrical around zero-cross voltage. motor speed increases, back-EMF signal moves slightly with respect zero-cross voltage. compensate, back-EMF filtered samples compared zero-cross threshold. software accumulator tallies number samples larger than zero-cross threshold number samples smaller than zero-cross threshold. there imbalance, accumulator will become very large signed number over time. higher order bits accumulator added offset zero-cross threshold. This ensures that back-EMF signal always symmetrical about zero-cross threshold. Note: source code, zero-cross threshold stored signal_average variable. calculation signal_average performed CheckZeroCrossing() function (motor_isr.c).
Zero-Cross Voltage Compensation
Ideally, zero-cross voltage threshold centered directly between voltage rails driving BLDC motor. motor being driven ±12V, zerocross threshold would motor being driven voltage range 0-12V, zero-cross voltage would ideally Figure shows circuit used scale back-EMF voltage before channel dsPIC DSC. voltage scaled that within analog input voltage range dsPIC DSC.
FIGURE
Motor Winding
BACK-EMF FEEDBACK CIRCUIT
DS01083A-page
2007 Microchip Technology Inc.
AN1083
Speed Control
have option enabling speed control loop. speed control loop enabled Data Monitor Control Interface tool. "Tuning Procedure" section provides details enabling tuning speed control loop. Note: function used this algorithm included part library provided with Microchip's compiler. detailed description function used found "16-Bit Language Tools Libraries" (DS51456).
TABLE
JUMPER SETTINGS PICDEMMC DEVELOPMENT BOARD
Setting Short Open Short Short Open Short Open Short Short Open Open
Jumper
Speed control loop called from MediumEvent() function. MediumEvent() called every from main program loop.
IMPLEMENTING ALGORITHM
algorithm described this application note, must: hardware. development tools load project workspace MPLAB IDE. Tune motor using Data Monitor Control Interface (DMCI) tool.
TABLE
MOTOR CONNECTIONS PICDEMMC DEVELOPMENT BOARD
Connection Phase Phase Phase Ground Wire available) 12-36V Ground Connect board/motor power ground only connector used. Refer "PICDEMMC Development Board User's Guide" (DS51554) detailed information.
Label
Hardware Setup
sensorless BLDC algorithm developed hardware platforms: PICDEMLow-Voltage Motor Control Development Board (DM183021) dsPICDEMMC1 Motor Control Development Board (DM300020) conjunction with dsPICDEMMC1L 3-Phase Low-Voltage Power Module (DM300022). These development boards, along with appropriate documentation, available from Microchip site (www.microchip.com).
-(1) Note
PICDEMMC DEVELOPMENT BOARD
This development board provides motor terminal strip, 3-phase voltage source inverter bridge, motion sensor inputs, overcurrent protection, temperature sensor, push button switches, nine LEDs, test points motor current back-EMF sensing, speed control potentiometer RS-232 port. board must configured shown Table motor should connected shown Table
This sensorless BLDC motor control algorithm developed MIPS. order achieve MIPS, crystal PICDEM board must replaced with 7.37 crystal. This allows algorithm 29.49 MIPS. Note: Limited testing shown that algorithm will using default crystal MIPS). Running code using crystal requires that user change definition general.h from 29490000 20000000.
Configuring board described Table Table connects dsPIC30F3010 device that pins device function shown Table This table shows only pins that used with this algorithm.
2007 Microchip Technology Inc.
DS01083A-page
AN1083
TABLE
Name MCLR OSC1 OSC2 RC13 RC14
dsPIC30F3010 FUNCTIONS
Function Device reset voltage sense Motor current sense Potentiometer (R14) input Phase back-EMF sense Phase back-EMF sense Phase back-EMF sense Ground Crystal oscillator input Crystal oscillator input Switch (S3) input Switch (S2) input
dsPICDEMMC1 MOTOR CONTROL DEVELOPMENT BOARD dsPICDEMMC1L 3-PHASE LOW-VOLTAGE POWER MODULE
dsPICDEM Motor Control Development Board includes dsPIC30F6010A, various peripheral interfaces custom interface header system that allows different motor power modules connected PCB. board also connectors mechanical position sensors, such incremental rotary encoders Hall effect sensors, breadboard area custom circuits. main control board receives power from standard plug-in transformer. dsPICDEM MC1L 3-Phase Low-Voltage Power Module optimized 3-phase motor applications that require voltage less than volts deliver 400W power output.
EMUD2 In-circuit debugging data EMUC2 In-circuit debugging clock FLTA Overcurrent Fault input (current trip level R60) In-Circuit Serial Programmingdata In-Circuit Serial Programming clock Ground
dsPICDEMMC1 Motor Control Development Board
dsPICDEM Motor Control Development Board must jumpered shown Table
TABLE
Jumper
dsPICDEMMC1 JUMPER SETTINGS
Setting Open Open Open Short Short Open Open Open Open
PWM3H Drives high-side MOSFET (Q5) Phase PWM3L Drives low-side MOSFET (Q6) Phase PWM2H Drives high-side MOSFET (Q3) Phase PWM2L Drives low-side MOSFET (Q4) Phase PWM1H Drives high-side MOSFET (Q1) Phase PWM1L Drives low-side MOSFET (Q2) Phase AVSS AVDD Ground
"PICDEMMC Development Board User's Guide" (DS51554) provides details board motors that require more than 36V. Running BLDC motor control algorithm motors rated below requires modifications board. Specifically, resistor feedback network must modified. user's guide also provides details about this modification. tactile switches PICDEM board provide functionality listed Table
addition, configure dsPICDEM Motor Control Development Board follows: switch position. Short R40. MPLAB used Debug mode with dsPIC30F6010A these resistors left circuit. Make sure dsPIC30F6010A. filter high-frequency transients back-EMF feedback lines, capacitors between ground AN12, AN13 AN14 connections breadboard area.
TABLE
Button
SWITCH FUNCTIONALITY
Function Device Reset Begin start-up ramp stop
version sensorless algorithm that runs dsPICDEM Motor Control Development Board allows motor Sensored mode. want this functionality, connect Hall effect sensors described Table
DS01083A-page
2007 Microchip Technology Inc.
AN1083
TABLE
Label
HALL EFFECT SENSOR CONNECTIONS (OPTIONAL)
Connection Hall effect supply voltage Hall effect sensor ground Phase position hall Phase position hall Phase position hall
TABLE
Name RD10 PWM1L PWM1H PWM2L PWM2H PWM3L PWM3H
dsPIC30F6010A FUNCTIONS (CONTINUED)
Function Phase position Hall effect sensor Phase position Hall effect sensor (D5) control Ground Drives low-side MOSFET (Q4) Phase Drives high-side MOSFET (Q3) Phase Drives low-side MOSFET (Q6) Phase Drives high-side MOSFET (Q5) Phase Drives low-side MOSFET (Q8) Phase Drives high-side MOSFET (Q7) Phase
When dsPICDEM Motor Control Development Board configured described above, LowVoltage Power Module configured described "dsPICDEMMC1L 3-Phase Low-Voltage Power Module" section, pins dsPIC30F6010A function described Table
TABLE
Name MCLR FLTA
dsPIC30F6010A FUNCTIONS
Function Switch (S4) input Switch (S5) input Switch (S6) input Device Reset Switch (S7) input Ground Shunt overcurrent)/overvoltage/ Hall (overcurrent)/brake chopper Fault input from power module Reset power module Faults
tactile switches dsPICDEM board have following functionality:
TABLE
Button
SWITCH FUNCTIONALITY
Function Device Reset Simulate Fault Hall mode Begin start-up ramp Sensorless mode stop
PGC/EMUC In-Circuit Serial ProgrammingTM/ debugging clock PGD/EMUD In-Circuit Serial Programming/ debugging data RA10 AVDD AVSS AN11 AN12 AN13 AN14 OSC1 OSC2 RA14 RA15 Potentiometer (VR2) input (D6) control (D7) control Ground current sense voltage sense Ground Phase back-EMF sense Phase back-EMF sense Phase back-EMF sense Crystal oscillator input Crystal oscillator input Ground (D8) control (D9) control Phase position Hall effect sensor
dsPICDEMMC1L 3-Phase Low-Voltage Power Module
Low-Voltage Power Module must configured sensorless algorithm, which requires that metal power module removed. WARNING Removing metal enclosure result electric shock. Wait least minutes after power removed from module before contacting enclosure. Read warnings "dsPICDEMMC1L 3-Phase Low-Voltage Power Module User's Guide" (DS70097) before removing metal enclosure. After removing Low-Voltage Power Module, solder resistors across links shown Table
2007 Microchip Technology Inc.
DS01083A-page
AN1083
TABLE
Link LK22 LK24 LK25 LK26 LK30
LINKS POPULATED WITH RESISTORS
Connection current sense Phase back-EMF sense Phase back-EMF sense Phase back-EMF sense voltage sense
Development Tool Setup
After connecting your development board MPLAB Debugger, follow procedures below your board load algorithm workspace load DMCI tool.
FIGURE
DEVELOPMENT TOOL SETUP
These only modifications required voltage supplied Low-Voltage Power Module 48V. Additional modifications required supplied voltage lower than 24V, higher current level required. details making these modifications, refer "dsPICDEMMC1L 3-Phase Low-Voltage Power Module User's Guide" (DS70097). After these modifications made, secure enclosure using screws aside during removal. Table lists screw terminal connections. Make these connections only after Low-Voltage Power Module securely place.
Connect MPLAB® between board your
PICDEMMC Development Board
Step Configure Workspace: Unzip AN1083 MCLV.zip file. Open MPLAB (version 7.50 later). Open Sensorless.mcw workspace. From Tools menu, select DMCI tool. Load AN1083 MCLV.DMCI DMCI tool. Place PRGM position. Select debug tool. Connect Select "Debug" from Project Manager toolbar. Build code. Program device. Place DEBUG position. Reset device. debugger. Halt debugger.
TABLE
Label Earth Symbol
SCREW TERMINAL CONNECTIONS
Screw Terminal Connection Positive Voltage Rail Negative Voltage Rail Earth Ground (optional) Motor Phase Motor Phase Motor Phase Motor Ground
Step Program dsPIC30F Device:
Step Three Algorithm:
DS01083A-page
2007 Microchip Technology Inc.
AN1083
dsPICDEMMC1 MOTOR CONTROL DEVELOPMENT BOARD dsPICDEMMC1L 3-PHASE LOW-VOLTAGE POWER MODULE
Step Configure Workspace: Unzip AN1083 MC1.zip. Open MPLAB (version 7.50 later). Open Sensorless.mcw workspace. From Tools menu, select DMCI tool. Load AN1083 MC1.DMCI DMCI tool. Place position. Select debug tool. Connect Select "Debug" from Project Manager toolbar. Build code. Program device. Reset device. debugger. Halt debugger.
Data Monitor Control Interface Tool
Data Monitor Control Interface (DMCI) tool eliminates hours trial error setup providing graphical user interface configure motor parameters. This tool included MPLAB version 7.50 later. DMCI tool provides sliders text controls that assign global variables. easily change these variables adjusting sliders changing text fields. tool also lets assign arrays four graphs. When have optimized motor parameters, graphical interface settings (the variables assigned different controls) saved that other people have access setup. DMCI consists these screens controls: Dynamic Data Input Screen Dynamic Data Control Screen Dynamic Data View Screen
Step Program dsPIC30F Device:
Step Three Algorithm:
DYNAMIC DATA INPUT SCREEN
Dynamic Data Input screen (Figure used define motor characteristics. Table identifies controls used sensorless algorithm.
DYNAMIC DATA CONTROL SCREEN
Dynamic Data Control screen (Figure used sensorless algorithm parameters. Table identifies controls used.
2007 Microchip Technology Inc.
DS01083A-page
AN1083
FIGURE DYNAMIC DATA INPUT SCREEN
TABLE
Reference
DYNAMIC DATA INPUT SCREEN CONTROLS
Control Function Number motor poles (should even number). Blanking count (0-20) counts.(1) Motor speed RPM) which phase advance should start. Phase advance slope degrees 1000 degrees). Max. motor speed RPM. This number used scale full range control potentiometer when speed control loop enabled.(2) Speed (electrical RPS) which algorithm transitions from low-to-high-speed implementation vice versa. default value typically does need changed. crossover speed less than because there electrical revolutions second built-in hysteresis. Shutdown sensitivity specified number Timer1 overflows. Timer1 overflows, motor stopped algorithm lost sync. Increase this number make algorithm less sensitive. duration Lock specified milliseconds.(3) duration Lock specified milliseconds.(3) demand (PWM duty cycle Lock 1.(3) demand (PWM duty cycle Lock 2.(3)
Note
corresponds interrupt frequency (approximately) when algorithm High-Speed mode. dsPICDEMMC1 Motor Control Development Board; PICDEMMC Development Board. lock parameters part open-loop start-up ramp. purpose lock time periods drive motor Sector (Lock then Sector (Lock small amount time, that motor will align known sector before start-up ramp begins.
DS01083A-page
2007 Microchip Technology Inc.
AN1083
FIGURE
.FIGURE DYNAMIC DATA CONTROL SCREEN SETUP
TABLE
Reference
DYNAMIC DATA CONTROL SCREEN CONTROLS
Control Function Ramp start demand (PWM duty cycle start open-loop start-up ramp). Ramp demand (PWM duty cycle open-loop start-up ramp). Ramp start speed RPM. Ramp speed RPM. Ramp duration (0.5 seconds). Initial demand (sets demand immediately after start-up ramp). Speed control loop error gain term. Speed control loop error gain term. Speed control loop error gain term. Speed control loop enable. When state, control potentiometer used adjust motor speed. When state, control potentiometer adjusts duty cycle.(1) Control potentiometer enable/disable. When state, potentiometer adjusts speed reference speed control loop duty cycle (refer control above). When state, control potentiometer effect motor speed.
Note
dsPICDEMMC1 Motor Control Development Board; PICDEMMC Development Board.
2007 Microchip Technology Inc.
DS01083A-page
AN1083
DYNAMIC DATA VIEW SCREEN
Note: This section only applicable sensorless control with dsPIC30F6010A dsPICDEM platform. When motor running Sensorless mode, pressing board initiates buffer capture. When debugger halted, graphs display buffered back-EMF signal (and three other buffers). DMCI tool lets zoom areas each graph dragging around desired area. enlarge graph full screen selecting pressing key. Pressing <Esc> returns DMCI GUI.
third DMCI tool accesses Dynamic Data View screen (Figure 29). default, this screen graphically shows four 512-word buffers. graphs display following information: Graph Phase back-EMF Samples Graph Phase back-EMF Samples (blanking count samples ignored) Graph Phase Filtered Samples Graph Zero-Cross Reference
FIGURE
DYNAMIC DATA VIEW SCREEN
DS01083A-page
2007 Microchip Technology Inc.
AN1083
Tuning Procedure
tune motor parameters must follow this precise process: sure motor stopped (failure will cause current spike when debugger restarted). Halt MPLAB debugger. Change appropriate parameter. Restart MPLAB debugger. Start motor. Step Two: Initialize open-loop start-up ramp. Lock Lock duration values lock demands. best start lower demand values. Start lock value Lock Lock Increase Lock Lock demands until motor snaps lock positions, drawing sufficient current damage motor windings drive circuitry. whole purpose lock positions bring motor known sector before beginning start-up ramp. remaining start-up ramp parameters found Dynamic Data Control screen. lower right hand corner this screen, disable speed control loop control potentiometer setting enabled boolean buttons "off". idea sensorless algorithm motor before algorithm compensate changes demand. ramp duration full duration 6500 Once start-up ramp tuned that motor start-up successful, ramp duration reduced. Ignore gain sliders moment. Concentrate getting ramp start speed, speed, start demand demand that motor spins fast enough sensorless algorithm sync sliders Dynamic Data Control screen start speeds. speed something order 12-20% full motor speed. motors with inertia and/or many motor poles, start speed will have less than RPM. motors with little inertia and/ motor poles, start speed higher (typically between RPM). Keep start, initial demand sliders same. three parameters same demand value specified Lock Lock Click `start' DMCI tool, then press button board that initializes start-up ramp (this hardware platform dependant). motor sits place shutters, more demand needed. Press button board stop motor. Click `halt' DMCI tool. Increase start, initial demand units repeat this step until motor starts. Note: should increase demand slowly. jump directly large demand value, motor will draw current which could harm motor drive circuitry.
This process must repeated time adjust motor parameter. Table details which switches start stop motor each development board.
TABLE
MOTOR CONTROL SWITCHES
Development Board Type dsPICDEMMC1 PICDEMMC
method used tune start-up ramp speed control parameters follows these basic steps: initial parameters that match characteristics motor. Initialize open-loop start-up ramp. Tune open-loop start-up parameters. Tune speed control loop. Follow these detailed procedures: Step One: initial parameters that match characteristics motor. Dynamic Data Input screen, enter number motor poles maximum speed motor. Leave blanking count default value. Disable phase advance during initial tuning motor parameters setting phase advance start speed value that higher than maximum motor speed. phase advance slope zero. This ensures that phase advance added during initial tuning process. crossover speed should 250. have lower speed motor (40k electrical maximum) that does require phase advance, change this very high number, such 700, make sure algorithm runs Low-Speed mode time. Enter shutdown sensitivity. This makes algorithm less sensitive shutdown detection (the lower this number more sensitive algorithm).
Step Three: Tune open-loop start-up parameters.
2007 Microchip Technology Inc.
DS01083A-page
AN1083
motor should start turning when motor start button pressed. motor commutations appear occur faster than motor keep with, increase initial demands. demand should never greater than higher than start demand. Typically, initial demand should slightly lower than demand. motor still appears "slip", decrease speed. motor should spin sensorless algorithm should take over start-up ramp. Fine tune ramp parameters until motor start-up reliable. Experiment with decreasing ramp duration. Find minimum value ramp duration that will still allow motor start-up reliably. time enable control potentiometer. Enable control potentiometer DMCI tool. enable speed control. potentiometer position will correlate duty cycle; full clockwise 100% duty cycle. Estimate potentiometer position that corresponds initial demand value. potentiometer this position initiate start-up ramp. motor doesn't start, adjust potentiometer again. When motor does run, speed adjustable turning potentiometer. Step Four: Tune speed control loop. speed control loop enabled. Enable speed control loop DMCI interface. potentiometer position correlates motor speed RPM). Full clockwise corresponds maximum motor speed specified Dynamic Data Input screen DMCI tool. Move initial demand slider about demand. Then, zero integral derivative terms center proportional slider. Estimate potentiometer position that corresponds speed start-up ramp. running motor. Adjust control potentiometer term until motor starts successfully. (Lowering initial start demand help improve start-up performance.) Some Integral gain needed start motor successfully. Tune terms until desired motor performance obtained. Very little integral term needed comparison proportional term.
"Troubleshooting" section tips possible problem solutions.
Changing Digital Filter Coefficients
high-speed filter coefficients located BEMF_filter.s. These filter coefficients replaced coefficients generated dsPIC Filter Design tool.
Other Tunable Features Algorithm
Table lists some configurable #define statements where they located source code. Note: Altering these features recommended. Adjust these features your risk.
TABLE
FPWM FULL_DUTY
OTHER CONFIGURABLE PARAMETERS.
Parameter Defined general.h general.h general.h general.h general.h general.h pwm.c Description processor frequency instructions second. frequency. period function FPWM). Filter phase delay Timer3 counts. interrupt processing delay Timer3 counts Low-Speed mode. interrupt processing delay Timer3 counts High-Speed mode. Three choices what module will when Fault condition occurs. Change "FLTACON these choices. dead time seconds. When defined allocated Dynamic Data View graphs. size four snapshot buffers bytes.
FILTER_PHASE_DELAY PROCESSING_DELAY PROCESSING_DELAY_HS CYCLE_BY_CYCLE_PROTECTION FAULT_CAUSE_PWM_SHUTDOWN NO_FAULT_PROTECTION DEAD_TIME SNAPSHOT SNAPSIZE
pwm.c snapshot.h snapshot.h
DS01083A-page
2007 Microchip Technology Inc.
AN1083
CONCLUSION
This application note intended developer wants drive sensorless BLDC motor without discrete, low-pass filtering hardware off-chip comparators. algorithm described uses digital filtering back-EMF signals generated turning BLDC motor. Digital filtering makes possible more accurately detect zero-cross events back-EMF signal. When detected dsPIC DSC, zero-cross events provide information needed algorithm commutate motor windings Accurately detecting zero-cross events backEMF signal sensorless control BLDC motor that driven using six-step, trapezoidal, commutation. digital filtering, opposed hardware filters external comparators, requires less hardware, which equates less cost smaller PCB. open source solution equates shorter development cycle Finally, Microchip development tools that support dsPIC device family, specifically, Data Monitor Control Interface tool included with MPLAB version 7.50 later, allow algorithm quickly adapted your specific motor application.
RESOURCES
BLDC motor control, see: AN901, "Using dsPIC30F Sensorless BLDC Control" AN957, "Sensored BLDC Motor Control Using dsPIC30F2010" AN1017, "Sinusoidal Control PMSM Motors with dsPIC30F DSC" AN1078, "Sensorless Field Oriented Control PMSM Motors" information hardware platforms compatible with this algorithm, see: "dsPICDEMMC1 Motor Control Development Board User's Guide" (DS70098) "dsPICDEMMC1L 3-Phase Low-Voltage Power Module User's Guide" (DS70097) "PICDEMMC Development Board User's Guide" (DS51554) information algorithm, see: "16-Bit Language Tools Libraries" (DS51456)
2007 Microchip Technology Inc.
DS01083A-page
AN1083
TROUBLESHOOTING
Problem: motor ramps then, high-speed, just quits. Possible Solution: increasing blanking count; have lower speed motor (maximum speed much lower than 90,000 electrical RPM) adding phase advance, need have algorithm transition from low-speed implementation high-speed implementation earlier. Adjust crossover point lower (from 200, then 150). Decreasing phase advance slope also help. Problem: back-EMF from motor does look trapezoidal oscilloscope. Possible Solution: This algorithm requires trapezoidal shape motor's back-EMF signal. AN1078, "Sensorless Field Oriented Control PMSM Motors" explains sinusoidal motor Sensorless mode. Problem: When running code, oscillator trap occurs. Possible Solution: After programming device with debugger, make sure reset MPLAB Problem: MPLAB will debug/program device (when using PICDEM board). Possible Solution: Make sure PRGM position when programming device. Switch DEBUG position once device programmed before debugging. Problem: know fast motor going. Possible Solution: Select "Watch" from View menu MPLAB This brings Watch window. Enter variable "Speed" Watch window. motor using algorithm. When motor desired speed, press "motor off" button. Halt speed motor time "motor off" button pressed will displayed RPM) Watch window. Problem: motor using does need faster than 40,000 electrical phase advance required. Possible Solution: crossover frequency maximum allowable value electrical revolutions second. This will insure motor only runs LowSpeed mode. High-Speed mode necessary motors that slower than 40,000 electrical RPM. number, 40,000 electrical RPM, arrived adding processing filter phase delays. maximum amount delay that occur LowSpeed mode electrical degrees. When delays added (assuming phase advance) equal electrical degrees, fastest electrical speed calculated around 48,000 RPM. Problem: motor stops running right after startup ramp. seems like should have enough speed start. Possible Solution: When first tuning start-up ramp, make sure potentiometer input speed control loop disabled. These disabled boolean controls Dynamic Data Control screen DMCI tool. Problem: know motor running High-Speed mode not? Possible Solution: array, "ControlFlags", Watch window. High-Speed mode when motor running High-Speed mode. clear when motor Low-Speed mode. will have halt when motor running check this bit. Alternatively, check using board this when motor High-Speed mode. Problem: When phase advance, motor does cross over High-Speed mode. Possible Solution: much phase advance when motor running Low-Speed mode will cause motor improperly. phase advance start frequency past crossover frequency. crossover frequency electrical revolutions second. convert RPM, crossover frequency, multiply divide number pole pairs. Problem: When using board, always oscillator trap when first after program dsPIC30F6010A. Possible Solution: After dsPIC30F6010A programmed, reset Then, halt Next, click "run" DMCI tool. another trap occurs, will have through sequence just described clear trap load parameters DMCI tool into device. Problem: change position sliders DMCI tool appears like parameters updated dsPIC DSC. Possible Solution: First, DMCI tool realtime tool time this writing). order changes make parameters loaded into dsPIC DSC, will have halt make desired change parameter restart Secondly, make sure code stuck trap. check whether device trap, halt look trap.c file. counter arrow (green arrow) located that file, then trap occurred. Clear trap resetting checking other Fault sources.
DS01083A-page
2007 Microchip Technology Inc.
AN1083
Problem: know fast motor running? Possible Solution: "Speed" variable Watch window. When motor speed, press tactile switch that stops motor. Halt Watch window will display speed motor time stopped motor. Problem: measuring speed motor using handheld tachometer. value "Speed" does match measured speed. Possible Solution: Assuming handheld tachometer correct, make sure that processor running instruction cycle rate specified general.h. other words, processor running MIPS specified 20000000, then calculated motor speed will accurate. Problem: oscillator trap. Possible Solution: After programming device, reset device before running debugger. Problem: have run, then halt debugger once, before adjustments motor tuning parameters DMCI tool will take effect? Possible Solution: motor start-up parameters initialized source code. When first debugger, start-up parameters initialized values specified source code (see TuningInterface.c). must code beyond initialization point these parameters then adjustments make these parameters, using DMCI tool, will take effect. motor tuning parameters initialized source code that when finished tuning motor, "hard code" tuned parameters into code program device.
2007 Microchip Technology Inc.
DS01083A-page
AN1083
NOTES:
DS01083A-page
2007 Microchip Technology Inc.
Note following details code protection feature Microchip devices: Microchip products meet specification contained their particular Microchip Data Sheet. Microchip believes that family products most secure families kind market today, when used intended manner under normal conditions. There dishonest possibly illegal methods used breach code protection feature. these methods, knowledge, require using Microchip products manner outside operating specifications contained Microchip's Data Sheets. Most likely, person doing engaged theft intellectual property. Microchip willing work with customer concerned about integrity their code. Neither Microchip other semiconductor manufacturer guarantee security their code. Code protection does mean that guaranteeing product "unbreakable."
Code protection constantly evolving. Microchip committed continuously improving code protection features products. Attempts break Microchip's code protection feature violation Digital Millennium Copyright Act. such acts allow unauthorized access your software other copyrighted work, have right relief under that Act.
Information contained this publication regarding device applications like provided only your convenience superseded updates. your responsibility ensure that your application meets with your specifications. MICROCHIP MAKES REPRESENTATIONS WARRANTIES KIND WHETHER EXPRESS IMPLIED, WRITTEN ORAL, STATUTORY OTHERWISE, RELATED INFORMATION, INCLUDING LIMITED CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY FITNESS PURPOSE. Microchip disclaims liability arising from this information use. Microchip devices life support and/or safety applications entirely buyer's risk, buyer agrees defend, indemnify hold harmless Microchip from damages, claims, suits, expenses resulting from such use. licenses conveyed, implicitly otherwise, under Microchip intellectual property rights.
Trademarks Microchip name logo, Microchip logo, Accuron, dsPIC, KEELOQ, KEELOQ logo, microID, MPLAB, PIC, PICmicro, PICSTART, MATE, PowerSmart, rfPIC, SmartShunt registered trademarks Microchip Technology Incorporated U.S.A. other countries. AmpLab, FilterLab, Linear Active Thermistor, Migratable Memory, MXDEV, MXLAB, logo, SEEVAL, SmartSensor Embedded Control Solutions Company registered trademarks Microchip Technology Incorporated U.S.A. Analog-for-the-Digital Age, Application Maestro, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, ECAN, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB, MPLINK, PICkit, PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal, PowerInfo, PowerMate, PowerTool, REAL ICE, rfLAB, rfPICDEM, Select Mode, Smart Serial, SmartTel, Total Endurance, UNI/O, WiperLock ZENA trademarks Microchip Technology Incorporated U.S.A. other countries. SQTP service mark Microchip Technology Incorporated U.S.A. other trademarks mentioned herein property their respective companies. 2007, Microchip Technology Incorporated, Printed U.S.A., Rights Reserved. Printed recycled paper.
Microchip received ISO/TS-16949:2002 certification worldwide headquarters, design wafer fabrication facilities Chandler Tempe, Arizona, Gresham, Oregon Mountain View, California. Company's quality system processes procedures PIC® MCUs dsPIC® DSCs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory analog products. addition, Microchip's quality system design manufacture development systems 9001:2000 certified.
2007 Microchip Technology Inc.
DS01083A-page
WORLDWIDE SALES SERVICE
AMERICAS
Corporate Office 2355 West Chandler Blvd. Chandler, 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://support.microchip.com Address: www.microchip.com Atlanta Duluth, Tel: 678-957-9614 Fax: 678-957-1455 Boston Westborough, Tel: 774-760-0087 Fax: 774-760-0088 Chicago Itasca, Tel: 630-285-0071 Fax: 630-285-0075 Dallas Addison, Tel: 972-818-7423 Fax: 972-818-2924 Detroit Farmington Hills, Tel: 248-538-2250 Fax: 248-538-2260 Kokomo Kokomo, Tel: 765-864-8360 Fax: 765-864-8387 Angeles Mission Viejo, Tel: 949-462-9523 Fax: 949-462-9608 Santa Clara Santa Clara, Tel: 408-961-6444 Fax: 408-961-6445 Toronto Mississauga, Ontario, Canada Tel: 905-673-0699 Fax: 905-673-6509
ASIA/PACIFIC
Asia Pacific Office Suites 3707-14, 37th Floor Tower Gateway Habour City, Kowloon Hong Kong Tel: 852-2401-1200 Fax: 852-2401-3431 Australia Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China Beijing Tel: 86-10-8528-2100 Fax: 86-10-8528-2104 China Chengdu Tel: 86-28-8665-5511 Fax: 86-28-8665-7889 China Fuzhou Tel: 86-591-8750-3506 Fax: 86-591-8750-3521 China Hong Kong Tel: 852-2401-1200 Fax: 852-2401-3431 China Qingdao Tel: 86-532-8502-7355 Fax: 86-532-8502-7205 China Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 China Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 China Shenzhen Tel: 86-755-8203-2660 Fax: 86-755-8203-1760 China Shunde Tel: 86-757-2839-5507 Fax: 86-757-2839-5571 China Wuhan Tel: 86-27-5980-5300 Fax: 86-27-5980-5118 China Xian Tel: 86-29-8833-7250 Fax: 86-29-8833-7256
ASIA/PACIFIC
India Bangalore Tel: 91-80-4182-8400 Fax: 91-80-4182-8422 India Delhi Tel: 91-11-4160-8631 Fax: 91-11-4160-8632 India Pune Tel: 91-20-2566-1512 Fax: 91-20-2566-1513 Japan Yokohama Tel: 81-45-471- 6166 Fax: 81-45-471-6122 Korea Gumi Tel: 82-54-473-4301 Fax: 82-54-473-4302 Korea Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 82-2-558-5934 Malaysia Penang Tel: 60-4-646-8870 Fax: 60-4-646-5086 Philippines Manila Tel: 63-2-634-9065 Fax: 63-2-634-9069 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 Taiwan Hsin Tel: 886-3-572-9526 Fax: 886-3-572-6459 Taiwan Kaohsiung Tel: 886-7-536-4818 Fax: 886-7-536-4803 Taiwan Taipei Tel: 886-2-2500-6610 Fax: 886-2-2508-0102 Thailand Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350
EUROPE
Austria Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 Denmark Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 France Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Germany Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Italy Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Netherlands Drunen Tel: 31-416-690399 Fax: 31-416-690340 Spain Madrid Tel: 34-91-708-08-90 Fax: 34-91-708-08-91 Wokingham Tel: 44-118-921-5869 Fax: 44-118-921-5820
12/08/06
DS01083A-page
2007 Microchip Technology Inc.

Other recent searches


XZCWD47S - XZCWD47S   XZCWD47S Datasheet
UNR1221 - UNR1221   UNR1221 Datasheet
1222 - 1222   1222 Datasheet
1223 - 1223   1223 Datasheet
1224 - 1224   1224 Datasheet
SPMQ461-01 - SPMQ461-01   SPMQ461-01 Datasheet
SG222V2 - SG222V2   SG222V2 Datasheet
SAC-4P-M12MR - SAC-4P-M12MR   SAC-4P-M12MR Datasheet
MCF5282 - MCF5282   MCF5282 Datasheet
MCF5280 - MCF5280   MCF5280 Datasheet
MCF5281 - MCF5281   MCF5281 Datasheet
MCF5282UM - MCF5282UM   MCF5282UM Datasheet
EzI2C - EzI2C   EzI2C Datasheet
ACLM-4531 - ACLM-4531   ACLM-4531 Datasheet

 

Privacy Policy | Disclaimer
© 2013 Datasheets.org.uk