The task at hand was to make an AC signal from the DC output of the battery-charger. As Professor Bill Dally says, “AC really is just slow-varying DC.” What this boils down to is the need to produce a different value of a DC signal in a short period of time such that a sine wave with some desired frequency is the overall signal produced. Our goal was to produce a single phase 120V 60Hz AC signal as one would in the outlet of a household in North America.
Full Bridge Topology

Our inverter is based on a full bridge topology with four switches to generated the sine wave. The 60Hz frequency is generated with PWM from the microcontroller which also bucks the battery-charger input to a controlled voltage that we then step-up with the transformer.

PCB Design
The process involved a few iterations on the schematic and more than a few on the board.

And finally,

And our various boards, from early vestiges to final product:
This was our first attempt at PCB design, hence the series of boards. We initially designed to isolate sensitive signals from noisy ones, but that proved to be very complicated to route. We then opted to design for a board that would be easy to route the traces. Our final product tweaks this design to include consideration for the high/low current isolation.

Control
For our inverter control we used pwm unipolar control. This type of control can be viewed as operating the full bridge as two buck converter. The left two FETs operate as a buck to create the positive part of the sine wave while the right FETs have the top FET open and the bottom FET closed. Then at halfway through the sine period we start to create the negative part of the sine wave by using the right two FETs as a buck converter and leaving the bottom left closed and the top left FET open. One of these cycles happens every cycle and we are operating at 60Hz.
The input voltage is the battery voltage which is anywhere between 12.8V-16.8V. In some inverter designs we looked at online they designed the control to have a look up table the Duty factors to get each voltage along the sin wave. I used matlab to create an array of the voltages along 1 period of a 60Hz sine wave being set at about ~10kHz (the speed of adc). However because our input voltage is variable we instead created a look up table of voltages along the sine wave and then used feed forward control to find the correct duty cycle.
We used two pwm channels to implement this control.

Transformer Design
Confronted with various options on Newark, we whittled down our considerations to E and ETD cores.
We compared different cores based on general specifics.



After considering which had the lowest rated losses at 100kHz, we calculated copper and core losses at our estimated current and B field.

Based on our initial calculations, we chose the ETD 29/16/10 core. Seemed convincing. However, our estimate for the current and B field was lower (1.2A and .05T) than we would actually expect with a 40V solar panel (~20A and B field closer to core saturation).
We then transitioned to using the core we had as part of our prototype. We conservatively measured the amount of wire we needed in order to have enough wire to wind the primary and secondary. Folks on the second floor of Packard were amused with our extensive layout of multiple strands of copper wire.

We then twisted the wires together, which is easier said than done, and then wound the core. We ended up winding 10 strands on the primary and 140 on the secondary with 5 parallel strands of 20AWG magnet wire per turn. We came up with these values as part of a compromise on the core we already chose, the wires in the lab, values we calculated, and what would really fit. Given more time, we would choose a larger E core and use a larger gauge wire such as 16AWG wire to handle a larger current.
Components
This was an incredible learning experience for us. If you’re interested in replicating or improving upon the design –yeahh open source- here is what we used in the process:
Software:
Eagle
Embedded programming in C
Julia
Hardware:
1x STM Discovery microcontroller board
4x nmos transistors
2x half-bridge drivers
14x 200pF capacitors
1x 1000uF capacitors
9x resistors for voltage dividers so as to not damage header pins on microcontroller
1x 22uH inductor for the full-bridge
2x N4728 diodes for the gate driver
3x 2-pin headers to connect to the microcontroller
2x banana plug connectors to interface with battery-charger
1x bobbin for the transformer
1x ETD29/16/10 core for transformer
1x mounting clip for transformer
Results
Our boards took a while to come so while we were waiting on them, we built our inverter with the green electronics lab kit. This turned out to be more difficult and time consuming then we had originally predicted.

We aimed to produce a sine wave at 60Hz with our inverter. With feed forward control adjusting the duty, we had a noisy sine wave output at 60Hz. After increasing the speed of the pwm, the ringing on the edges of the sine wave decreased.
After generating the sine wave with the inverter without the transformer, we added the transformer for the voltage step up. After adding the transformer, the noise on the sine wave further decreased.




And finally, if you would like to see, synthesize, manipulate the files used in this project: