Texas Instruments MSP430i2040 User Manual
Texas Instruments MSP430i2040 User Manual

Texas Instruments MSP430i2040 User Manual

Embedded metering evm
Table of Contents

Advertisement

Quick Links

MSP430i2040 Embedded Metering EVM
(EVM430-i2040SUBMTR)
User's Guide
Literature Number: SLAU587
August 2014

Advertisement

Table of Contents
loading

Summary of Contents for Texas Instruments MSP430i2040

  • Page 1 MSP430i2040 Embedded Metering EVM (EVM430-i2040SUBMTR) User's Guide Literature Number: SLAU587 August 2014...
  • Page 2: Table Of Contents

    4.3.4 HOST_CMD_GET_RTC ........... 4.3.5 HOST_CMD_ALIGN_WITH_CALIBRATION_FACTORS ................4.3.6 HOST_CMD_SET_PASSWORD ..............4.3.7 HOST_CMD_GET_READINGS_PHASE_n ............4.3.8 HOST_CMD_GET_EXTRA_READINGS_PHASE_n ................. 4.3.9 HOST_CMD_SUMCHECK_MEMORY ..............4.3.10 HOST_CMD_CLEAR_CALIBRATION_DATA ............... 4.3.11 HOST_CMD_SET_CALIBRATION_PHASE_n .............. 4.3.12 HOST_CMD_GET_CALIBRATION_PHASE_n Contents SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 3 ......................EVM Performance ................ C.2.1 Power Accuracy at Room Temperature ............... C.2.2 Accuracy vs Temperature at 220 V, 5 A ................Running on MSP430i2040 and MSP430i2041 SLAU587 – August 2014 Contents Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 4 Options Window ........................D-5. Config Tab ....................D-6. Selecting Default XCL File .................... D-7. Finishing the Setting Changes ....................D-8. Saving the Setting Changes List of Figures SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 5 Any other use and/or application are strictly prohibited by Texas Instruments. If you are not suitable qualified, you should immediately stop from further use of the HV EVM.
  • Page 6: Getting Started

    EVM430-i2040SUBMTR development tool. This development tool provides you the resources to evaluate the performance of MSP430i2040 utilizing as embedded metering application. This documentation will guide you to get familiar with this development tool and will provide necessary information to start further development and evaluation. Before proceeding, read this guide to gain basic understanding and knowledge of this development tool and how to safely operate it.
  • Page 7: Package Contents

    GPIO pins in a 28-pin TSSOP or 16 GPIO pins in a 32-pin QFN package. The peripheral set is a good combination for electricity power measurement. This EVM is designed as an evaluation tool for using the MSP430i2040 in the application of embedded metering (sub-metering). In this application, the electricity measuring device is embedded in the end application and provides the user with information about the voltage, current, and power consumption of the device.
  • Page 8: Hardware

    Figure 1-1. EVM Top View 1.6.2 Bottom View of the EVM Isolator circuit Power Supply Fuse Shunt Sensor Voltage Sensor Figure 1-2. EVM Bottom View Getting Started SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 9: Hardware Setup Procedures

    EVM and the PC using for debugging. NOTE: Connection to debugging interface is optional for the operation of the EVM. The EVM can operate standalone without debugger connected. SLAU587 – August 2014 Getting Started Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 10: Calibrator Software

    EVM or the user can download the package from Texas Instruments web site. This section discusses the software in the software package and the procedure to setup the software to operate with the EVM 1.7.1 Software Package Content...
  • Page 11: System Properties Window

    2. Select the Hardware tab in the System Properties Window, then Click the Device Manager to go to the Device Manager window. Figure 1-3. System Properties Window SLAU587 – August 2014 Getting Started Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 12: Device Manager Window

    Calibrator Software www.ti.com 3. Find the COM port number of the serial port that connecting the PC and the EVM. Figure 1-4. Device Manager Window Getting Started SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 13: Instruments

    • AC Meter Test Set: http://en.3gcnkaipu.com/products_list/&pmcId=10.html • Reference Meter: http://www.hc.com.tw/portal_c1_cnt_page.php?owner_num=c1_142363&button_num=c1&folder_id=17 560&cnt_id=124863&search_field=&search_word=&search_field2=&search_word2=&search_field3=&s earch_word3=&bool1=&bool2=&search_type=1&up_page=1 • AC Source: http://www.chromausa.com/acpowersources/61500lo-ac-source.php • Reference Meter: http://www.chromausa.com/powermeters/66201-66202-digital-power-meters.php • DC Electronic Load: http://www.chromausa.com/dcloads.php#6310a SLAU587 – August 2014 Getting Started Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 14: Operating The Pc Software Tool

    The Comms indicator turns green if communication to EVM from PC is established, and it flashes between read and green when communication is taking place. Operating the PC Software Tool SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 15: Calibrator Software Startup Window

    Start Using the EVM www.ti.com Figure 2-1. Calibrator Software Startup Window Click the Comms indicator to open the Meter Status window (see Figure 2-2). SLAU587 – August 2014 Operating the PC Software Tool Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 16: Meter Status Window

    Click the Meter Calibration Factors button to open the [Meter Calibration Factors] window (see Figure 2-3). This window shows the current calibration factor values. Operating the PC Software Tool SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 17: Meter Calibration Factor Window

    EVM compare to the reading from the reference meter. The technique and procedure of performing SLAU587 – August 2014 Operating the PC Software Tool Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 18: Known Issues

    • Aggregate current in the [Meter Status] window always shows 10.0000 A. Operating the PC Software Tool SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 19: Calibration Techniques

    If a custom calibration method is implemented, the application must read the complete set of calibration values, update the modified fields, and write the complete set back to the EVM. SLAU587 – August 2014 Calibration Techniques Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 20: Calibration Procedures

    IGAIN calibration Or if percentage error is used (as with the provided calibration software): Error (d) Write and apply the calibrated IGAIN. Calibration Techniques SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 21: Calibration Of Compensation Resistance And Capacitance

    ACTIVE (d) Write and apply the calibrated CAP (note that the capacitance is in units of 1/64 µF). SLAU587 – August 2014 Calibration Techniques Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 22: Calibration Of Current Ac Offset

    NOTE: The procedure of having the best dc measurement parameters will be modified and improved when the embedded metering customized calibration software is released. Calibration Techniques SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 23: Serial Communication Commands

    Data field. The end of the frame is a check sum byte which is a modulus 256 byte sum of each byte from the beginning of the header to the end of the data field followed by an end of frame marker 0x16. SLAU587 – August 2014 Serial Communication Commands Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 24: Polling Mode Command Frame Format

    Figure 4-3. Polling Mode Respond Frame Format NOTE: If writing a custom protocol, make sure that the data buffer is sufficient to hold the data from the host. Serial Communication Commands SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 25: Commands

    Width Data CMDH 0x53 0x53 CMDL 0x00 0x80 U8(4) 4-byte software version U8(4) 4-byte hardware version U8(4) 4-byte metrology version U8(4) 4-byte protocol version SLAU587 – August 2014 Serial Communication Commands Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 26: Host_Cmd_Get_Meter_Configuration

    Bit 2 Measures fundamental active power Bit 1 Auto Report Support Bit 1 Measures fundamental reactive power Bit 0 Limp Mode Support Bit 0 Undefined Serial Communication Commands SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 27: Host_Cmd_Get_Rtc

    This command does not read anything related to RTC as there is no RTC in the EVM yet one of the data read from the meter by this command is the temperature. Hence this command is considered a command to read the temperature of the EVM using the internal temperature sensor on the MSP430i2040 4.3.4.1...
  • Page 28: Host_Cmd_Get_Readings_Phase_N

    Reactive power in mW Apparent power in mW Power factor in 0.001 Frequency in 0.01 Hz Voltage channel dc offset Current channel dc offset Serial Communication Commands SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 29: Host_Cmd_Get_Extra_Readings_Phase_N

    Command Format HOST_CMD_SUMCHECK_MEMORY Command Respond Offset Width Data Offset Width Data CMDH 0x75 0x75 CMDL 0x00 0x80 Start Flash Address Check sum End Flash Address SLAU587 – August 2014 Serial Communication Commands Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 30: Host_Cmd_Clear_Calibration_Data

    Current channel ac offset Phase correction in 1/1024 Vrms scaling factor Wire resistance in 1/256 Ω Irms scaling factor 0x0000 reserved Power scaling factor Serial Communication Commands SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 31: Host_Cmd_Get_Calibration_Phase_N

    Command Respond Offset Width Data Offset Width Data CMDH 0xD5 0xD5 CMDL 0x00 0x80 Calibration status Intercept temperature Temperature intercept Temperature slope / degree SLAU587 – August 2014 Serial Communication Commands Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 32: Host_Cmd_Get_Calibration_Extras

    Command Respond Offset Width Data Offset Width Data CMDH 0xDA 0xDA CMDL 0x00 0x80 Calibration status Intercept temperature Temperature intercept Temperature slope / degree Serial Communication Commands SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 33: Firmware And Embedded Metering Library Api

    16-bit, 32-bit, and 64-bit square root and integer square root • 16-bit by 16-bit multiply-accumulate into 48-bit accumulator • 16-bit by 24-bit multiply-accumulate into 64-bit accumulator SLAU587 – August 2014 Firmware and Embedded Metering Library API Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 34: Metrology Computation Engine

    RMS fund RMS fund (20) active fund reactive fund RMS fund RMS fund (21) ± , RMS fund RMS fund (22) Firmware and Embedded Metering Library API SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 35: Background Process

    (d) Check for dc mode or ac mode and switch over 6. Trigger foreground process (a) Setting flag to indicate there is data for the foreground to process SLAU587 – August 2014 Firmware and Embedded Metering Library API Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 36: Foreground Process

    (iii) Calculate the apparent power by multiplying the root mean square voltage and root means square current (iv) Other processing (i) Calculate the power factor (ii) Calculate the frequency of the ac line Firmware and Embedded Metering Library API SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 37: Embedded Metering Library Api

    Initialize the metrology related ADC channels with proper phase correction, Set system to run in normal mode Parameter: none Return: none SLAU587 – August 2014 Firmware and Embedded Metering Library API Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 38 EVM is operating in dc measurement mode. Parameter: ph = 1 Return: latest apparent power of phase ph Firmware and Embedded Metering Library API SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 39 Returns the latest fundamental root mean square current of phase ph Parameter: ph = 1 Return: latest fundamental root mean square current of phase ph SLAU587 – August 2014 Firmware and Embedded Metering Library API Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 40: Embedded Metering Library Callbacks

    Called when the background process detects that the voltage signal is zero crossing from negative to positive. 5.5.2.7 void AC_MODE_ON (void) Called when the background process enters ac measurement mode. Firmware and Embedded Metering Library API SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 41: Application-Level Calibration Functions

    Get the calibration value of the temperature intercept. Parameter: none Return: The calibrated ADC reading for calibration temperature in calibration parameter memory SLAU587 – August 2014 Firmware and Embedded Metering Library API Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 42 Get the active (dynamic) voltage channel ADC dc offset of phase phx Parameter: phx = 1 Return: the dynamic voltage channel dc offset, in ADC counts, of phase phx Firmware and Embedded Metering Library API SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 43 = 1 • value = the value to be written to current scaling factor in calibration parameter memory Return: none SLAU587 – August 2014 Firmware and Embedded Metering Library API Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 44 Get EMI filter capacitor value of phase phx Parameter: phx = 1 Return: the capacitance to be compensate (in 1/64 µF unit) in calibration parameter memory Firmware and Embedded Metering Library API SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 45 = 1 • the phase correction value (in unit of 97.65625 µs) to be written to calibration parameter memory Return: none SLAU587 – August 2014 Firmware and Embedded Metering Library API Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 46 Square of estimated noise level on voltage channel ADC Calculated as § · 1024 10 ¨ ¸ DEFAULT_I_AC_OFFSET Estimated noise level ¨ ¸ Current Scaling Factor © ¹ (25) Firmware and Embedded Metering Library API SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 47 Defines the Metrology library version of the meter as reported by HOST_CMD_GET_METE_VER 5.5.3.2.18 METER_PROTOCOL_VERSION Defines the Protocol version of the meter as reported by HOST_CMD_GET_METE_VER SLAU587 – August 2014 Firmware and Embedded Metering Library API Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 48: A Example Application Code

    1. Select the emter-app-i2041 project tab at the bottom of the Workspace window 2. Check project options by right clicking project name and select [Options…] from the pop-up menu (see Figure A-1) Example Application Code SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 49: Project Options

    Prepaing the Application Code to Run www.ti.com Figure A-1. Project Options SLAU587 – August 2014 Example Application Code Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 50: Optimization Options

    3. When the options appears select [C/C++ compiler] on the left hand column and then select the Optimizations tab on the right hand side and check that the optimization setting is as shown in Figure A-2. Figure A-2. Optimization Options Example Application Code SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 51: Debugger Options

    4. Select FET Debugger on the left hand column the select Setup tab. The EVM uses Spy-Bi-Wire for its code downloading and debugging. Check to make sure the optionsis as shown in Figure A-3. Figure A-3. Debugger Options SLAU587 – August 2014 Example Application Code Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 52: Download Options

    IAR Embedded Workbench 5.5 installed with a valid license. If a valid license is not available, the user can still down load the object code. See Section A.3 for downloading procedures. Example Application Code SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 53: Compiling The Application

    Prepaing the Application Code to Run www.ti.com Figure A-5. Compiling the Application Figure A-6. Warnings SLAU587 – August 2014 Example Application Code Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 54: Connecting Evm And Fet

    A-8). Figure A-8. Code Downloading 10. After downloading is completed and succeed Figure A-9 appears. Click Go to start application running (see Figure A-10). Example Application Code SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 55: Downloading Without An Iar License

    Section A.2 steps 1 through 5. Then connect the board to the MSP-FET430UIF as described in step 8. 2. Click Project→Download→Download File… (see Figure A-11). SLAU587 – August 2014 Example Application Code Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 56 Figure A-11. Download File 3. When prompted to select the file, select the file named emeter-app-i2041.d43 from the folder [Submeter i2040 4k_3_SOCK_AUTO_OSR_IAR5.5]\emeter-app\emeter-app-i2041\Debug\Exe (see Figure A-12). Example Application Code SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 57 Downloading Without an IAR License www.ti.com Figure A-12. Select File 4. The executable code is downloaded to the board. SLAU587 – August 2014 Example Application Code Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 58: Hardware Design Files

    Schematic CAD file in Altium Designer format • PCB layout CAD file in Altium Designer format • Bill of materials • PCB layout files in Gerber file format Hardware Design Files SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 59: Schematic

    Schematic www.ti.com Schematic Figure B-1. EVM Schematic SLAU587 – August 2014 Hardware Design Files Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 60: Evm Specification And Performance

    Active Power resolution : 1 mW • Reactive and apparent power resolution : 1 mW • Power factor resolution : 0.001 • Frequency resolution : 0.01 Hz EVM Specification and Performance SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 61: Evm Performance

    7.399000 -0.002750 -0.037% 1025.610 1025.054 -0.556 -0.054% 14.334700 14.318000 -0.016700 -0.117% 2196.370 2190.308 -6.062 -0.276% 19.304000 19.241000 -0.063000 -0.326% 2965.780 2951.400 -14.380 -0.485% SLAU587 – August 2014 EVM Specification and Performance Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 62: Power Percentage Error (%) Vs Load Current (A)

    At low current, the higher error is mostly caused by noise that causes instability of the readings. EVM Specification and Performance SLAU587 – August 2014 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 63: Accuracy Vs Temperature At 220 V, 5 A

    This phenomenon occurs because the board is heated and the combined temperature coefficient of the whole board is affected. SLAU587 – August 2014 EVM Specification and Performance Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 64: Running On Msp430I2040 And Msp430I2041

    Appendix D SLAU587 – August 2014 Running on MSP430i2040 and MSP430i2041 The example IAR project has been configured for MSP430i2041. To run on MSP430i2040, follow these steps once: 1. Open the workspace. After launching IAR 5.5, select File→Open→Workspace. Figure D-1. IAR 5.5 Launch Window Running on MSP430i2040 and MSP430i2041 SLAU587 –...
  • Page 65: Open Workspace Window

    Figure D-2. Open Workspace Window 2. Set the option. Right click on the project emeter-app-i2041 and select Options... Figure D-3. Workspace Options SLAU587 – August 2014 Running on MSP430i2040 and MSP430i2041 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 66: Options Window

    Click on Linker in the left-hand column and select the Config tab. Then click on the right-hand button in the Linker configuration file box. Figure D-5. Config Tab Running on MSP430i2040 and MSP430i2041 SLAU587 – August 2014 Submit Documentation Feedback...
  • Page 67: Selecting Default Xcl File

    Select lnk430i2040_temp.xcl when prompted and click Open. Figure D-6. Selecting Default XCL File When brought back to the Options window, click OK. Figure D-7. Finishing the Setting Changes SLAU587 – August 2014 Running on MSP430i2040 and MSP430i2041 Submit Documentation Feedback Copyright © 2014, Texas Instruments Incorporated...
  • Page 68: Saving The Setting Changes

    When brought back to the main screen, select File→Save to save the setting. Figure D-8. Saving the Setting Changes The project is now set for run on MSP430i2040. To have the project to run back on MSP430i2041, follow the same steps except to select MSP430Ixxxx Family→MSP430I2041 in the Options window and select lnk430i2041_temp.xcl when prompted in the Linker configuration file box.
  • Page 69 IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, enhancements, improvements and other changes to its semiconductor products and services per JESD46, latest issue, and to discontinue any product or service per JESD48, latest issue.

This manual is also suitable for:

Evm430-i2040submtr

Table of Contents