MCP3901 Low-Cost Power Monitor Reference Design User's Guide 2010 Microchip Technology Inc. DS51915A Note the following details of the code protection feature on Microchip devices: * Microchip products meet the specification contained in their particular Microchip Data Sheet. * Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. * There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip's Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. * Microchip is willing to work with the customer who is concerned about the integrity of their code. * Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as "unbreakable." Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip's code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act. Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights. Trademarks The Microchip name and logo, the Microchip logo, dsPIC, KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART, PIC32 logo, rfPIC and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor, MXDEV, MXLAB, SEEVAL and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, Application Maestro, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN, ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB, MPLINK, mTouch, Omniscient Code Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit, PICtail, REAL ICE, rfLAB, Select Mode, Total Endurance, TSHARC, UniWinDriver, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. (c) 2010, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper. ISBN: 978-1-60932-483-4 Microchip received ISO/TS-16949:2002 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Company's quality system processes and procedures are for its PIC(R) MCUs and dsPIC(R) DSCs, KEELOQ(R) code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip's quality system for the design and manufacture of development systems is ISO 9001:2000 certified. DS51915A-page 2 2010 Microchip Technology Inc. MCP3901 LOW-COST POWER MONITOR USER'S GUIDE Table of Contents Preface ........................................................................................................................... 5 Introduction............................................................................................................ 5 Document Layout .................................................................................................. 5 Conventions Used in this Guide ............................................................................ 6 Recommended Reading........................................................................................ 7 The Microchip Web Site ........................................................................................ 7 Customer Support ................................................................................................. 7 Document Revision History ................................................................................... 7 Chapter 1. Product Overview 1.1 Overview ........................................................................................................ 9 1.2 Analog Input Circuit ...................................................................................... 10 1.3 Power Circuit ................................................................................................ 10 1.4 PIC18F25K20 Microcontroller and Liquid Crystal Display (LCD) ................. 10 Chapter 2. Installation and Operation 2.1 Power Monitor Firmware Description ........................................................... 11 2.2 Calibration Procedure ................................................................................... 18 Appendix A. Schematics and Layouts A.1 Board Schematic - Analog and Power ........................................................ 22 A.2 Board Schematic - Microcontroller and LCD ............................................... 23 A.3 Board Schematic - Universal Serial Bus ..................................................... 24 A.4 Board - Top Trace and Top Silk .................................................................. 25 A.5 Board - Bottom Trace and Bottom Silk ........................................................ 25 Appendix B. Bill of Materials Worldwide Sales and Service .................................................................................... 30 2010 Microchip Technology Inc. DS51915A-page 3 MCP3901 Low-Cost Power Monitor User's Guide NOTES: DS51915A-page 4 2010 Microchip Technology Inc. MCP3901 LOW-COST POWER MONITOR REFERENCE DESIGN Preface NOTICE TO CUSTOMERS All documentation becomes dated, and this manual is no exception. Microchip tools and documentation are constantly evolving to meet customer needs, so some actual dialogs and/or tool descriptions may differ from those in this document. Please refer to our web site (www.microchip.com) to obtain the latest documentation available. Documents are identified with a "DS" number. This number is located on the bottom of each page, in front of the page number. The numbering convention for the DS number is "DSXXXXXA", where "XXXXX" is the document number and "A" is the revision level of the document. For the most up-to-date information on development tools, see the MPLAB(R) IDE on-line help. Select the Help menu, and then Topics to open a list of available on-line help files. INTRODUCTION This chapter contains general information that will be useful to know before using the MCP3901 Low-Cost Power Monitor. Items discussed in this chapter include: * * * * * * Document Layout Conventions Used in this Guide Recommended Reading The Microchip Web Site Customer Support Document Revision History DOCUMENT LAYOUT This document describes how to use the MCP3901 Low-Cost Power Monitor as a development tool to emulate and debug firmware on a target board. The manual layout is as follows: * Chapter 1. "Product Overview"- Provides important information about the MCP3901 Low-Cost Power Monitor hardware. * Chapter 2. "Installation and Operation"- Describes the MCP3901 Low-Cost Power Monitor firmware. * Appendix A. "Schematics and Layouts"- Shows the schematic and board layouts for the MCP3901 Low-Cost Power Monitor Reference Design. * Appendix B. "Bill of Materials" - Lists the parts used to build the MCP3901 Low-Cost Power Monitor. 2010 Microchip Technology Inc. DS51915A-page 5 MCP3901 Low-Cost Power Monitor Reference Design CONVENTIONS USED IN THIS GUIDE This manual uses the following documentation conventions: DOCUMENTATION CONVENTIONS Description Arial font: Italic characters Initial caps Quotes Underlined, italic text with right angle bracket Bold characters N`Rnnnn Text in angle brackets < > Courier New font: Plain Courier New Represents Referenced books Emphasized text A window A dialog A menu selection A field name in a window or dialog A menu path MPLAB(R) IDE User's Guide ...is the only compiler... the Output window the Settings dialog select Enable Programmer "Save project before build" A dialog button A tab A number in verilog format, where N is the total number of digits, R is the radix and n is a digit. A key on the keyboard Click OK Click the Power tab 4`b0010, 2`hF1 Italic Courier New Sample source code Filenames File paths Keywords Command-line options Bit values Constants A variable argument Square brackets [ ] Optional arguments Curly brackets and pipe character: { | } Ellipses... Choice of mutually exclusive arguments; an OR selection Replaces repeated text Represents code supplied by user DS51915A-page 6 Examples File>Save Press , #define START autoexec.bat c:\mcc18\h _asm, _endasm, static -Opa+, -Opa0, 1 0xFF, `A' file.o, where file can be any valid filename mcc18 [options] file [options] errorlevel {0|1} var_name [, var_name...] void main (void) { ... } 2010 Microchip Technology Inc. Preface RECOMMENDED READING This user's guide describes how to use the MCP3901 Low-Cost Power Monitor Reference Design. Other useful documents are listed below. The following Microchip documents are available and recommended as supplemental reference resources. * MCP3901 Data Sheet - "Energy Metering IC with SPI Interface and Active Power Pulse Output" (DS22192) * AN1291 - "Low-Cost Shunt Power Meter using MCP3909 and PIC18F25K20" (DS01291) THE MICROCHIP WEB SITE Microchip provides online support via our web site at www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information: * Product Support - Data sheets and errata, application notes and sample programs, design resources, user's guides and hardware support documents, latest software releases, and archived software * General Technical Support - frequently asked questions (FAQs), technical support requests, online discussion groups, and Microchip consultant program member listing * Business of Microchip - Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives CUSTOMER SUPPORT Users of Microchip products can receive assistance through several channels: * * * * Distributor or Representative Local Sales Office Field Application Engineer (FAE) Technical Support Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document. Technical support is available through the web site at http://support.microchip.com. DOCUMENT REVISION HISTORY Revision A (November 2010) Initial release of this document. 2010 Microchip Technology Inc. DS51915A-page 7 MCP3901 Low-Cost Power Monitor Reference Design NOTES: DS51915A-page 8 2010 Microchip Technology Inc. MCP3901 LOW-COST POWER MONITOR REFERENCE DESIGN Chapter 1. Product Overview 1.1 OVERVIEW The MCP3901 Low-Cost Power Monitor Reference Design is used to evaluate the performance of the MCP3901 dual channel ADC, as well as a development platform for PIC18F-based applications. A programmed PIC18F25K20 device in the power monitor processes samples acquired by the MCP3901 to obtain Root Mean Square Voltage (URMS), Root Mean Square Current (IRMS), Active Power, Apparent Power, and Power Factor values. 1.1.1 Feature Highlights * Dual ADC MCP3901 output display using serial communication to the PC software interface * MCP3901 ADC ability to do simultaneous sampling; with sampling speed up to 64 ksps, and 91 dB SINAD * Computation of URMS, IRMS, Active Power, Apparent Power, and Power Factor FIGURE 1-1: 2010 Microchip Technology Inc. MCP3901 Low-Cost Power Monitor Reference Design DS51915A-page 9 MCP3901 Low-Cost Power Monitor Reference Design 1.2 ANALOG INPUT CIRCUIT The MCP3901 Low-Cost Power Monitor Reference Design uses an MCP3901 dual ADC to acquire current and voltage samples. For best performance, the power supply and ground must be noise free. To ensure low noise, large capacitors are located on the lines that power the MCP3901 device, i.e., C4 and C5. Additionally, multi-layer ceramic capacitors are located near the ADC, on the C13 and C14 pins, to ensure that high-frequency noise is also eliminated. The VREF is potentially another source of noise. Accordingly, it is mandatory to place at least one 100 nF multi-layer capacitor on the VREF pin. For better noise rejection on VREF, a larger capacitor has been added (C77). The MCP3901 Low-Cost Power Monitor is provided with a 200 shunt as a current sensor. The user has the option to use the two current transformer footprints U1 and U10 that are available on the printed circuit board (PCB). Refer to the board schematic in the appendix, A.1 "Board Schematic - Analog and Power". The MCP3901 Power Monitor Reference Design does not contain a crystal - it uses the clock signal from the output compare pin RC2/CCP1 of the PIC18F25K20 microcontroller (MCU). 1.3 POWER CIRCUIT Two voltages are required for the power monitor reference design: - 3.3V for the MCU - 5V for the ADC For this reason, two MCP1703 Low Dropout Voltage Regulators (LDOs) are placed after the C51 capacitor, with the required voltages at the outputs. The meter is powered from the capacitive divider, mainly C6 and U53. A parametric regulator circuit, using Zener diode D5, limits the input voltage of the LDOs to 12V. Rectifier diode D2 restricts the current flow to a single direction, while ripple is reduced by C51 and the LDOs. 1.4 PIC18F25K20 MICROCONTROLLER AND LIQUID CRYSTAL DISPLAY (LCD) A PIC18F25K20 MCU is used in this application for its high speed (16 MIPS) and low power (nanoWatt XLP technology). It also has an internal EEPROM, where the calibration constants are saved. Because the MCU does not include an LCD driver, the LCD used in this reference design has the driver built in. The connection between the LCD and the MCU carries four lines of data and three lines of control. DS51915A-page 10 2010 Microchip Technology Inc. MCP3901 LOW-COST POWER MONITOR REFERENCE DESIGN Chapter 2. Installation and Operation 2.1 POWER MONITOR FIRMWARE DESCRIPTION 2.1.1 Samples Acquisition Using the external ADC, the current and voltage samples must be acquired before the correct values of the desired parameters can be computed. The MCU reads the values of the samples from the ADC through the SPI bus. The sampling speed of the ADC is controlled by the clock frequency of the MCP3901. The MCU uses the Output Compare 1 module to generate a 50% pulse-width modulation (PWM) signal that has a frequency of 901.120 kHz. This frequency can be easily changed by modifying values in the Timer2 Period Register (PR2) and the Compare Register 1 (CCPR1). The sampling speed of the ADC is 1024 times lower than the master clock in the MCP3901, meaning 880 sps at an Over Sampling Rate (OSR) of 256. 2.1.2 Signal Processing In order to obtain the desired parameter values out of the acquired samples, a signal processing technique must be assumed. Since this design uses an 8-bit MCU, the signal processing technique that is implemented must be fast enough to avoid limiting the sampling speed, so that a time-domain analysis can be performed. The signal processing technique is graphically described in Figure 2-1. Active Power Scaling Factor Voltage Sample Current Sample HPF LPF LPF Active Power HPF RMS Current Scaling Factor LPF LPF SQRT LPF LPF SQRT Power Factor Apparent Power RMS Voltage Scaling Factor URMS IRMS FIGURE 2-1: Block Diagram of the Signal Processing Algorithm. Initially, the acquired samples go through a first-order Infinite Impulse Response high-pass filter (IIR HPF), which has the following roles: 1. Removes the offset of the ADC 2. Compensates for the Sinc filters transfer function 2010 Microchip Technology Inc. DS51915A-page 11 MCP3901 Low-Cost Power Monitor Reference Design Because the offset is removed and the rest of the system has a linear response, a single point calibration method is sufficient to obtain accurate readings. To compute the instantaneous active power, samples of the current and voltage are multiplied. To extract the average active power, the instantaneous active power samples are filtered by two first-order Infinite Impulse Response low-pass filters (IIR LPF). To obtain the values for the URMS and IRMS, the acquired samples are multiplied to extract the instantaneous U2 and I2. For the integrated values, the samples go through the second first-order IIR LPF. To obtain a value proportional with IRMS, a square root operation (SQRT) is performed. The structure of a first-order IIR filter is illustrated in Figure 2-2. b0 y[n] v[n] x[n] -1 z b1 a1 -1 z y[n-1] FIGURE 2-2: First-Order IIR Filter Structure. The power monitor also has a pulse output for energy measurements and an extra circuit that is implemented to perform a power-to-frequency conversion. In addition, a 24-bit timer is included to supply accurate timings of the pulse output. Because the PIC18F25K20 MCU only has a 16-bit timer, a 8-bit Timer0 extended (t0e) register is included in the software to obtain the desired pulse period. The power-to-frequency conversion is achieved through the Timer0 interrupt routine. For better accuracy in power measurement, the power is averaged for a period of time that is equal to the pulse output. The resulting averaged power value is converted into three bytes that are written to the t0l, t0h, and t0e global variables. These variables control the 24-bit timer. The LCD displays the important parameters URMS, IRMS, Power Factor, and Active Power (default). However, more parameters, such as Reactive Power and Apparent Power, can be displayed with minimum modifications of the firmware. The LCD display is controlled in the main loop, since it does not require an update at a definite period of time. Measurement results are available via UART, as well - the MCU steadily sends URMS, IRMS and Active Power values. The UART connection is configured with the following values: 19200 baud, 8-bit of data, 1-bit of stop, none of parity, and no flow control. The connection between the MCP3901 power monitor reference design and a PC is simple and secure. The UART-USB converter is located on the upper-right corner of the PCB and implemented via U4 (PIC18F14K50). And, to prevent exposing the PC to high-risk voltage, the circuit is galvanically isolated by the rest of the meter through an optocoupler. DS51915A-page 12 2010 Microchip Technology Inc. Installation and Operation 2.1.3 Power Factor Compensation One of the major tasks in energy meter design is to minimize the effect of the power factor variations on measurement accuracy. In order to have accurate measurements over a wide range of power factors, it is necessary to have the same delays on both current and voltage channels. Any difference in values between the two delays will cause undesirable variations in the measurement of power and energy, as shown on the display, according to the power factor. The external passive components can induce a phase shift because of the part's value tolerances. The MCP3901 device contains a phase delay compensation block that adds extra delays on one channel relative to the other, compensating for the power factor variations. The extra delays added are controlled by the user through an internal Phase Delay register (kk) on the MCP3901 device. Figure 2-3 illustrates the measurement accuracy at different power factors and for different Phase Delay register values. It shows how a small delay was necessary on one of the channels to achieve minimum errors on a wider range of angles. Error VS Angle VS Phase Delay Register (kk) 0.25 kk=-1 kk=-2 kk=0 kk=1 0.2 0.15 Error (%) 0.1 -90 0.05 0 -60 -30 -0.05 0 30 60 90 -0.1 -0.15 -0.2 Angle (degrees) FIGURE 2-3: -0.25 -0.3 Error vs. Phase Angle vs. Phase Delay Register. The value of the Phase Delay register is automatically computed during the meter calibration routine. Power meter calibration and all of the processes that are performed are described in Section 2.2 "Calibration Procedure". Once written into the MCP3901 ADC Phase Delay register, the Phase Delay block inside the MCP3901 ADC compensates for power-factor-related errors. This method decreases the computation requirement on the PIC18F25K20 MCU. 2010 Microchip Technology Inc. DS51915A-page 13 MCP3901 Low-Cost Power Monitor Reference Design 2.1.4 Line Frequency Compensation A 50 Hz line frequency is used, which is the typical frequency most of the time. However, this is not a constant and can vary above or below this value by a few Hertz. This line frequency shift can cause measurement errors because of the characteristics of the Sinc filter at low sampling speeds. The Sinc filter transfer function is similar to a low-pass filter. Depending on the sampling speed of the ADC, this low-pass filter can be narrower or wider. Figure 2-4 shows the following line frequency situations: * 880 sps (as in this meter) * 1200 sps * 3200 sps FIGURE 2-4: DS51915A-page 14 Sinc Filters Transfer Functions. 2010 Microchip Technology Inc. Installation and Operation In Figure 2-5, the frequency range is magnified and the Y axis is scaled to cross at 50 Hz for all three cases. Notice that the low speed ADC causes a sensitive attenuation of the signal when the line frequency is higher than 50 Hz compared to situations when the line frequency is lower than 50 Hz. The measurement differences can be higher than 0.2%. To have accurate measurements, without regard for the line frequency, it is necessary to compensate for these low-pass filter situations. FIGURE 2-5: Errors Caused by Line Frequency. 2010 Microchip Technology Inc. DS51915A-page 15 MCP3901 Low-Cost Power Monitor Reference Design Although complex, long, finite impulse response (FIR) structures called Sinc Compensation Filters are usually used to compensate for low-pass filter difficulties, they cannot be implemented in this application because the MCU is being used at close to maximum computation power. The appropriate solution is to adjust the cutoff frequency of the IIR HPF to a value at which the transfer function of the HPF will compensate the Sinc transfer function to approximately the 50 Hz value. The simulation and the measurements indicate that a cutoff frequency of 9 Hz for the HPF is the best choice in this case (see Figure 2-6). FIGURE 2-6: DS51915A-page 16 Sinc Filter Compensation Using HPF. 2010 Microchip Technology Inc. Installation and Operation Error (%) Figure 2-7 illustrates the error measurements in the frequency range of 48-52 Hz at 5 ARMS current. 0.1 0.08 0.06 0.04 0.02 0 -0.02 47 -0.04 -0.06 -0.08 -0.1 Error vs frequency 48 49 50 51 52 53 Frequency Line (Hz) FIGURE 2-7: Errors vs. Line Frequency. Line frequency compensation is a simplified solution and does not compensate for frequencies in which harmonics exist. However, it significantly improves the overall accuracy of the meter. There is one drawback to using this method. As demonstrated, the signal will be attenuated a little more than it is when the HPF has a lower cutoff frequency. This extra attenuation slightly increases the measurement errors at low currents in which measurement is made more difficult because of the lower signal-to-noise ratio (SNR). In this situation, the accuracy decrease is less than 0.1% and is considered acceptable. 2010 Microchip Technology Inc. DS51915A-page 17 MCP3901 Low-Cost Power Monitor Reference Design 2.2 CALIBRATION PROCEDURE The power monitor should be calibrated to provide accurate measurements. Due to the implemented signal processing technique, a single-point calibration is sufficient. To achieve power factor compensations without modifying the hardware, the phase delay block in the MCP3901 power monitor reference design is used. Through having written a correct value in the Phase Delay register, one channel sample is delayed relative to the other channel sample. Most of the phase errors are caused by phase delays induced by the various components of the meter (i.e., RC filters, current transformers, etc.), from one of the two channels. This block can induce an extra phase delay on the other channel, so the phase delay is compensated, and measurement errors caused by power factor variations are decreased. The correct value for the Phase Delay register is determined automatically during the calibration routine using the following method. First, determine the influence of the Phase Delay register (kk) over measurement variation for the design. Five points are enough to see a linear dependency, and by choosing the best fit, the Power Factor compensation equation is obtained, as shown in Figure 2-8: Phase Delay Register (kk) Power Factor Compensation Equation 2 Measurements Linear Best Fit 1 0 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 -1 y = 4.9693x - 0.9836 -2 -3 Measurement Variation (%) -4 FIGURE 2-8: Influence of the Phase Delay Register Over Measurement Accuracy at Different Phase Angles. The measurement variation is, in fact, the variation of the indication for the Active Power value at 45 degrees and -45 degrees. These two points were chosen because the measurement indication is varying almost linearly in this interval, as shown in Figure 2-3. DS51915A-page 18 2010 Microchip Technology Inc. Installation and Operation The appropriate Phase Delay register value is determined by the measurement of the indication variation during the following calibration routine. As calibration is initiated, the values of the Active Power Scaling Factor, RMS Current Scaling Factor, and RMS Voltage Scaling Factor at a Power Factor of 1 are determined through the following process: 1. Supplying the meter with the following values: 110 of VRMS, 5 ARMS, and Phase at 0 degrees The meter takes a few seconds (maximum 20 s) to get stable readings, then the PC virtual port sends the character "c" from the PC to the power monitor. The pulse output LED stops blinking for a few seconds, and the LCD shows "Calibrating 110V 5A PF=1". The three constants will be computed and saved to the EEPROM of the MCU. Power can be interrupted without losing this calibration information. 2. Powering the monitor with 110V of URMS, 5V of IRMS and a Phase at -45 degrees The meter takes a few seconds to get stable readings, then the PC virtual port sends the character "n" (negative phase) from the PC to the power monitor. The the pulse output LED is forced ON for a few seconds, while the LCD shows "Calibrating for -45 degrees". The results collected during this step are not saved into the EEPROM of the MCU. It is important that power is not lost until after Step 3 is complete. 3. Powering the meter with 110V of URMS, 5A of IRMS and Phase at 45 degrees. The meter takes a few seconds to get stable readings, then the PC virtual port sends the character "p" (positive phase) from the PC to the power monitor. The pulse output LED is forced ON for a few seconds, while the LCD shows "Calibrating for +45 degrees". When this step finishes, the calibration parameters are saved into the EEPROM. Now power can be disconnected from the meter. The two power values measured at -45 and +45 degrees are inserted into the equation in Figure 2-8, and the result is the Phase Delay register value required to compensate for the power factor variation. 2010 Microchip Technology Inc. DS51915A-page 19 MCP3901 Low-Cost Power Monitor Reference Design NOTES: DS51915A-page 20 2010 Microchip Technology Inc. MCP3901 LOW-COST POWER MONITOR REFERENCE DESIGN Appendix A. Schematics and Layouts This appendix contains the following schematics of the MCP3901 Low-Cost Power Monitor Reference Design. * * * * * Board Schematic - Analog and Power Board Schematic - Microcontroller and LCD Board Schematic - Universal Serial Bus Board - Top Trace and Top Silk Board - Bottom Trace and Bottom Silk 2010 Microchip Technology Inc. DS51915A-page 21 MCP3901 Low-Cost Power Monitor Reference Design A.1 BOARD SCHEMATIC - ANALOG AND POWER DS51915A-page 22 2010 Microchip Technology Inc. Schematics and Layouts A.2 BOARD SCHEMATIC - MICROCONTROLLER AND LCD 2010 Microchip Technology Inc. DS51915A-page 23 MCP3901 Low-Cost Power Monitor Reference Design A.3 BOARD SCHEMATIC - UNIVERSAL SERIAL BUS DS51915A-page 24 2010 Microchip Technology Inc. Schematics and Layouts A.4 BOARD - TOP TRACE AND TOP SILK DANGER HIGH VOLTAGE MCP A.5 3901 PIC18F25K20 POWER METER BOARD - BOTTOM TRACE AND BOTTOM SILK 2010 Microchip Technology Inc. DS51915A-page 25 MCP3901 Low-Cost Power Monitor Reference Design NOTES: DS51915A-page 26 2010 Microchip Technology Inc. MCP3901 LOW-COST POWER MONITOR REFERENCE DESIGN Appendix B. Bill of Materials TABLE B-1: Qty BILL OF MATERIALS Reference Description Manufacturer Part Number 14 C1, C2, C8, C10, CAP .10UF 50V CERAMIC X7R Yageo Corporation C11, C13, C14, 0805 C16, C17, C18, C19, C20, C28, C30 CC0805KRX7R9BB104 3 C3, C4, C5 CAP TANT LOESR 220UF 6.3V AVX Corporation 10%SMD CASE C TPSC227K006R0125 1 C6 CAP FLM 2.2uF 275VAC POLY- Kemet PRO MKP R46KR422000M2K 4 C7, C12, C27, C33 CAP CERAMIC 18PF 50V NP0 0805 Yageo Corporation CC0805JRNP09BN180 5 C9, C15, C16, C17, C18 CAP .10UF 50V CERAMIC X7R Yageo Corporation 0603 CC0603KRX7R9BB104 1 C51 CAP ELECT 470UF 16V VS SMD Panasonic(R) - ECG EEE-1CA471P 5 C74, C75, C76, C77, C78 CAP TANT 47UF 6.3V 20% POLY SMD CASE B AVX Corporation TCJB476M006R0070 1 D2 DIODE STD REC 1A 600V SMA ON Semiconductor MRA4005T3G 2 D3, D4 LED RED ORANGE CLEAR 0805 SMD Lite-On Inc LTST-C170EKT 1 D5 DIODE ZENER 15V 1.5W SMA ON Semiconductor BZG03C15G 5 L1, L2, L3, L4, L5 INDUCTOR 10UH 1210 TAIYO YUDEN Co., Ltd. CBC3225T100MR 1 LCD1 16X2 LCD Character Display Fema Electronics CG1626-SGR1 8 LCD2, R17, R18, DO NOT POPULATE R33, R34, R36, R39, R45 -- -- 1 MOV1 VARISTOR 275V RMS 20MM RADIAL EPCOS S20K275E2 1 PCB RoHS Compliant Bare PCB, PIC18F1XK50 & MCP3909 Power Meter -- 104-00285 1 R1 RES 330K OHM 1/4W 1% 0805 Yageo Corporation SMD RC0805FR-07330KL 13 R10, R11, R15, R16, R38, R44, R48, R49, R51, R52, R53, R54 RES 1.00K OHM 1/8W 1% 0805 Yageo Corporation SMD RC0805FR-071KL 5 R20, R21, R28, R37, R40 RES 220 OHM 1/8W 1% 0805 SMD RC0805FR-07220RL Note 1: Yageo Corporation The components listed in this Bill of Materials are representative of the PCB assembly. The released BOM used in manufacturing uses all RoHS-compliant components. 2010 Microchip Technology Inc. DS51915A-page 27 MCP3901 Low-Cost Power Monitor Reference Design TABLE B-1: Qty BILL OF MATERIALS (CONTINUED) Reference Description Manufacturer 1 R24 RES 510 OHM 1/10W 5% 0603 SMD 1 R25 RES 4.7K OHM 1/10W 5% 0603 Yageo Corporation SMD RC0603JR-074K7L 2 R32, R42 RES 22 OHM 1/10W 1% 0606 SMD Yageo Corporation RC0603FR-0722RL 1 R35, R43 RES 0.0 OHM 1/3W 5% 0805 SMD Panasonic - ECG ERJ-6GEY0R00V 1 R37 RES 309 OHM 1/8W 1% 0805 SMD Yageo Corporation RC0805FR-07309RL 2 R41, R50 RES 10K OHM 1/10W 5% 0805 Yageo Corporation SMD RC0805JR-0710KL 1 R46 RES 10K OHM 1/10W 5% 0603 Yageo Corporation SMD RC0603JR-0710KL 1 R47 RES 220K OHM 1/10W 5% 0603 SMD Yageo Corporation RC0603JR-07220KL 2 S1, S2 SWITCH TACT 160GF H=5.0MM SMT E-Switch, Inc. TL3301AF160QG 1 U1 MCP3901 energy measurement IC Microchip Technology Inc. MCP3901T-I/SS 1 U2 MCP1703 5V 250 mA, 16V, Low Quiescent Current LDO Regulator Microchip Technology Inc. MCP1703T-3302E/DB 1 U3 MCP1703 3.3V 250 mA, 16V, Low Quiescent Current LDO Regulator Microchip Technology Inc. MCP1703T-3302E/DB 1 U4 PIC18F14K50 Flash Microcontroller Microchip Technology Inc. PIC18F14K50-E/SS 1 U5 OPTOCOUPLER TRANS-OUT VDE 4-SMD Fairchild Semiconductor H11A8173S 1 U6 IC ISOLATOR DIGITAL DUAL 8-SOIC Analog Devices, Inc. ADUM1201CRZ-RL7 1 U7 MCP131 voltage supervisor Microchip Technology Inc. MCP131T-270I/TT 1 U11 PIC18F25K20 Flash MCU Microchip Technology Inc. PIC18F25K20-E/SS 1 U53 RES100 OHM 1W 2512 Vishay DRALORIC CRCW2512100RFKEG 1 U61 RES 330K OHM 1/4W 1% 1206 Yageo Corporation SMD RC1206FR-07330KL 1 X1 CRYSTAL 16.000MHZ 18PF FUND SMD Abracon Corporation ABM3B-16.000MHZ-B2-T 1 X2 CRYSTAL 12.000MHZ 18PF FUND SMD Abracon Corporation ABM3B-12.000MHZ-B2-T Note 1: Yageo Corporation Part Number RC0603JR-07510RL The components listed in this Bill of Materials are representative of the PCB assembly. The released BOM used in manufacturing uses all RoHS-compliant components. DS51915A-page 28 2010 Microchip Technology Inc. Bill of Materials NOTES: 2010 Microchip Technology Inc. DS51915A-page 29 Worldwide Sales and Service AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://support.microchip.com Web Address: www.microchip.com Asia Pacific Office Suites 3707-14, 37th Floor Tower 6, The Gateway Harbour City, Kowloon Hong Kong Tel: 852-2401-1200 Fax: 852-2401-3431 India - Bangalore Tel: 91-80-3090-4444 Fax: 91-80-3090-4123 India - New Delhi Tel: 91-11-4160-8631 Fax: 91-11-4160-8632 Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 India - Pune Tel: 91-20-2566-1512 Fax: 91-20-2566-1513 France - Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Japan - Yokohama Tel: 81-45-471- 6166 Fax: 81-45-471-6122 Germany - Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Atlanta Duluth, GA Tel: 678-957-9614 Fax: 678-957-1455 Boston Westborough, MA Tel: 774-760-0087 Fax: 774-760-0088 Chicago Itasca, IL Tel: 630-285-0071 Fax: 630-285-0075 Cleveland Independence, OH Tel: 216-447-0464 Fax: 216-447-0643 Dallas Addison, TX Tel: 972-818-7423 Fax: 972-818-2924 Detroit Farmington Hills, MI Tel: 248-538-2250 Fax: 248-538-2260 Kokomo Kokomo, IN Tel: 765-864-8360 Fax: 765-864-8387 Los Angeles Mission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608 Santa Clara Santa Clara, CA Tel: 408-961-6444 Fax: 408-961-6445 Toronto Mississauga, Ontario, Canada Tel: 905-673-0699 Fax: 905-673-6509 Australia - Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China - Beijing Tel: 86-10-8528-2100 Fax: 86-10-8528-2104 China - Chengdu Tel: 86-28-8665-5511 Fax: 86-28-8665-7889 Korea - Daegu Tel: 82-53-744-4301 Fax: 82-53-744-4302 China - Chongqing Tel: 86-23-8980-9588 Fax: 86-23-8980-9500 Korea - Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 China - Hong Kong SAR Tel: 852-2401-1200 Fax: 852-2401-3431 Malaysia - Kuala Lumpur Tel: 60-3-6201-9857 Fax: 60-3-6201-9859 China - Nanjing Tel: 86-25-8473-2460 Fax: 86-25-8473-2470 Malaysia - Penang Tel: 60-4-227-8870 Fax: 60-4-227-4068 China - Qingdao Tel: 86-532-8502-7355 Fax: 86-532-8502-7205 Philippines - Manila Tel: 63-2-634-9065 Fax: 63-2-634-9069 China - Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 China - Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 Taiwan - Hsin Chu Tel: 886-3-6578-300 Fax: 886-3-6578-370 China - Shenzhen Tel: 86-755-8203-2660 Fax: 86-755-8203-1760 Taiwan - Kaohsiung Tel: 886-7-213-7830 Fax: 886-7-330-9305 China - Wuhan Tel: 86-27-5980-5300 Fax: 86-27-5980-5118 Taiwan - Taipei Tel: 886-2-2500-6610 Fax: 886-2-2508-0102 China - Xian Tel: 86-29-8833-7252 Fax: 86-29-8833-7256 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 Spain - Madrid Tel: 34-91-708-08-90 Fax: 34-91-708-08-91 UK - Wokingham Tel: 44-118-921-5869 Fax: 44-118-921-5820 China - Xiamen Tel: 86-592-2388138 Fax: 86-592-2388130 China - Zhuhai Tel: 86-756-3210040 Fax: 86-756-3210049 08/04/10 DS51915A-page 30 2010 Microchip Technology Inc.