Example: bachelor of science

AN899, Brushless DC Motor Control Using …

2004 Microchip Technology 1AN899 INTRODUCTIONThe PIC18F2331/2431/4331/4431 family of micro-controllers have peripherals that are suitable for motorcontrol applications. These peripherals and some oftheir primary features are: Power Control PWM (PCPWM)- Up to 8 output channels- Up to 14-bit PWM resolution- Center-aligned or edge-aligned operation- Hardware shutdown by Fault pins, etc. Quadrature Encoder Interface (QEI)- QEA, QEB and Index interface- High and low resolution position measurement- Velocity Measurement mode Using Timer5- Interrupt on detection of direction change Input Capture (IC)- Pulse width measurement- Different modes to capture timer on edge- Capture on every input pin edge- Interrupt on every capture event High-Speed Analog-to-Digital Converter (ADC)- Two sample and hold circuits- Single/Multichannel sel

AN899 DS00899A-page 6 2004 Microchip Technology Inc. PWM DUTY CYCLE CALCULATION PWM duty cycle depends mainly upon three factors: motor rated voltage, DC bus voltage and the speed ref-

Tags:

  Using, Control, Motor, Brushless, Brushless dc motor control using

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of AN899, Brushless DC Motor Control Using …

1 2004 Microchip Technology 1AN899 INTRODUCTIONThe PIC18F2331/2431/4331/4431 family of micro-controllers have peripherals that are suitable for motorcontrol applications. These peripherals and some oftheir primary features are: Power Control PWM (PCPWM)- Up to 8 output channels- Up to 14-bit PWM resolution- Center-aligned or edge-aligned operation- Hardware shutdown by Fault pins, etc. Quadrature Encoder Interface (QEI)- QEA, QEB and Index interface- High and low resolution position measurement- Velocity Measurement mode Using Timer5- Interrupt on detection of direction change Input Capture (IC)- Pulse width measurement- Different modes to capture timer on edge- Capture on every input pin edge- Interrupt on every capture event High-Speed Analog-to-Digital Converter (ADC)

2 - Two sample and hold circuits- Single/Multichannel selection- Simultaneous and Sequential Conversion mode- 4-word FIFO with flexible interruptsIn this application note, we will see how to use thesefeatures to Control a Brushless DC (BLDC) Motor in openloop and in closed loop. Refer to the Microchip applica-tion note, AN885, Brushless DC (BLDC) MotorFundamentals (DS00885), for working principles ofBrushless DC motors and basics of Control . Also, toobtain more information on Motor Control peripherals andtheir functions, refer to the PIC18F2331/2431/4331/4431 Data Sheet (DS39616).

3 HARDWAREA PICDEM MC demo board was used to develop,test and debug the Motor Control code. The PICDEMMC has a single-phase diode bridge rectifier, convert-ing AC input to DC and a power capacitor bank thatkeeps a stable DC bus. A 3-phase IGBT-based inverterbridge is used to Control the output voltage from the DCbus. Figure 1 shows the overall block diagram of Control circuit and power circuits are optically iso-lated with respect to each other. An on-board fly-backpower supply generates +5VD, with respect to thedigital ground used for powering up the Control circuit,including the PICmicro device.

4 +5VA and +15VA aregenerated with respect to the power ground (negativeof DC bus). The feedback interface circuit is poweredby +5VA, while +15VA supplies power to the IGBT drivers located inside the Integrated Power Module(IPM).With the optical isolation between power and controlcircuits, programming and debugging tools can beplugged into the development board when main poweris connected to the board. The board communicateswith a host PC over a serial port configured with an on-chip Enhanced USART. The on-board user interfacehas two toggle switches, a potentiometer and fourLEDs for this application note, the switch SW1 is used totoggle between Motor Run and Stop and SW2 is usedto toggle between the direction of Motor rotation.

5 Eachpress of these buttons will change the state. A potenti-ometer is used for setting the speed reference. TheLEDs are used for indication of different states ofcontrol. Reference copies of the PICDEM MC schematics canbe found in Appendix B: Circuit Schematics .Author:Padmaraja YedamaleMicrochip Technology DC Motor Control Using PIC18 FXX31 MCUsAN899DS00899A-page 2 2004 Microchip Technology CONTROLAs seen in AN885, BLDC motors are electronicallycommutated based on the rotor position. Each commu-tation sequence has two of three phases connectedacross the power supply and the third phase is leftopen.

6 Using PWMs, the average voltage suppliedacross the windings can be controlled, thus controllingthe speed. In this section, we will see how the periph-erals on the PIC18 FXX31 can be used to Control aBLDC 1 shows a typical Control block diagram forcontrolling a BLDC PWM outputs from the PIC18 FXX31 Control thepower switches, Q0 to Q5. A matching driver circuitshould be used for supplying the required gate currentdrive for the power switches. As we have seen inAN885, the Hall Sensor signals may have 60-degree,or 120-degree, electrical phase difference to eachother.

7 A sequence table is entered in the programmemory based on the type of Hall Sensor sequence can be taken from the Motor data sequence may be different for clockwise andcounterclockwise following section explains how PCPWM, IC andADCs are used for open-loop 1:BLDC Motor Control BLOCK DIAGRAMACBPWM0Q0Q1Q2Q3Q4Q5 Hall AHall BDC+DC-FWD/REVREFD riverPWM1 PWM2 PWM3 PWM4 PWM5 PWM0 PWM1 PWM3 PWM5 PWM4 PWM2 NSSNIMAXIMOTORA mplifierComparator/FaultAPIC18 FXX31 RSHUNTAN0AN1IC1IC2IC3 Hall CIMOTORHall AHall BHall CRun/StopRxTx/FaultBTe m pAN8 PCGUI 2004 Microchip Technology 3AN899 Using THE INPUT CAPTURE MODULEHall Sensors A, B and C are connected to IC1, IC2 andIC3, respectively, on the Input Capture (IC) Input Capture module is used in Input Capture onState Change mode.

8 In this mode, the IC module inter-rupts every transition on any of the IC pins. Also,Timer5 is captured on every transition and cleared atthe beginning of the next clock cycle. The capturedTimer5 value is useful in determining the speed of themotor. Measuring the speed and controlling the motorin closed loop is discussed in detail in the section Closed-Loop Control Using Hall Sensors .Upon IC interrupt, in the IC Interrupt Service Routine,the status of all three input capture pins is read and thecombination is used to pick up the correct sequencefrom the 1 shows a typical switching sequence used to runthe Motor in the clockwise direction and Table 2 showsthe counterclockwise sequence.

9 These tables aretaken directly from the Motor data sheet(1).If the Motor you have uses a different sequence, itshould be entered in the firmware. Figure 2 shows therelationship between the Motor phase current and theHall Sensor inputs and the corresponding PWM signalsto be activated to follow the switching sequence, whichin turn, runs the Motor in the clockwise 1:SEQUENCE FOR ROTATING THE Motor IN CLOCKWISE DIRECTION WHEN VIEWED FROM NON-DRIVING ENDTABLE 2:SEQUENCE FOR ROTATING THE Motor IN COUNTERCLOCKWISE DIRECTION WHEN VIEWED FROM NON-DRIVING ENDNote 1: Motor Data SheetManufacturer: Bodine Electric CompanyType Number: 22B4 BEBLS eries: 3304 Web Site.

10 NumberHall Sensor InputActive PWMsPhase CurrentABCABC1001 PWM1(Q1) PWM4(Q4)DC+OffDC-2000 PWM1(Q1) PWM2(Q2)DC+DC-Off3100 PWM5(Q5) PWM2(Q2)OffDC-DC+4110 PWM5(Q5) PWM0(Q0)DC-OffDC+5111 PWM3(Q3) PWM0(Q0)DC-DC+Off6011 PWM3(Q3) PWM4(Q4)OffDC+DC-Sequence NumberHall Sensor InputActive PWMsPhase CurrentABCABC1011 PWM5(Q5) PWM2(Q2)OffDC-DC+2111 PWM1(Q1) PWM2(Q2)DC+DC-Off3110 PWM1(Q1) PWM4(Q4)DC+OffDC-4100 PWM3(Q3) PWM4(Q4)OffDC+DC-5000 PWM3(Q3) PWM0(Q0)DC-DC+Off6001 PWM5(Q5) PWM0(Q0)DC-OffDC+AN899DS00899A-page 4 2004 Microchip Technology 2 is drawn with respect to Table 1.


Related search queries