Atmel AT16225 Hardware User's Manual

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
2
2
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
3
3
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
4
4
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
5
5
Pin #
SAM W25 function
System function
Description
0
GND
GND
Heat sink pads in the bottom
1
GND
GND
2 UART TXD
Wi-Fi TXD
For ATWINC1500 firmware upgrade
3
UART RXD
Wi-Fi RXD
For ATWINC1500 firmware upgrade
4
Wi-Fi Chip En
NC
5
Wi-Fi GPIO_1
RTC
Not Used
6
NC
NC

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
6
6
Pin #
SAM W25 function
System function
Description
7
VBAT
VCC
Power supply
8
PA16
Flash SPI MOSI
DataFlash Interface
9
PA17
Flash SPI CLK
DataFlash Interface
10
GND
GND
11
PA18
Flash SPI SS
DataFlash Interface
12
PA19
Flash SPI MISO
DataFlash Interface
13
PA20
RTC
Not Used
14
PA21
LED WR
Red LED for Wi-Fi
15
PA22
LED WG
Green LED for Wi-Fi
16
PA23
LED WY
Yellow LED for Wi-Fi
17
GND
GND
18
PA24
Test TXD
Fixture test interface
19
PA25
Test RXD
Fixture test interface
20
GND
GND
21
VCC
VCC
Power supply
22
PB22
Relay
Relay ON/OFF
23
PB23
NC 24
RESET_N
MCU Reset
SAM D21 reset pin
25
PA30
MCU SWDCLK
SWD SWDCLK pin
26
PA31
MCU SWDIO
SWD SWDCLK pin
27
PB02
LED PR
Red LED for Power
28
PB03
LED PG
Green LED for Power
29
PA00
XIN32
32kHz External Crystal
30
PA01
XOUT32
32kHz External Crystal
31
PA02
NC
32
GND
GND
33
PA03
NC 34
PA04
NC 35
PA05
Touch Guard 2
Touch Guard sensor
36
PA06
Touch Key
Touch key sensor
37
PA07
Touch Guard 1
Touch Guard sensor
38
PA08
Crypto SDA
Reserved interface for internal crypto
39
PA09
Crypto SCL
Reserved interface for internal crypto
40
PA10
PM TXD
Interface for Power Measurement device
41
PA11
PM RXD
Interface for Power Measurement device
42
GND
GND
AT16225: Atmel Smart Plug Hardware User Guide [APPLICATION NOTE]
Atmel-42689B-Atmel-Smart-Plug-Hardware-User-Guide_AT16225_ApplicationNote_07/2016
7
7
Pin #
SAM W25 function
System function
Description
43
PB10
NC 44
PB11
NC 45
Wi-Fi GPIO_15
NC 46
Wi-Fi GPIO_16
NC 47
Wi-Fi GPIO_18
NC 48
Wi-Fi I2C SCL
I2C SCL
Reserved interface for internal WINC1500
49
Wi-Fi I2C SDA
I2C SDA
Reserved interface for internal WINC1500
50
Wi-Fi Reset_n
NC 51
GND
GND
SWD header pin
Pin definition
ATSAMW25 pin
1
SWDCLK
25
2
GND
3
NC 4
VCC
5 SWDIO
26 6 RESET
24 7 NC 8
NC 9
NC 10
NC
Touch header pin
Pin definition
ATSAMW25 pin
1
GND (External power input if onboard power is not available)
2 VCC (External power input if onboard power is not available)
3
Touch Guard Sensor 1
37
4
Power LED Green
28 5 Touch Key Sensor
36

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
8
8
6
Power LED Red
27
7
Touch Guard Sensor 2
35 8 Wi-Fi LED Red
14 9 Wi-Fi LED Yellow
16
10
Wi-Fi LED Green
15
Power header pin
Pin definition
ATSAMW25 pin
1
VCC
2
GND
3
Wi-Fi TXD (Reserved for Wi-Fi firmware upgrade on fixture)
2
4
Wi-Fi RXD (Reserved for Wi-Fi firmware upgrade on fixture)
3 5 Test RXD (Reserved for fixture)
19
6
Test TXD (Reserved for fixture)
18
7
Power Measurement RXD (Interface for MCU and power measurement device)
41 8
Power Measurement TXD (Interface for MCU and power measurement device)
40 9
MCU Reset (Reserved for fixture)
24
10
Relay Control
22
11
MCU SWDIO (Reserved for fixture)
26
12
MCU SWDCLK (Reserved for fixture)
25

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
Loading...
+ 16 hidden pages