MCP39F511 Smart Plug Reference Kit User’s Guide

 2017 Microchip Technology Inc. DS50002664A 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 Trademarks applications and the like is provided only for your convenience The Microchip name and logo, the Microchip logo, AnyRate, AVR, and may be superseded by updates. It is your responsibility to AVR logo, AVR Freaks, BeaconThings, BitCloud, CryptoMemory, ensure that your application meets with your specifications. CryptoRF, dsPIC, FlashFlex, flexPWR, Heldo, JukeBlox, KEELOQ, MICROCHIP MAKES NO REPRESENTATIONS OR KEELOQ logo, Kleer, LANCheck, LINK MD, maXStylus, WARRANTIES OF ANY KIND WHETHER EXPRESS OR maXTouch, MediaLB, megaAVR, MOST, MOST logo, MPLAB, IMPLIED, WRITTEN OR ORAL, STATUTORY OR OptoLyzer, PIC, picoPower, PICSTART, PIC32 logo, Prochip OTHERWISE, RELATED TO THE INFORMATION, Designer, QTouch, RightTouch, SAM-BA, SpyNIC, SST, SST INCLUDING BUT NOT LIMITED TO ITS CONDITION, Logo, SuperFlash, tinyAVR, UNI/O, and XMEGA are registered QUALITY, PERFORMANCE, MERCHANTABILITY OR trademarks of Microchip Technology Incorporated in the U.S.A. FITNESS FOR PURPOSE. Microchip disclaims all liability and other countries. arising from this information and its use. Use of Microchip ClockWorks, The Embedded Control Solutions Company, devices in life support and/or safety applications is entirely at EtherSynch, Hyper Speed Control, HyperLight Load, IntelliMOS, the buyer’s risk, and the buyer agrees to defend, indemnify and mTouch, Precision Edge, and Quiet-Wire are registered hold harmless Microchip from any and all damages, claims, trademarks of Microchip Technology Incorporated in the U.S.A. suits, or expenses resulting from such use. No licenses are Adjacent Key Suppression, AKS, Analog-for-the-Digital Age, Any conveyed, implicitly or otherwise, under any Microchip Capacitor, AnyIn, AnyOut, BodyCom, chipKIT, chipKIT logo, intellectual property rights unless otherwise stated. CodeGuard, CryptoAuthentication, CryptoCompanion, CryptoController, dsPICDEM, dsPICDEM.net, Dynamic Average Matching, DAM, ECAN, EtherGREEN, In-Circuit Serial Programming, ICSP, Inter-Chip Connectivity, JitterBlocker, KleerNet, KleerNet logo, Mindi, MiWi, motorBench, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, PureSilicon, QMatrix, RightTouch logo, REAL ICE, Ripple Blocker, SAM-ICE, Serial Quad I/O, SMART-I.S., SQI, SuperSwitcher, SuperSwitcher II, Total Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, 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 Microchip received ISO/TS-16949:2009 certification for its worldwide the U.S.A. headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California Silicon Storage Technology is a registered trademark of Microchip and India. The Company’s quality system processes and procedures Technology Inc. in other countries. are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and GestIC is a registered trademark of Microchip Technology analog products. In addition, Microchip’s quality system for the design Germany II GmbH & Co. KG, a subsidiary of Microchip Technology and manufacture of development systems is ISO 9001:2000 certified. Inc., in other countries. All other trademarks mentioned herein are property of their QUALITY MANAGEMENT SYSTEM respective companies. © 2017, Microchip Technology Incorporated, All Rights Reserved. CERTIFIED BY DNV ISBN: 978-1-5224-2114-6 == ISO/TS 16949 ==

DS50002664A-page 2  2017 Microchip Technology Inc. Object of Declaration: MCP39F511 Smart Plug Reference Kit

EU Declaration of Conformity

This declaration of conformity is issued by the manufacturer. The development/evaluation tool is designed to be used for research and development in a laboratory environment. This development/evaluation tool is not a Finished Appliance, nor is it intended for incorporation into Finished Appliances that are made commercially available as single functional units to end users under EU EMC Directive 2004/108/EC and as supported by the European Commission's Guide for the EMC Directive 2004/108/EC (8th February 2010). This development/evaluation tool complies with EU RoHS2 Directive 2011/65/EU. This development/evaluation tool, when incorporating wireless and radio-telecom functionality, is in compliance with the essential requirement and other relevant provisions of the R&TTE Directive 1999/5/EC and the FCC rules as stated in the declaration of conformity provided in the module datasheet and the module product page available at www.microchip.com. For information regarding the exclusive, limited warranties applicable to Microchip products, please see Microchip’s standard terms and conditions of sale, which are printed on our sales documentation and available at www.microchip.com. Signed for and on behalf of Microchip Technology Inc. at Chandler, Arizona, USA.

 2017 Microchip Technology Inc. DS50002664A-page 3 Automotive Networking Development Board User’s Guide

NOTES:

DS50002664A-page 4  2017 Microchip Technology Inc. MCP39F511 SMART PLUG REFERENCE KIT USER’S GUIDE

Table of Contents

Preface ...... 7 Introduction...... 7 Document Layout ...... 7 Conventions Used in this Guide ...... 8 Warranty Registration...... 8 Recommended Reading...... 9 The Microchip Web Site ...... 9 Product Change Notification Service...... 9 Customer Support ...... 9 Document Revision History ...... 10 Chapter 1. Product Overview 1.1 Introduction ...... 11 1.2 Characteristics ...... 11 1.3 System overview ...... 11 1.3.1 North American Plug Board ...... 12 1.3.2 Relay ...... 13 1.3.3 Status LEDs ...... 13 1.3.4 Power Board ...... 13 1.3.5 BTLE MCU Board ...... 14 1.4 What Does the MCP39F511 Smart Plug Reference Kit Kit Contain? ...... 16 Chapter 2. Installation and Operation 2.1 Overview ...... 17 2.2 Wireless Commands ...... 18 Chapter 3. Meter Calibration 3.1 Overview ...... 19 3.2 Step-by-Step Calibration Procedure using the GUI ...... 19 Chapter 4. Android Application 4.1 Overview ...... 21 Appendix A. Schematic and Layouts A.1 Introduction ...... 25 A.2 North American Plug Module Board - Schematic ...... 26 A.3 North American Plug Module Board - Top View ...... 27 A.4 North American Plug Module Board - Bottom View ...... 28 A.5 Power Module Board - Schematic ...... 29 A.6 Power Module Board - Top View ...... 30 A.7 Power Module Board - Bottom View ...... 31

 2016 Microchip Technology Inc. DS50002664A-page 5 MCP39F511 Smart Plug Reference Kit User’s Guide

A.8 BTLE MCU Module Board - Schematic ...... 32 A.9 BTLE MCU Module Board - Top View ...... 33 A.10 BTLE MCU Module Board - Bottom View ...... 34 Appendix B. Bill of Materials (BOM) Appendix C. Accuracy Data Worldwide Sales and Service ...... 41

DS50002664A-page 6  2016 Microchip Technology Inc. MCP39F511 SMART PLUG REFERENCE KIT USER’S GUIDE

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 “DSXXXXXXXXA”, where “XXXXXXXX” 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® IDE online help. Select the Help menu, and then Topics, to open a list of available online help files.

INTRODUCTION This chapter contains general information that will be useful to know before using the MCP39F511 Smart Plug Reference Kit. 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 MCP39F511 Smart Plug Reference Kit as a development tool to emulate and debug firmware on a target board. The manual layout is as follows: • Chapter 1. “Product Overview” – Important information about the MCP39F511 Smart Plug Reference Kit. • Chapter 2. “Installation and Operation” – Includes instructions on how the MCP39F511 Smart Plug Reference Kit works. • Chapter 3. “Meter Calibration” - Describes the steps for meter calibration. • Chapter 4. “Android Application” - Presents the Android application. • Appendix A. “Schematic and Layouts” – Shows the schematic and layout diagrams for the MCP39F511 Smart Plug Reference Kit. • Appendix B. “Bill of Materials (BOM)” – Lists the parts used to build the MCP39F511 Smart Plug Reference Kit. • Appendix C. “Accuracy Data” – Lists accuracy data for the MCP39F511 Smart Plug Reference Kit.

 2017 Microchip Technology Inc. DS50002664A-page 7 MCP39F511 Smart Plug Reference Kit User’s Guide

CONVENTIONS USED IN THIS GUIDE This manual uses the following documentation conventions:

DOCUMENTATION CONVENTIONS Description Represents Examples Arial font: Italic characters Referenced books MPLAB® IDE User’s Guide Emphasized text ...is the only compiler... Initial caps A window the Output window A dialog the Settings dialog A menu selection select Enable Programmer Quotes A field name in a window or “Save project before build” dialog Underlined, italic text with A menu path File>Save right angle bracket Bold characters A dialog button Click OK A tab Click the Power tab N‘Rnnnn A number in verilog format, 4‘b0010, 2‘hF1 where N is the total number of digits, R is the radix and n is a digit. Text in angle brackets < > A key on the keyboard Press , Courier New font: Plain Courier New Sample source code #define START Filenames autoexec.bat File paths c:\mcc18\h Keywords _asm, _endasm, static Command-line options -Opa+, -Opa- Bit values 0, 1 Constants 0xFF, ‘A’ Italic Courier New A variable argument file.o, where file can be any valid filename Square brackets [ ] Optional arguments mcc18 [options] file [options] Curly brackets and pipe Choice of mutually exclusive errorlevel {0|1} character: { | } arguments; an OR selection Ellipses... Replaces repeated text var_name [, var_name...] Represents code supplied by void main (void) user { ... }

DS50002664A-page 8  2017 Microchip Technology Inc. Preface

RECOMMENDED READING This user’s guide describes how to use the MCP39F511 Smart Plug Reference Kit. Other useful documents are listed below. The following Microchip document is avail- able and recommended as a supplemental reference resource: MCP39F511 Data Sheet – “Power-Monitoring IC with Calculation and Energy Accumulation” (DS20005393B) This data sheet provides detailed information regarding the power-monitoring device. PIC24FJ64GA104 Family Data Sheet – “28/44-Pin, 16-Bit General Purpose Flash Microcontrollers with nanoWatt XLP Technology” (DS39951C) This data sheet provides detailed information regarding the MCU. RN4020 Data Sheet – “Bluetooth® Low Energy Module” (DS50002279B) This data sheet provides detailed information regarding the BTLE module.

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, 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

PRODUCT CHANGE NOTIFICATION SERVICE Microchip’s customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notifications whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. To register, access the Microchip web site at www.microchip.com, click on Product Change Notification and follow the registration instructions.

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.

 2017 Microchip Technology Inc. DS50002664A-page 9 MCP39F511 Smart Plug Reference Kit User’s Guide

Technical support is available through the web site at: http://www.microchip.com/support.

DOCUMENT REVISION HISTORY

Revision A (August 2017) • Initial Release of this Document.

DS50002664A-page 10  2017 Microchip Technology Inc. MCP39F511 SMART PLUG REFERENCE KIT USER’S GUIDE

Chapter 1. Product Overview

1.1 INTRODUCTION The MCP39F511 Smart Plug is a fully functional power meter capable of transmitting its data over a Bluetooth® interface to an Android phone or tablet. The free Android application for the MCP39F511 Smart Plug can be found on the Google Play Store under "Microchip Smart Plug". The system calculates the real-time values of the RMS current, RMS voltage, frequency, active, reactive and apparent power, power factor and also the energy consumption. The MCP39F511 Smart Plug allows remote power control to save energy when the user turns an unused device off, instead of keeping it in stand-by (still consuming power). It also offers an easy way of monitoring the electrical behavior of home devices and appliances, allowing early detection of malfunctions if an overpower or overcurrent event is observed. The MCP39F511 Smart Plug is designed to stand between the wall outlet and any elec- tronic device that the user wants to control and monitor remotely.

1.2 CHARACTERISTICS • Nominal input voltage: 120V/230V [RMS] • Nominal frequency: 50/60 Hz • Latching relay for loads up to 10A [RMS] • Wireless reporting of all power and energy quantities • Factory calibrated • BTLE range up to 100m • Two LEDs for status indication • Button for turning the wireless module OFF

FIGURE 1-1: MCP39F511 Smart Plug Picture (North American Version).

1.3 SYSTEM OVERVIEW The MCP39F511 Smart Plug is assembled out of three PCBs. The North American plug board is used as support for the other two boards, the power board and the BTLE MCU board, which are mounted vertically.

 2017 Microchip Technology Inc. DS50002664A-page 11 MCP39F511 Smart Plug Reference Kit User’s Guide

Metrology MCU BTLE

LDO

Shunt NA Plug

Relay Relay driver

AC in DC out Off-line Power Supply

FIGURE 1-2: Block Diagram. 1.3.1 North American plug board The North American plug board contains the output socket, the relay, the relay driver and the two LEDs. A shunt resistor is used as a current sensor for the current channel and two high-voltage resistors, which are part of the resistive divider, provide the voltage input for the voltage channel. The North American plug board is connected to the BTLE MCU board through two 90-degree male headers (3-pin and 6-pin) as shown next, soldered directly on both PCBs.

DS50002664A-page 12  2017 Microchip Technology Inc. Product Overview

J6 1 2 3

HDR-2.54 Male 1x3

R19 R18 LINE 330k 330k 2010 2010 S+ S- 5% 5% Connection to PWR Supply CP6

NEUTRAL 1 3 4 2

Wire from MAINS CP2 R13 NEUTRAL 0.002R 2512 1% CP1 NEUTRAL NOUT NEUTRAL

NEUTRAL 3 N CP4 2 EARTH G LINE RL1 1 CP3 L LINE 3 Mains Socket J5 U3A 4 LINE CP5 1 7 2 RELAY_1

2 D5 SMBJP6KE6.8 TC4428A G6CU-1117P-US 5DC U3B

5 4 RELAY_2

TC4428A

FIGURE 1-3: Metrology Sensing.

J9 RELAY_1 1 RELAY_2 2 GND 3 GND +5V 4 +5V LED_BLUE 5 HDR-2.54 Male 1x6 LED_RED 6

FIGURE 1-4: Digital Signals Connector. 1.3.2 Relay The relay is a latching-type relay, which offers the advantage that it consumes no power in either ON or OFF state, but only during the transition between states. This is a very important feature for a device like the MCP39F511 Smart Plug. 1.3.3 Status LEDs The RED LED shows the status of the relay (it is off when the relay state is OFF). The BLUE LED shows the status of the BTLE module (it is off when the BTLE module is turned OFF). When the BTLE module is ON, but the connection to the Android application is not made, the BLUE LED emits a short light pulse every 5 seconds. The BLUE LED is solidly lit as long as the Bluetooth® connection is maintained. 1.3.4 Power Board The power board contains the AC-to-DC converter used as the power supply for the entire system.

 2017 Microchip Technology Inc. DS50002664A-page 13 MCP39F511 Smart Plug Reference Kit User’s Guide

It is connected to the North American plug board through two 90-degree, 3-pin male headers with the middle pin removed (AC input and +5V DC output), soldered directly on both PCBs.

LINE IN

R21 R22 D1 L1 R1 D4 470R 470R 680uH MRA4005 D 1210 1210 10k 1N4148 1% 1% 0603 C14 C15 4 U6 1% LNK304 4.7uF 10uF D 400V 400V 1 R23 RAD_P3.5D8H13 P5D10H20 BP 1 2 FB 2 BP FBFB 3 4.02k J2 C17 0603 0.1uF S S S S R24 C1 1% C18 D2 +5V 5 6 7 8 2k 25V 1000pF 10uF MRA4005 0603 0603 50V 25V 1% D3 0603 1206 L3 S 1 680uH ES1G 2 C16 R26 C25 2.1k 3 GND 100uF 10uF 0603 J8 25V 25V 1% P2.0D5H12.5 1206 GND GND GND GND FIGURE 1-5: Offline Power Supply (Non-Isolated). 1.3.5 BTLE MCU Board The BTLE MCU board contains the most important devices: the MCP39F511 power monitoring IC, BTLE module and the MCU. There is also an LDO that provides a stable +3.3V DC power supply for all the low-voltage components. The MCP39F511 power-monitoring IC is a complex device in itself, because it includes a dual-channel Delta-Sigma ADC with PGA front-end, a 16-bit calculation engine and an UART interface. The 16-bit calculation engine takes care of all the real-time measurements, meaning no metrology firmware is required on the MCU.

3.3A 3.3A

C7 R11 4.7k AGND 0402 U5 16V 5% 10 5 RESET COMMON_A 0.1uF 13 COMMON_B 0402 11 AVDD 14 PWM R12 0402 16 1 I1+ EVENT1 1k 1% 15 FB1 47R EVENT2 17 C8 I1- 2 J7 16V NC I+ 18 3 1 0.033uF V1- NC I- 8 2 0402 NC VOLTAGE 19 9 3 V1+ NC HDR-2.54 Male 1x3 AGND 21 20 AGND AGND AN_IN 22 ZCD R15 0402 23 REFIN+/OUT 1k 1% R16 6 FB2 47R C9 OSCI 1% 7 C10 16V OSCO 3k 24 16V 0.033uF GND DGND 0402 29 28 0.033uF 0402 EP DR 0402 C11 16V 25 12 TX_MCP39F511 3.3D DVDD UART_TX 0.1uF 4 RX_MCP39F511 UART_RX AGND AGND 0402 27 26 GND DGND MCLR MCP39F511 AGND C12 R17 R20 5% 1% C13 3.3D GND 10k 16V 1k 16V 0402 0.033uF 0603 0.1uF 3.3D 0402 0402

AGND AGND FIGURE 1-6: MCP39F511 Power Monitoring IC. For calibration purposes, the J2 connector can be used to gain access to the MCP39F511 registers on the UART1 interface.

DS50002664A-page 14  2017 Microchip Technology Inc. Product Overview

J2 PK Serial TX_MCP39F511 R9 0402 6 RXR 100R 5% 5 SCL 4 SDA 3 GND GND 2 3.3D VDD RX_MCP39F511 R10 0402 1 100R 5% TX HDR-1.27 Male 1x6

FIGURE 1-7: UART1 Connector. The PIC24FJ32GA102 MCU is a low-cost, general-purpose microcontroller, equipped with two UART modules and an internal oscillator. The button mounted on the board allows the BTLE module to be turned ON or OFF. The MCU can be programmed by using the dedicated ICSP connector (J1).

J1 1 MCLR 0402 MCLR R2 3.3D 2 10k 5% VDD 3.3D 3 GND GND 4 PGD PGD 5 PGC PGC 6 AUX

ICSP HDR-1.27 Male 1x6

FIGURE 1-8: ICSP Connector.

U2 MCLR 26 27 MCLR AN0/C3INC/VREF+/CN2/CTED1/RA0 16 28 RN4020_WAKE_HW GND DISVREG AN1/C3IND/VREF-/CN3/CTED2/RA1 6 RN4020_WAKE_SW OSCI/CLKI/C1IND/CN30/RA2 C2 0603 17 7 GND VCAP/VDDCORE OSCO/CLKO/CN29/PMA0/RA3 10uF 9 MLDP_EV 10V SOSCO/SCLKI/T1CK/C2INC/CN0/PMA1/RA4 10 3.3D VDD 25 1 PGD 3.3D VDD PGED1/AN2/C2INB/RP0/CN4/RB0 2 PGC PGEC1/AN3/C2INA/RP1/CN5/RB1 0 5 3 TX_MCP39F511 3.3D 3.3D 1 3 VSS AN4/C1INB/SDA2/RP2/CN6/RB2 24 4 CMD/MLDP SW1 GND VSS AN5/C1INA/SCL2/RP3/CN7/RB3 8 RX_M PUSH SPST SOSCI/C2IND/RP4/PMBE/CN1/RB4 29 11 TX_M R3 R4

EP PGED3/RP5/ASDA1(2)/CN27/PMD7/RB5 SHIELD 12 4.7k 4.7k PGEC3/RP6/ASCL1(2)/CN24/PMD6/RB6 13 RX_MCP39F511 0402 0402 2 RP7/INT0/CN23/PMD5/RB7 14 SCL1 5% 5% TCK/RP8/SCL1/CN22/PMD4/RB8 15 SDA1 TDO/RP9/SDA1/CN21/PMD3/RB9 3.3D 3.3D 18 PGED2/TDI/RP10/CN16/PMD2/RB10 19 RELAY_1 R5 0402 PGEC2/TMS/RP11/CN15/PMD1/RB11 3.3D 20 RELAY_2 R7 0402 10k 5% C3 C4 AN12/RP12/CN14/PMD0/RB12 21 10k 5% R1 16V 16V AN11/C1INC/RP13/CN13/PMRD/REFO/RB13 22 10k 0.1uF 0.1uF AN10/C3INB/CVREF/RTCC/RP14/CN12/PMWR/RB14 23 0402 0402 0402 AN9/C3INA/RP15/CN11/PMCS1/RB15 LED_RED GND 5% PIC24FJ32GA102 GND GND LED_BLUE GND FIGURE 1-9: MCU. The RN4020 is a fully certified Bluetooth® version 4.1 module. This device integrates RF, a baseband controller and a command API processor, mak- ing it a complete Bluetooth® low-energy solution.

 2017 Microchip Technology Inc. DS50002664A-page 15 MCP39F511 Smart Plug Reference Kit User’s Guide

3.3D U4 23 5 RX_M VDDVDD UART_TXUART_TX 1 6 TX_M C5 GNDGND UART_RXUART_RX 9 14 CTS_M 16V C6 GNDGND CTS/PIO5CTS/PIO5 16 18 RTS_M 0.1uF 4.7uF GNDGND RTS/PIO6RTS/PIO6 R8 24 15 RN4020_WAKE_HW 0402 25V GNDGND WAKE_HWWAKE_HW 3.3D 7 RN4020_WAKE_SW 0805 WAKE_SWWAKE_SW 10k 2 AIO2AIO2 0402 GND GND GND 3 8 CMD/MLDP AIO1AIO1 CMD/MLDPCMD/MLDP 5% 4 AIO0AIO0 19 10 PIO7PIO7 LED/PIO1/SCKLED/PIO1/SCK 11 MLDP_EV MLDP_EV/PIO2/CS 20 12 RSVDRSVD WS/PIO3/MOSIWS/PIO3/MOSI 21 13 RSVDRSVD PIO4/MISOPIO4/MISO 22 17 RSVDRSVD SPI/PIOSPI/PIO RN4020 FIGURE 1-10: RN4020. The BTLE module sends the data via a wireless connection and the information is dis- played on the Android phone or tablet.

1.4 WHAT DOES THE MCP39F511 SMART PLUG REFERENCE KIT CONTAIN? This MCP39F511 Smart Plug Reference Kit includes: • The MCP39F511 Smart Plug Unit (ADM00642) • Information Sheet

DS50002664A-page 16  2017 Microchip Technology Inc. MCP39F511 SMART PLUG REFERENCE KIT USER’S GUIDE

Chapter 2. Installation and Operation

2.1 OVERVIEW The MCU is the heart of the system, expanding the power monitoring functionality over wireless connectivity. When the application is in Meter State or Energy State, it asks for new data once every second.

MCU BTLE PHONE

FIGURE 2-1: The User Asks For Data. The MCU receives the request via wireless and sends a read command frame to the MCP39F511 power monitoring IC on the UART1 interface. In Meter State, the MCU requests the reading of 24 bytes, starting from address 0x0006 (Voltage RMS register). In Energy State, the MCU requests the reading of 32 bytes, starting from address 0x001E (Import Active Energy Counter).

Power Monitoring MCU

FIGURE 2-2: MCU Interrogates the Power Monitoring IC. In response, MCP39F511 power-monitoring IC sends back the values of the internal registers containing the results of the calculations (performed every four line cycles in a continuous loop).

Power Monitoring MCU

FIGURE 2-3: Power Monitoring IC Responds to MCU Interrogation The MCU sends the requested data to the BTLE module on the UART2 interface. The data is then wirelessly sent by the BTLE module and displayed in real time on the screen.

 2017 Microchip Technology Inc. DS50002664A-page 17 MCP39F511 Smart Plug Reference Kit User’s Guide

MCU BTLE PHONE

FIGURE 2-4: The Requested Data Is Sent Back to the Phone.

2.2 WIRELESS COMMANDS Each command sent to the MCP39F511 Smart Plug by the application contains two bytes. After receiving, decoding and executing the command, the MCU sends back one byte in response and the application displays a confirmation message.

TABLE 2-1: WIRELLES COMMANDS Command Group Command Group Reply (Byte 1) (Byte 2) Relay commands 0x10 0x11 – Relay ON 0x1 1 – if relay is correctly set or no reply if the command fails 0x12 – Relay OFF 0x1 2 – if relay is correctly set or no reply if the command fails Calibration Commands 0x20 0x21 - Frequency cali- 0x20 - Calibration successful bration and gains cali- 0x28 - Set range command failed bration at PF = 1 0x29 - Frequency calibration failed 0x2A - Gain calibration failed 0x2D - Save to flash command failed 0x22 - Reactive power 0x2F - Reactive power gain calibration calibration at PF = 0.5 failed Data Request Commands 0x30 0x31 – Read meter 30-byte reply: state 0x31,0xFE, No of data bytes (27), 27 bytes of data representing the measured values of the voltage, current, frequency, active power, reactive power, apparent power and power factor 0x32 – Read energy 38-byte reply: state 0x32, 0xFE, No of data bytes(35), 35 bytes of data representing the energy counters 0x34 – Reset energy 0x34 – counters reset counters

DS50002664A-page 18  2017 Microchip Technology Inc. MCP39F511 SMART PLUG REFERENCE KIT USER’S GUIDE

Chapter 3. Meter Calibration

3.1 OVERVIEW The MCP39F511 Smart Plug is factory-calibrated, so no calibration is required. The calibration is done by connecting the MCP39F511 power-monitoring IC to a PC via an isolated UART to USB adapter, and using the MCP39F511 Power Monitor Utility provided free of charge on the Microchip website. The J2 connector provides all the necessary signals for this operation. Once the MCP39F511 Smart Plug is assembled, it is harder to gain external access to the UART signals of the MCP39F511 power monitoring IC, because the MCU is already connected on the same UART pins. The solution is to place the MCU in reset by pulling the MCLR pin down, which causes the internal UART port pins to be kept in high impedance. This is done by placing a header with MCLR and GND pins shorted on the ICSP con- nector (J1). The calibration is performed with lab grade equipment capable of generating an accu- rate high voltage and simulating a current load at 50/60 Hz. After calibration, the MCU is released from reset by removing the header placed on J1.

3.2 STEP BY STEP CALIBRATION PROCEDURE USING THE GUI • Apply the calibration AC voltage, without a load. • Wait for a computational cycle (a minimum of 80 ms). • Manually adjust the AC offset registers (current, active power and reactive power) for minimal offset values. • Apply the calibration load current, PF = 1. A calibration load current of 1/3 of the maximum current is suggested. • Wait for a computational cycle (a minimum of 80 ms). • Press the Calibrate Gains button; this sets the range and target values, then per- forms the frequency, voltage, current and active power-gain calibration. • Change the power factor to 0.5. • Wait for a computational cycle (a minimum of 80 ms). • Press the Calibrate Phase button; this calibrates the phase compensation coefficient. • Wait for a computational cycle (a minimum of 80 ms). • Press the Calibrate Reactive button; this calibrates the reactive power gain. • Press the Save to Flash button. Note: The default calibration values are: - Voltage = 220V - Current = 5A - Frequency = 50 Hz

 2017 Microchip Technology Inc. DS50002664A-page 19 MCP39F511 Smart Plug Reference Kit User’s Guide

NOTES:

DS50002664A-page 20  2017 Microchip Technology Inc. MCP39F511 SMART PLUG REFERENCE KIT USER’S GUIDE

Chapter 4. Android Application

4.1 OVERVIEW The Android App is free to download and can be found on the Google Play Store: https://play.google.com/store/apps/details?id=com.microchip.smartplug The first time you run the application, you will be prompted to accept the License Agreement. Press Accept to agree with the terms to start using the application.

FIGURE 4-1: License Agreement. The application needs permission to use the device's Bluetooth® and also the Location. For Android 7 and higher, the Bluetooth® scan will not find any devices unless the Loca- tion permission is granted. The first screen shown is the device list.

 2017 Microchip Technology Inc. DS50002664A-page 21 MCP39F511 Smart Plug Reference Kit User’s Guide

FIGURE 4-2: Device List. The application scans for available Bluetooth® devices and displays them. Touching the Scan button starts the search process again and updates the list. Select the Smart Plug from the list to connect to it. Once the connection is established, the blue light on the MCP39F511 Smart Plug will light up and the Meter State screen will be shown.

FIGURE 4-3: Meter State (No Load). The Meter State screen contains information about the current consumption, voltage, frequency, active power, reactive power, apparent power and power factor value read from the meter and allows controlling the power output at a touch of a button using the onboard relay. Switching the relay off cuts the power to any electrical device that is plugged in. The result of the operation will briefly be displayed on screen.

DS50002664A-page 22  2017 Microchip Technology Inc. Android Application

The side menu allows access to the Energy State, where the total energy consumption is displayed.

FIGURE 4-4: Side Menu. The user has the option of resetting the energy counters, a useful feature for monitoring the energy consumption of a different consumer. The energy-counting feature is turned on by default after resetting the counters.

FIGURE 4-5: Energy State. The side menu allows accessing the calibration menu. Pressing the Microchip Logo five times in rapid succession (within a 3-second interval) will display the calibration screen. Pressing the Calibrate PF 1 button should be done after applying the appropriate volt- age and current calibration signals at PF = 1. This operation allows the calibration of the frequency, current, voltage and active power gains.

 2017 Microchip Technology Inc. DS50002664A-page 23 MCP39F511 Smart Plug Reference Kit User’s Guide

After changing the PF to 0.5, pressing the Calibrate PF 0.5 button allows the calibra- tion of the reactive power gain. The new gain coefficients are saved to flash automatically after a successful calibration. Disclaimer: The calibration procedure is irreversible and should only be carried out by trained personnel with the appropriate calibration equipment.

FIGURE 4-6: Calibration Menu. To disconnect from the MCP39F511 Smart Plug, press the back button until you return to the Scan screen, or select Disconnect from the top-right menu on any of the screens. The firmware, schematics and the layout files can be found on the MCP39F511 Smart Plug web page at www.microchip.com/smartplug.

DS50002664A-page 24  2017 Microchip Technology Inc. MCP39F511 SMART PLUG REFERENCE KIT USER’S GUIDE

Appendix A. Schematic and Layouts

A.1 INTRODUCTION This appendix contains the following schematics and layouts for the MCP39F511 Smart Plug revision 3 boards: • North American Plug Module Board - Schematic • North American Plug Module Board - Top View • North American Plug Module Board - Bottom View • Power Module Board - Schematic • Power Module Board - Top View • Power Module Board - Bottom View • BTLE MCU Module Board - Schematic • BTLE MCU Module Board - Top View • BTLE MCU Module Board - Bottom View

 2017 Microchip Technology Inc. DS50002664A-page 25 MCP39F511 Smart Plug Reference Kit User’s Guide 40mm - Wire 0.5mm2 - EARTH 40mm - Wire 0.75mm2 - NEUTRAL +5V 6 8 1 NC NC VDD 0603 25V 1206 GND 0.1uF C27 4.7uFC20 25V U3C TC4428A 3 GND RELAY_1 RELAY_2 50mm - Wire 0.75mm2 - LINE (for power supply connection) 2 4 50mm - Wire 0.5mm2 - NEUTRAL U3A TC4428A U3B TC4428A 7 5 LINE J5 N G L Mains Socket R18 330k 2010 5% 3 2 1 D5 SMBJP6KE6.8 R19 330k 2010 5% HDR-2.54 Male 1x6 J9

1 2 3 4 5 6

3 3 1 2 2

2 MODULE BOARD - SCHEMATIC

1 1

GND RELAY_1 RELAY_2 GND +5V LED_BLUE LED_RED 4

J6 HDR-2.54 Male 1x3

S+ S- 3 R13 0.002R 2512 1% RL1 G6CU-1117P-US 5DC 1 4 NEUTRAL LD2 RED LD1 BLUE +5V NEUTRALLINE NOUT CP5 GND 0603 1% 0603 1% LINE LINE CP6 CP2 CP1 CP4 CP3 EARTH 1k 1k NEUTRAL NEUTRAL NEUTRAL R9 R8 +5V GND LED_RED LED_BLUE Wire from MAINS CP7 CP9 5V GND Connection to PWR Supply A.2 AMERICAN PLUG NORTH

DS50002664A-page 26  2017 Microchip Technology Inc. Schematic and Layouts

A.3 NORTH AMERICAN PLUG MODULE BOARD - TOP VIEW

 2017 Microchip Technology Inc. DS50002664A-page 27 MCP39F511 Smart Plug Reference Kit User’s Guide

A.4 NORTH AMERICAN PLUG MODULE BOARD - BOTTOM VIEW

DS50002664A-page 28  2017 Microchip Technology Inc. MCP39F511 Smart Plug Reference Kit User’s Guide 1 2 3 J8 GND R26 2.1k 0603 1% GND C25 10uF 25V 1206 +5V GND C16 100uF 25V P2.0D5H12.5 D2 MRA4005 GND L3 680uH C18 10uF 25V 1206 D4 1N4148 R23 4.02k 0603 1% R1 10k 0603 1% C1 1000pF 50V 0603 FB R24 2k 0603 1% U6 LNK304

2

S

B S

FB F 8

S S

7

D D

S D 4

S S

6

S 5 BP 1 BP C17 0.1uF 25V 0603 D3 ES1G C15 10uF 400V P5D10H20 GND L1 680uH C14 4.7uF 400V RAD_P3.5D8H13 D1 MRA4005 R22 470R 1210 1% R21 470R 1210 1% LINE IN 1 2 3 J2 J2 and J8 are 3 pin Headers with the middle pin removed. A.5 POWER MODULE BOARD - SCHEMATIC

DS50002664A-page 29  2017 Microchip Technology Inc. MCP39F511 Smart Plug Reference Kit User’s Guide

A.6 POWER MODULE BOARD - TOP VIEW

DS50002664A-page 30  2017 Microchip Technology Inc. Schematic and Layouts

A.7 POWER MODULE BOARD - BOTTOM VIEW

 2017 Microchip Technology Inc. DS50002664A-page 31 Schematic and Layouts 3.3D R8 10k 0402 5% RTS CTS TX_MCP39F511 RX_MCP39F511 R17 5% 10k 0402 TX R RX PK Serial SCL SDA GND VDD 3.3D J3 6 5 4 3 2 1 HDR-1.27 Male 1x6 DNP 6 13 26 2 3 8 9 28 5 1 22 4 15 7 14 20 12 NC NC NC NC DR 3.3D ZCD PWM OSCI MCLR OSCO AN_IN EVENT1 EVENT2 RX_M TX_M CTS_M RTS_M UART_TX UART_RX 0402 0402 5% COMMON_A COMMON_B RN4020_WAKE_SW RN4020_WAKE_HW CMD/MLDP MLDP_EV DNP DNP GND 13 12 11 17 GND 18 6 5 8 15 10 7 14 R6 100R R14 100R 5% I 5 P O X X K O SO OS SC /PI T_T T_R 1/ PI/PI S 4/MI 3/M SPI/PIO S O T TS/PIO6 AR AR O O AKE_SW RTS/PIO6 R CTS/PIO5 C AKE_HW UART_TX U UART_RX U MD/MLD C12 16V 0.1uF 0402 WAKE_SW W PIO4/MISO PI WAKE_HW W /PI RX_M TX_M CTS_M RTS_M CMD/MLDP C LED/PIO1/SCK LED/PI WS/PIO3/MOSI WS MLDP_EV/PIO2/CS RESET AVDD I1+ I1- V1- V1+ AGND REFIN+/OUT DGND EP DVDD DGND 3.3D U5 MCP39F511 D D D 11 10 16 17 18 19 21 23 24 29 25 27 2 1 0 7 D D D D D O O O O D N N SV SV SV VDD V GND G GND G GND GN GND GN AIO2 AI AIO1 AI AIO0 AI PIO7 PI RSVD R RSVD R RSVD R U4 RN4020 1 9 2 3 4 23 16 24 19 20 21 22 3.3D TX R RX PK Serial SCL SDA GND VDD 3.3A J2 GND GND 6 5 4 3 2 1 HDR-1.27 Male 1x6 AGND R11 4.7k 0402 5% GND C11 16V 0.1uF 0402 3.3D AGND 3.3A C6 4.7uF 25V 0805 R16 1% 3k 0402 0402 5% 0402 5% C7 16V 0.1uF 0402 GND C13 16V 0.033uF 0402 GND C9 16V 0.033uF 0402 AGND R9 100R R10 100R C5 16V 0.1uF 0402 AGND R20 1% 1k 0603 3.3D GND AGND C8 16V 0.033uF 0402 C10 16V 0.033uF 0402 AGND TX_MCP39F511 RX_MCP39F511 AGND AGND 0402 1% 0402 1% 1k 1k R12 R15

SW1 PUSH SPST

SHIELD

DNP 0 C1 0.1uF 16V 0402

R1 10k 0402 5%

3

47R 47R 2

3.3D GND GND 1 3.3D FB1 FB2 R4 4.7k 0402 5% SCL1 3.3D 3.3D 4 5 6 R3 4.7k 0402 5% L C NC N DD SCL SC 3.3D 0402 5% I+ I- VOLTAGE VDD V A C D 1 2 3 SDA S VSS NC N SHT21 DNP U1 1 2 3 J7 HDR-2.54 Male 1x3 R5 10k GND 0402 5% SDA1 GND R7 10k C24 25V 0.1uF 0603 AGND LED_RED LED_BLUE RELAY_1 RELAY_2 PGD PGC RX_M TX_M SCL1 SDA1 C23 25V 10uF 1206 TX_MCP39F511 RX_MCP39F511 CMD/MLDP RN4020_WAKE_HW RN4020_WAKE_SW MLDP_EV 3.3A AGND 27 8 19 11 1 2 23 4 6 14 21 22 13 3 15 7 20 28 9 18 12 NT1 Net Tie 0.5mm GND R25 10R 5% 0603 C22 25V 0.1uF 0603 3.3D GND BOARD - SCHEMATIC RP7/INT0/CN23/PMD5/RB7 OSCI/CLKI/C1IND/CN30/RA2 AN12/RP12/CN14/PMD0/RB12 C19 25V 10uF 1206 OSCO/CLKO/CN29/PMA0/RA3 AN5/C1INA/SCL2/RP3/CN7/RB3 AN4/C1INB/SDA2/RP2/CN6/RB2 TCK/RP8/SCL1/CN22/PMD4/RB8 TDO/RP9/SDA1/CN21/PMD3/RB9 PGED1/AN2/C2INB/RP0/CN4/RB0 PGEC1/AN3/C2INA/RP1/CN5/RB1 GND SOSCI/C2IND/RP4/PMBE/CN1/RB4 PGED2/TDI/RP10/CN16/PMD2/RB10 PGEC2/TMS/RP11/CN15/PMD1/RB11 AN1/C3IND/VREF-/CN3/CTED2/RA1 3 AN0/C3INC/VREF+/CN2/CTED1/RA0 AN9/C3INA/RP15/CN11/PMCS1/RB15

PGEC3/RP6/ASCL1(2)/CN24/PMD6/RB6 PGED3/RP5/ASDA1(2)/CN27/PMD7/RB5

GND GND AN11/C1INC/RP13/CN13/PMRD/REFO/RB13 VOUT V 2 SOSCO/SCLKI/T1CK/C2INC/CN0/PMA1/RA4 GND IN VIN V U7 MCP1755/3.3V AN10/C3INB/CVREF/RTCC/RP14/CN12/PMWR/RB14 1 3.3D C21 0.1uF 25V 0603 5% 0402 GND MCLR DISVREG VCAP/VDDCORE VDD VDD VSS VSS EP U2 PIC24FJ32GA102 5 GND 10k 26 16 17 10 25 24 29 C26 10uF 25V 1206 R2 GND GND 3.3D 0603 10V MCLR PGD PGC MCLR GND C4 16V 0.1uF 0402 3.3D 1 2 3 4 5 6 3.3D GND GND 10uF C2 RELAY_1 RELAY_2 5V_IN ICSP LED_BLUE LED_RED PGC PGD VDD GND AUX MCLR J1 HDR-1.27 Male 1x6 C3 16V 0.1uF 0402 6 5 4 3 2 1 GND 3.3D GND J4 HDR-2.54 Male 1x6 A.8 BTLE MCU MODULE

 2017 Microchip Technology Inc. DS50002664A-page 32 Schematic and Layouts

A.9 BTLE MCU MODULE BOARD - TOP VIEW

 2017 Microchip Technology Inc. DS50002664A-page 33 MCP39F511 Smart Plug Reference Kit User’s Guide

A.10 BTLE MCU MODULE BOARD - BOTTOM VIEW

DS50002664A-page 34  2017 Microchip Technology Inc. MCP39F511 SMART PLUG REFERENCE KIT USER’S GUIDE

Appendix B. Bill of Materials (BOM)

TABLE B-1: BILL OF MATERIALS (BOM)(1) - NORTH AMERICAN PLUG MODULE BOARD (ADM00642-US) Qty. Reference Description Manufacturer Part Number 1 C20 CAP CER 0.1uF 25V 10% X7R Murata Electronics® GRM188R71E104KA01D SMD 0603 1 C27 CAP CER 4.7uF 25V 10% X5R TDK Corporation C3216X5R1E475K SMD 1206 1 D5 DIO TVS SMBJP6KE6.8CA 5.8V Micro Commercial SMBJP6KE6.8CA-TP 600W DO-214AA_SMB Components 1 J5 Enclosure Aolaisite CZ660-US Shenzhen Aolaisite Plastic CZ660-US Electronics Co., Ltd. 1 J6 CON HDR-2.54 Male 1x3 Gold Samtec, Inc. TSW-103-08-F-S-RA 5.84MH TH R/A 1 J9 CON HDR-2.54 Male 1x6 Gold FCI 68016-106HLF 5.84MH TH R/A 1 LD1 DIO LED BLUE 3.2V 20mA 140mcd Dialight Corporation 598-8091-107F Clear SMD 0603 1 LD2 DIO LED RED 1.95V 30mA 700mcd Kingbright Electronic Co., APTD1608SURCK Clear SMD 0603 Ltd. 1 PCB North American Plug Module Microchip Technology Inc. 04-10372-US-R3 Printed Circuit Board 2 R8, R9 RES TKF 1k 1% 1/10W SMD 0603 ® - BSG ERJ-3EKF1001V 1 R13 RES SHUNT MF 0.002R 1% 2W Stackpole Electronics, Inc. CSNL2512FT2L00 2512 2 R18, R19 RES TKF 330k 5% 1/2W SMD 2010 Semiconductor MCR50JZHJ334 1 RL1 RELAY POWER SPST-NO LATCH- Corporation G6CU-1117P-US 5DC ING 5V 10A 250VAC TH 1 U3 MCHP ANALOG FET DRIVER Microchip Technology Inc. TC4428AEUA713 Dual-Non/Inverting TC4428AE- UA713 MSOP-8 Note 1: 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.

TABLE B-2: BILL OF MATERIALS (BOM)(1) - POWER MODULE BOARD (ADM00642-PWR) Qty. Reference Description Manufacturer Part Number 1 C1 CAP CER 1000pF 50V 10% X7R Cal-Chip Electronics Inc. GMC10X7R102K50NTL_F SMD 0603 1 C14 CAP ALU 4.7uF 400V 20% Corporation UVC2G4R7MPD1TD RAD_P3.5D8H13 1 C15 CAP ALU 10uF 400V 20% TH Panasonic® - ECG EEU-EE2G100 P5D10H20 Note 1: 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.

 2017 Microchip Technology Inc. DS50002664A-page 35 MCP39F511 Smart Plug Reference Kit User’s Guide

TABLE B-2: BILL OF MATERIALS (BOM)(1) (CONTINUED)- POWER MODULE BOARD Qty. Reference Description Manufacturer Part Number 1 C16 CAP ALU 100uF 25V 20% RAD Rubycon Corporation 25PX100MEFC5X11 P2.0D5H12.5 1 C17 CAP CER 0.1uF 25V 10% X7R Murata Electronics® GRM188R71E104KA01D SMD 0603 1 C18 CAP CER 10uF 25V 10% X7R SMD Co., Ltd. TMK316B7106KL-TD 1206 1 C25 CAP CER 10uF 25V 10% X7R SMD Murata Electronics North GRM31CR71E106KA12L 1206 America, Inc. 2 D1, D2 DIO RECT MRA4005 1.1V 1A 600V ON Semiconductor® MRA4005T3G DO-214AC_SMA

1 D3 DIO RECT ES1G 1.25V 1A 400V Diodes Incorporated® ES1G-13-F SMD DO-214AC_SMA 2 J2, J8 CON HDR-2.54 Male 1x3 Gold Samtec, Inc. TSW-103-08-F-S-RA 5.84MH TH R/A 1 L1 INDUCTOR 680uH 250mA10% TH Wurth Elektronik 7447462681 P2.5D6H8.5 1 L3 INDUCTOR 680uH 330mA 10% TH Wurth Elektronik 7447412681 RAD P5D8.5H5.5 1 PCB Power Module Printed Circuit Board Microchip Technology Inc. 104-10372-PWR-R3 2 R21, R22 RES TKF 470R 1% 1/2W SMD Vishay/Dale CRCW1210470RFKEA 1210 1 R23 RES TKF 4.02K 1% 1/10W SMD Stackpole Electronics, Inc. RMCF0603FT4K02 0603 1 R24 RES TKF 2k 1% 1/10W SMD 0603 Panasonic® - ECG ERJ-3EKF2001V 1 R26 RES TKF 2.1k 1% 1/10W SMD Panasonic® - ECG ERJ-3EKF2101V 0603 1 U6 IC SWITCHER LNK304 SO-8C Power Integrations™ LNK304DG-TL Note 1: 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.

TABLE B-3: BILL OF MATERIALS (BOM)(1) - BTLE MCU MODULE (ADM00642-MCU) Qty. Reference Description Manufacturer Part Number 1 C2 CAP CER 10uF 10V 20% X5R SMD Panasonic® - ECG ECJ-1VB1A106M 0603

6 C3, C4, C5, C7, CAP CER 0.1uF 16V 10% X7R Murata Electronics® GRM155R71C104KA88D C11, C12 SMD 0402 1 C6 CAP CER 4.7uF 25V 10% X7R TDK Corporation C2012X7R1E475K125AB SMD 0805 4 C8, C9, C10, CAP CER 0.033uF 16V 10% X7R TDK Corporation CGA2B2X7R1C333K050B C13 SMD 0402 A 3 C19, C23, C26 CAP CER 10uF 25V 10% X7R SMD Murata Electronics North GRM31CR71E106KA12L 1206 America, Inc. 3 C21, C22, C24 CAP CER 0.1uF 25V 10% X7R Murata Electronics® GRM188R71E104KA01D SMD 0603 Note 1: 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.

DS50002664A-page 36  2017 Microchip Technology Inc. Bill of Materials (BOM)

TABLE B-3: BILL OF MATERIALS (BOM)(1) (CONTINUED)- BTLE MCU MODULE Qty. Reference Description Manufacturer Part Number 2 FB1, FB2 FERRITE 47R@100MHz 500mA Laird-Signal Integrity Prod- LI0603E470R-10 SMD 0603 ucts 2 J1, J2 CON HDR-1.27 Male 1x6 Gold 3MH Sullins Connector Solutions GRPB061VWVN-RC TH VERT 1 PCB Bluetooth Module Printed Circuit Microchip Technology Inc. 04-10372-MCU-R3 Board 6 R1, R2, R5, R7, RES TKF 10k 5% 1/10W SMD 0402 Panasonic® - ECG ERJ-2GEJ103X R8, R17 3 R3, R4, R11 RES TKF 4.7k 5% 1/10W SMD Panasonic® - ECG ERJ-2GEJ472X 0402 2 R9, R10 RES TKF 100R 5% 1/16W SMD Yageo Corporation RC0402JR-07100RL 0402 2 R12, R15 RES TKF 1k 1% 1/10W SMD 0402 Panasonic® - ECG ERJ-2RKF1001X 1 R16 RES SMD 3K 1% 1/10W 0402 Panasonic® - ECG ERJ-2RKF3001X

1 R20 RES TKF 1k 1% 1/10W SMD 0603 Panasonic® - ECG ERJ-3EKF1001V 1 R25 RES TKF 10R 5% 1/10W SMD Panasonic® - ECG ERJ-3GEYJ100V 0603 1 SW1 SWITCH PUSH SPST-NO 12V E-Switch®, Inc. TL3340AF160QG 0.05A TL3340 SMD 1 U2 MCHP MCU 16-BIT 32MHz 32KB Microchip Technology Inc. PIC24FJ32GA102-I/ML 8KB PIC24FJ32GA102-I/ML QFN-28 1 U4 MCHP RF BLUETOOTH 4.0 Microchip Technology Inc. RN4020-V/RM RN4020-V/RM MODULE-24 1 U5 MCHP ANALOG ENERGY MEA- Microchip Technology Inc. MCP39F511-E/MQ SUREMENT 4000:1 MCP39F511-E/MQ QFN-28 1 U7 MCHP ANALOG LDO 3.3V Microchip Technology Inc. MCP1755ST-3302E/DB MCP1755ST-3302E/DB SOT-223-3 Note 1: 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.

 2017 Microchip Technology Inc. DS50002664A-page 37 MCP39F511 Smart Plug Reference Kit User’s Guide

NOTES:

DS50002664A-page 38  2017 Microchip Technology Inc. MCP39F511 SMART PLUG REFERENCE KIT USER’S GUIDE

Appendix C. Accuracy Data

TABLE C-1: RMS CURRENT (AT 120V, 60Hz) Applied Current [A] Measured Current [A] Error in % 10 9.9971 -0.029 5 5.0015 0.03 2 1.9999 -0.005 1 0.9995 -0.05 0.5 0.4997 -0.06 0.2 0.1995 -0.25 0.1 0.0997 -0.3 0.05 0.0494 -1.2

TABLE C-2: ACTIVE POWER (AT 120V, 60 Hz, PF = 1) Expected Power (W) Measured Active Power [W] Error in % 1200 1197.62 -0.198333333 600 599.25 -0.125 240 239.83 -0.070833333 120 119.95 -0.041666667 60 59.97 -0.05 24 23.97 -0.125 12 11.98 -0.166666667 65.97-0.5

TABLE C-3: ACTIVE POWER (AT 120V, 60 Hz, PF = 0.5) Expected Power (W) Measured Active Power [W] Error in % 600 597.11 -0.481666667 300 299.26 -0.246666667 120 119.84 -0.133333333 60 59.95 -0.083333333 30 29.97 -0.1 12 11.97 -0.25 6 5.98 -0.333333333 3 2.98 -0.666666667

TABLE C-4: ENERGY COUNTING (AT 220V, 50 Hz) Expected (Wh) Measured [Wh] Error in % 10000 10016.858 0.16858 1000 1003.648 0.3648 100 100.226 0.226 10 10.035 0.35 11.0020.2

 2017 Microchip Technology Inc. DS50002664A-page 39 MCP39F511 Smart Plug Reference Kit User’s Guide

NOTES:

DS50002664A-page 40  2017 Microchip Technology Inc. Worldwide Sales and Service

AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE Corporate Office Asia Pacific Office China - Xiamen Austria - Wels 2355 West Chandler Blvd. Suites 3707-14, 37th Floor Tel: 86-592-2388138 Tel: 43-7242-2244-39 Chandler, AZ 85224-6199 Tower 6, The Gateway Fax: 86-592-2388130 Fax: 43-7242-2244-393 Tel: 480-792-7200 Harbour City, Kowloon China - Zhuhai Denmark - Copenhagen Fax: 480-792-7277 Hong Kong Tel: 86-756-3210040 Tel: 45-4450-2828 Technical Support: Tel: 852-2943-5100 Fax: 86-756-3210049 Fax: 45-4485-2829 http://www.microchip.com/ Fax: 852-2401-3431 India - Bangalore Finland - Espoo support Australia - Sydney Tel: 91-80-3090-4444 Tel: 358-9-4520-820 Web Address: Tel: 61-2-9868-6733 Fax: 91-80-3090-4123 www.microchip.com France - Paris Fax: 61-2-9868-6755 India - New Delhi Tel: 33-1-69-53-63-20 Atlanta China - Beijing Tel: 91-11-4160-8631 Fax: 33-1-69-30-90-79 Duluth, GA Tel: 86-10-8569-7000 Fax: 91-11-4160-8632 Tel: 678-957-9614 France - Saint Cloud Fax: 86-10-8528-2104 Tel: 33-1-30-60-70-00 Fax: 678-957-1455 India - Pune China - Chengdu Tel: 91-20-3019-1500 Germany - Garching Austin, TX Tel: 86-28-8665-5511 Tel: 512-257-3370 Japan - Osaka Tel: 49-8931-9700 Fax: 86-28-8665-7889 Tel: 81-6-6152-7160 Germany - Haan Boston China - Chongqing Fax: 81-6-6152-9310 Tel: 49-2129-3766400 Westborough, MA Tel: 86-23-8980-9588 Japan - Tokyo Germany - Heilbronn Tel: 774-760-0087 Fax: 86-23-8980-9500 Fax: 774-760-0088 Tel: 81-3-6880- 3770 Tel: 49-7131-67-3636 China - Dongguan Fax: 81-3-6880-3771 Germany - Karlsruhe Chicago Tel: 86-769-8702-9880 Tel: 49-721-625370 Itasca, IL Korea - Daegu Tel: 82-53-744-4301 Tel: 630-285-0071 China - Guangzhou Germany - Munich Fax: 630-285-0075 Tel: 86-20-8755-8029 Fax: 82-53-744-4302 Tel: 49-89-627-144-0 China - Hangzhou Korea - Seoul Fax: 49-89-627-144-44 Dallas Tel: 86-571-8792-8115 Tel: 82-2-554-7200 Addison, TX Germany - Rosenheim Fax: 86-571-8792-8116 Fax: 82-2-558-5932 or Tel: 972-818-7423 Tel: 49-8031-354-560 82-2-558-5934 Fax: 972-818-2924 China - Hong Kong SAR Israel - Ra’anana Tel: 852-2943-5100 Malaysia - Kuala Lumpur Detroit Tel: 972-9-744-7705 Fax: 852-2401-3431 Tel: 60-3-6201-9857 Novi, MI Italy - Milan Fax: 60-3-6201-9859 Tel: 248-848-4000 China - Nanjing Tel: 39-0331-742611 Tel: 86-25-8473-2460 Houston, TX Malaysia - Penang Fax: 39-0331-466781 Fax: 86-25-8473-2470 Tel: 60-4-227-8870 Tel: 281-894-5983 Italy - Padova China - Qingdao Fax: 60-4-227-4068 Indianapolis Tel: 39-049-7625286 Tel: 86-532-8502-7355 Philippines - Manila Noblesville, IN Netherlands - Drunen Fax: 86-532-8502-7205 Tel: 63-2-634-9065 Tel: 317-773-8323 Tel: 31-416-690399 Fax: 317-773-5453 China - Shanghai Fax: 63-2-634-9069 Fax: 31-416-690340 Tel: 86-21-3326-8000 Singapore Tel: 317-536-2380 Norway - Trondheim Fax: 86-21-3326-8021 Tel: 65-6334-8870 Los Angeles Tel: 47-7289-7561 China - Shenyang Fax: 65-6334-8850 Mission Viejo, CA Poland - Warsaw Tel: 86-24-2334-2829 Taiwan - Hsin Chu Tel: 949-462-9523 Tel: 48-22-3325737 Fax: 949-462-9608 Fax: 86-24-2334-2393 Tel: 886-3-5778-366 Romania - Bucharest Tel: 951-273-7800 China - Shenzhen Fax: 886-3-5770-955 Tel: 40-21-407-87-50 Raleigh, NC Tel: 86-755-8864-2200 Taiwan - Kaohsiung Tel: 919-844-7510 Fax: 86-755-8203-1760 Tel: 886-7-213-7830 Spain - Madrid Tel: 34-91-708-08-90 China - Wuhan Taiwan - Taipei New York, NY Fax: 34-91-708-08-91 Tel: 631-435-6000 Tel: 86-27-5980-5300 Tel: 886-2-2508-8600 Fax: 86-27-5980-5118 Fax: 886-2-2508-0102 Sweden - Gothenberg San Jose, CA Tel: 46-31-704-60-40 Tel: 408-735-9110 China - Xian Thailand - Bangkok Tel: 408-436-4270 Tel: 86-29-8833-7252 Tel: 66-2-694-1351 Sweden - Stockholm Fax: 86-29-8833-7256 Fax: 66-2-694-1350 Tel: 46-8-5090-4654 Canada - Toronto Tel: 905-695-1980 UK - Wokingham Fax: 905-695-2078 Tel: 44-118-921-5800 Fax: 44-118-921-5820

DS50002664A-page 41  2017 Microchip Technology Inc. 11/07/16