
Atmel-42689B-Atmel-Smart-Plug-Hardware-User-Guide_AT16225_ApplicationNote_07/2016
ATSAMW25
AT16225: Atmel Smart Plug Hardware User Guide
Application Note
Introduction
The Atmel® Smart Plug Reference Design provides a system solution for a Wi-Fi®
enabled power plug that can turn on/off power from the main plug in three ways:
using the QTouch® button, using the Android™ app with a Wi-Fi connection, or
using a scheduled on/off from the Android app. It is an IoT application using the
ATSAMW25 module (a highly integrated module with ATSAMD21, WINC1500,
ECC508A), and an ATM90E26 device to realize ARM® Cortex®-M0+ MCU
control, Wi-Fi connection, CryptoAuthentication with secure hardware key
storage, QTouch sensing, and energy metering functions with an optimized BOM.
This document describes the hardware design of the smart plug reference
design.
Features
Turnkey solution with small form factor
Three models following either US, EU, or Chinese standards
AC input 90-265V and 50/60Hz
Max output power: 2200W(10A)
Based on ATSAMW25 module
– ATSAMD21 Cortex-M0+ MCUWINC1500 IEEE 802.11 b/g/n 2.4G Wi-Fi
Controller
– ECC508A hardware Authentication and Encryption
ATM90E26 power and energy metering function
QTouch button
CE/FCC/UL&CUL Certification
Figure 1. Atmel Smart Plug Kits

Table of Contents
1 Overview ..................................................................................................................... 3
1.1 System Overview .................................................................................................................................. 3
2 MCU Board ................................................................................................................... 4
2.1 MCU Board Overview ............................................................................................................................ 4
2.2 ATSAMW25 .......................................................................................................................................... 5
2.3 Programming Interface .......................................................................................................................... 7
2.4 Header to Touch Board ......................................................................................................................... 7
2.5 Header to Power Board ......................................................................................................................... 8
2.6 DataFlash (Not Mounted) ...................................................................................................................... 8
3 Touch Board ................................................................................................ ................ 9
3.1 Touch Board Overview .......................................................................................................................... 9
3.2 Touch Sensors ...................................................................................................................................... 9
3.3 LEDs for Wi-Fi and Power ................................................................................................................... 10
3.3.1 Wi-Fi LED ............................................................................................................................... 10
3.3.2 Power LED ............................................................................................................................. 10
3.3.3 LED Pin Definition on SAM W25 ............................................................................................ 10
4 Power Board ................................................................................................ .............. 10
4.1 Power Board Overview ........................................................................................................................ 10
4.2 AC-DC .............................................................................................................................................. 11
4.3 The Fuse ............................................................................................................................................. 12
4.4 DC-DC .............................................................................................................................................. 12
4.5 Power Measurement ........................................................................................................................... 12
4.6 Power Measurement Calibration ......................................................................................................... 14
4.6.1 Calculation of the GL .............................................................................................................. 14
4.6.2 Calculation of the Ugain.......................................................................................................... 14
4.6.3 Calculation of the Igain ................................ ........................................................................... 14
4.6.4 Calculation of the PL_Constant .............................................................................................. 14
4.7 The Relay ............................................................................................................................................ 14
4.8 Plug and Socket .................................................................................................................................. 15
5 PCB Assembly ........................................................................................................... 17
5.1 PCB Stack Structure ........................................................................................................................... 17
6 Reprogram the Kit ..................................................................................................... 18
6.1 Open the Kit ........................................................................................................................................ 18
6.2 Power Supply ...................................................................................................................................... 18
6.2.1 Onboard AC Power ................................................................................................................ 18
6.2.2 External DC power ................................................................................................................. 19
6.3 Programming Tools ............................................................................................................................. 20
6.4 Programming ....................................................................................................................................... 21
7 Revision History ........................................................................................................ 22
AT16225: Atmel Smart Plug Hardware User Guide [APPLICATION NOTE]
Atmel-42689B-Atmel-Smart-Plug-Hardware-User-Guide_AT16225_ApplicationNote_07/2016

ATSAMW25
Output Socket
AC/DC
3.3V
DC/DC
LEDs
12V
L
N
Button
Relay
Fuse
Input Plug
DataFlash
E
ATM90E26
1 Overview
The smart plug consists of three PCBs: Power board, MCU board, and Touch board. The MCU board is
vertically mounted to the Power board and the Touch board is connected to the MCU board by a pin connector.
Touch Board: Touch pad and LEDs.
MCU Board: ATSAMW25, 32KHz crystal, DataFlash footprint (not mounted).
Power Board: Socket and Plug, AC-DC, DC-DC, Power Measurement, Relay.
1.1 System Overview
Figure 1-1. System Block Diagram
AT16225: Atmel Smart Plug Hardware User Guide [APPLICATION NOTE]
Atmel-42689B-Atmel-Smart-Plug-Hardware-User-Guide_AT16225_ApplicationNote_07/2016

Figure 1-2. Overview of the Smart Plug Kit PCBs
2 MCU Board
2.1 MCU Board Overview
Figure 2-1. MCU Board Overview
AT16225: Atmel Smart Plug Hardware User Guide [APPLICATION NOTE]
Atmel-42689B-Atmel-Smart-Plug-Hardware-User-Guide_AT16225_ApplicationNote_07/2016

Heat sink pads in the bottom
For ATWINC1500 firmware upgrade
For ATWINC1500 firmware upgrade
2.2 ATSAMW25
The Atmel SmartConnect SAM W25 is a low-power Wi-Fi certified module. This highly integrated module offers
the ideal solution for designers seeking Wi-Fi connectivity. The SAM W25 integrates an 802.11 IP stack on top
of the Wi-Fi core and fully covers RF certifications.
The SAM W25 module is based on Atmel’s industry-leading WINC1500 Wi-Fi core combined with Atmel’s
latest ARM Cortex-M0+ based microcontroller (SAM D21) technology. This turnkey system provides an
integrated software solution with application and security protocols such as TLS and integrated network
services (TCP/IP stack).
ATSAMW25 is the control center of the smart plug kit. It covers all the intelligent functions including the Wi-Fi
connection, touch button, relay control, temperature sensing and protection, LED indicators, and timing.
Figure 2-2. Schematic for ATSAMW25
Table 2-1. ATSAMW25 Pinout
AT16225: Atmel Smart Plug Hardware User Guide [APPLICATION NOTE]
Atmel-42689B-Atmel-Smart-Plug-Hardware-User-Guide_AT16225_ApplicationNote_07/2016

Reserved interface for internal crypto
Reserved interface for internal crypto
Interface for Power Measurement device
Interface for Power Measurement device
AT16225: Atmel Smart Plug Hardware User Guide [APPLICATION NOTE]
Atmel-42689B-Atmel-Smart-Plug-Hardware-User-Guide_AT16225_ApplicationNote_07/2016

Reserved interface for internal WINC1500
Reserved interface for internal WINC1500
GND (External power input if onboard power is not available)
2 VCC (External power input if onboard power is not available)
2.3 Programming Interface
Since SAM W25 uses the SAM D21 as the controller, the user can use the SWD interface to Program and
debug the device.
Table 2-2. Pin Definition of SWD Interface
2.4 Header to Touch Board
The Touch Board is connected to MCU Board through a 10-pin header, it contains the tracks for the touch
sensors and LEDs. The header also makes it possible to power the MCU externally.
Table 2-3. Header to Touch Board
AT16225: Atmel Smart Plug Hardware User Guide [APPLICATION NOTE]
Atmel-42689B-Atmel-Smart-Plug-Hardware-User-Guide_AT16225_ApplicationNote_07/2016

Wi-Fi TXD (Reserved for Wi-Fi firmware upgrade on fixture)
Wi-Fi RXD (Reserved for Wi-Fi firmware upgrade on fixture)
3 5 Test RXD (Reserved for fixture)
Test TXD (Reserved for fixture)
Power Measurement RXD (Interface for MCU and power measurement
device)
Power Measurement TXD (Interface for MCU and power measurement
device)
MCU Reset (Reserved for fixture)
MCU SWDIO (Reserved for fixture)
MCU SWDCLK (Reserved for fixture)
2.5 Header to Power Board
The MCU Board is mounted directly on the Power Board by a 12-pin header.
Table 2-4. Header to Power Board
2.6 DataFlash (Not Mounted)
Space for a DataFlash device is reserved (but not mounted) on the board. This can be used to store more data
locally if needed.
Figure 2-3. Schematic of DataFlash Part
AT16225: Atmel Smart Plug Hardware User Guide [APPLICATION NOTE]
Atmel-42689B-Atmel-Smart-Plug-Hardware-User-Guide_AT16225_ApplicationNote_07/2016