STEVAL-IHP002V1 SmartPlug systems to measure and control AC loads, based on the STM32, ST7540 PLM, and STPM01 Data brief Features ■ Energy consumption monitoring ■ PLM communication ■ On/Off or dimming configuration ■ CENELEC band C compliant ■ System setting by RS232 ■ RoHS compliant Description The STEVAL-IHP002V1 demonstration board is a SmartPlug based on the STM32F10x microcontroller, ST7540 PLM, and STPM01 energy metering ICs. The board is a node of a PLM network which allows the final user to monitor and manage the plugged load energy consumption, and can work in conjunction with the STEVAL-IHP003V1 used as a data concentrator for connection to a PC. STEVAL-IHP002V1 The board has been developed as a guideline to build a home/building automation subsystem for energy management. It is designed to fit the dimensions of a standard box for wall installation and easy integration into home/building electrical plants. The current, power, energy and other information related to the electrical load connected to the SmartPlug board are sent to a PLM data concentrator (such as the STEVALIHP003V1) through the home/building PLM network. A protocol stack has been implemented to allow node communication; it includes a PHY layer with FEC, a MAC layer with CSMA/CA and ACK, and a network layer with static addressing and routing topology. March 2011 Doc ID 18235 Rev 2 For further information contact your local STMicroelectronics sales office. 1/10 www.st.com 10 STEVAL-IHP002V1 L SYN_MCU SPI_SCS SPI_CLK SPI_MISO SPI_MOSI N UART_TX UART_RX USART_RX PC Comm USART_TX TRIAC-Relay OPT_OUT_CMD OPT_CMD OUT_CMD STPM01_SYN STPM01_SCS STPM01_SCK STPM01_MISO STPM01_MOSI PLM_BU PLM_CD/PD PLM_Rx/Tx PLM_REG/DATA PLM_SCK PLM_RX PLM_TX BU/THERM CD/PD RxTx REG_DATA CLR/T RxD TxD L N CON2 2 1 J9 CON2 J7 2 1 GND_PLM F1 1A RV1 S14K510 EARTH L ZCR MCO STPM01 MCU Energy Measurement SPAC265-3W Power Supply TRIAC_CMD Dimmer-Switch N N L ZCR CLK ST7540 PLM SmartPlug - top view PLM Figure 1. STM32 Circuit schematics RS232 1 INSULATED UART Circuit schematics GAPMSMD00010 2/10 Doc ID 18235 Rev 2 UART_RX UART_TX 0 R60 0 R59 Doc ID 18235 Rev 2 TX-0 1 6 2 7 3 8 4 9 5 PORT 0 10 11 GND2 IN2 OUT1 VDD2 4 7 8 5 CN1 IL712S-1E GND1 OUT2 IN1 Vo- NC3 VDD1 U10 Vo+ NC4 DB9-male connector 4 3 2 1 TSM0505S Vin- NC2 NC1 Vin+ 5 6 7 8 5V_ISOL C92 47nF 5V_ISOL C71 100nF C69 100nF 9 12 10 11 5 4 3 1 15 R2OUT R1OUT T2IN T1IN C2- C2+ C1- C1+ IC1 C70 100nF C68 100nF 8 13 RX-0 7 14 TX-0 6 2 ST3232EBDR R2IN R1IN T2OUT T1OUT V- V+ 5V_ISOL 16 VCC RX-0 C91 47nF 1 6 3 2 U9 Figure 2. 5V 5V STEVAL-IHP002V1 Circuit schematics PLM SmartPlug - serial communication GND GAPMSMD00011 3/10 4/10 1 3 4 FIT106-4 4 2 6 8 7 +VOUT 5 AC_IN2 -VOUT SPAC265-3W U1 1 3 AC_IN1 10uH L8 + C117 470 uF 25V 1 VCC_12V + 470 uF 25V C118 2 C119 47 uF 25V + VIN C93 100nF 3 1 IC2 VOUT LD1117DT50TR GND Doc ID 18235 Rev 2 2 2 1 L1 10uF 16V C94 2 + 5V DL1 RED R61 560 VIN 10uF 16V + C95 3 1 IC3 VOUT LD1117ADT33TR GND 1mH L9 C120 33nF X2 R107 10 1W 2 47uF 25V + C96 VCC_3V3 Figure 3. N L Circuit schematics STEVAL-IHP002V1 PLM SmartPlug - power supply GAPMSMD00012 R20 56k R19 2k4 Vdd REG_DATA BU/THERM CD/PD PA_OUT PA_IN+ TP8 TP27 UART/SPI TP10 TP9 Vsense Tx_OUT TP12 PA_IN- TP16 Doc ID 18235 Rev 2 TP17 TP18 RxTx TP19 CLR/T TP20 TP11 WD TP21 CL TP22 TP13 RSTO TP23 TP15 Vdd TP25 Rx_IN TP26 JP4 CLOSE TxD RxD 1 MCLK TEST PADS Vdd 2 R9 4k7 C32 270 pF Vcc VDC C15 10 uF C17 10 uF Digital Ground C24 10 uF VCC_12V VDC Vdd C25 100 nF C33 100 pF PA_IN- C16 100 nF C18 100 nF Analog Power Ground CD/PD REG_DATA Analog Signal Ground Vcc R10 13k PA_IN+ R12 1k C31 22 pF C21 100pF Vdd JP5 CLOSE MCLK RSTO UART/SPI WD PA_IN- 2 BAT54S/SOT 2 RxD RxTx TxD BU/THERM CLR/T 1 1 3 PA_OUT Rx_IN VDC D10 PA R14 1k8 C30 15 pF GND_PLM 1 2 3 4 5 6 7 8 9 10 11 12 13 14 D8 2 1 3 R6 1k1 CL R17 470 1 L7 1 mH 2 28 27 26 25 24 23 22 21 20 19 18 17 16 15 1 Vsense TEST2 TEST1 VDC Rx_IN CL Vsense X2 X1_OSCIN SVss Tx_OUT PA_IN+ Vcc Vss PA_OUT C26 6.8 nF BAT54S/SOT 2 C14 10nF D9 SM6T15CA C23 68nF X2 R8 15k VDC Vcc 1 2 3 4 5 TEST2 TEST1 SVss Rx_IN C12 33pF C11 33pF X1 16Mhz OSCIN J1 PEAK METER CONNECTOR R7 47K Vcc VDC Tx_OUT PA_OUT Tx_OUT PA_IN+ Rx_IN CL Vsense TEST2 TEST1 L5 22 uH Non Isolated topology for 132 kHz (Band C) ST7540 CD/PD REG_DATA GND RxD Rx/Tx TxD BU/THERM CLR/T Vdd MCLK RSTO UART/SPI WD PA_IN- 2 1 C22 10uF U3 L6 220 uH R13 2k7 C27 10 nF Vcc Vcc Figure 4. Tx_OUT VDC VDC STEVAL-IHP002V1 Circuit schematics PLM SmartPlug - PLM communication TP14 GAPMSMD00013 5/10 Circuit schematics Figure 5. STEVAL-IHP002V1 PLM SmartPlug - MCU +3.3V +3.3V R68 1k 2 2 3 BC857B Q2 1 R63 R64 R65 R66 R67 10K 10K 10K 10K (NOT MOUNTED) VCC_3V3 R71 10K R72 10K 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 JT-NTRST 3 BC857B Q1 1 +3.3V R62 1k JT-TDI JT-TMS R69 82 R70 82 JT-TCK JT-TDO +3.3V RESET# U11 C98 100nF RESET# RESET# R75 Y1 1M +3.3V 8MHz SW 4 Rst C5 22pF +3.3V VBAT PC13/TAMP/RTC PC14 PC15 PD0/OSC-IN PD1/OSC-OUT NRST VSSA VDDA PA0-WKUP PA1 PA2 VDD2 VSS2 PA13 PA12 PA11 PA10 PA9 PA8 PB15 PB14 PB13 PB12 C7 470nF 36 35 34 33 32 31 30 29 28 27 26 25 PA3 PA4 SPI1_SCK SPI1_MISO SPI1_MOSI TIM3_CH3 TIM3_CH4 BOOT_1 I2C2_SCL I2C2_SDA C99 100nF JT-TMS OPT_CMD STPM01_SYN USART_RX USART_TX MCO STPM01_MOSI STPM01_MISO STPM01_SCK STPM01_SCS USART1_RX USART1_TX SPI2_MOSI SPI2_MISO SPI2_SCK PA1 PA2 PA3 13 14 15 16 17 18 19 20 21 22 23 24 C6 22pF 1 2 TAMP 3 PC14 4 PC15 5 6 7 8 9 W KUP 10 PA1 11 PA2 12 PA3 PA4 PA5 PA6 PA7 PB0 PB1 PB2 PB10 PB11 VSS1 VDD1 R74 10K +3.3V J2 JTAG R73 10K STM32F103CBT6 VDD3 VSS3 PB9 PB8 BOOT0 PB7 PB6 PB5 PB4 PB3 PA15 PA14 +3.3V 48 47 46 45 44 43 42 41 40 39 38 37 C97 100nF BOOT_0 PB7 PB6 PB5 JT-NTRST JT-TDO JT-TDI JT-TCK D1 BI-COLOR LED RED/GREEN PLM_REG/DATA PLM_CD/PD PLM_BU +3.3V C100 100nF PA4 SPI1_SCK SPI1_MOSI SPI1_MISO PLM_Rx/Tx PLM_SCK PLM_RX PLM_TX ZCR TRIAC_CMD 5V +3.3V SW 5 R76 10k 3 +3.3V 2 BOOT_1 R77 10k BOOT_1 SW 2 1 R108 4.7k +3.3V R109 4.7k J8 3 2 BOOT_0 1 I2C2_SDA + BOOT_0 C101 10uF 1 2 3 4 C103 10nF C104 100nF I2C2_SCL RFID READER +3.3V SW 6 R80 10k R81 2 PB5 R82 10k CONF0 R83 10k SW 7 SW 3 J3 1 3 CONF1 S3 10k 1 2 PB6 PB7 TAMP +3.3V 3 PC14 PC15 2 100n W KUP 1 2 +3.3V 1 R84 3 CON2 C106 S4 10k 2 1 1 CONF3 C107 2 100n GAPMSMD00014 6/10 Doc ID 18235 Rev 2 Doc ID 18235 Rev 2 2 3 6.8 T1 R91 N L Current Transformer 1 N 6.8 R92 D6 1N4148 C110 100nF C109 100nF 4 1nF C108 L 261K R96 C112 261K R97 100nF 100nf C113 STPM01 led MON MOP Vddd Vss Vcc Vdda Votp Ilp1 Iln1 261K R21 2M R94 20 1 ZCR 2 4 5 6 8 7 9 10 R18, R19, R20, R21 Close to STPM01 R93 1k C114 10nF R90 1k 100nF C111 VCC_3V3 U12 Sda Scl Scs Syn CLKout CLKin Vin Vip Iln2 Ilp2 19 18 3 15 17 16 14 13 12 11 CLK R99 43K 0R R98 R95 R100 475 100 C115 10nF R85 2.4k R86 2.4k 2 1 2 2 2 2 SW 12 SW 11 SW 10 SW 8 DL2 R89 560 3 1 3 1 3 1 3 1 SCS_CAL SPI_CS SYN_CAL SYN_MCU SCLK_CAL SPI_CLK SDA_CAL SDA_MCU CALIBRATION SETTINGS SCS SYN SCLK SDA R87 2.4k SW 9 SPI_SCS SYN_MCU SPI_CLK 2 3 1 SPI Option VOTP SBG GND SDA SCS SCLK LED SYN SBG CLK ZCR SPI_MOSI SPI_MISO R88 4K7 VCC_3V3 J6 1 2 3 4 5 6 7 8 9 10 CAL CON VOTP SBG GND SDA_CAL SCS_CAL SCLK_CAL LED SYN_CAL SBG SPI_MOSI SPI_MISO CLK ZCR Figure 6. VCC_3V3 STEVAL-IHP002V1 Circuit schematics PLM SmartPlug - energy meter GAPMSMD00015 7/10 Circuit schematics Figure 7. STEVAL-IHP002V1 PLM SmartPlug - dimmer, switch F2 15A L L VCC_12V R101 1k W3 W1 2 1 Load D11 STPS140U C1 R102 2.2uF 22 R Q3 T2035H C116 47nF R3 1k 0.5W N N Sensor VCC_12V N K1 D12 1N4148 VCC_3V3 2 7 3 6 5 4 1 8 RTD14-SPDT (Do Not Fit) R103 1K (DO NOT FIT) R104 1k 16A Relay RS 365-0535 Q4 2STR1215 OUT_CMD J4 1 2 3 CON3 VCC_12V K2 D13 1N4148 VCC_3V3 3 6 1 8 2 7 5 4 RTD14-SPDT R105 1K (DO NOT FIT) R106 1k OPT_OUT_CMD 16A Relay RS 365-0535 Q5 2STR1215 GAPMSMD00016 8/10 Doc ID 18235 Rev 2 STEVAL-IHP002V1 2 Revision history Revision history Table 1. Document revision history Date Revision 17-Nov-2010 1 Initial release. 2 – Description on page 1: Added reference to use of the STEVALIHP002V1 as a data concentrator. – Resized and reconfigured schematic diagrams to improve readability. 08-Mar-2011 Changes Doc ID 18235 Rev 2 9/10 STEVAL-IHP002V1 Please Read Carefully: Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice. All ST products are sold pursuant to ST’s terms and conditions of sale. Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no liability whatsoever relating to the choice, selection or use of the ST products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein. UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY, DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK. Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any liability of ST. ST and the ST logo are trademarks or registered trademarks of ST in various countries. Information in this document supersedes and replaces all information previously supplied. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners. © 2011 STMicroelectronics - All rights reserved STMicroelectronics group of companies Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Philippines - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com 10/10 Doc ID 18235 Rev 2