ST STM32F103ZE User Manual
ST STM32F103ZE User Manual

ST STM32F103ZE User Manual

1.4 kw digital power factor corrector
Table of Contents

Advertisement

Quick Links

1.4 kW digital power factor corrector based on the STM32F103ZE
Introduction
This system has been designed to evaluate the capabilities of the high-density
STM32F103ZE microcontroller to perform a digital power factor corrector. An application
example is provided for easy evaluation of the system's features and performance. The
system is intended for demonstration purposes to evaluate the potentiality of the STM32 to
control a high power PFC with performances comparable to a standard continuous mode
PFC monolithic IC, while assigning enough micro resources (such as program memory and
CPU computational capabilities) to other complex operations (such as driving 3ph motors in
scalar or field-oriented control). The system described in this document has been designed
to offer high performances in terms of PF, THD and DC output voltage ripple. According to
less demanding performances, power components (such as the inductor) present in the
PFC power board can be downsized to obtain a cost-effective solution. As opposed to
monolithic ICs, this digital approach enables a sophisticated control algorithm to be applied
and system parameters to be adjusted to meet customer requirements. The STM32 digital
PFC hardware system is composed of two boards: a PFC power stage (STEVAL-ISF002V1)
and a dual motor control stage (STEVAL-IHM022V1) based on the STM32F103ZE
microcontroller. Thanks to an MC connector on the PFC power board, this latter can be
interfaced to several ST MCU-based boards, especially those developed for motor control.
On-board OFF-line SMPS based on a VIPER12 is used to generate the 15 VDC voltages
necessary to supply the drivers inside the power board. Additionally, this board provides 5
volts for supplying any control stage supplied via the MC connector.
Note:
Read
Section 1
Main system features
– Maximum output power: 1400 W
– Input voltage range: 185 - 230Vac, 50/60 Hz
– Output voltage: 415VDC, 5% ripple
– PF up to 0.998 (at nominal rated power)
– THD between 0.9% and 9% over entire operating range
– Hardware overcurrent protection
– Software current limitation
– Software overvoltage protection
– Software voltage limitation
– Regulated DC output voltage with zero load
– Adjustable target value of output DC voltage
– Embedded UI for adjusting real-time PIs parameters for voltage and current
– Available demo for dual FOC motor control drive
April 2010
www.BDTIC.com/ST
prior to using the system.
Doc ID 16854 Rev 1
UM0877
User manual
1/62
www.st.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F103ZE and is the answer not in the manual?

Questions and answers

Summary of Contents for ST STM32F103ZE

  • Page 1 Introduction This system has been designed to evaluate the capabilities of the high-density STM32F103ZE microcontroller to perform a digital power factor corrector. An application example is provided for easy evaluation of the system’s features and performance. The system is intended for demonstration purposes to evaluate the potentiality of the STM32 to...
  • Page 2: Table Of Contents

    Signal conditioning for PFC current ......22 2/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 3 Revision history ........... . 61 Doc ID 16854 Rev 1 3/62 www.BDTIC.com/ST...
  • Page 4 List of tables Table 1. Peripherals and pins of the STM32F103ZE used for the digital PFC ....32 Table 2. Used interrupts and their priority..........33 Table 3.
  • Page 5 Technical sheet of PFC inductor - page 2 of 2 ........60 Doc ID 16854 Rev 1 5/62 www.BDTIC.com/ST...
  • Page 6: Safety And Operating Instructions

    No contact must be made with electronic components and contacts. ● The boards contain electro-statically sensitive components that are prone to damage through improper use. The electrical components must not be mechanically damaged or destroyed (to avoid potential health risks). 6/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 7: Electronic Connection

    (fan, water cooled load, etc). Note: Do not touch the board and its components after disconnection from the voltage supply as several parts and power terminals containing possibly energized capacitors must be given time to discharge. Doc ID 16854 Rev 1 7/62 www.BDTIC.com/ST...
  • Page 8: Pfc Basics And Operating Principles

    Most often, the core of a power factor correction (PFC) is an AC to DC boost converter (see Figure 2). For power typically above 600 W, the switching of the power MOSFET (T) is modulated so that the inductor current is in continuous conduction mode (CCM), as shown Figure 8/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 9: Pfc With Digital Approach

    From a theoretical point of view, it could be possible to replace an existing analog solution made up of discrete components with ST’s digital solution, in which case, other than the PFC control, the same MCU would also manage the main application.
  • Page 10: Figure 5. Digital Pfc Implementation Scheme

    Moreover, its output is used as a scaling factor for the Vac, the latter used as the current reference input for the "current error compensator". The output of this last PI is the actual duty cycle of the PFC power MOSFET. 10/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 11: Steval-Isf002V1 Hardware Description

    This demonstration board is intended for motor control applications involved in domestic appliances, HVAC (heating, ventilating and air conditioning) appliances, blowers and fans. AN3165 describes how to merge the digital PFC firmware with the one developed for the STM32 dual FOC motor control demonstrator. Doc ID 16854 Rev 1 11/62 www.BDTIC.com/ST...
  • Page 12: Dimensioning The Power Components

    Equation 6 ⋅ ⋅ ⋅ in(ripple) in(pk) Equation 7 ripple μF μF ⋅ ⋅ ⋅ ⋅ ⋅ in(ripple) This capacitor has to be in class X2 so its value must be 0.22 µF. 12/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 13: Boost Inductor For Ccm

    Equation 14 1400 ≥ out(max) ≅ μF ⋅ ⋅ π ⋅ ⋅ ⋅ π ⋅ ⋅ mains out(ripple Two capacitors in parallel have been selected. Their values are 330 µF at 450 V. Doc ID 16854 Rev 1 13/62 www.BDTIC.com/ST...
  • Page 14: Power Mosfet

    ⎞ − − ⋅ ⋅ ⎜ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⎟ ⎢ ⎥ MOSFET(swi tching) ⎝ ⎠ ⎣ ⎦ Equation 22 MOSFET(swi tching) Equation 23 ≅ MOSFET(tot MOSFET(con duction) MOSFET(swi tching) 14/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 15: Boost Diode

    Equation 30 ⎛ ⎞ − ⎜ ⋅ ⋅ ⋅ ⋅ ⋅ ⎟ ≅ Diode(swit ching) ⎝ ⎠ Equation 31 ≅ Diode(tot) Diode(cond uction) Diode(swit ching) Equation 32 ≅ ≅ PFC(tot) Bridge(tot MOSFET(tot Diode(tot) Doc ID 16854 Rev 1 15/62 www.BDTIC.com/ST...
  • Page 16: Connectors

    This connector can be used to provide 15 V to the STEVAL-ISF002V1 if the VIPER12 is bypassed. For correct polarity, follow the board’s serigraphy. 3.4.4 MC + PFC connector Refer to J15 of Figure 44 16/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 17: Mc Connector Only

    UM0877 STEVAL-ISF002V1 hardware description Figure 10. MC + PFC connector 3.4.5 MC connector only Refer to J16 of Figure 44 Figure 11. MC connector only Doc ID 16854 Rev 1 17/62 www.BDTIC.com/ST...
  • Page 18: Steval-Isf002V1 Block Diagram

    STEVAL-ISF002V1 hardware description UM0877 STEVAL-ISF002V1 block diagram Figure 12 shows the principal blocks of the STEVAL-ISF002V1 and their interconnections. Each block is described in the following sections. Figure 12. STEVAL-ISF001V1 block diagram 18/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 19: Power Supply

    L7805 to obtain 5 Vdc. The VIPER12 can be left out by removing J9. In this case, 15 Vdc have to be provided on J10 (positive on pin 1). Doc ID 16854 Rev 1 19/62 www.BDTIC.com/ST...
  • Page 20: Signal Conditioning For Input Voltage

    Figure 15. STEVAL-IHM022V1 - input voltage sensing section The conversion ratio is given by Equation 33 Equation 33 ⋅ 008629 ⋅ The input voltage scaled by this conversion ratio will be read by the MCU’s ADC. 20/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 21: Signal Conditioning For Output Voltage

    STEVAL-ISF002V1 hardware description 3.5.3 Signal conditioning for output voltage Figure 16. STEVAL-ISF002V1 - output voltage sensing section Figure 17. STEVAL-IHM022V1 - output voltage sensing section The conversion ratio is given by: Equation 34 ⋅ ⋅ Doc ID 16854 Rev 1 21/62 www.BDTIC.com/ST...
  • Page 22: Signal Conditioning For Pfc Current

    The output voltage scaled by this conversion ratio will be read by the MCU’s ADC. 3.5.4 Signal conditioning for PFC current Figure 18. STEVAL-ISF002V1 - PFC current sensing section Figure 19. STEVAL-IHM022V1 - PFC current sensing section 22/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 23 ⋅ ⋅ ⋅ PFC_Iac RSense RSense ⋅ Equation 37 ⋅ PFC_Iac 212121 RSense Conversion ratio: Equation 38 212121 The PFC current scaled by this conversion ratio will be read by the MCU’s ADC. Doc ID 16854 Rev 1 23/62 www.BDTIC.com/ST...
  • Page 24: Driving The Pfc Power Mosfet

    STEVAL-ISF002V1 hardware description UM0877 3.5.5 Driving the PFC power MOSFET Figure 20. STEVAL-ISF002V1 - PFC power MOSFET driving section The PFC_PWM provided by the MCU is inverted and sent to the MOSFET driver TD352. 24/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 25: Overcurrent Protection

    Q2 remains saturated until I goes below 14.3 V. RSense In fact, the second operational amplifier inside the TSV992 is used as a comparator and its output is high if the following conditions are met. Doc ID 16854 Rev 1 25/62 www.BDTIC.com/ST...
  • Page 26: Zero Crossing Detection Of Input Voltage

    Zero crossing detection of input voltage Figure 22. STEVAL-ISF002V1 - vin zero crossing detection section From PFC_SYNC, information can be obtained on the zero crossing of the input voltage as shown in Figure 23 26/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 27: Figure 23. Vin Zero Crossing Detection (Without Load)

    Then for each mains period on PFC_SYNC, a transition high/zero occurs as soon as the mains crosses zero. Note: This circuitry, combined with a timer, is also used to measure the frequency of V Doc ID 16854 Rev 1 27/62 www.BDTIC.com/ST...
  • Page 28: Current And Voltage Protections

    PFC_REFERENCE_VDC is 415 V. Note: With the exception of the hardware protection, all values that take part in the software protection or limitation can be modified in the "PFC.h" file (see Section 6.3.2). 28/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 29: Steval-Ihm022V1 Demonstration Board

    UM0877 STEVAL-IHM022V1 demonstration board STEVAL-IHM022V1 demonstration board The STM32F103ZE’s demonstration board STEVAL-IHM022V1 is designed as a dual and triple motor control development platform for STMicroelectronics’ ARM Cortex-M3 core- based STM32F103ZE microcontroller. Figure 25. STEVAL-IHM022V1 For more information refer to the user manual of the STEVAL-IHM022V1 a.
  • Page 30: Digital Pfc Firmware

    Figure 26 and it is managed by the PFC_ROUTINE function (part of the "PFC.c" file) every 25 µs. This method of gradually incrementing to reach the target output voltage reference is called soft-start . 30/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 31: Figure 26. Output Voltage Soft-Start Methodology

    PFC STOPPED: the PFC is in this state after any fault condition. The MOSFET is switched off and it is not possible to exit from this state. Figure 27 summarizes the states and transition events of the state machine. Doc ID 16854 Rev 1 31/62 www.BDTIC.com/ST...
  • Page 32: Stm32 Peripherals For Digital Pfc

    UM0877 Figure 27. PFC states STM32 peripherals for digital PFC Some STM2 peripherals are used to perform the digital PFC. Table 1. Peripherals and pins of the STM32F103ZE used for the digital PFC MC + PFC Peripheral Description connector ADC1 Ch.3 (regular channel) Output DC voltage PA.03...
  • Page 33: Main Files For Digital Pfc

    (in terms of embedded peripherals, CPU load and code memory), it is basically sufficient to include these two files in the host application firmware and to appropriately call a function that initializes and starts the digital PFC. Doc ID 16854 Rev 1 33/62 www.BDTIC.com/ST...
  • Page 34: Pfc.c File

    Enables the TIM3 counter. – Bypasses resistor when there is in-rush current. – Uses WAIT_FOR_Vin_ZERO as timer to wait for change relay status. – Calls ENABLE_PROTECTIONS. – Sets the PFC status as PFC_STARTING. 34/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 35: Pfc.h

    /* ADC1 and ADC2 ************************************************************ */ #define Vdc_main_Channel ADC_Channel_3 #define Vdc_sub_Channel ADC_Channel_14 #define Iac_Channel ADC_Channel_4 #define Vac_Channel ADC_Channel_5 /* ************************************************************* */ ● Conversion ratios (see Section 3.5.2 3.5.3 3.5.4 /* Conversion Ratios ******************************************************** */ Doc ID 16854 Rev 1 35/62 www.BDTIC.com/ST...
  • Page 36 /* Three particular points are located (at startup, after OC and after OV /* N (in percentage) is the part of VdcRef used by voltage PI /* N will be increased by N_GROWTH as soon as CYCLES reaches CYCLES_MAX 36/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 37 /* then N will be increased after 1600 x 25us = 40ms /* ************************************************************* */ #define CYCLES_MAX_STARTUP 1600 #define CYCLES_MAX_OVERCURRENT 3200 #define CYCLES_MAX_OVERVOLTAGE 3200 #define N_INITIAL_STARTUP #define N_INITIAL_OVERCURRENT #define N_INITIAL_OVERVOLTAGE #define N_GROWTH_STARTUP #define N_GROWTH_OVERCURRENT #define N_GROWTH_OVERVOLTAGE /* ************************************************************* */ Doc ID 16854 Rev 1 37/62 www.BDTIC.com/ST...
  • Page 38: Digital Pfc Firmware Execution

    PFC inputs Has any have been read hardware protection happened? PFC routine Has any software protection happened? stop PFC The timing of the PFC is explained in Figure 30 38/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 39: Figure 30. Digital Pfc Timing

    μs conv clock Through experimental measurements, the CPU performs a "PFC routine" for a time of 4.27 µs every control loop, then the CPU’s load for the PFC routine μs ≅ becomes: μs Doc ID 16854 Rev 1 39/62 www.BDTIC.com/ST...
  • Page 40: Starting The Pfc Application

    ● IAR embedded workbench for ARM 5.20 ● IAR project for digital PFC based on the STM32F103ZE microcontroller The software demonstration source code is provided by STMicroelectronics free of charge (after acceptance of the license agreement during the installation procedure).
  • Page 41: Downloading The Firmware

    PIs while the firmware is running. Connect the components as shown in Figure 31 to download the firmware into the STM32. Figure 31. Hardware connections for firmware downloading Doc ID 16854 Rev 1 41/62 www.BDTIC.com/ST...
  • Page 42: Figure 32. Opening The Workspace File

    Figure 33. Downloading and debugging the firmware As soon as the download is complete you can unplug the J-LINK probe. Once you have reset the STM32, the control board will be ready for you to try out the demonstrator. 42/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 43: Getting Started With The System

    Connect a 3-ph inverter board if required (optional). Supply the control board STEVAL-IHM022V1 with either a 5 V DC power supply or by means of the PFC power board STEVAL-ISF002V1 (refer to J18 in Table 3 Doc ID 16854 Rev 1 43/62 www.BDTIC.com/ST...
  • Page 44: Running The Demonstrator

    ● Use RIGHT of joystick to increase the selected PI parameter. ● Use LEFT of joystick to decrease the selected PI parameter. ● Use KEY push button to restore the selected PI parameter. 44/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 45: Digital Pfc At Work

    MCU will detect this condition and will launch the digital PFC and protections. The LCD display should now show the following. Figure 37. LCD during running of the digital PFC Doc ID 16854 Rev 1 45/62 www.BDTIC.com/ST...
  • Page 46: Figure 38. Lcd After An Overcurrent

    Running the demonstrator UM0877 If any errors occur, the MCU will stop the digital PFC and the LCD will display the following. Figure 38. LCD after an overcurrent 46/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 47: Performance Of The Digital Pfc

    The following figures show the behavior of the digital PFC when it is supplying a load of 1400 W while the input voltage is 185 V/50 Hz, 230 V/50 Hz and 265 V/50 Hz. Figure 40. 185 Vrms at 50 Hz as input - 1400 W as output load Doc ID 16854 Rev 1 47/62 www.BDTIC.com/ST...
  • Page 48: Efficiency Measurement

    97.3% 0.978 50.00% 0.73 410.0 0.71 97.3% 0.995 185 Vrms 75.00% 1050 1.10 410.5 1.06 96.4% 0.997 at 50 Hz 100.00% 1400 1.47 413.5 1.41 95.9% 0.998 105.00% 1470 1.55 416.9 1.48 95.5% 0.998 48/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 49: Table 8. Efficiency With 230 Vrms At 50 Hz

    1470 1.52 415.0 1.47 96.7% 0.998 1. By means of digital power meter Yokogawa WT110. 2. By means of AC power source/analyzer Agilent 6813B. 3. By means of DC electronic load Chroma 63202. Doc ID 16854 Rev 1 49/62 www.BDTIC.com/ST...
  • Page 50: Appendix A Schematic And Bill Of Materials

    Schematic and bill of materials UM0877 Appendix A Schematic and bill of materials Figure 43. STEVAL-ISF00V1 schematic 50/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 51: Layout

    J18: jumper to supply digital board with 5 Vdc ● L1: EMI filter ● L2: PFC inductor ● Q1: PFC power MOSFET (STW23NM60N) ● R34: resistor to avoid in-rush current at start-up ● RL1: relay to bypass the R34 resistor Doc ID 16854 Rev 1 51/62 www.BDTIC.com/ST...
  • Page 52: Table 10. Steval-Isf00V1 Bom

    SMD 0805 capacitor X7R C14, Ceramic 100 pF +/-10% 50 V SMD 0805 capacitor X7R Ceramic 2 2 nF +/-10% 50 V SMD 0805 capacitor X7R C16, C19, Ceramic 100 nF +/-10% 50 V SMD 0805 C21, capacitor X7R www.BDTIC.com/ST...
  • Page 53 Vishay GF1M RS code: 269-451 600 V/ 1N5406 Rectifier diode DO201AD RS code: 262-343 Turbo 2 STTH12S0 STTH12S06 ultrafast high TO-220 ST Microelectronics voltage rectifier Switching Distrelec code: LL4148 SOD-80 diode_ 601496 Turbo 2 STTH1R06 STTH1R06 ultrafast high ST Microelectronics voltage rectifier www.BDTIC.com/ST...
  • Page 54 Socket for F1 Through hole Schurter 31.8231 RS code: 336-7851 for F1 Low-power OFF line SMPS VIPER12A VIPER12A-E SO-8 ST Microelectronics primary switcher 3-way PCB mount screw 220AC/16 A Through hole Phoenix Contact 1731734 RS code: 189-5972 terminal, 7.62 mm...
  • Page 55 Vertical External, 15 V RS code: 495-8470 (male through hole connector) 2.54 mm pitch Rail-to-rail input/output TSV992 20 MHz GBP SO-8 ST Microelectronics TSV992ID operational amplifiers Advanced TD352 IGBT/MOSFET SO-8 ST Microelectronics TD352ID driver Positive voltage L7805CDT- L7805C DPAK...
  • Page 56 Radial inductor Through Hole Wurth Elektronik 744741102 RS code: 488-9964 N-channel 600 V - 0.150 Ω - 19 A, second STW23NM STW23NM60N generation TO-247 ST Microelectronics MDmesh™ power MOSFET Heatsink for Heat- STW23NM60N sink for Heatsink for Q1 Aavid Thermalloy...
  • Page 57 1/4 W Resistor SMD 1206 R27, 120 kΩ +/-5% 1/4 W Resistor SMD 1206 1.5 kΩ +/-5% 1/4 W Resistor SMD 1206 100 Ω +/-5% Resistor Through hole RS code: 199-7769 1.2 kΩ +/-5% 1/4 W Resistor SMD 1206 www.BDTIC.com/ST...
  • Page 58 Metal screw Metal screw RS code: 560-580 screw M3x6mm Metal Metal screw Metal screw RS code: 560-596 screw M3x10mm Metal Metal washer Metal washer RS code: 560-338 washer Metal shake- Metal shakeproof Metal washer RS code: 526-574 proof washer washer www.BDTIC.com/ST...
  • Page 59: Customized Inductor By Magnetica

    UM0877 Schematic and bill of materials Customized inductor by MAGNETICA Figure 45. Technical sheet of PFC inductor - page 1 of 2 Doc ID 16854 Rev 1 59/62 www.BDTIC.com/ST...
  • Page 60: Figure 46. Technical Sheet Of Pfc Inductor - Page 2 Of 2

    Schematic and bill of materials UM0877 Figure 46. Technical sheet of PFC inductor - page 2 of 2 60/62 Doc ID 16854 Rev 1 www.BDTIC.com/ST...
  • Page 61: Revision History

    UM0877 Revision history Revision history Table 11. Document revision history Date Revision Changes 23-Apr-2010 Initial release. Doc ID 16854 Rev 1 61/62 www.BDTIC.com/ST...
  • Page 62 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.

Table of Contents