Shunt Resistor Measurement Lab for DE427 21 July 2004 From SoftBaugh Custom Software, Firmware, Hardware, and Project Management Consulting 4080 McGinnis Ferry Road Suite 604 Alpharetta, Georgia 30005 Disclaimer: All software, hardware, firmware and related documentation is provided AS IS and without warranty or support of any kind and SoftBaugh expressly disclaims all other warranties, express or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. Under no circumstances shall SoftBaugh be liable for any incidental, special or consequential damages that result from the use or inability to use the software, firmware, hardware or related documentation, even if SoftBaugh has been advised of the liability. Unless otherwise stated, software written and copyrighted by SoftBaugh remains the sole property of SoftBaugh. You may not modify this software or distribute it, in whole or in part, to any other party.
Table of Contents 1. DE427 SHUNT RESISTOR MEASUREMENT LAB... 3 1.1 STEP ONE, ORGANIZE YOUR MATERIALS... 3 1.2 STEP TWO, SETTING UP THE DE427... 3 1.3 STEP THREE, CONNECTING THE JTAG PROGRAMMER... 3 1.4 STEP FOUR, OPENING THE DE427 MEASURE SAMPLE PROJECT... 3 1.5 STEP FIVE, MAKING THE PROJECT... 4 1.6 STEP SIX, PROGRAMMING THE TARGET... 4 1.7 STEP SEVEN, MAKING THE CONNECTIONS... 4 1.8 STEP EIGHT, MEASURING POWER AND ENERGY... 5 Table of Figures FIGURE 1-1... 5 This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) this device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation. Page 2 of 5
1. In this lab, we demonstrate how to properly setup and run the DE427 using a shunt resistor as a current sensor. This document is void of theoretical information regarding power measurement and/or MSP430 peripherals. Please refer to Texas Instruments FE427 application report Implementing an Electronic Watt-Hour Meter with the MSP430FE42X Devices(SLAA203) for further details. 1.1 Step One, Organize Your Materials For this laboratory exercise, you will need the following: DE427 Evaluation System from SoftBaugh SoftBaugh USBP JTAG programmer with USB cable or SoftBaugh FETP JTAG programmer with 25-pin straight-through parallel port extension cable. (USBP, FETP, or equivalent). 14-pin cable supplied with the JTAG programmer. Installed IAR v2 or newer software development tools on a compatible PC. FE427_Measure sample code 0.005Ω, 5W shunt resistor(digikey part# 15FR005-ND) 14 gauge wire Extension cord(~6 ft.) Alligator clips 1.2 Step Two, Setting Up the DE427 1. For this exercise, the jumper options should be in the following configuration: Jumper J3.2-3, J6.11-12, J6.13-14, J9, and J10. 1.3 Step Three, Connecting the JTAG Programmer To program and debug your DE427, the JTAG programmer must be connected. These instructions assume you are using a SoftBaugh JTAG programmer, but other equivalent devices may be used. Warning: If you have a new, very fast, or "green" PC, you may have difficulty with equivalent JTAG programmers on any MSP430 target. Obtaining a genuine SoftBaugh JTAG programmer will usually resolve these problems (as of this writing, we haven't seen a case where it hasn't yet!). 2. Connect the JTAG programmer to your PC. Then, connect JTAG programmer 14-pin header to DE427:J17 using the 14-pin JTAG cable. 1.4 Step Four, Opening the DE427 Measure Sample Project 3. Download the DE427 electronic watt-hour meter demo sample project from our website at: http://www.softbaugh.com/productpage.cfm?strpartno=de427 Page 3 of 5
4. Unzip the code samples into an empty file folder on your PC. 5. Open IAR by selecting Start>Programs>IAR System>IAR Embedded Workbench for MSP430>IAR Embedded Workbench. 6. After IAR opens, select File>Open Workspace. 7. Find the FE427_Measure.eww workspace file that you downloaded from the SoftBaugh website. Select Open. Note: if you cannot see this file in the folder you placed it, you may need to extract the file out of the zip file previously downloaded. 1.5 Step Five, Making the Project 8. Select Project>Make in the upper taskbar. 9. In the Messages window at the bottom of the screen it should now show zero errors. Note: If you do not have the full version of IAR you will need to program the DE427 using the provided.txt file and a SoftBaugh USBP. 1.6 Step Six, Programming the Target 10. To program the target select Project>Debug in the upper taskbar. 11. Disconnect the DE427 from the JTAG programmer. 1.7 Step Seven, Making the Connections 12. Cut the extension cord in half. 13. For each half of the extension cord strip the insulation off the ends. 14. Connect the shunt resistor and load to the DE427, refer to Figure 1-1. Page 4 of 5
LCD LOAD DE427 I2+ I2- J23 J24 I1+ I1- P1+ P1- J20 J19 J21 J22 R shunt N L Figure 1-1 1.8 Step Eight, Measuring Power and Energy 15. Plug the extension cord into the wall outlet. 16. The LCD should now begin to display different measurements. Pressing S1 will toggle between measurements. 17. Press S1 until you get to the power measurement. 18. Plug your load into the extension cord receptacle connected to the shunt resistor. You should see the watts of power being consumed displayed on the LCD. 19. Press S1 once more, you should now be reading the energy displayed in kw/h. Page 5 of 5