ST STEVAL-BLUEPLUG1 User manual

Introduction
The STEVAL-BLUEPLUG1 evaluation board for home-automation and IoT (internet of things) applications is designed to help
you develop your own home or building automation subsystems for energy management, in a small form factor solution for easy
integration into home and building electrical systems.
The board is compliant with Bluetooth Low Energy (BLE) specification 4.2 to allow secure communication of metering data from
specific electrical loads to a smart phone with BLE support.
You can use an Android application for your smart phone to display energy measurement parameters and send dimming and
scheduling commands to the Smart Plug board.
This board embeds an STPM32 metering chip for high accuracy measurement of power and energy in power line systems using
shunt current sensors, and a non-isolated buck converter supply based on the VIPER06Xs. A three-terminal TRIAC controls the
current through AC switching.
You can also interface the board with NFC enabled EEPROM via a dedicated connector.
Figure 1. STEVAL-BLUEPLUG1 evaluation board - top and bottom
How to use the STEVAL-BLUEPLUG1 evaluation board for home automation
smart plugs
UM2395
User manual
UM2395 - Rev 1 - May 2018
For further information contact your local STMicroelectronics sales office.
www.st.com
Downloaded from Arrow.com.

1Safety information
FCC notices
Note: ST reference designs and evaluation boards are intended to help and facilitate development of products. Using
a direct copy of any of them does not waive the requirement for testing and certification of products mandated by
governing agencies and authorities.
This device compiles with part 15 of the FCC Rules. Operation is subject to the following two conditions:
1. This device may not cause harmful interference
2. This device must accept any interference received, including interference that may cause undesired
operation.
Electrical safety
Danger:
Due to the high voltage present on the non-isolated components, special care must be taken to
avoid the risk of electric shocks and burns.
There are no protections against accidental human contact with high voltage components.
Never touch live board components when the board is connected or immediately after the board is
disconnected, as the capacitors may still be charged.
Do not connect probes to any high voltage components if the board is not isolated from the mains
supply, as this may cause damage to equipment.
1. The board must be used only by qualified persons.
2. De-energize the board and all its interface outputs and electrical loads before performing any electrical or
diagnostic operations.
3. Only program and debug the board with the isolated JTAG in-circuit debugger/programmer to avoid
damaging the tools.
4. Use a mains insulation transformer when you perform any tests with spectrum analyzers or oscilloscopes.
Note: STMicroelectronics assumes no responsibility for accidents or injury caused by improper use of this
development tool.
Personal safety
1. Wear personal protective equipment such as latex gloves or safety glasses with side shields, or protect the
EVM in an adequate lucent plastic box with interlocks from accidental touch.
UM2395
Safety information
UM2395 - Rev 1 page 2/22
Downloaded from Arrow.com.Downloaded from Arrow.com.

2Overview
2.1 Features
• Smart Energy Meter design with wireless connectivity
• BLE (Bluetooth Low Energy) v4.2 connectivity for control and metering panel: Smart-phone connectivity for
energy consumption dashboard, control of appliances
• Dimming: Some loads can be controlled. For example, AC Induction fan speed, Heaters, Incandescent
lamps
• Scheduling: Set the time of day for ON or OFF of the load
• NFC interface: To configure the design, store the logs (connector for adapter board)
• Rated voltage: 240 VAC (typ.)
• Rated current: 12 A (typ.)
• Power consumption of plug: 1.6 W (max.)
• Instantaneous and averaged power
• RMS and instantaneous voltage and current
• Radio certifications:
– FCC certified: S9NSPBTLE1S
– IC certified: 8976C-SPBTLE1S
• CE certified
• RoHS and China RoHS compliant
2.2 Typical applications
• Control and monitoring of energy parameters using BLE.
• Smart metering
• Home automation
• Smart lighting
UM2395
Overview
UM2395 - Rev 1 page 3/22
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

2.3 Board architecture
Figure 2. STEVAL-BLUEPLUG1 featured components
3
2
1
5
4
6
1. BTA12-800BWRG (12 A TRIAC)
2. STPM32 (IC for metering applications)
3. SPBTLE-1S (Bluetooth Low Energy v4.2 module)
4. VIPER06 (30 KHz offline converter)
5. STTH110RL (High voltage ultrafast rectifier)
6. L4931 (very low drop voltage regulator)
Figure 3. STEVAL-BLUEPLUG1 block diagram
UART
SWD
GPIOs
V
dd I2C
STPM32
UART
Tx
Rx
M24LR
I2C
SDA
VIPER06 L4931
SWD
Debugger
OPTO
BTA12
230 VAC
Phase_in Neutral_in Phase_out Neutral_out
IIN
Zero Crossing
Circuit
LEDs Switch
STEVAL-BLUEPLUG1
230 VAC
Inductive or resistive LOAD
3.3V
Vdd
3.3V
Vdd
3.3V
Voltage Divider
Circuit
VIP
VIN
Shunt
VIPerPLUS
SCK
ST25
IIP
Smart Plug APP
STBTLE-1S SCL
o
ptional
UM2395
Board
architecture
UM2395 - Rev 1 page 4/22
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

The mains supply and loads are monitored by the STPM32 standard metering IC, while the SPBTLE-1S Bluetooth
Low Energy module handles data and command interfacing for the Smart Plug Android app developed for the
board, and can store data via the EEPROM connector.
The 12 A TRIAC acts as a switch for the load and phase controller for dimming.
The supplies for the ICs are regulated from the VIPER06 buck converter output.
The board includes a manual switch to turn the load on and off, and LEDs to signal connectivity status.
2.4 Zero crossing detector circuit
A zero crossing circuit is an electrical circuit that begins operation with the AC load voltage at close to 0 V in the
AC cycle. Zero crossing detection is used for the dimming reference point to fire the TRIAC accordingly.
The circuit has three resistors connected to phase of the AC line to lower the resultant voltage and a resistor on
the base of a PNP transistor which acts as a pull up resistor: when the voltage at the base drops below the base
operating voltage, the transistor switches to output LOW.
Figure 4. Zero crossing detector circuit
R54
270K
DIO6_ZCR
10K
3V3
R53
GND
PHASE
270K
2N3906
R37
R51
10k
270K
Q3
R52
The purpose of the circuit in our design is to start the TRIAC conducting very near the moment when the load
voltage crosses zero volts (at the beginning or the middle of each AC cycle represented by a sine wave), so that
the output voltage can be modified by changing the firing angle of TRIAC, which in turn will change the required
output waveform.
UM2395
Zero crossing detector circuit
UM2395 - Rev 1 page 5/22
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

Figure 5. Zero crossing detection with oscilloscope
3
2
1
Note: 1. AC voltage
2. Output of the transistor
3. Output of the transistor goes low as ac voltage approaches zero
Figure 6. AC at 50% phase
2
1
Note: 1. AC voltage
2. TRIAC Output at 50% duty cycle
2.5 Power supply
For power supply, a non-isolated Buck converter using the VIPER06Xs offline converter is used, with PWM
operation at 30 kHz and frequency jittering for lower EMI. Standby power is very low, at < 30 mW.
This type of supply is ideal for the Smart Plug application, where large currents are not required, but a small form
factor is necessary.
UM2395
Power supply
UM2395 - Rev 1 page 6/22
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

Figure 7. Non-isolated buck converter
1
RR3322
RR3344
PP__IINN
NEUTRAL
VDD
2
DD11
GND 7
JJ11
RR1111
11..55uuFF 2255VV
SSMMAA
DD22
2277nnFF,,2255vv
CC4444
LIM
3
CCOONN22
CC4466
5V
CC1177
116600kk
11..55uuFF,,440000VV
LL111100EE,,11WW
GND
RR1100
MMOOVV
5V
CC1188
UU22
5
11..11mmHH
LL44993311
NN__IINN
SSTTTTHH111100RRLL
PHASE
GND
COMP
7
GND
1
110000nnFF,,1166VV
INHIBIT
6
GND
GND
77..55KK
22..22uuFF,,5500VV
CC4499
8822kk
3V3
333300uuff 1100vv
VVIIPPEERR 0066XXSS
JJ1100
GND
JJ1133
RRVV11
DRAIN 10
DO NOT MOUNT J10, J13
DD44
SSTTTTHH111100RRLL
NC
4
11..55uuFF,,440000VV
CC4455
8
CC3366
1
1
2
VOUT
GND
2
GND
3
DRAIN
9
PHASE
NEUTRAL
FB
4
5V
RR11
UU66
LL66
DRAIN
6
DRAIN
GND
DRAIN
8
VIN
CC3344
220000nnFF,,2255VV
1
5
REGULATOR
55..11kk
447700uuHH
The output of supply is set to 4.3 V, which is further regulated by the L4931 LDO to 3.3 V and 500 mA, to power
all the analog and digital sections.
UM2395
Power supply
UM2395 - Rev 1 page 7/22
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

3Set up the board and connect with the Android app
Warning:
Before performing this task, please review all the safety procedures and precautions associated
with high voltage electrical circuits, and prepare the necessary protection equipment.
Use the procedure below to set up the board.
Step 1. On the evaluation board, connect the input mains and output load connectors.
Input mains connectors:
– P_IN (J10)
– N_IN (J13)
Load connectors:
– P_OUT (J11)
– N_OUT (J12)
Figure 8. Phase (P) and neutral (N) input (IN) and output (OUT) connectors
3
2
1
5
4
6
P_IN P_OUT N_OUT N_IN
J10 J11 J12 J13
Step 2. After powering up the board, RED LED (LD3) will indicate that the board is turned ON.
Step 3. Install the SmartPlug.apk Android app from the release package and launch it.
Figure 9. Smart Plug launch screen
Step 4. Search for the device on your smart phone by selecting the [Plugs found] icon.
Step 5. Connect the device to the App by selecting the Smart_Plug_NRG1 device.
Once connected with the board, the BLUE LED (LD2) will blink at the frequency of 2 Hz.
UM2395
Set up the board and connect
with the Android app
UM2395 - Rev 1 page 8/22
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

3.1 Control a load with the device
Follow the instructions below to control a load with the STEVAL-BLUEPLUG1 board and the Smart Plug app.
Step 1. Connect the board to a mains supply and a load, such as a light bulb.
Step 2. Select the load type; i.e., [Light Bulb] for this example.
Figure 10. Smart Plug - load type panel
Step 3. Control the light bulb and view the parameters in the load control panel.
– select the bulb image to turn it on or off
– use the slider to control dimming
Note: LED lights are not particularly suitable to evaluate the dimming function.
UM2395
Control a load with the
device
UM2395 - Rev 1 page 9/22
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.

Figure 11. Smart Plug - load control panel
UM2395
Control a load with the
device
UM2395 - Rev 1 page 10/22
Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.Downloaded from Arrow.com.
Table of contents
Other ST Motherboard manuals

ST
ST STM32F407 Series User manual

ST
ST NUCLEO-F207ZG User manual

ST
ST EVAL-RHRICL1ATV1 User manual

ST
ST STEVAL-ISB042V1 User manual

ST
ST STEVAL-PCC008V1 User manual

ST
ST STEVAL-IME015V1 User manual

ST
ST SPC560P-DISP User manual

ST
ST UM0969 User manual

ST
ST EVAL-L9177A User manual

ST
ST SPC5-UDESTK User manual































