Generation X

Time sure flies when you are having fun. For those of you anticipating my next posts, I apologise for the time lag for this one.

Winter is upon us and the mercury is falling - fleeces, jerseys, and duvets abound. However it is still relatively moderate as the sun here is nice enough to poke its head up quite often and the place heats up pretty easily. We are giving the heat pump a good run for the money, it's doing well. The thing about this place is that for every 2-3 days of rain there is usually about 1-2 weeks of sunshine - nothing to complain about really, especially when our water tanks fill up during the rain.

I haven't got bored yet, in case you were wondering. We are still settling into village life and there is much happening around the place. I even had a visit from my Christchurch friend Edward who was up mountain biking the Heaphy Track. I gave him a whirlwind tour of Atamai as he only had a few hours in Atamai before it went dark. Thanks for the visit Ed, hope you enjoyed your trip :)

Apart from my day job, I've been involved with my first engineering project here at Atamai. As the title of this post may elude to (albeit elusively), my project is to automate a single cylinder Lister diesel engine generator so that it can turn on/off automatically when the power inverter tells it the batteries are low and in-need of a top up. Here is the engine ...
This is the engine that powers much of India and probably China and is quite remarkable for its ability to run a a variety of liquid fuels (including a variety of vegetable oils) as well as being robust enough to run for many hundreds of hours with little or no servicing. Although one is recommended to have a regular service schedule to extend the life of the machine, it takes much abuse and hence remains today the agricultural work horse of many 3rd world countries. Part of the reason for this is the macro scale of the engine which requires less specialised expertise to service if it does breakdown. It has large injectors, pistons, flywheel etc which help make the thing keep on "putt putting" as long as you put some fuel in it. Anything that needs fixing can and is likely done by a local workshop - this in contrast to some of the more modern multi cylinder engines which may not be quite so simplistic.

Of course being such a primitive engine does also have its limitations. One in particular is that there is no auto starter for it when the battery bank is in need of a top up - an issue I've been given the opportunity to address, more on that later.

This engine makes up the backup power generation for the photovoltaic (PV) system up at Jack's house (one of Atamai's founders). It has been fitted to an alternator to generate 240V AC power at about 3kVA (or ~3000W), which is that big blue thing connected with a belt drive.

Unfortunately one limitation with a single cylinder engine is that the electricity generated isn't a pure sine wave and has torque ripples in it when loaded. This can cause the lights in the house to blink at ~50Hz which is annoying indeed. A better topology for utilising this system would be to generate power directly for charging the battery only. 

There is ~2KW solar panel array feeding a 48V battery bank which has a rated capacity of 1200AHrs - yes, it's a huge momma! (see below)
These are deep cycle flooded lead acid batteries which have a cyclic life in the vicinity of 20 years. It has to be sized correctly for the end use, in this case with the ability to free run without the sun for several days. Batteries of this type are sensitive to how deeply you discharge them and work for many more cycles if you only do a shallow discharge. 50% depth of discharge (DOD) is usually considered the most you should ever do in any one cyclic event. The problem with discharging them further is that you will get a build up of sulphation which permanently removes the energy capacity of the battery - in essence speeding up its death.

The cells also need regular maintenance for checking the electrolyte levels, with a top up using distilled water. This is what we used to do in regular car battery. The electrolyte in the battery diminishes from evaporation during normal use, as well as during equalization cycles. The cells need to be equalized to get the most out of the pack, and this job is done by a smart battery charger.

In this case the smart battery charger is also the smart inverter and smart controller, that big yellow box below.

This is called an SMA Sunny Island, and is given the job of creating a micro 240V single phase AC grid which runs the house. The red box next to it is a SMA Sunny Boy, which is a grid tied inverter that looks at the output waveform from the big yellow box and tries to inject power into it from the solar panels. Are you still with me here?

When the big yellow box detects power is coming in from the little red box (ie. the solar panels), it either dumps that extra energy into the batteries to charge it up - or allows the extra energy to be used by the micro grid in tandem with the power generated by the big yellow box. In short, the big yellow guy is the boss, and the small red guy is the underling. The small grey box to the bottom left of the big yellow box is the controller for the big boss, and the small grey box above the big yellow box is a networking interface which enables monitoring. The medium sized white box on the right is the breaker box which has the circuit breakers in it feeding the electricity to the main house. See below:

The generator ties into the micro grid as well, and the big yellow box monitors its power output and does the same as if that power was coming from the little red box. However in this case, the generator is not a smart little red box which knows how to generate and follow the sinusoidal waveform of the clever big yellow box, so the big yellow box tries compensates - the generator is bigger than it after all and it doesn't want to get all beaten up. The big yellow box however is able to send a turn on/off signal to the generator to run it only when it is absolutely needed. However at the moment, this on/off signal merely goes to the end of some wires - and the big generator sits there twiddling its idle rotors, just wondering about things.

Aha ... finally this brings me back to my project.

So how do you automate a primitive engine? erm ... pass? I program handheld computers for a living, not primitive engines. At least the basics are well ... quite simple, ... no really. For an engine to run you need to first set the throttle on full (so it gets the fuel), then you need to energize the starter solenoid so that the crank will turn around (for x seconds) - and hopefully then you will get a running engine. You wait for the engine to warm up and generating correctly, then switch the output of the alternator into the micro grid. And if told to shut the system down, the alternator is taken offline, and the throttle is set to the zero position so as to starve the machine of fuel. Easy eh ... :) Sveet ... let's do it already!!

Fortunately some work had already been done before I  came. The throttle position is cunningly engineered out of this Subaru window motor (which had a previous life lifting the side window of the car up and down), see below:
You can see the semi circular cog like device that is moved by the gears attached to the motor assembly. This moves in 90 degrees and as it does this rotates the central axis that controls the throttle mechanism on the far end of the bar. There are limit switches located at the points where the circular cog will touch it on the end of its travel in both directions. All this assembly takes care of the mechanical movement of the throttle, my job is to make it work electronically ...  hmm.

So I came up with something relatively simple using a couple of SPDT relays. The relays act to change the direction of the motor when energised/deenergised. However if I did this and nothing else, the windscreen motor will spin itself and cause damange. So I put each of the limit switches in series with each of those circuits and voila:

- when the relays are energised (generator turn on signal) the motor works itself to the end of the travel where it hits the limit switch and stops, the throttle is fully open now.
- when the relays are deenergised (generator turn off signal) the motor returns to the throttle zero position and hits the other limit switch which depowers the motor and returns everything to zero power.

... and I haven't even written a line of code yet, but that might be the easy bit.

I still need a controller to actually sequence this action with the host of other actions which I alluded to earlier. A Deep Sea Electronics (DSE) 3110 controller was chosen before I started the project, hence I'm going to try and make that work. It basically has a lot of the functionality that should be a matter of tweaking it so as to get it to work nicely ... famous last words??

Unfortunately this smart controller isn't as smart as I would have liked - being an embedded programmer who writes in the C programming language, I was aghast at the lack of any kind of programming or scripting ability that can be done on this thing. That might not be a bad thing as it does simplify my job, as long as it can do its job. What it does enable me to do is select some digital inputs to do certain preprogrammed things (like the start/stop signal from the big yellow box, and an emergency stop button), and some outputs which can act in some preprogrammed way which can be used for energising the throttle, starting relay - as well as a 240V relay to bring the alternator on/offline as needed. It also has 240V inputs with preprogrammed voltage and frequency monitoring which could be put to good use. The devil however will be in the details, and I will be finding out more of that in the coming weeks.

Phew that was a long one ...best go get some sleep now. Take care!







Popular posts from this blog

Charry Charry Night

Adobe.. dobe ... dobe

Slabulous