This is the project that I want to share with you. Project goal is 97% peak efficiency and over 25yrs lifespan.
I've been working on this project over two years total. Currently the project is at the software development design stage and I hope to get some support from you regarding that.
I know that Dave Jones like solar stuff so maybe this topic will get some attention.
Photo of V1 (but V2 looks almost identically)
V2 that is powering the lightbulbs
INTRODUCTIONMicroinverter is based on AN4070 250W Grid connected micro-inverter by Rosario Attanasio.
https://www.st.com/resource/en/application_note/an4070-250-w-grid-connected-microinverter-stmicroelectronics.pdfThe design is based on two power stages, namely, an Resonant LLC DC-DC
converter and modified unipolar modulation DC-AC converter. Max power is 450W to align with the biggest PV modules available on the market today. Original AN4070 use interleaved boost with isolation transformer in DC-DC stage. To improve efficiency I've decided to design a resonant LLC converter which so far have 97.5% peak efficiency without any optimization. DC-AC stage is basically the same but high frequency transistors were replaced by SiC MOSFETS to increase switching frequency from original 17.4kHz to approx 50kHz. This stage have approx 98% peak efficiency, so currently total efficiency is about 95.5% (at 70% of load) with room for improvement. MCU has been changed from STM32F103 to the newest STM32G474 that is dedicated to the digital power supply control systems. Design also have a lot of other improvements (i.e voltage, current sensing, gate drive, protection) which optimize it in terms of cost and performance. To achieve a 25yrs lifespan there are no electrolytic caps here. Bulk caps are film polypropylene caps.
It contains all hardware and software required to connect the microinverter to the grid. Currently software is under development due to some control issues which I want to mostly focus on here. Microinverter AC sine voltage generationworks. It works on closed loop with PLL and Park Transformations when DAC serves as an grid signal simulator. (DAC attached to GRID side voltage amplifier). It fails however after synchronization to real GRID with massive overcurrent events and oscillations. Voltage in my grid is also non ideal, and looks like trapezoid not sine wave but that could be related to zero-cross over distortions which I'm facing now. Frankly speaking at zero cross events there are distortions of sine current that are related to modulation of MOSFETS. It happens in open and closed loop mode. Now I'm try to eliminate them.
HARDWARECurrently hardware is a revision V2 which means it’a second prototype with significant hardware improvement (noise, signal integrity, sensing philosophy, cost optimized) over version V1.
There are two main PCBs namely DCDC stage and DCAC stage, plus couple of small PCBs with digital isolators and planar transformers that connects DCDC and DCAC PCBs.
Schematics, PCBs and GERBER files are available via github. The project structure is as follows.
DCDC.PrjPcb - Project of DCDC PCB That contains main STM32G4 microcontroller. Processor here do all main tasks. Its control LLC resonant converter with MPPT stage and DCAC stage with PLL and Park transformations. That board connects with DCAC stage via digital isolators and control planar transformer half-bridge converter to power the DCAC stage circuits. On this PCB there is also CAN bus transceiver and ESP8266 WiFi. Power is delivered by two step down DCDC. One from PV to 12V and one from 12V to 5V. There are also two 5V-3.3V LDO for digital and analog circuits.
Power_Stage.SchDoc - Contains Full Bridge LLC Mosfet stage with resonant current sensor (Resonant current sensing for future use). Here we have also connections for LLC Transformer, resonant Inductor and Capacitors. Currently the transformer and inductor are separate things. I spoke with a transformer expert here in Poland and he said that performance will be identical with integrated one but EMI will be better (yeah that horrible fringe fields form the gapped transformer). Transformer+Inductor cost under $10, but due to ETD39 size and I wanted a low profile (PCBs are designed for very nice aluminium IP67 GAINTA HQ017S enclosure) so the transformer is turned sideways so now its naturally connect both DCDC and DCAC PCBs and it fits to that enclosure. LLC stage boost 36-42V from PV (optimized for longi lr4-72hph-450m) to 200V and after that there is a diode-cap voltage doubler that makes 400V.
MCU.SchDoc - STM32G474Q with PV Voltage and PV Current sense circuits. There are also NTC, LEDs, and external VREF.
ISO_IO.SchDoc - Connectors to DCAC stage
ISO_Power.SchDoc - is a half bridge driver for the Planar Transformer that gives power for DCAC axillary circuits.
HV_BUCK_V2.SchDoc - Is a buck connected with a PV Panel that delivers 12V. 75V max input voltage capable.
LV_Buck.SchDoc. Buck converter that is stepping-down 12V to 5V plus two 3.3V LDO, one for digital and one for analog part.
CAN.SchDoc - Isolated CANBus Transceiver with LDO supply for stepping down power supply from isolated side.
WIFI.SchDoc - ESP8266 that is connected to the STM32G474Q. Also contains a circuit with a backup supercap to be able to do some statistics at night (i.e temperature logging).
DCAC_V2b.PrjPcb - That PCB contains of course DCAC inverter bridge. Its converts 380-400VDC to the grid AC Voltage. That stage uses hybrid unipolar modulation. One of the half bridge that is connected to inductor operates at high frequency, and second leg operates at low frequency. Its reduces EMI and it optimize the cost since only one leg have to work at high frequency (SiC MOSFETS), second leg could use cheaper slow Si MOSFETs.
PCB Contains 2 microcontrollers that one STM32G431 is located at DC- ground potential and its used for HVDC Bus sensing, low side MOSFET TWO-LEVEL OFF protection, control high side MOSFET charge pumps (will be removed in next revision due to noise and replaced by second two output planar transfomer). control 21V step up converter and -3.5V for gate drivers.
Second STM32G491 is located at grid side after inductor to sense inductor current, grid voltage and HVDC Bus. I wanted to test if HVDCBus sensing here will be reliable. After testing its looks that it is so I the next PCB revision the HVDC sensing will be removed from low side MCU. So the low side MCU could be replaced to some cheaper STM only for protection and power control.
Control_Sense_BOTT.SchDoc - STM32G431 MCU with HVDC Bus and experimental High Side current measurements. Currently both signals are not used since Grid Side MCU measures HVDCBus very well and I don't have to manage two SPIs to transfer all measurements. MCU is connected to DCDC STM32G474 via digital isolators with SPI plus other signals (i.e MOSFET protection trigger from TWO-Level Protection circuit). Also via digital-isolator mosfet gate signals are coming from DCDC stage. Two level protection uses a TIMER that after detecting an overcurrent in mosfets it cuts its gate voltage to approx 9V for SiC and 5V for Si MOSFETS for 1uS. MOSFETs here works in linear region to dissipate inductive energy (from PCB and MOSFET Leads) . That prevents high voltage overshoot that could destroy mosfets if they were to be turned off immediately. After 1uS MOSFETs gates are turned off to 0V.
IND_CURRENT_SENSE.SchDoc - Here we have all grid realted measurements. Most of them are converted to differential signals to get better precision. ADR3425 used for high long term accuracy. (Microinverter should work over 25yrs without maintanence so its not overdesign)
Inductor shunt current sense with uses one fixed 15x gain plus PGA inside STM32G491. Aim was to boost gain at lower currents to boost accuracy at low sun light conditions.
Grid Voltage sense uses simple circuit, not fancy things here.
Hall Current sensor in return path. Mainly purpose for differential current sensing tocreate a RCD like protection. Currently not implemented in software.
DRV_TOP_MOS.SchDoc - gate drivers with to level protection (there protection is controled via DCDC STM32G474). Plus overvoltage comparators.
DCAC_V2.SchDoc - Full Bridge MOSFETS, LCL filter. Inductors are made with high performance Sendust toroidal cores. They are both 1 mH with at 50kHz and 2A output current produces 20% of ripple. CMC is 10 mH. There are also two optocoupler circuits to detect open fuse at GRID and HVDC side.Grid protection is made of diff mode hybrid GDT+MOV and for common mode is two MOV+ discrete GDT. According to solar inverter reliability studies grid protection is one of the most important things for long live inverter reliability. Here we have also relay plus some fancy two current level driver for fun purposes.
There is also planar pcb trasformer design files but I will describe it later. Now I will only mention that PCB windings are designed with capacitance canceling method so transformer have virtually zero common mode noise (its standard Planar transformers biggest drawback). Design is also cost optimized, one complete transformer contains three 4-layer small PCB, so at JLCPCB cost is under 6$ for 2 sets.
There are also small PCB for digital isolators and relay connection (relay is driver from DCDC MCU).
PCB DESIGN FILESCreated in Altium Designer 21-22. Current version is newer than PCB that I have so its not verified. I'm constantly updating it. For Two main boards, DCDC and DCAC i've added PDFs with schematic and PCB.
https://github.com/KoRba88/Microinverter-V2-PCBSOFTWARE GITHUBhttps://github.com/KoRba88/Microinverter_V2.0_DCDC -Microinverter V2.0 DCDC Main software for main MCU
https://github.com/KoRba88/Microinverter_V2.0_DCAC - Microinverter V2.0 DCAC software for auxiliary microcontroller at HVDC side.
https://github.com/KoRba88/Microinverter_V2.0_GRID - Microinverter V2.0 GRID software for GRID side Volt,Current,HVDC measurement MCU
SOFTWAREDCAC and GRID software is very simple (now). It gets trigger from HRTIM (synchronized with PWM period of inverter MOSFETS) to their ADC, make measurements and send via SPI data to the DCDC MCU. DCAC MCU also take care of Two level protection and power sequencing for gate drivers.
DCDC MCU get via SPI4-DMA Channel 2 interrupt request and starts whole loop. That ISR Drives whole converter loop. You can find it in DataSensing.C
#define DS_AcquisitionEvent DMA1_Channel2_IRQHandler
now the whole program start in 400WControl.c , after initialization void InitControl(ControlMode_t mode) and offset calibration u8 CalibrationControl() it gets to the open loop void ExecControlOpenLoop() or closed loop mode void ExecControl().
In ExecControl() there is a measurement data collection, processing and PWM execuiton.
Grid_Volt_q_d= DQ_PLL_Grid(Grid_Voltage); - make quadrature transformation of voltage
Output_qVd_Grid=(s16)(PLL_PID_Regulator(&DQ_PLL_PID,Grid_Volt_q_d)); PI Regulator for Vqd voltage
Calc_Theta_Grid(Output_qVd_Grid); - calculate frequency and phase angle for grid synchronization
Inverter_q_d=DQ_Filtering(DQ_Current_Inverter(qIalpha_Inverter,qIbeta_Inverter)); Current filtering
Actual_QD_Power = DQ_Power_Estimation(Inverter_q_d); - Power estimation
switch (State_Control) is state machine that control all process
void CalcAndSetACComponents(SystStatus_t state) is a final function it sets a reference for direct and quadrature current (warning! direct and quadrature current are swapped in that software so no to be confused if you are familiar with control theory), make cross decoupling, reverse Park Transformation and send PWM signal.
Original firmware manual is also available there
https://www.st.com/resource/en/user_manual/um1561-stevalisv003v1-firmware-user-manual-stmicroelectronics.pdfPlease feel free to comment.