Microinverter
MCINV8 - Version 8
MCINV8 - Version 8
The goal of this project was to design and make a solar microinverter designed to be used with a 12V solar panel or 12/24V battery. It converts DC power from the solar panel to AC which then passes through a transformer to get high voltage AC power suitable for wall appliances. The microinverter's PCB is 52mm long and 105mm wide.
You can find a link to the previous versions of this project at the bottom of the page.
This project cost me €600 and took about 350 hours of work/research.
The PCB for the microinverter consists of 4 layers (2 for power and 2 for signals) and 37 components. Although 2 layers could have been sufficient, I chose 4 layers for the extra current capacity and thermal mass. The microinverter's primary function is to chop an analog sine wave into discrete PWM signals and use them to drive 4 MOSFETs, producing a high power SPWM signal. The 2 IRL3705 n-channel mosfets are driven using a TC4424 mosfet driver IC and the 2 FQP47P06 p-channel mosfets are driven using a custom gate driver. The output waveform is then stepped up using a toroidal transformer to get a (roughly) 230Vrms sine wave. The microinverter can function as either grid-tied or grid-forming without requiring any hardware changes.
To address thermal management, heatsinks are attached to each mosfet/diode, but since they are electrically connected to each's drain they need to be kept separate. To ensure this, I designed and 3D-printed a heatsink spacer from polycarbonate plastic, which also helps maintain good contact pressure between each mosfet and its heatsink. Additionally, the PCB includes a 4-pin fan header wired to 5V for extra cooling, which (with some software modifications and maybe an adapter) can also be used to facilitate several communication protocols (for example RS485). The lower 2 pins of the fan header are connected to the microcontroller's serial RX and TX pins to allow for the programming of the microcontroller even when its soldered to the board.
The device can measure its input voltage (after the diode) using a voltage divider, and the approximate output current using the Drain-Source resistance (Rds_on) of one of the low-side mosfets (approx. 12mΩ) as a shunt resistor and clamping its voltage to a maximum of 3V using a Zener diode. It also has the capability to read the positive half-sine of the power grid's waveform with a 1:11 scale (before factoring in the transformer).
The ATmega328P runs a modified version of Kurt Hutten's code. The code generates a 10KHz SPWM output on pins 15 and 16 with matching square waves on pins 17 and 19. The square waves go to the gate drivers of the high-side p-channel mosfets, resulting in each of them being active for alternating 10ms periods. The SPWM signals go to the gates of the faster, n-channel mosfets, thus modulating their output to create a high power SPWM waveform on the output.
The ATmega328P has the ability to monitor the grid's voltage waveform (only for the positive half of a cycle) through the board's "phase lock" circuit. In grid-tied mode, the microinverter waits until it detects a voltage peak, then waits until the voltage goes to 0 (the negative half of the cycle) and then activates when a positive voltage is detected, thus synchronizing with the grid at the 0° phase of the sinewave. In grid-forming mode, the microinverter spends anywhere from 10 to 200 cycles (at random) waiting to detect a voltage peak and, if one is detected, it follows the previous procedure to synchronize with the preexisting grid. If a voltage peak is not detected within that timeframe then no grid exists and the microinverter proceeds to generate its own. Values are subject to change with newer versions of the code, you can find a link to the most recent version at the bottom of the page.
To program the ATmega328P I used an Arduino UNO and the Arduino IDE.
This image shown is the microinverter's output with a 150W load attached (30W soldering iron, 70W floor fan, another 50W floor fan, and a USB power supply). A Triad Magnetics VPT30-1670 toroidal transformer is used to step up the inverter's output to 230V in order to power household loads. A capacitive load (in this case the USB power supply) can be used to smooth out the output waveform.
The output voltage fluctuates based on the connected load because the inverter doesn't have a feedback system or any ways to increase its input voltage BUT if a higher input voltage is available, the microinverter can use its current measuring capability to infer how much PWM it needs to apply to the SPWM signal to keep the voltage roughly stable. This would also help compensate for the voltage drop on the transformer side but would require calibration based on the transformer model used.
To test the microinverter I used a lab bench power supply, a 50VA 230:15 toroidal transformer, and a Logilight power meter. For a load I used a soldering iron because it's 30W power consumption is below the transformer's 50VA maximum power rating and because it's a fully resistive load. To calculate the inverter's efficiency I subtracted the transformer's efficiency of 86%, as stated in its datasheet.
Testing showed that the inactive pmos gates are prone to induced voltage dips with the same frequency as the sPWM signal of the nmos, which were partially activating the inactive pmos resulting in wasted power and excess heating up of the pmos. To solve this I had to solder an extra 22nF ceramic capacitor between the gate and source for each pmos.
Thermally, all mosfet heatsinks were cool to the touch even with a 100W load. The diode heatsink got slightly warm under that load and would require active cooling after 150W (5A of current).
Results:
Source voltage: 23.54V
Source current: 1.533A
Source power: 36.09W
Load voltage: 230.9Vrms
Load current: 0.127A
Load power: 29.3W
Power factor: 1.00
Efficiency (w/ transformer): 81.19%
Efficiency: 94.41%
=> ATmega328P
=> IRL3705N nmos [2]
=> FQP47P06 pmos [2]
=> VT3045BP diode
=> 1N5817 diode
=> 3V zener diode
=> 20V zener diode [2]
=> 35V capacitor [2]*
=> 5V capacitor
=> 100nF capacitor
=> 22pF capacitor [2]
=> TSR 1-2450E
=> BS170 nmos [2]
=> TC4424
=> 10kΩ resistor 1/4W [8]
=> 1kΩ resistor 1/4W [3]
=> 500Ω resistor 1/4W [2]
=> 100kΩ resistor 1/4W [2]
=> 16MHz oscillator
=> 22mm TO220 heatsinks [5]
=> 4 pin fan header*
=> M3x12 screws [5]
=> M3 nylon washer [5]
=> 5V fan*
Not originally planned for:
=> 22nF ceramic capacitor [2]
*optional