ReadMe File for AN1160 Software:
AN1160 dsPIC33FJ16MC102 dsPICDEM MCLV
This file contains the following sections:
Software Description
Project Contents
Suggested Development Resources
Running the Software
Reconfiguring the project for a different PIC24H, PIC24F, dsPIC30F and dsPIC33F device
Revision History
APPLICATION NOTE SOFTWARE DESCRIPTION
The Microchip application not e, AN1160, describes a sensorless Brushless Direct Current (BLDC) motor control
algorithm that is im plemented using a dsPIC
®
Digital Signal Controller (DSC). The algorithm w orks by utilizing a
majority function for digitally filtering the Back-Electromotive F orce (BEMF). Each phase of the motor is filtered to
determine when to commutate the motor drive voltages. T his control technique excludes the need for discrete, low-
pass filtering hardw are and off-chip co mparators. It should be poi nted out that all of t he discussions here, and the
application software, assume a that a 3-Phase motor is being used. T he motor control algorithm described here has
seven main parts:
Sampling trapezoidal BEMF signals using the dsPIC Analog-to-Digital Converter (ADC)
Reconstructing the Motor Virtual Neutral Point
Comparing the trapezoidal BEMF signals to the reconstructed motor virt ual neutral point to detect
the zero crossing points
Filtering the signals coming from the comparisons us ing a majority function filter
Calculate the rotor speed, the commutation delay and the phase advance angle
Commutate the motor driving voltages
Control loop
Function: main()
Overview: Main function used to initia lize the ADC, PW M, UART and T imer2 modules. It also initializes the global
variables used in the interrupts and PID controller. The main task executed here is to handle starting and stopping the
motor, as well as setting the ramp-up initial parameters to spin the motor. It also handles the data exchange betw een
the Host PC and the target device.
Note: None
Function: _ADC1Interrupt ()
Overview: ADC interrupt used to measure the BEMF signals, reconstruct the Motor Virtual Neutral Point and compare
the BEMF signals against the neutral point re ference to detect the zero-crossing ev ent. It also fills the DMCI buffers
with the data to plot on the DMCI data view window
Note: None
评论0