Saturday, 23 May 2015

My DB board

When I had my inverter installed I decided to put in a whole new DB board. In this post I'll talk about why and how I wired it up.

The main reason for redoing the DB board is that I wanted to be able to switch individual circuits on and off of the inverter.
An easier solution would be to get an automatic changeover switch box and switch the entire supply to the DB board, but I wanted more fine-grained control:

I have a pumped solar geyser which needs a bit of power to pump the water through the collector, so it makes sense to run this off the inverter in summer. Obviously I don't want the geyser element running off the inverter though so in winter it will stay off.

We also have a gas stove with an electric ignitor, so it's nice to be able to turn it on easily.

It gets pretty hot where I live so the aircons can also be run off the inverter. We have a Samsung inverter aircon in the bedroom which only draws a few hundred watts in economy mode, so it's no problem running off battery.

So this is my db board circuit, it's reasonably straight forward. The idea is there are two completely isolated supplies with changeover switches that select where each subcircuit is powered from. It's very important that the inverter and utility supplies can never be connected to eachother.

I have indicator lights on the supplies because I read somewhere that that's a legal requirement on dual supply systems, and it's nice to know when each supply is active.

I then ordered all the stuff, basically copying the breaker ratings from the old board. My old db board used minirail circuit breakers, but they seem to be a South African thing, so you don't get changeover switches in that size, so I got DIN breakers instead.

Can you follow what's going on?

I mounted the new DB board on hinges over the recess from the old board so the wires behind it can be accessed and worked on if necessary.

I then printed out labels, which turned out to be wrong (or at least I need to swap the wires on the lights and plugs changeover). I should get round to printing another label...


As you can see I'm in loadshedding now- only the red light is on... Time to make some coffee :)

Thursday, 21 May 2015

Installation

Here's a rundown of the parts involved:

Inverter (Inverter, AC charger, MPPT solar charger): R13000

Batteries (4x100Ah): R6000

Battery cabinet: R1000
http://www.bidorbuy.co.za/item/178019194/battery_cabinet_105ahx4.html

Battery cabling and lugs: R500
Make sure to get the lugs crimped properly. Don't forget you'll need cables between each battery. Make sure you get the right type of lug for your battery, I'm using 6mm ring lugs, but some batteries use post terminals (eg a car battery)

DB Board, MCBs, Changeover switches, wiring: R3000
I'll try write another blog post about the DB board, but if in doubt get an electrician to do this.

Electrician to wire in DB: R2500
I got wildly varying quotes. This is the cheapest for installation and certificate of compliance.

Total R26K

I bought the stuff and wired up the DB board myself to save a few bucks. It's quite a tedious job.
I just got an electrician in to pull out the old DB and wire in the new one.


*This is an old photo, the breakers on the bottom left are place-holders for a changeover switch



Online vs Offline UPS

There are two different types of UPSes: online mode and offline mode.

Offline mode is the simplest and cheapest: it has a relay switch that supplies your appliances directly from Eskom utility power while it's available, then switches over to battery+inverter power when utility power fails.

The process of switching over takes a bit of time, only a fraction of a second, but in this time your stuff will have a brief power cut. Usually it's not a big deal but it could cause your computer to reset, your microwave timer to reset etc.

A fast changeover could also cause a surge: appliances with motors in them typically store a bit of power as a magnetic field, and release that power later. 
AC power is delivered in waves, where power cycles back and forth, but normally a cheap inverter and the utility won't be synchronised. If your washing machine is spinning, the current it generates once power is cut could be added on top of the power the inverter generates as it kicks in and cause a surge. Newer appliances are protected against this sort of thing though. I'd only worry if I had an ancient old fridge or washing machine.

A safer, more expensive option is an online UPS where the appliances are always run off the inverter, and the inverter takes its power from the utility when available, or from battery when its not. This means power is never interrupted, and everything stays nice and smooth.

Offline UPSes are cheaper because they only need a small charger circuit. They usually take quite a long time to recharge after a power failure.

Higher end inverter units will usually let you run in either mode. The tradeoff with running in online mode is that it uses more standby power because all the power you use needs to be converted from AC to DC back to AC again. My cheapo Axpert aka MPPSolar unit uses about 50W in online mode, which is about R40 a month's worth. Decent inverters might only draw 10 to 20W.

I tend to leave my inverter completely disconnected because I know when the load shedding is coming anyway. It's important to keep the batteries topped up regularly though.

Saturday, 25 April 2015

Advanced: Communicating with the inverter

I wanted to be able to make my own gadgets that can communicate with the inverter, so the first step is to understand how the inverter's serial communication protocol works

After googling a bit I found this post, which is the inverter's rosetta stone
http://forums.aeva.asn.au/forums/pip4048ms-inverter_topic4332.html

I used two USB-serial cables and an arduino configured to AND the serial lines together to sniff the traffic between the supplied WatchPower application and the inverter.


Messages to the inverter follow this format:
<command string><CRC1><CRC2><CR>

Messages from the inverter follow this format:
<command string><CRC1><CRC2><CR>

Eg, to query the general status you'd send QPIGS. The CRC for QPIGS is B7 A9, so in hex you'd send 0x51 0x50 0x49 0x47 0x53 0xb7 0xa9 0x0d


The forum above contains info about how to generate the CRC, or get the C# code off my github.

Here's an example of the command messages for quick reference, see my github for the names of the fields:
QPI
(PI30
QSID
(1111111111111111111111
QPIRI
(230.0 21.7 230.0 50.0 21.7 5000 4000 48.0 46.0 42.0 56.4 54.0 0 10 010 1 0 0 6 01 0 0 54.0 0 1
QVFW
(VERFW:00052.30
QVFW2
(VERFW2:00000.00
QPIRI
(230.0 21.7 230.0 50.0 21.7 5000 4000 48.0 46.0 42.0 56.4 54.0 0 10 010 1 0 0 6 01 0 0 54.0 0 1
QMCHGCR
(010 020 030 040 050 060 070 080 090 100 110 120
QMUCHGCR
(002 010 020 030 040 050 060
QFLAG
(ExDabjkuvyz
QDI
(230.0 50.0 0030 42.0 54.0 56.4 46.0 60 0 0 2 0 0 0 0 0 1 1 0 0 1 0 54.0 0 1
QMOD
(S
QPIGS
(240.4 50.1 000.0 00.0 0000 0000 000 435 54.10 001 100 0027 0000 000.0 00.00 00000 00000101 00 00 00000 100

Using this, I wrote a C# app that emulates the inverter so that I can write other apps without having to connect to the inverter. This will let me test the fault codes etc.

github.com/scottwday/InverterEmulator


Let me know if you manage to build anything!

Thursday, 23 April 2015

Dodgy Isolator Switch

A word of caution about switches- Just because it says 100 amps on the box doesn't mean it can switch 100 amps.

I bought this isolator switch from an auto spares shop, and it seemed to work well until one day when I was removing the fuse it gave an almighty spark!

On closer inspection it turned out that the isolator had failed in the on position.

I drilled out the rivets holding it together and it together and found that the copper switch bar had welded itself closed. There is only a spring to return the bar and no way to tell (mechanically at least) that the switch had failed.



I replaced the switch with one of the same type because I couldn't find anything else locally, and I still have the fuse as a safety cutoff. It might arc while switching and damage the fuse holder but its a surefire way to disconnect the battery in an emergency.



Video overview of my backup power system

An overview of my home backup power system

Starting up and shutting down the inverter

Wednesday, 22 April 2015

Lead Acid Battery Life Expectency

Lead acid batteries hate to be discharged.

They especially hate it when you drain them completely. Your battery should come with a datasheet that details the life expectancy vs. the discharge current. This will let you estimate how long your batteries are likely to last based on how much you're going to use them.

Different types of batteries have different lifespans. High cycle batteries may only last a few hundred cycles if you use them with an inverter system.

This is the graph for the batteries I have at home (Stride 100Ah Solar)
So if I drain them completely each time I use them, I can expect 300 cycles (or load-sheds) from them before they give out, defined as when the battery only holds 60% of the original capacity.

I'm drawing roughly 100W per battery for 2 hours at a time, so that's 200Wh, or 20Ah per 12V battery rounded off (There's no point working accurately here because these are rough estimates). The batteries hold 100Ah in total, so I expect to use 20% capacity per load shed.

I estimate that I'll get about 2000 cycles based on 20% usage. Even if I get load-shed every day then the batteries should be good for 5 years.

Even without load-shedding, don't expect low-end batteries to last much past 5 years though.

Battery Types

In this post I'm only going to talk about lead-acid batteries. These are the big heavy batteries you'd typically find in your car.

There are a few different types of lead acid batteries which I'll discuss, however there are other types of batteries like LiFePo4 which I'm going to ignore because they are super expensive in South Africa at the moment. Hopefully in a couple years they will become viable, or let me know if you beg to differ.

So... Of the lead acids you firstly get high cycle and deep cycle batteries. High cycle would be a car battery where you want to draw a lot of power in short bursts with long intervals in between. Deep cycle batteries are used with inverters, where you want to draw a moderate amount of power for extended periods of time.

The next thing to choose is between flooded and sealed batteries. Lead acid batteries can be charged quite quickly at a high voltage, but this has a side effect of releasing hydrogen gas, which isn't a great thing to have in your garage. If gassing occurs you will need to top up the battery 'water', which is only possible in a flooded battery. Sealed batteries tend to last longer but only if you're careful not to overcharge them.

There are then two common types of sealed lead acids
AGM stands for absorbent glass mat: The battery acid lives in a fibreglass mat between the battery electrode plates. This keeps the electrodes covered in electrolyte nicely, but the whole thing is still pretty similar to a flooded lead acid battery.

Gel: The acid is a thick paste instead of a liquid. These batteries can't deliver as much current in one go, but they perform better under deep cycle, ie when most of the power is drained out. These batteries are more expensive, and last a bit longer before the electrodes wear out.

Tuesday, 21 April 2015

Hello World

Hi,

I recently installed a UPS system at home, and now that it's in I thought I'd share some info and tips about this sort of thing.

If you're South African then you know that this sort of thing is becoming an necessity. When I was buying the system I couldn't find much local info about inverters and stuff, so this blog will hopefully help a few Saffers out.

The Basics

So if you've got no clue about these sort of things, but just want some power during load shedding, here are your options.

There are two numbers to look out for: Capacity in Watt hours, and Power in Watts or Volt Amps (VA).

Power capacity, or storage, is measured in watt-hours (Wh). A really cheapo UPS will hold about 100Wh, A lightbulb might draw 25W, so 100Wh divided by 25W gives 4h of power.

There is also an upper limit to how much maximum power the UPS can deliver at once. This will be a figure in Watts or Volt Amps. A small fridge, TV and a few lights would add up to about 500W.


Pap and Gravy: Hundreds of rands
These sort of UPS units will power a computer for about between 10 minutes and an hour, and cost about R500 up to R2000 or so.

Big downside: These units are designed for emergency backup so they usually beep annoyingly when the power is out. So you'll need to do a bit of surgery to disable the buzzer.

A super cheapo UPS will hold about 50Wh of usable charge, and be able to deliver up to 500W at once. This means you can draw 25W (or one energy-saving lightbulb's worth) over a two hour load shedding period.

These units usually have 'kettle' (IEC60320) type connectors so you'll need to get adapters for your plugs.

Remember that the batteries in low-end UPSes don't last long if it gets used a lot. You can expect it to give out in a year or two.


Streetwise Two: Thousands of rands

Some enterprising souls on gumtree are selling small inverter kits with a medium sized battery and inverter.
You can expect to pay upwards of about R5000 to R10000 for this sort of thing.

A 1000W inverter with a 500Wh of usable power in the battery would be able to power your TV and decoder (250W) for two hours.

They usually come with a plug socket so you can run an extension lead to your TV or fridge etc.

Col-o-nel burger: Tens of thousands
Here's where you start wiring the inverter into the house's electricity distribution board. The system automatically kicks in when the power fails so you don't need to mess around with extension leads etc.

My system here cost about R25000, and can supply 4000w and has 2000Wh of usable storage, so I can run the TV, fridge, computer, lights etc for 2 hours.













Big solar setup
Fully loaded box meal: Hundreds of thousands
We're out of DIY territory now, but this sort of thing would make Eskom irrelevant (if you have a few spare kidneys to sell.)

Invert-huh?

So what's an inverter anyway?

Your appliances run off 220V Alternating Current (AC), whereas a battery might store Direct Current (DC) at 12V.
So the inverter's job is to pump up the battery voltage to a couple hundred volts, then switch it back and forth really quickly to generate Alternating Current.

There are two types of inverters: square wave and sine wave. Square wave inverters kindof suck, so the marketing guys had a wank session and decided to call them 'modified sine wave' inverters.

What's the problem with square wave inverters?
The short answer is that, like a cyclist's legs, smooth is better.
Every time you have a quick change in voltage, a large amount of electrons will flow quickly to make the change happen.
Large amounts of current flowing then suddenly turning off is bad because it creates sudden surges. Things with motors in them especially don't like this because of things*. Computers and small electronics don't mind as much since they are converting the Alternating Current back to Direct Current anyway.

*Disclaimer: I'm dumbing this down severely, so rather learn about things like reactance, harmonics and filtering from someone better at explaining!

A sine wave is the smoothest sort of wave, but actually making a sine wave from DC is quite tricky because the electronic components that generate the wave can either switch on or off. This means they have to switch so fast that the resulting voltage averages out into a sine wave without anyone noticing. (I should probably put in another disclaimer here too.)

So long story short, pure-sine inverters cost more because they won't burn out your fridge motor.

Choosing an inverter

Choosing an inverter:

There are a bunch of different options to choose between when deciding on which inverter to buy. Here are some of the things to look out for.

Quality:
Name brand units like Victron or Outback will come with a warranty of many years, but obviously you will have to pay for it, typically they will cost twice what a cheap Chinese inverter of the same rating will go for.

One usually doesn't think of electronics as being able to wear out, but the capacitors used to smooth out the generated sine wave will wear out eventually. Cheap inverters will contain cheap capacitors which will burn out faster, especially if you run your inverter at its maximum power rating, since this will cause the inverter to run hotter, and heat kills capacitors. The switching components in very cheap inverters also might not be protected properly so these can also pop more easily due to surges.

If you go with a cheap inverter, make sure you leave a good margin spare: Don't run it at more than half of it's rated capacity for extended periods of time.

DC Voltage:
How many batteries can you string together? The more batteries you connect in series, the more efficient the system becomes.
If you have the choice, try go with the higher voltage option because this will be the lower current option for the same amount of power.
High current would mean thicker battery cables and/or more losses to heat.

Expansion:
Some inverters let you chain up more units in parallel in case you need to add more capacity. Unfortunately it's typically only larger units that let you do this in the first place.

Integration:
The inverter is only half the story- you will also need to charge your batteries. Many units have a built in charger (This makes it a UPS) and some will also accept input from solar panels.
It's probably better to keep things separate in case one breaks, but all-in-one units can be way cheaper. I paid R13000 for my 4KW inverter, 50A AC charger and 50A MPPT solar charger unit (Voltronic Axpert MKS 5K).

Monitoring:
Most larger inverters have data ports so you can fiddle with settings and monitor usage. You might want to investigate your monitoring options before choosing. You will want to be able to keep an eye on how much power you are using so you don't run into any nasty surprises.

The inverter typically won't be able to tell you very accurately how much power is left in the battery, usually only a high/medium/low sort of thing. If you want a percentage readout you'll need a separate battery monitor that counts charge flowing in and out of the battery.

Stock:
One of the main reasons I bought the inverter that I did was that I found stock. Unfortunately Eskom has caused massive shortages of Inverters and Deep Cycle batteries in South Africa. I think it's getting better though.