Saturday, October 03, 2015

A Micro Solar Inverter - based on Arduino - Part 1



Bothy-Hack - A Micro-solar inverter based on Arduino

About once a year, I get the opportunity to spend some time with my friends from @openenergymon in North Wales.  This year, having attended the oshCamp in Heben Bridge last weekend, I took advantage of the glorious late September sunshine to cross over to southern Snowdonia, to a rural bothy outside the village of Llanfrothen, to spend a few days working on some new projects with Trystan Lea.

Trystan had expressed an interest in building from scratch, a low power inverter.  This would take the dc output from a low-wattage solar pv panel and create a stable 50Hz, 230Vac mains - suitable for powering small items of equipment. So after a couple of beers and some tech discussion over a pub meal on Monday evening we set about beginning our micro-solar inverter project.

Open Source - Easily Built, Easily Repaired

There have been several inverter designs published on the web, but they are either crude, square wave or modified square wave and based on beefy bipolar transistors.

The intention was to make the design easily accessible to others, with the intention of using familiar and easily sourced components - available to hobbyists everywhere. The project was going to be open sourced, hopefuly with professional pcbs coming a bit later - so that others could follow our work.

We wanted to make a design that uses readily obtainable N-type FETS and an Arduino (more strictly a ATmega328P-PU on a breadboard) to generate the PWM signals and provide simple circuit protection, and load sensing.  With the PWM signals generated in firmware it can easily be modified for 50Hz or 60Hz operation, either 115V or 230V operation and a wide range of battery input voltages.

We imagined that the final design could consist of an Arduino, an "Inverter Shield"  containing FETs and driver ICs configued in a H-bridge and some voltage and current monitoring circuits.  To make the inverter a 12V or 24V battery (or PV panel) and a 12V (or 24V) torroidal transformer would be added.

As we really only had 2 days to work on the design, we decided to make a simple proof of concept prototype, which could later be refined.

We are happy to receive suggestions from the wider community  - in the hope that the basic design will evolve into an efficient unit.

Planning

The steps of the primary project were planned as follows, the time available was about two and a half days:

1.  Use a breadboard "Arduino" to generate the 50Hz sinusoidal pwm waveforms needed to drive the FETs.

2.  Breadboard the FET driver ICs and the 40A  55V FETs for ininial testing with a 4VA step up transformer.

3.  Build up the FETs on stripboard - with substantial current handling tracks and heatsinks.

4.  A series of tests with different ac loads, with both 12V battery and pv input power.

5. Documentation and blogposts.

A secondary project was to build a simple energy monitor - again using a "breadboard Arduino" which would measure the dc output of the pv panel, and allow us to perform efficiency tests on the micro-solar inverter.

As a fall-back position, I had brought along a dc motor driver board I have been developing at work that uses an ARM Cortex M4 processor and a 12A  24V H-bridge.  I wanted to have a go at repurposing this board to make a simple 50Hz inverter (and succeeded!).

Implementation.

Step 1 was fairly quick to achieve, because I already had some Arduino code to generate an 8-bit sine waveform, using "Fast-PWM" - which appears as complementary pwm outputs on Arduino Digital Pins 3 and 11.

Trystan had already built up a "breadboard Arduino" - so it was relatively simple to program this with a FTDI cable, and then test the outputs for frequency, using a low pass filter to reconstitute the sine waveform for the oscilloscope.

The next task was to build up the 4 FETs that form the H-bridge onto a breadboard, and wire them up to the IR2110 driver ICs.  These ICs produce a level shifted drive waveform, so that N-FETs can be used in the upper arms of the H-bridge - with reduced on resistance and therefore improved switching efficiency.  The driver ICs are designed to supply the high currents - both source and sink, required to turn the FETs on and off - quickly.

Breadboard construction is not ideal for building fast switching power electronics, and getting the driver ICs to work reliably was probably the biggest challenge of the project.

However, by 9:45pm on the first night, Trystan had the inverter running and lighting an ac powered LED bulb.

The LED lamp in Trystan's right hand was first signs of a working inverter!

The ac waveforms on the scope were not in great shape, so we added a couple of 0.33uF 250V capacitors, connected in series across the ac output - that cleaned things up a lot!
Scope waveform  - not great at first
Until we added 0.33uF capaciors across the mains output
Even with a 4VA step up transformer - the LED lamp was ultrabright!

So we retired at the end of Day One - with a working inverter, and the plan to characterise it and improve it on Day Two.

In the next part, I look in more detail at the design and performance.  Later there will be links to the schematics,  pcb layout and the Arduino code used to drive the FETs.

2 comments:

  1. Hello! I am interested in trying to create this! I was wondering if you could help me understand your circuit!

    ReplyDelete
  2. Robert4:17 pm

    hey there, i am interested to create this circuit. Is it possible to show your schematic diagram of this board? Thanks!!

    ReplyDelete