Design Center GUI

Introduction

Energy Measurement Design Center

Fig. 1 Energy Measurement Design Center

The Energy Measurement Design Center is a rapid development tool that can simplify development and accelerate designs in a wide range of power monitoring and energy measurement applications, including smart grid and building automation. Using the Design Center you can configure, calibrate, and view results without writing a single line of code.

Set up a design in less than five minutes:

  • Drag and drop an MCU, voltage sensors, and current sensors into the GUI workspace
  • Configure each sensor and the MCU according to your system configuration
  • The GUI will check for errors before generating the source code
  • Import the code into an IDE and program the MCU
  • Easily calibrate the MCU using the GUI and view the results

Key Features

  • Intuitive GUI for connecting, configuring, and calibrating controller and sensors
  • Support for shunt and current transformer (CT) current sensors
  • Support for 1-phase, 2-phase, and 3-phase system configurations plus neutral monitoring
  • Support for voltage, current, power, energy, power factor, and frequency measurement
  • Estimated CPU bandwidth (library only) for supported system configurations
  • Automated generation of complete source code projects for CCS™ IDE
  • Real-time target communication through a USB HID communication bridge featuring:
    • Perform single-point calibration for gain and phase
    • View or log real-time results

Hardware and Software Requirements

The Energy Measurement Design Center can be used on a PC with the following minimum requirements:

  • Windows 7+ operating system with Java version 1.7+
  • Apple OS X 10.10.1+ with Java version 1.7+
  • Linux OS with Java version 1.7+

The source code projects generated by the GUI supports the following IDEs:

  • Texas Instruments Code Composer Studio (CCS) version 7.1 or later

Additional Linux Requirements

If you are not running the application using a root account, you may not have permissions to the HID device mounted by the MSP microcontroller.

To enable access perform the one-time setup step:

  • Create the file /etc/udev/rules.d/ti_hid.rules.
  • Add the lines below to the file and save the file
## Allow open access to any usb device with the default Texas Instruments MSP
## Vendor Id of 0x2047
ATTRS{idVendor}=="2047", MODE="0666"

Licensing

The Energy Measurement Design Center is released under the BSD 3-clause license. See the license manifest in the installation directory for details.

Quick Start Guide

This section is intended to provide a very basic and quick overview of how to use the Energy Measurement Design Center (EMDC) to configure a typical energy measurement design (based on the three-phase EVM430-F6779), generate the source code, and communicate with the target. For additional detailed information about the features of the Energy Measurement Design Center, please refer to the Energy Measurement Design Center user’s guide.

Programming MSP-EXP430F5529LP (HID Bridge)

This section describes how to program the MSP430F5529 with the HID bridge code. The HID bridge is necessary for the target to communicate with EMDC.

Verify that all jumpers on the MSP-EXP430F5529LP are populated.

Plug the MSP-EXP430F5529LP into the PC. If the LaunchPad has never been connected to the host PC, then a message will pop up as shown below.

Device Ready to Use

Fig. 2 Device Ready to Use

Open UniFlash.

UniFlash

Fig. 3 UniFlash

Enter “MSP-EXP430F5529LP” in the search box under “New Configuration”.

MSP-EXP430F5529LP Selection

Fig. 4 MSP-EXP430F5529LP Selection

Select USB connection and click the “Start” button.

USB Selection

Fig. 5 USB Selection

Click “Browse” to select the HID Bridge image. If the default installation location was used, the image can be found in the following folder: C::raw-latex:`\ti`:raw-latex:`\msp`:raw-latex:`\EnergyMeasurementDesignCenter`_%VERSION%:raw-latex:EnergyMeasurementDesignCenter:raw-latex:`\hidbridge`

Select HID Bridge Image

Fig. 6 Select HID Bridge Image

Open the TI_MSP_HIDBRIDGE__1_00_04_00__MSP-EXP430F5529LP.txt image. Then, under “Available Actions”, click the “Load Image” button to program the LaunchPad.

Download HID Bridge Image

Fig. 7 Download HID Bridge Image

If “Update Firmware” message appears, click “Update” and proceed.

Firmware Update

Fig. 8 Firmware Update

In the UniFlash “Console” window, “SUCCESS” should be shown when the program was loaded successfully.

Successful Image Load

Fig. 9 Successful Image Load

The green LED2 on the LaunchPad should now be blicking slowly.

Close UniFlash and disconnect/re-connect the MSP-EXP430F5529LP from the PC.

Hardware Connection

This section describes how to properly connect the EVM to the HID Bridge.

Communication

The MSP-ISO Isolation board is an easy-to-use plug-in module that offers galvanic isolation between the HID bridge and the High Voltage EVM. The MSP-ISO must be wired manually and not placed on the MSP-EXP430F5529LP isolation jumper block. The following pin map from the MSP-ISO Quick Start Guide can be used as a reference when connecting the jumper wires.

MSP-ISO Pin Map

Fig. 10 MSP-ISO Pin Map

The image below shows how to connect the MSP-EXP430F5529LP (HID bridge) to the MSP-ISO.

HID Bridge to MSP-ISO Connections

Fig. 11 HID Bridge to MSP-ISO Connections

The image below shows how to connect the pins of J101 on the MSP-ISO.

MSP-ISO J101 Connector

Fig. 12 MSP-ISO J101 Connector

The image below shows how to connect the MSP-ISO to the supported EVMs.

MSP-ISO to EVM Connections

Fig. 13 MSP-ISO to EVM Connections

High Voltage

Please refer to the EVM’s User’s Guide on how to properly connect the EVM to high voltage source. Please note that the RS232 connector cannot be used for communication with Energy Measurement Design Center.

Start the Design Center

Double-click on the desktop shortcut called “EnergyMeasurementDesignCenter” to start the Design Center GUI. The following sections will describe how to open an existing project or create a new project for the EVM430-F6779. The process to create a new project also applies to the other supported EVMs.

Energy Measurement Design Center Shortcut

Fig. 14 Energy Measurement Design Center Shortcut

The GUI will open a blank design canvas.

Blank Design Center Canvas

Fig. 15 Blank Design Center Canvas

Open an existing project

Click “File” > “Project Open” in the Design Center menu bar to open a new project. Select of the projects shown below. Then skip to Generate the Source Code section to generate the code for the default configuration.

Create New Project Window

Fig. 16 Create New Project Window

NOTE If the EVM has the default voltage and current sensors, the user can skip to Configure the MSP430 Controller. If the sensors have been changed, then skip to Configure voltage sensors or Configure current sensors and update the sensor / system parameters.

Create a new project

Click “File” > “Project New” in the Design Center menu bar to create a new project called “EVM430-F6779” and click “OK”.

Create New Project Window

Fig. 17 Create New Project Window

Place the MSP430 controller

Start by clicking the MSP430 controller icon. Select “MSP430F6779” in the Device Selection window and click “OK”. Place the controller by clicking on the design canvas.

Select and Place MSP430 Controller on Design Canvas

Fig. 18 Select and Place MSP430 Controller on Design Canvas

Place the voltage sensors

Start by clicking the voltage sensor icon. Place the voltage sensor by clicking on the design canvas. Repeat this process twice to place a total of three voltage sensors.

Select and Place Voltage Sensors on Design Canvas

Fig. 19 Select and Place Voltage Sensors on Design Canvas

Place the current sensors

Since the EMV430-F6779 features CTs, start by clicking the CT icon. Place the current sensor by clicking on the design canvas below the voltage sensors. Repeat this process twice to place a total of three CTs.

Select and Place Current Sensors on Design Canvas

Fig. 20 Select and Place Current Sensors on Design Canvas

Configure the voltage sensors

Start by double-clicking a voltage sensor to display its properties window. Enter the parameters based on the user’s guide and schematic for the EVM430-F6779 and click “OK”. Repeat this process for the other voltage sensors.

Configure Voltage Sensor Parameters

Fig. 21 Configure Voltage Sensor Parameters

Configure the current sensors

Start by double-clicking a CT to display its properties window. Enter the parameters based on the user’s guide and schematic for the EVM430-F6779 and click “OK”. Repeat this process for the other CTs.

Configure Current Sensor Parameters

Fig. 22 Configure Current Sensor Parameters

Configure the MSP430 controller

Start by double-clicking the MSP430 controller to display its properties window.

Library Configuration

Hardware Connections

Note that the initial connections for the CTs do not match the EVM430-F6779 connections and were made automatically according to the placement order of the voltage and current sensors.

Initial Connections between Controller and Sensors

Fig. 23 Initial Connections between Controller and Sensors

Disconnect each current sensor by clicking each CT cell under the “Sensor” column and selecting “DISCONNECT” from the drop-down menu.

Disconnect CTs

Fig. 24 Disconnect CTs

Reconnect the current sensors by clicking the cells in the “Sensor” and “Polarity” columns to correctly match the EVM430-F6779 connections. Note that the green “OK” button indicates that all sensor pins have been connected to controller pins.

Correct Connections between Controller and Sensors

Fig. 25 Correct Connections between Controller and Sensors

Basic Parameters

Click the “Basic Parameters” tab and change the meter name to “EVM430-F6779”. Using the drop-down menus, increase the sampling frequency to 4096 Hz, increase the OSR to 256, and increase the SMCLK frequency to 25,165,824 Hz. Keep the default AC mains frequency and number of voltage and current sensors.

Change Default Basic Parameters

Fig. 26 Change Default Basic Parameters

Phases

Click the “Phases” tab and choose three different phase names. Assign a pair of ADC voltage and current channels to each phase. Note that these phase names are used during calibration and communication. Check each box under “Total” to aggregate all phases.

Configure the Phases

Fig. 27 Configure the Phases

Results

Click the “Results” tab and click the “Select All” button to choose all results. Click the “Save” button to validate any dependencies across selected results before saving the configuration. Note that the estimated CPU bandwidth is for the software library only. The estimation depends on these results and the parameters selected in the “Basic Parameters” tab.

Select Results and View Estimated CPU Bandwidth

Fig. 28 Select Results and View Estimated CPU Bandwidth

Pulses

Click the “Pulses” tab. Note that the phase names are automatically populated with those selected in the “Phases” tab. The EVM430-F6779 features several LEDs and headers that are used to output active and reactive energy pulses used for measuring accuracy during calibration and indicating power consumption for individual phases and total (aggregate). Start by checking each box under “Enable”. Select the Active/Reactive Ports/Pins for each phase according to the user’s guide and schematic for the EVM430-F6779.

Select GPIOs for Active and Reactive Energy Pulses

Fig. 29 Select GPIOs for Active and Reactive Energy Pulses

ADC Channels

Click the “ADC Channels” tab to view the automatic gain selections for each ADC channel. The selections depend on the device selected and the sensor output voltages.

View Pre-Selected ADC Gains

Fig. 30 View Pre-Selected ADC Gains

Advanced Parameters

Click the “Advanced Parameters” tab and keep the default values.

Keep Default Advanced Parameters

Fig. 31 Keep Default Advanced Parameters

Check for errors

Click the “Error Status” button to check for configuration errors.

Error Status Button

Fig. 32 Error Status Button

The Configuration Error Status window will pop up. Note that each section matches a tab under the Library Configuration tab in the MSP430 controller properties window. Errors will be shown as a red X instead of the green checkmark. If there are no errors, click “OK” to continue.

Error Status Window

Fig. 33 Error Status Window

Generate the source code

Start by selecting where the source code project will be generated by clicking the “Browse” button or keep the default location. Copy this file path to use later when importing the source code project into the IDE.

Browse Button

Fig. 34 Browse Button

Click the “Generate Code” button to create the source code project.

Generate Code Button

Fig. 35 Generate Code Button

An information window will pop up confirming that code has been generated successfully. Click “OK” to continue.

Code Generation Confirmation Window

Fig. 36 Code Generation Confirmation Window

Update existing project

For existing CCS projects in the CCS workspace, follow these instructions:

  • Copy the CCS project’s path
  • Select “Update existing project configuration files” under “Select Configuration”
  • Click on Browse button
  • Paste CCS project’s path into the Folder name text box
  • Hit Enter
  • Click the “Generate Code” button

An information window will pop up confirming that code has been generated successfully. Click “OK” to continue.

This will update the configuration in the following files:

  • EM_Config/EM_config.c
  • EM_Config/EM_config.h
  • EM_Config/emReactivePowerIIRCoeff.h
  • hal/hal_adc.c
  • hal/hal_adc.h
  • DesignCenter/guiApp/hmiDC/hmi.c
  • DesignCenter/guiApp/hmiDC/hmi.h

Load and run the generated firmware using the IDE

Open Code Composer Studio IDE, right click on the Project Explorer window and select Import->CCS Project.

Code Composer Studio Workspace

Fig. 37 Code Composer Studio Workspace

Click on Browse and select the CCS folder inside of the EMDC project as shown below.

Code Composer Studio Importing Project

Fig. 38 Code Composer Studio Importing Project

Click on Finish to complete the project import.

Code Composer Studio Imported Project

Fig. 39 Code Composer Studio Imported Project

After importing the project, click the debugger icon to build and download the code to the target. Then start the code by clicking the run button. Then click stop debugging and power cycle the target.

Start communicating with Controller

In the controller properties window, click on the Connected button as shown below.

EMDC Connection Window

Fig. 40 EMDC Connection Window

When the connection handshake is complete, the EMDC status bar will display the device name and firmware ID.

NOTE Communication with the controller is required for calibration and viewing results.

Status Bar with Device Name and FW ID

Fig. 41 Status Bar with Device Name and FW ID

Calibration

Configure the high voltage setup at desired VRMS, IRMS, phase angle and frequency.

Open the controller properties window and click on the “Calibration” tab.

Select Phase A in the “Phase Selection” panel and click on Gain calibration checkbox as shown below. Note that the phase angle will default to 0 degrees when clicking this checkbox.

Starting Calibration

Fig. 42 Starting Calibration

Gain Calibration

Enter the test setup configuration parameters in Step 2 and click the “Start” button to initiate calibration for Phase A.

Phase A Gain Calibration

Fig. 43 Phase A Gain Calibration

If the high voltage test equipment supports energy measurement error, the error can be entered in the “Active Energy Error” field. Otherwise, EMDC can automatically calculate the energy measurement error based on the expected energy result. This is calculated using the VRMS, IRMS, and phase angle parameters entered in Step 2.

Click on Apply to calibrate the voltage, current and active power scaling factors. When the calibration values have been sent to the target a Gain Calibration Window message will appear.

Phase A Gain Calibration Complete

Fig. 44 Phase A Gain Calibration Complete

Phase Calibration

Select the “Phase” checkbox for the Calibration Type. Note that the phase angle will default to 60 degrees when clicking this checkbox.

Phase A Phase Calibration Complete

Fig. 45 Phase A Phase Calibration Complete

Enter the test equipment error. (optional)

Click on Apply to calibrate the target’s current ADC channel preload values. When the calibration values have been sent to the target a Phase Calibration Window message will appear.

Phase A Phase Calibration Complete

Fig. 46 Phase A Phase Calibration Complete

Saving Calibration Values to Flash Memory

Once calibration is complete click on the “Stop” button. A message will appear as shown below to store the calibration values in Flash. If “Yes” is selected, the values will be saved to INFO A and will remain on the target after a power reset. Otherwise, the previously used calibration values will remain the same.

Save Calibration Values

Fig. 47 Save Calibration Values

Repeat the previous calibration process for the remaining phases.

View Results

Click the “Results” tab on the Controller window to view the calibrated results.

3 Phase Results

Fig. 48 3 Phase Results

User’s Guide

Design Center GUI Panels

The Design Center GUI consists of three main panels:

  • Menu bar
  • Object selection tabs
  • Design canvas
Design Center GUI

Fig. 49 Design Center GUI

Object Selection Tabs

The object selection tabs display objects that can be selected for placement in the design canvas and include: - Sensors and controller tab - Miscellaneous tab

Sensors and Controller Selection Tab

The sensors and controller selection tab includes two object types:

  • Sensor Objects
    • Voltage Sensor
    • Current Sensor
      • CT
      • Shunt
  • MSP430 Controller Object
Sensors and Controller Selection Tab

Fig. 51 Sensors and Controller Selection Tab

Miscellaneous Selection Tab

The Miscellaneous selection tab includes only the Comment object type.

Miscellaneous Selection Tab

Fig. 52 Miscellaneous Selection Tab

Comments can be added by clicking the “/*” icon. Place the comment object by clicking on the design canvas. Double-click the comment object to open the Comment properties window. Enter text and click “OK” to continue.

Add a Comment to Design Canvas (optional)

Fig. 53 Add a Comment to Design Canvas (optional)

Design Canvas

To place an object in the design canvas:

  • Select an object from the object tab with the left mouse button
  • Position the cursor in the design canvas area and place the object by clicking the left mouse button

Objects may be selected and moved anywhere on the canvas. Additional object operations can be displayed by right-clicking the mouse button on the object. To display the properties and configure the object, double-click using the left mouse button.

Design Canvas

Fig. 54 Design Canvas

Object Properties

Controller Properties

This section discusses how to configure the controller. Double-clicking on the controller object will open its properties window.

Controller Object

Fig. 67 Controller Object

The properties window allows the user to:

  • Select a supported device
  • Configure basic and advanced library parameters
  • Check for configuration errors
  • Generate source code
  • Enable target communication
  • Perform calibration
  • View results
Controller Properties Window

Fig. 68 Controller Properties Window

Select a supported device

If the MSP430 controller has been placed on the design canvas, you have already selected a device from the “Device Selection” window. To choose a different device, select one from the “Device” drop-down menu. Click the “Show Device Documentation” link to open the selected device’s Product page on TI.com.

Select a Device

Fig. 69 Select a Device

Configure Basic and Advanced Library parameters

Hardware Connections

There are three ways to map the ADC channel pins of the controller to the sensor pins:

  • Automatically map all the connections using the “Auto-Assign” button
  • Manually map the connections using the “Connections” table
  • Graphically connect the sensor and controller pins on the objects in the design canvas

After selecting and placing the controller in the design canvas, each sensor is connected automatically according to the placement order. In this case, the connections most likely will not match the connections on the EVM or your design. Easily disconnect all the sensors by clicking the “Clear” button.

Clear Button

Fig. 70 Clear Button

Automatic Connections

If the “Auto-Assign” button is clicked, the Design Center will automatically (randomly) connect all of the unconnected sensor pins to the controller pins. This is a good option if there are no pre-existing restrictions on the connections. For example, if the connections are already defined by the EVM or your design, map the connections manually or graphically.

Note that any existing connections will not be changed. In this case, it is possible to make one of the two polarity connections per sensor manually and then auto-assign the rest.

Auto-Assign Button

Fig. 71 Auto-Assign Button

The red “Errors” button indicates that the assignments did not complete successfully.

Errors Button

Fig. 72 Errors Button

Clicking on the button will open the connections “Error” window listing the remaining errors.

Connection Error Window

Fig. 73 Connection Error Window

If the assignments complete successfully, the red “Errors” button will turn into a green “OK” button indicating no assignment errors. Note that this also applies to manual and graphical connections.

OK Button

Fig. 74 OK Button

Manual Connections

The “Connections” table enables detailed manual control for mapping the sensor pins to the controller pins. There are three columns:

  • Pin Name column
  • Sensor column
  • Polarity

Pin Name column

This column lists the selected controller’s Sigma Delta ADC channels. Note that a channel is a pair of positive and negative pins. The pin names match the selected controller’s datasheet. Note that the data in this column is read-only.

Pin Name Column

Fig. 75 Pin Name Column

Sensor column

This column lists any placed sensors that have been connected.

Sensor Column

Fig. 76 Sensor Column

Start by clicking a cell in the Sensor column and selecting a voltage or current sensor from the drop-down menu. Before moving to another cell in the Sensor column, click the neighboring cell in the Polarity column and select the polarity. Select only one sensor per channel.

Drop-down Menu in Sensor Column

Fig. 77 Drop-down Menu in Sensor Column

Polarity column

This column lists the polarities of the connected sensors.

Polarity Column

Fig. 78 Polarity Column

After selecting a sensor in the Sensor column, click the neighboring cell in the Polarity column and select “V NEG” or “V POS” from the drop-down menu. Note that the sensor polarities should match the ADC channel polarities.

Drop-down Menu in Polarity Column

Fig. 79 Drop-down Menu in Polarity Column

Graphical Connections

Connections between the controller and sensors can be made by clicking a sensor pin and dragging the connection to the desired controller pin.

NOTE Be sure to display the connection fly lines first using the “Options” > “Display” menu.

Graphical Connections on Design Canvas

Fig. 80 Graphical Connections on Design Canvas

The graphical connections are still shown in the “Connections” table.

Graphical Connections in Connections Table

Fig. 81 Graphical Connections in Connections Table

Basic Parameters

Configure the basic library parameters in the Basic Parameters tab:

  • Meter Name
  • Sampling Frequency
  • Rate
  • SMCLK Frequency
  • AC Mains Frequency
  • Number of Voltage Sensors
  • Number of Current Sensors
Graphical Connections in Connections Table

Fig. 82 Graphical Connections in Connections Table

Meter Name

If desired, change the default meter name by entering a new name (such as “EVM430-F6779”) in the text box.

Updated Meter Name

Fig. 83 Updated Meter Name

Sampling Frequency

Select a supported sampling frequency from the drop-down menu. Note that the sampling frequency is equal to the ADC modulation frequency (not shown but configured automatically) divided by the Oversampling Rate (OSR).

Select a Sampling Frequency

Fig. 84 Select a Sampling Frequency

The supported sampling frequencies depend on the selected controller. For example, MSP430F67xx controllers feature a variable modulation frequency that supports multiple OSRs for each sampling frequency. MSP430i20xx controllers feature a fixed modulation frequency that supports a single OSR for each sampling frequency. When this parameter is updated, the OSR will also be updated.

NOTE Increasing the sampling frequency reduces the available CPU bandwidth.

Oversampling Rate

Select a supported OSR from the drop-down menu. Note that the OSR is equal to the ADC modulation frequency (not shown but configured automatically) divided by the sampling frequency.

Select an OSR

Fig. 85 Select an OSR

The supported OSRs depend on the selected controller. For example, MSP430F67xx controllers feature a variable modulation frequency that supports multiple OSRs for each sampling frequency. MSP430i20xx controllers feature a fixed modulation frequency that supports a single OSR for each sampling frequency.

NOTE Increasing the OSR increases the ADC sample resolution but may decrease the sampling frequency for some devices.

SMCLK Frequency

Select a supported SMCLK (Sub-Main Clock) frequency using the drop-down menu. OSR is equal to the ADC modulation frequency (not shown but configured automatically) divided by the sampling frequency.

Select an SMCLK Frequency

Fig. 86 Select an SMCLK Frequency

The supported SMCLK frequencies depend on the selected controller. For example, MSP430F67xx controllers feature a variable SMCLK frequency whereas the MSP430i20xx controllers feature a fixed SMCLK frequency.

NOTE Both SMCLK and MCLK are configured according to the selected frequency. MCLK can be manually changed in the code but must be equal or greater than the SMCLK frequency.

AC Mains Frequency

Choose a nominal AC mains frequency between 40 and 70 Hertz (Hz) by entering a value in the text box or using the up and down arrows. Note that this frequency influences some default parameters in the Advanced Parameters tab.

Select an AC Mains Frequency

Fig. 87 Select an AC Mains Frequency

Number of Voltage Sensors

The default selection equals the total number of connected voltage sensors. If desired, select a sub-set. This feature allows users to easily debug individual phases in a poly-phase system configuration.

Select the Number of Voltage Sensors

Fig. 88 Select the Number of Voltage Sensors

Number of Current Sensors

The default selection equals the total number of connected current sensors. If desired, select a sub-set. This feature allows users to easily debug individual phases in a poly-phase system configuration.

Select the Number of Current Sensors

Fig. 89 Select the Number of Current Sensors

Phases

Configure the phase parameters in the Phases tab:

  • Phase Name column
  • ADC Voltage Channel column
  • ADC Current Channel column
  • Total column

Phase Name column

Select a different phase name from the drop-down menu for each pair of voltage and current ADC channels. These names allow the phases to be easily distinguished when calibrating, communicating, and viewing results. If the system configuration requires neutral monitoring, choose “NEUTRAL” as one of the phase names from the drop-down menu. Note that the number of available phase names depends on the number of voltage and current sensors selected in the “Basic Parameters” tab.

Select Phase Names

Fig. 90 Select Phase Names

ADC Voltage Channel column

Select a voltage channel from the drop-down menu. If the system configuration requires a single voltage channel with multiple current channels, select the same voltage channel (voltage sensor) for the current channels. Note that the available voltage channels depend on the connected sensors in the “Hardware Connections” tab.

Select ADC Voltage Channels

Fig. 91 Select ADC Voltage Channels

ADC Current Channel column

Select a current channel from the drop-down menu. Note that the available current channels depend on the connected sensors in the “Hardware Connections” tab.

Select ADC Current Channels

Fig. 92 Select ADC Current Channels

Total column

Add each phase to the total (aggregate) by selecting its checkbox under the “Total” column.

Select Totals

Fig. 93 Select Totals

Results

Select the supported results according to your system requirements and view the estimated CPU bandwidth in the “Results” tab.

  • VRMS
  • IRMS
  • V Peak
  • I Peak
  • Power Factor
  • Frequency
  • Active Power
  • Reactive Power
  • Apparent Power
  • Active Energy
  • Reactive Energy
  • Apparent Energy
Results Configuration Section

Fig. 94 Results Configuration Section

Easily select or deselect all the results by clicking the “Select All” or “Deselect All” buttons in the “Result Configuration” section.

Select All and Deselect All Results Buttons

Fig. 95 Select All and Deselect All Results Buttons

Manually select or deselect results using the checkboxes. Hover the cursor over a checkbox to quickly see its result.

NOTE The user must click the “Save” button to both validate dependencies (some results depend on others) and save the selections.

Save Result Configuration Button

Fig. 96 Save Result Configuration Button

Clicking the “Save” button when the dependencies are not met will display an Error window listing all the dependencies. Click “OK” and enable the other results accordingly.

Dependencies shown in Error Window

Fig. 97 Dependencies shown in Error Window

Clicking the “Save” button when all dependencies are met will display an Info window confirming the result configuration has been saved successfully.

Result Configuration Saved Window

Fig. 98 Result Configuration Saved Window

The bar graph in the “Estimated CPU Bandwidth” section represents the CPU load percentage and changes dynamically based on the selected results. Note that certain results such as reactive power impact the CPU load more than others. Green indicates that the CPU load is less than 100%.

Estimated CPU Bandwidth below 100%

Fig. 99 Estimated CPU Bandwidth below 100%

Red indicates the CPU load exceeds 100%. See the CPU load percentage for the specific amount.

Estimated CPU Bandwidth above 100%

Fig. 100 Estimated CPU Bandwidth above 100%

NOTE MCLK is assumed to be the same frequency as SMCLK.

Parameters that impact the estimated CPU load (and strategies to reduce it) include:

  • Device selection
    • Controller (select higher performance device)
  • Basic Parameters tab
    • SMCLK Frequency (increase frequency)
    • Sampling Frequency (lower frequency)
    • Number of Voltage and Current Sensors (reduce number of phases)
  • Results tab
    • Result Configuration (reduce result selections)

Depending on the device and your system configuration, some of these strategies above may not be possible.

NOTE This estimation is based on the cycle count for the selected result APIs and does not include the CPU bandwidth consumed by the application code. Source code will not be generated for CPU loads higher than 100%.

Pulses

If your application does not measure active and reactive energy, this tab can be skipped. These GPIOs can drive LEDs and header pins to output pulses. These pulses are used for measuring accuracy during calibration and indicating active and reactive energy consumption for individual phases and total (aggregate).

Pulse Configuration

Fig. 101 Pulse Configuration

Enable column

Enable pulses for each phase by clicking the checkbox under the “Enable” column. The pulses can be disabled by deselecting the checkbox even after pins and ports have been selected for that phase.

Enable Pulses per Phase

Fig. 102 Enable Pulses per Phase

Active and Reactive Port/Pin columns

The ports are selected using the left drop-down menus, and the pins are selected using the right drop-down menus in each column.

Select Ports/Pins for Reactive Energy Pulses

Fig. 103 Select Ports/Pins for Reactive Energy Pulses

Select Ports/Pins for Active Energy Pulses

Fig. 104 Select Ports/Pins for Active Energy Pulses

NOTE Duplicate port pins will get detected later, but the user must confirm that the selected GPIOs are supported by the selected device (and its package).

Phase Name column

The phase names are automatically populated with those (including Total if enabled) selected in the “Phases” tab.

Phase Names (read-only)

Fig. 105 Phase Names (read-only)

ADC Channels

This tab allows the user to decrease the default ADC gain per channel if the gain is higher than one.

ADC Channels column

The ADC channels and connected sensors are shown in the ADC Channels column and are automatically populated based on the connections in the “Hardware Connections” tab.

ADC Channels Column (read-only)

Fig. 106 ADC Channels Column (read-only)

Gain column

The maximum output voltages from each sensor (automatically calculated in the Sensor Properties window) and the typical FSR values (specified in the datasheet for the selected controller) are used to automatically select the default ADC channel gains in this column.

ADC Gain Column

Fig. 107 ADC Gain Column

If the gain is higher than one, the drop-down menus allow users to easily decrease the gain. Lower gains help reject more noise, but some current sensors such as shunts have very low output voltages that require higher gains to amplify the signal (and unfortunately some noise).

NOTE Some devices support higher gains than others. Refer to the datasheet for more details.

Advanced Parameters

This tab allows user to configure the following advanced library parameters by entering values in the text box or using the up and down arrows:

  • Per Phase Startup Current
  • Total Phases Startup Current
  • Impulses Per kWH
  • Pulse Duration
  • IIR Minimum Frequency
  • IIR Maximum Frequency
  • IIR Step Size
Advanced Parameter Tab

Fig. 108 Advanced Parameter Tab

Per Phase Startup Current

This parameter helps define when energy starts or continues accumulating. This energy threshold is based on both the startup current and the maximum input voltage. The default value equals 0 mA and ensures that energy accumulates at very low currents.

Total Phases Startup Current

This parameter is very similar to the Per Phase Startup Current but configures the total energy threshold instead. The default value equals 0 mA and ensures that energy accumulates at very low currents.

Impulses Per kWH

This parameter defines how many pulses are output after 1 kilowatt hour (kWH) of energy has been measured. Inverting this parameter reveals the kWH per pulse. The default value equals 6400 pulses per kWH, but can be changed.

NOTE If your test equipment accepts energy measurement pulses, configure it with the same number of impulses per kWH. Otherwise, the number of pulses per kWH won’t match affecting the accuracy measurements during calibration and testing.

Pulse Duration

This parameter determines how many ADC samples are used for the pulse duration. The ADC interrupt service routine (ISR) is used to output the pulses rather than using a timer.

The maximum pulse duration can be calculated by using the following parameters: - Maximum Active Power (e.g. 23000 Watt) - Impulses Per kWH (e.g. 6400 impulses per kWH) - Sampling Rate (e.g. 4096 Hz or samples per second)

First, find the maximum possible number of impulses per second based on the maximum active power expected after 1 hour. Take the number of impulses per kWH and divide this value by 3600 seconds to get the number of impulses per kilowatt seconds (kWs). Divide this value by 1000 Watts (W) to get the number of impulses per watt second (Ws). Multiply this value by the maximum active power to get the maximum number of impulses per second. Divide the sampling frequency by this value to get the maximum pulse duration.

For example, if you use the values in the parenthesis above, the maximum pulse duration equals around 100 ADC samples. The default pulse duration equals 20 ADC samples and is five times less than the maximum pulse duration.

IIR Minimum Frequency

This parameter defines the minimum AC mains frequency supported by the IIR filter that calculates reactive power and energy. The default value equals 98% of the AC mains frequency entered in the “Basic Parameters” tab. Note that the minimum frequency must be less than the IIR maximum frequency and greater than or equal to 40 Hz.

IIR Maximum Frequency

This parameter defines the maximum AC mains frequency supported by the IIR filter that calculates reactive power and energy. The default value equals 102% of the AC mains frequency entered in the “Basic Parameters” tab. Note that the maximum frequency must be greater the IIR minimum frequency and less than or equal to 70 Hz.

IIR Step Size

This parameter defines number of steps between the IIR minimum and maximum frequencies. The IIR filter is used to calculate reactive power. The resolution of the IIR constant look-up table is ((IIR Maximum Freq - IIR Minimum Freq )/ (IIR Step-1)). Each step size requires 4 bytes in Flash memory. This value must be greater than 1 and less than or equal to 250. The default values is odd (101) to ensure the AC Mains Frequency is included in the look-up table, which provides the best accuracy for stable high voltage systems. The look-up table will also include the minimum and maximum frequencies.