Microinverter - Versions
The original goal for this project was to create a solar micro-inverter with a 50Hz modified sinewave output. Below you can see the progress made with each consecutive version of the PCB.
Version 1
Version 1 (mcinv1) was supposed to produce a rough modified sine wave at 54.5Hz. It used an ATtiny85 microcontroller as a FSM and a 555 timer as a clock. It (theoretically) had the ability to work in parallel with other microinverters to supply more power.
After testing the PCB, it turns out that the linear regulator wasn't working. After "solving" that issue, I found out that more parts of the circuit weren't working as intended, resulting in the device not working and shorting out the transistors.
Version 2
The second version of the microinverter (mcinv2) used MOSFETs instead of transistors for faster switching times, higher currents, better efficiency, and easier control. The goal was to use SPWM to have a sine wave output. The ability to work in parallel had been removed and would be reintroduced as a rudimentary PLL.
The output waveform seemed correct but it turned out it was by accident because the circuit was faulty, and as a result the voltage was much lower than expected.
Version 3
The third version (mcinv3) corrected the issue I had where the MOSFET's drain and source were swapped allowing current to flow always. The ATtiny85 was not able to generate a fast enough PWM signal to drive the MOSFETs so I decided to swap it for an ATmega328P and use a modified version of Kurt Hutten's SPWM code. This version also adds rudimentary phase lock capabilities to the board, allowing it to match a preexisting grid's waveform. The more powerful microcontroller allows for a future implementation of a communication protocol between all microinverters and a main controller.
The output is correct but it needs a low pass filter to reveal the sinusoidal waveform.
Due too poor planning the PCB has a cutout for an ATtiny85 instead of the ATmega328P.
Version 4
The fourth version (mcinv4) corrected an issue I had where the MOSFET's heatsinks were touching thus shorting live and neutral. This PCB has holes for the ATmega328P instead of the ATtiny85 because the former has better PWM control that results in faster PWM signals. It also included a Zener diode that protected the p-channel MOSFETs from being exposed to higher than expected source-drain voltages but I decided that it was unnecessary and replaced the IRF4905 with the FQP27P06 that has a higher source-drain voltage.
The phase lock hardware on this board is wrong and would result in the ATmega328P getting damaged by exposing it to high negative voltages.
The package with the PCBs was lost in shipping and arrived after the 5th version so I didn't assemble it and test it.
Version 5
The fifth version (mcinv5) changed to a 4 layer PCB for the extra current capacity and thermal mass. It also added holes for mounting the MOSFET heatsinks and the linear regulator to the PCB, and a 4pin fan header that is also wired to the ATmega328P microcontroller so it can be used (with an appropriate adapter and software) to facilitate communication using (for example) RS485.
Testing showed that the microcontroller's digital outputs wasn't powerful enough to drive the MOSFETs fast enough, resulting in an almost square-wave output instead of the expected SPWM.