PAC5220 / PAC5223 Hall Sensor BLDC Firmware - Active-Semi

PAC5220 Hall Sensor BLDC
Power Application Controllers TM
Firmware / Graphical User Interface User Guide
www.active-semi.com
Copyright © 2015 Active-Semi, Inc.
CONTENTS
Contents ...............................................................................................................................................................2
Overview ..............................................................................................................................................................3
Application Installation .........................................................................................................................................4
Running the Windows Application ....................................................................................................................4
PAC522x BLDC Hall Sensor GUI Windows Application ......................................................................................5
Menu .................................................................................................................................................................6
COM Port Configuration ...................................................................................................................................6
Status Frame ....................................................................................................................................................7
Dead Time Control Frame ................................................................................................................................7
Open Loop Controls Frame ..............................................................................................................................8
Configuration Frame .........................................................................................................................................9
Debug Frame ................................................................................................................................................. 14
About Active-Semi............................................................................................................................................. 15
-
2
-
Rev 1.3 July 2015
OVERVIEW
The PAC522x BLDC Hall Sensor GUI is the Windows Application software employed to communicate with
any of the PAC5220 or PAC5223 hardware platforms running the Hall Sensor FW algorithm. Said FW
application has been tailored to control the motor in question while immediately reacting to hall effect sensor
changes by using a simple algorithm which relies on the fast acting interrupt service routines behind some of
the internal timer modules. For BEMF Sensor-less commutation, a different application and firmware
combination must be used.
The BLDC Hall Sensor firmware has been written so the motor operates in one of two modes. Open Loop
Mode will commutate the motor by reacting to hall sensor transitions. It is considered to be open loop as
speed is not regulated. Closed Loop Mode will commutate the motor throughout speed regulation. The
application enables the user to exercise the different modes.
The GUI is written in the Microsoft’s Visual Studio C# Integrated Development Environment. This Graphical
User Interface (GUI) can also be used as a tool during development for motor tuning as well as during
firmware debug.
Some of the applications main features are:
•
•
•
•
Parameter download via serial communications port.
System’s status can be polled on a continuous basis.
The ability to monitor important variables in real time.
Access to different firmware configuration aspects such as PI loop parameters, dead time control,
open loop and close loop parameters.
The following sections provide information about the Windows application software features for Active-Semi’s
BLDC motor drive turnkey solution.
-
3
-
Rev 1.3 July 2015
APPLICATION INSTALLATION
To install the PAC522x_BLDC_HallSensor_GUI Windows Application, simply double click the “setup.exe” file
inside the Windows Application folder. Follow application’s installer.
Running the Windows Application
To start the PAC522x_BLDC_HallSensor_GUI Windows Application simply go to the Windows START Button
and press the PAC522x_BLDC_HallSensor_GUI icon.
Alternatively, press the Start Button, go to All programs and press the PAC522x_BLDC_HallSensor_GUI icon
under the Active Semi folder.
-
4
-
Rev 1.3 July 2015
PAC522X BLDC HALL SENSOR GUI WINDOWS APPLICATION
The PAC522x BLDC Hall Sensor GUI Windows Application is the control panel behind the 3 phase motor
driver. It can be used to control motor enablement/disablement, open and closed loop control, speed control,
PI loop tuning, as well as gain insight as to some of the internal firmware features.
-
5
-
Rev 1.3 July 2015
Menu
File -> Quit: Exits the Windows Application.
View ->COM Port Configuration: Displays the COM Port configuration Window
Clear OC: Clears an Over Current event. After an Over Current event takes place, H Bridges will remain
disabled until this internal flag is cleared.
COM Port Configuration
The first time the EVK-PAC5220QS-BLDCM1 is connected to the computer, the GUI must be configured to
use the correct USB Port. To achieve this:
1. With the USB port connected to the computer, and the PAC5220 device powered up (LED D8 lights
up), the board is discoverable.
2. If the COM Port is not show under the Available COM Ports: field, press the Detect button.
3. Press the Write Button
This process must only be performed once. Once the application exits, these parameters are stored within the
User Parameters.
-
6
-
Rev 1.3 July 2015
Status Frame
The status frame offers system information in a real time fashion. The Status box will indicate when the motor
is operating in open or closed loop as well as when an over current event is triggered.
In order to sample system status information, the user can enable the polling mode by checking the Polling
checkbox. When the Polling checkbox is unchecked, the user can still poll the latest data packet by pressing
the R button.
Dead Time Control Frame
One of the advantages offered by the PAC family of devices driving external FETs, is the availability of a
Dead Time delay superimposing block, which allows for the FETs on any given Half H Bridge leg to go
through a disconnect/connect switching topology in a safely manner. This ensures shoot-through occurrence
to be eliminated on a per switching cycle.
Dragging the Leading Edge or Trailing Edge Dead Time sliders, will configure the dead time for the three half
H Bridge legs.
-
7
-
Rev 1.3 July 2015
Open Loop Controls Frame
When in Open Loop Mode (Close Loop Checkbox unchecked), this slider can be used to modify the 3 phase
inverter duty cycle. To avoid jerky motion during startup, it is recommended for system’s duty cycle to be set
to 0%.
When in Closed Loop Mode (Close Loop Checkbox checked), this slider is disabled.
When system changes from Closed Loop Mode to Open Loop Mode, the 3 phase inverter will be supplying
the duty cycle as specified by the speed regulation engine. The slider will not match this duty cycle value.
User can change slider value as desired and system will be updated accordingly.
-
8
-
Rev 1.3 July 2015
Configuration Frame
The Configuration frame contains important parameters such as main system parameters, as well as Closed
Loop Mode parameters. The PI loop parameters and writing method are also treated under this region.
Enable Motor: When checked, the motor is enabled. The motor will start in Open Loop Mode and enter
Closed Loop Mode if the Auto Close Loop box is checked. When the motor is moving at speed, if the
checkbox is unchecked, the motor decelerates to Shutdown Speed and then is disabled. If an Over Current
event has taken place before the motor is disabled, unchecking this checkbox will clear the Over Current
event.
Closed Loop: Defines whether the motor is operating in Open Loop Mode or Closed Loop Mode. When
checked, the motor operates in Closed Loop Mode and speed is regulated according to the Speed Command.
When unchecked, the motor operates in Open Loop Command and the Open Loop Duty Cycle slider defines
output PWM duty cycle.
PWM Frequency (KHz): H Bridge PWM frequency in Hz. The GUI transforms the frequency in KHz into clock
cycles by following the equation:
#
= -
∗ 1000
9
-
Rev 1.3 July 2015
Where:
PWM # Clock Cycles is the total number of clock cycles Timer A will count up to.
TIMERA FREQ is Timer A’s frequency; in this case initialized to 100 MHz in the firmware.
PWM FREQ is the value specified by the GUI
Speed Command (Hz): Specifies the Closed Loop Mode speed in Hz. Changing this field during normal run
time, will change the motor operating speed.
Speed PID Kp: Control loop Proportional gain term.
Speed PID Ki: Control loop Integral gain term
Speed PID Ks: Control loop Anti Windup gain term
Speed PID Min: Control loop output minimum value
Speed PID Max: Control loop output maximum value
-
10
-
Rev 1.3 July 2015
Over Current Protection Frame
The PAC522x devices have a series of built in protection schemes to allow the device to safeguard itself
against high current conditions such as those encountered during short between power outputs (PHASES U,
V and W) and power rails (VIN and GND). The HP and LP blocks grant two ways of disabling the H Bridge
power stage in the event output current exceeds a pre-programmed value. This frame offers access to preprogramming the Over Current Protection Set Points.
HP Over Current (A): Specifies the current value at which, if reached, an HP Over Current event is triggered.
On this firmware implementation, an Over Current event will disable the 3 phase H bridge in its entirety,
disable the PWM generation, and clear system flags. An Over Current status bit will be asserted. In order to
clear an Over Current event, the Clear Over Current menu item must be actuated.
LP Over Current (A): Specifies the current value at which, if reached, an LP Over Current event is triggered.
On this firmware implementation, an Over Current event will disable the 3 phase H bridge in its entirety,
disable the PWM generation, and clear system flags. An Over Current status bit will be asserted. In order to
clear an Over Current event, the Clear Over Current menu item must be actuated.
SENSE R (mOhms): Specifies the SENSE resistance in milli Ohms
Diff Amp Gain (V/V): Specifies the Differential Amplifier Gain utilized to compute the LPDAC Over Current
Set Point. This parameter must match the FW configuration. Default is 4X, but user may modify this
parameter as required by the application.
Over current is defined by the SENSE resistor. On the HYDRA-X BLDC Head (EP-BLDCM1-1), the default
value for the SENSE resistor is 3 mOhms.
-
11
-
Rev 1.3 July 2015
HP Over Current Counts must be a value between 0 and 255 and it is given by the equation:
!" ∗ =
#$#
∗ 255
1000
2.5(
Where:
HP Over Current Counts: is the number of counts for the internal 8 Bit DAC which will be compared against
the voltage reading coming from the analog input AIO1.
Amps: is the decimal value provided by the GUI (HP Over Current (A):), and is directly proportional to the
motor current at which an Over Current event is initiated.
RSENSE: is the SENSE resistance in mOhms (SENSE R (mOhms):).
NOTES:
1. The GUI will only update the HPDAC register when the HP Over Current (A): numeric up/down box
is updated. Changing the SENSE R (mOhms): parameter will not update the HPDAC register.
2. If the combination of SENSE R (mOhms): and HP Over Current (A): parameters yield a number
larger than 255, the result will not be transmitted and a warning will be shown. User must updated
parameters before a successful write to the HPDAC takes place.
-
12
-
Rev 1.3 July 2015
LP Over Current Counts must be a value between 0 and 1023 and it is given by the equation:
!" ∗ ) =
#$#
∗ *+, ∗ 1023
1000
2.5(
LP Over Current Counts: is the number of counts for the internal 10 Bit DAC which will be compared against
the voltage reading coming from the analog differential amplifier (analog inputs AIO10).
Amps: is the decimal value provided by the GUI (LP Over Current (A):), and is directly proportional to the
motor current at which an Over Current event is initiated.
RSENSE: is the SENSE resistance in mOhms (SENSE R (mOhms):).
Gain: is the differential amplifier gain (Diff Amp Gain (V/V):)
NOTES:
1. The GUI will only update the LPDAC register when the LP Over Current (A): numeric up/down box is
updated. Changing the SENSE R (mOhms): parameter will not update the LPDAC register.
2. If the combination of SENSE R (mOhms): and LP Over Current (A): parameters yield a number
larger than 1023, the result will not be transmitted and a warning will be shown. User must update
parameters before a successful write to the LPDAC takes place.
-
13
-
Rev 1.3 July 2015
Debug Frame
The Debug frame offers some valuable information which can aid the designer during real time motor
operation. Users modifying the firmware can take advantage of this feature to see variable content without
needing to stop code execution.
The firmware contains a series of variables specifically tailored to aid during debugging. The variables are
called debug_1, debug_2, debug_3 and debug_4. The debug frame offers a portal into the content within
these variables. These variables are polled on a continuous basis whenever the Polling check box is
checked, or can be sampled once when the R button is pressed.
HEX: When checked, specifies data will be presented in hexadecimal data format.
Fix16_t: When checked, specifies data will be presented in fixed 16 data format.
Debug 0,1,2,3 (Text Box): Text Boxes specifying the name for the respective debug function. User can
change this content according to preference.
Debug 0,1,2,3 (Label): debug value read from the system.
Live Debug (Combo Box): offers a selection of variables which can be sampled on a real time basis.
Live Debug (Text Box): shows the read value, as selected from the Combo Box xounterpart.
-
14
-
Rev 1.3 July 2015
ABOUT ACTIVE-SEMI
Founded in 2004 in Silicon Valley and headquartered in Allen, Texas, Active-Semi is a rapidly emerging
leader in the multi-billion dollar power management IC and intelligent digital motor drive IC markets. The
company's portfolio of analog and mixed signal SoCs (systems-on-chips) are scalable core platforms
used in charging, powering and embedded digital control systems for end applications such as industrial,
commercial and consumer equipment. The company offers power application microcontrollers, DC/DC,
AC/DC, PMU and LED drivers that significantly reduce solution size and cost while improving systemlevel reliability. Active-Semi's turnkey solutions deliver energy-saving power conversion architectures
that minimize energy usage and compress system development cycle-time by greater than 50 percent.
Active-Semi ships 50 million power ICs per quarter and reached the "one billion units shipped" milestone
in May 2012. The multi-national company focuses on commercializing industry leading power
management IC solution platforms and has developed broad intellectual property with over 150 patents
granted and pending. For more information visit: http://active-semi.com/
LEGAL INFORMATION & DISCLAIMER
Copyright © 2012-2015 Active-Semi, Inc. All rights reserved. All information provided in this document is subject to legal disclaimers.
Active-Semi reserves the right to modify its products, circuitry or product specifications without notice. Active-Semi products are not intended, designed, warranted
or authorized for use as critical components in life-support, life-critical or safety-critical devices, systems, or equipment, nor in applications where failure or
malfunction of any Active-Semi product can reasonably be expected to result in personal injury, death or severe property or environmental damage. Active-Semi
accepts no liability for inclusion and/or use of its products in such equipment or applications. Active-Semi does not assume any liability arising out of the use of any
product, circuit, or any information described in this document. No license, express, implied or otherwise, is granted under any patents, copyrights or other
intellectual property rights of Active-Semi or others. Active-Semi assumes no liability for any infringement of the intellectual property rights or other rights of third
parties which would result from the use of information contained herein. Customers should evaluate each product to make sure that it is suitable for their
applications. Customers are responsible for the design, testing, and operation of their applications and products using Active-Semi products. Customers should
provide appropriate design and operating safeguards to minimize the risks associated with their applications and products. All products are sold subject to ActiveSemi's terms and conditions of sale supplied at the time of order acknowledgment. Exportation of any Active-Semi product may be subject to export control laws.
Active-Semi™, Active-Semi logo, Solutions for Sustainability™, Power Application Controller™, Micro Application Controller™, Multi-Mode Power Manager™,
Configurable Analog Front End™, and Application Specific Power Drivers™ are trademarks of Active-Semi, I. ARM® is a registered trademark and Cortex™ is a
trademark of ARM Limited. All referenced brands and trademarks are the property of their respective owners.
-
15
-
Rev 1.3 July 2015