Saturday 16 February 2013

Simple, but it works

I have now removed the INA219 breakout board from my Arduino. It took quite a bit of work with the soldering iron to get it off. It is definitely toast. Putting 5v across it and it gets finger-burningly hot pretty quickly. So, I've ordered another one which should be here in a few days.

In the meantime I still wanted to try and get some more charge at 14.4V into my battery. As you may remember the last attempt to charge the battery stopped shortly into the constant 14.4v 'absorption' phase.

So I went old-skool and built a simple voltage divider using a 24K and 10K resistor on a breadboard. I calibrated in software against my digital voltmeter. I wrote a simple Arduino sketch to read the voltage from the analog input connected to the middle of the voltage divider and adjust a PWM pin connected to my MOSFET board accordingly.

I tuned the algorithm a bit to try and stop the oscillation I was seeing before:

void loop() {
  last_voltage = voltage;
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
  voltage = sensorValue * (5.0 / 1023.0) * ((25+10.0)/10.0) * 0.989;
  // print out the value you read:
  Serial.println(voltage);

  if (voltage > 14.4 && voltage >= last_voltage) {
    output_level -= 1;
    if (output_level < 0) {
      output_level = 0;
    }
  } else {
     output_level += 1;
     if (output_level > 255) {
      output_level = 255;
    } 
  }
  Serial.println(output_level);
  analogWrite(6, output_level);
  
  delay(500);
}

It seems to work and when the charger got to 14.40V it kept pretty close to that value and only oscillated by about 0.01V.

Arduino and breadboard with voltage divider on it to read voltage from battery

I am not able to log the current and voltage like before, so can't produce any graphs, but at least I can give the battery a good absorption charge. I can hear a bit of bubbling going on, so will check in a bit and may adjust the voltage down a bit if it gets too much.

Blown something up :(

Bollocks. Think I've somehow blown something up. After my last blog post I was going back to the garage to put the battery back on charge again. However when I tried to switch it on.... nothing. Taking the logging shield off the Arduino and the Arduino works again. So it is something up with the shield it looks like. My guess is the INA219 has somehow blown. Taking a reading from Vcc to GND on the shield I only get 6 Ohms resistance so seems that something has shorted somewhere. :(

Friday 15 February 2013

PWM charger works!

I soldered up the MOSFET circuit as per the last post and connected it up to my 'dumb' mains charger to charge one of my batteries overnight. You can just about see the MOSFET in the photo below sat on the bench with the wires coming in and out of it. The wires are red, but it is actually connected to the negative side of the battery.


I initially tried the MOSFET without the heat sink but it got finger-burningly hot. Attaching the heat sink meant you could touch it.

The Arduino was set to start the PWM pin at 0 and whilst the voltage was less than 14.4V increase the PWM output by 10, up to a max of 255 (100% duty cycle, ie. full on). If the voltage is greater than 14.4V reduces the PWM output by 10 to a min of 0 (0% duty cycle, ie full off).

Below is the graph of the current/voltage results:

PWM charging attempt, current and voltage
As you can see the charger only just got to 14.4V by the morning when I switched it off. But you can see it is holding the voltage around 14.4V. I'm not sure if the oscillation around the target voltage is due to my simple algorithm or due to the the fact the charger itself seems to pulse the current (as seen by the green band on the current in the graph). I could probably make my algorithm a bit smarted and get it to check the change in voltage between readings and not just the absolute values. This will probably allow it to converge on the right PWM value better.

My original intention was to hold the battery in absorption stage for a number of hours and watch what happens with the amount of current it accepts. It should get to a point where the change in the rate of current accepted flattens out. At that point I think that battery has taken all it can and the rest is just being converted to heat.

So I'll go out and switch it back on again so it can get some absorption charge. According to this page:


The Absorption time for my 110Ah battery being charged at 2A is 31 hours! That is way higher than I've seen elsewhere, but may explain why my batteries have not been getting enough charge in the past!

Thursday 14 February 2013

Building a Smarter Battery Charger

I currently have a very 'dumb' mains battery charger. As you may recall, this is the charger that took my battery up to 15.1v last time I tried it. I don't use this charger much, it was bought in an emergency to charge a start battery once upon a time. I've always believed I didn't need a mains charger as my Sterling B2B and solar panel should keep the batteries in my van in a good state. I've since worked out that it looks like they have been undercharging as whilst they have been OK to do a bulk charge, I never went on drives long enough to get to the 'absorption' stage of the charge.

So I've had an idea to build a PWM solar regulator to replace my Stecca PR3030. But I've realised I can use the same circuit to add some 'smarts' to my dumb mains charger. Mainly I need to to make sure that the voltage once it reaches 14.4v is held at that voltage for a few hours as the absorption stage, then drop down to a float charge. So, all I need to do is have something that can restrict the voltage that the mains charger is supplying to the batteries.

My plan is to use a logic level MOSFET to do this, controlled by a PWM pin on the battery monitor Arduino. In short, the Arduino will already be monitoring the battery voltage and so just needs to adjust the PWM rate, lowering it if the voltage goes above 14.4v and increasing it if the voltage falls below 14.4v.

I picked up some 'logic level' MOSFETs from RS today. This particular MOSFET can dissipate 167W and can go up to 40V or 106A. So should be fine to deal with the max 6A at 14.4v = 87W that my mains charger can put out. The idea of a logic-level MOSFET is that the gate pin can be driven directly by TTL voltages from the Arduino (ie. 5V). It is an N-channel MOSFET so will be connected to the negative lead and do 'low side' switching, as opposed to be connected to the positive lead. Connecting to the positive lead means you need more circuitry as the gate pin on the MOSFET has to be pulled higher than the source voltage (ie. higher than 14.4v).

This MOSFET also has a very low resistance between the source and drain pins. A quoted max 0.008 Ohms or 8 Milliohms. This means that at 6A I would get a voltage loss of 0.048V, which is insignificant for the mains charger. It is a bit of a waste for when I use it for solar panels, but seeing as the solar panels have an open voltage quite a bit higher (around 17-20V) then it should be OK. The regulator will be as close to the batteries as possible, so any voltage loss in the wiring from the solar panel to the regulator should happen before we drop the voltage down to 14.4V. This is one of the issues I think I have with my current solar regulator placement. It is halfway between the batteries and the panel and I think doesn't get an accurate reading of the battery voltage.

My plan is to solder the MOSFET to a small piece of stripboard with some screw terminals on the end. I plan to solder the wires along the tops of the copper tracks to provide some more current carrying ability. I also have a small heat sink to attach to the MOSFET to help with heat dissipation. The proposed circuit will be something like this:


The resistor across the pins of the MOSFET is a pull-down resistor, meaning it will keep the gate of the MOSFET closed if the Arduino is disconnected.

Sunday 10 February 2013

Adjusting fridge temp based on voltage

I stumbled across an interesting message board thread today:

http://www.fieldlines.com/index.php?topic=145714.0

Lots of good pictures and diagrams of someone's experiments with solar and building their own solar regulator.

One thing that particularly caught my attention was later on down the thread they start using a compressor fridge as a dump load for the experiments. They found the built in fridge thermostat drew a large quintessent load when the fridge was not running. They crated their own thermostat which monitored the battery levels and adjusted the temperature depending on what was available in the battery. This meant if they had 'excess' energy coming from the panel then they would chill the fridge to a lower temperature, and if less power available would run the fridge a bit warmer.

I have a compressor fridge in my van and have wondered about doing something along the same lines. My original plan was to have a temp sensor in the fridge and controlled by a microprocessor so that I could set the temperature to a known digital level. Currently you turn a knob inside to set the temperature and I never know exactly what it is set to. So I probably have it set too cold or too warm most of the time which is no doubt in-efficient.

Setting it so that it detect when we are driving and cools the fridge down to a lower temperature when there is excess power coming (from the engine) and maybe runs it slightly warmer at night when there is no power from the solar panel and we are likely to have less power in the battery bank. I could also maybe have different modes depending on what was in the fridge. ie. if I know we have meat int here then then I need to keep it to the correct temperature. If I just have drinks in there then it can afford to run a bit warmer.

The Danfoss compressor in my fridge also has a resistor in the controller in the back that controls how fast the compressor motor runs. I need to check what it is set to, but I think by default it is set to run the compressor as fast as possible. Whilst this means the fridge cools down quicker, it also means that the fridge draws maximum current and probably maximum in-efficiency. It also leads to uneven cooling in the fridge, with some areas frozen with others still warm. If I could control the fridge with a microprocessor then I could adjust the speed of the compressor depending on how the temperature changes. Ie. if the door opens and the temp increases rapidly then run the compressor fast to cool it down and then drop down to low speed to keep it at that temperature.

Saturday 9 February 2013

Calcium Technology

Doing some more research on what may have happened to my current batteries and how they are performing and I came across some interesting bits. The batteries I have are 'sealed' or termed 'maintenance free'. This is sold by the manufacturers as being a 'good thing'... but as we all know, there is no such thing as a free lunch. The issue here is that the batteries have to be charged much more gently than normal top-uppable batteries.

In order to prevent the excessive gassing that can happen with normal cells which can be topped up, maintenance free batteries have calcium in the plates. This helps prevent the gassing and helps the hydrogen given off to recombine to water inside the cells. The calcium also reduces the self-discharge rate of the battery.

It seems however there is an issue that can arise termed 'Antimony free effect' or 'passivation' which can affect batteries with calcium instead of antimony in the plates such as mine. Fulle details can be read in the comments of this page:

http://batteryuniversity.com/learn/article/charging_the_lead_acid_battery

But in short, a thin layer of lead oxide can form on the plates in the battery. Battery desulphators are not actually removing sulphation, but removing oxidation instead. So I'm hoping that the battery of mine with the desulphator connected might improve.

Doing some more reading, this page describes it in much more detail:

http://www.batteryvitamin.net/sulfation_pulse_treatment_surprise


We believe it to be highly significant that pulsing began gaining popularity in the early 1990s, only after all the major battery manufacturers had introduced low-maintenance and maintenance-free automobile batteries. These batteries have lead-calcium alloy grids. Lead-calcium batteries overwhelmingly fail due to something known in the trade as "passivation" or "open circuit". It has been described by battery technologists as the "antimony-free effect". 
Lead-calcium alloy develops an ultra-thin, very poorly conducting tetragonal lead oxide, (alpha-PbO), layer on the surfaces of the positive plate grids over time, leaving the positive active material in the positive plates isolated from the supporting positive grid structure. Battery manufacturers use tin to control this oxide layer. This is far from straightforward. Addition of more than 1.5% tin to the alloy reduces the passivation effect - critically, at 0.6%, tin actually provides a worsening of the effect. Tin is expensive, so as little as possible is used, with unpredictable results. There are more than 90 patents describing tin, as well as other metals, alloyed with, or plated onto positive grids - suggesting this too, is a highly problematic technology. Silver is even more beneficial but is excruciatingly expensive. Before lead-calcium, lead-antimony was the preferred alloy. Lead-antimony has always been absolutely 100% trouble-free in this regard.


There is also a long article on different charging regimes for sealed lead acid batteries:

http://www.intechopen.com/books/trends-in-telecommunications-technologies/traditional-float-charges-are-they-suited-to-stationary-antimony-free-lead-acid-batteries-

They suggest that the typical approach of holding a calcium/lead battery on float might cause excessive corrosion of the plates and cause premature failure ie. 3-4 year life rather than 20 year design life. They suggest that the battery voltage is allowed to fall and then is periodically given a small current charge at regular intervals to bring the voltage up.

There is also a report done by the US Navy on Calcium batteries used in submarines, which is also an interesting read:

http://torpedo.nrl.navy.mil/tu/ps/pdf/pdf_loader?dsn=5476298

They manufactured some identical cells half with lead-antimony and half with lead-calcium and put them through some charge cycles to see what happened. The lead-calcium ones ended up with very soft paste on the plates that very easily smeared off.

So it does seem that the addition of calcium to batteries versus antimony really is for convenience, but at a trade off of battery life.

Desulphator

It seems battery desulphators are a pretty contentious topic, and some swear by them, some say they are snake oil. I purchased a kit on from Courties Town Marine. I thought it was worth a punt to see if I could revive my dead batteries.

Kit of parts
I did manage to make a mistake on the very first component I soldered in. It was a large diode that I soldered in back to front. I realised as soon as i did it, and then spent about half an hour trying to unsolder it.

I seems that everything it working and that I haven't managed to damage the components with the excess heat.


I wired it up to the battery in the garage. This is the one that managed to charge up to 15.1v. It has been sat now for about 4 days and is still reporting 12.90v... which still seems quite high. I connected the desulphator up and the LED has come on and I can here the 1Hz buzz of it as it pulses the battery.


The MOSFET on it gets pretty warm. As in I can just about touch it briefly, but it doesn't melt skin warm. I think this is normal. My multimeter is unable to read the voltage whilst the dusulphator is connected. I'm guessing the, in effect, AC voltage is too much for it.

I'll keep an eye on it to make sure it is not overheating, but you need to run them for several weeks for them to work apparently.

-Matt

Monday 4 February 2013

Even further down the rabbit hole... An Arduino solar regulator

So, I'm accepting my batteries are dead. I will need new batteries. This brings about two questions:

  1. What batteries do I go for this time, and how many?
  2. What can I do to prevent these batteries from dying prematurely?
I've been umming and ahhing about going for 6v Trojan T-105 'golf cart' batteries for a a while now. In fact searching around, I actually found a thread I wrote when my last battery set died. I also found a great rant on batteries and solar panels that makes a lot of sense. See the last posts.

In the thread that I wrote on the SBMCC 2.5 years ago I also wondered about point 1 above:
Of course, then the question is.... what to replace them with  Another set of Exide Portapowers? Pretty cheap (£0.90/Ah), and lasted 3 years. Or step up a price bracket and go for Elecsol EL125's (£1.04/Ah) which are slightly higher capacity, but come with a 5-year warranty as opposed to the 2 year one of the Exides. 
Or even go a bit more exotic and go for Trojan T-105s (6v wired in series) would be £1.09/Ah. I think they might be a bit too tall for my battery space though, and as 6V, I'd have to go for 2 or 4 of them... and I kinda wanted around 330Ah.
So based on the last two posts, I think I'm going to go for a pair of 6v Trojan T-105 batteries. Wired in series they will give be 225Ah (C/20) at 12v. This smaller than my current bank of 345Ah, and my previous bank before that of 460Ah. But my plan is to get another one (or two) solar panels on the roof.

But this brings back an even bigger question about solar regulators.... can my current solar regulator charge at the higher 14.8v? Answer: No. It is a Stecca PR3030 and charges as 14.4v for flooded lead acid batteries.

I originally bought the controller as it had a nice State of Charge display on it with a bar graph and smiley faces. Yeah, I'm a sucker. It also has the ability to measure the current in/out of the batteries and keep a running total of Ah put in to the battery and Ah consumed. There are however two big drawbacks that I only discovered when I got in and started to install it many years (5? 6?) ago.

  1. The nice pretty State of Charge display can only work if solar is the only charging source. As I also charge from a Sterling B2B charger (from the van engine alternator) this mode can't work. So I have to put it in 'voltage' mode, which just gives a plain old voltmeter and no smiley faces :(
  2. In order to count the current going in/out, you have to wire all of you load negatives via the controller. This was a pain, and has resulted in un-necessary cabling and voltage drops. The van is metal bodied, and the body is grounded so in many cases I don't need a return wire back to the battery as I can ground the the chassis/body nearby.
So given all that, I'm not really getting much out of this controller. This battery monitor I'm building will give a much better reading and log of current going in/out of the battery bank and its voltage.

So... the next obvious question.... should I get a new/different solar charge controller?

....or actually.... can I BUILD one? ;) Given that all the controller has to to is take a voltage that may be significantly higher than the battery (17-19v) and drop it down to a suitable charging voltage (14.8v for bulk) and hold it there... couldn't I do this with an Arduino? How about the Arduino that I will already have connected to the battery bank doing the monitoring? Mwahahahahah! A cunning plan is forming and I'm heading yet even further down this rabbit hole of an experiment.

Luckily... as with much of the Arduino world (and why I love it do much) I can stand on the shoulders of others. A quick search around and I found someone already did something like this:


And yes, it is as simple as it looks. It just switches on the current from the solar panel to the battery (via a relay, or transistor) and switches it off again when the battery reaches the right voltage (e.g. 14.8v). Pretty simple.

EDIT: Or I might want to use something like a P-channel power MOSFET such as this with very low resistance across it. Someone has a great blog on using a MOSFET for a solar controller. Not quite as simple as I originally thought, but should be still easy enough.
EDIT 2: Or even better, use a shunt regulator system such as this.

This also has another benefit. One potential problem I have with my current setup is that the solar regulator is not that close to the batteries, it is up at head height and near the solar panel. This means there is potential voltage drop between the panel and the battery. Especially as the cable between the two also carries the load current as well. By putting the solar regulator next to the battery I minimise the voltage drop between the controller and the battery (or rather, I am able to sense the battery voltage at the terminals not several meters away at the current controller's location). It doesn't matter too much if there is some voltage drop from the panel itself as that is going to potentially be at a higher voltage anyway so can 'afford' to lose a few tenths of a volt.

A great rant on solar and batteries

I just came across this GREAT rant on solar and batteries. It is by a guy in the US who full-times in a big RV there. He makes a LOT of sense in his post. It is pretty long, but very much well worth a read:

https://handybobsolar.wordpress.com/the-rv-battery-charging-puzzle-2/

In short, he is advocating Trojan T-105 batteries. He is tending towards a smaller battery bank than you might think, but better charging regime. He is saying that T-105s could do with being charged at 14.8v rather then the generally accepted 14.4v used for most batteries. This actually gets a lot more out of a solar panel, as they generally run at a higher voltage anyway. Adding more batteries to a system (or more solar panels) without getting the charge voltage right and the wiring right is wasting a lot of power.

Deja Vu

In doing more research, I have managed to actually find a post from myself. In which I seem to have been asking the exact same questions before, and coming to the exact same conclusions. I guess you could ask, 'why haven't I learned?' I guess I have learned a bit, but clearly forgotten a lot as well in that time.

The posts were from the SBMCC (Self Build Motorcaravan Club) and dated the 7th August 2010. So around 2.5 years ago. I've copied and pasted them here, as you need to be a member to view them on the original site:


Hi all, I've got a question about battery charging and smart chargers... 
I've got 460Ah of battery on a 12v system (4 x 115Ah batteries) primarily charged with a 50A sterling B2B. So assuming I took it down no further than 50% it would take at very best scenario 4.5 hours to put 230A back into it assuming my alternator could put 50A in (no idea what it actualy puts in) and the charger gave it 50A continuously.
Now, I know smart chargers (mains or B2B) have several stages and start with constant current and then switch to constant voltage. According to Battery University the constant voltage stage is very necessary in order to make sure the batteries can hold the charge....
... so does that mean then unless I did a solid 4.5 hour drive (or I guess more like 10 hours, as its unlikely to get the optimum) I would never end up fully charging the batteries properly. 
Ie. if I did 5 drives each of 2 hours on different days, would it never do a full charge cycle? How do the chargers know how long to spend on each cycle? I presume they must monitor the resistance and voltage of the battery? So does that mean if the battery was very low it would take, say, 10 hours to do the full multi-stage process.... yet if the battery was only slightly discharged it would do the full cycle, but quicker?
The reason I'm asking all this, is whilst I have this massive battery bank, its has (especially recently) seemed to be much lower capacity than I would expect. I'm thinking this could be because the van only gets driven short hops, and hence the battery never gets a chance to have a complete full multi-stage charge and only gets the first stage of the charge repeatedly. Obviously age of the batteries is a factor (these are probably 3 years old now, but have been looked after fairly well). 
I've not got a mains charger installed in the van as we very very rarely ever stay on sites, so nothing to hook it up to. I have however just run the extension lead outside and plugged it my portable multi-stage 20A RAC charger to try and do a long full charge overnight to see what happens, as I've just uprated some of the cables in the wiring.
So seems I was already thinking that lots of small trips (ie small charing runs on the B2B) were conducive to good battery health:
I suspect what is happening is that I am doing lots of trip sin which the charger does stage 1 (constant current) but never gets to stage 2 (constant voltage) and hence it never gets to 'properly' charge the battery and so the battery always seems to be lower capacity even though I keep thinking I've put a fair bit of charge into it.
...and I seem to have been experiencing the same voltage drop symptoms as before:
Another data point. I've just gone out and checked the batteries. After taking the surface charge off by leaving around 3A of lights on for half an hour, each of the four batteries, measured individually is exactly 12.80V. 
However, when I put a 7.3A load on (halogen lights, compressor fridge, and 200W invertor running laptop)... admitedly an abnormally high load, the batteries read 12.54V at the battery terminals. They read 12.32V at the distribution point, so my cable upgrade has certainly helped with the voltage drop between the batteries and the distribution point. 
However, my question is.... is a drop from 12.80V -> 12.54V on the battery terminals 'normal' for drawing a 7.3A load from a 460Ah battery bank? When I switch the load off, the batteries return back to 12.80V (after about 5 minutes).  
So, hopefully now with building this battery monitor I won't be asking the same questions YET AGAIN in 3 years time ;)

Sunday 3 February 2013

Yeah, they are dead :(

So I think I'm coming to finally accept that my batteries really are not in a good state of health. I tested them today with a 4A load from a headlight bulb after giving them a hard charge last night. Here is the graph of the results. Ignore the current line, I forgot to connect the load after the shunt and so it wasn't recorded.

Testing the battery with a 12v headlight bulb (4A)

As you can see, the battery is sitting at quite a high voltage still... over 13 volts. When the load is added you can see the voltage drop dramatically. Even if the voltage had started at 12.8v the voltage drop down to 12.65v the first time (16:00) and 12.6v the second time (19:30), is not a good sign.

Voltage under 4A load
I stumbled across this bit taken directly from a Rolls battery manual:
Corrective equalization needs to be performed if symptoms arise such as a constantly running generator (low capacity) or the battery bank will “not hold a charge”. These symptoms are typical of a heavily sulfated battery. If a battery is not being fully charged on a regular basis or limited equalization is performed using a generator (see Bulletin 611, Generators, Inverters and Equalization) sulfation will occur from “deficit” cycling. This undercharge condition can take months before it becomes a major and noticeable problem. This under charge condition is caused when batteries are deficit cycled. The bank receives less of a charge each cycle and starts to sulfate. Eventually the sulfate will cause a resistance to charge and a “false high voltage” reading will occur. The “false high voltage” is measured by the charge controller, which further lowers the charging current to maintain the voltage set point. This further increases the undercharge condition. This is one reason why specific gravity measurements are so important as “false high voltage” readings can be misleading. See Bulletin 609, Voltage, SG and State of Charge for information on how to correctly interpret voltage readings.

I'm thinking this sounds like what has happened to my batteries. Thinking about it, my main charging source, the Sterling B2B only runs when my engine is running. I think I do many trips in which the full charging cycle will not have completed. This means that the batteries may not have reached the absorption stage of the charging routine. That combined with the B2B getting a bit confused by the solar panel keeping the voltage high means that the charging has not been idea. So as described above I think the batteries have a "false high voltage" and that has been fooling both the chargers and myself that the batteries are charged when they are not. So they are now badly sulphated and hence the high internal resistance.

If only I had a battery monitor that was able to log this information over time ;)

Well the next set of batteries is now going to have that device. That is what I'm building here. So the next set of batteries should last much longer. I'm also going to make sure I get normal flooded lead acid batteries that I can get the caps off to top up / test the electrolyte. I had that type last time and they worked well. This time I  didn't realise these batteries I have are sealed 'maintenance free' ones until after they arrived. They were a good price so decided to stick with them.

Now that solar panels have come down considerably in price I'm planning to buy an additional 80W panel to go with my 64W one. I will check the roof space on the van, might even get two 80W panels. That should mean that the solar regulator will be able to do a better job keeping the batteries charge up.

Overnight charging graph

Here is the graph of leaving the battery on charge overnight:

Voltage and Current on overnight charge
The charger I have is some bargain basement one I picked up from an auto store. My intention at the time was to find the stupidist heaviest cheapest charger I could find. My old Halfords automatic charger had died and I needed a quick replacement. I didn't want to spend money on something all singing and dancing as the plan was this charger was just going to be for occasional bench charging, or to feed 12v power into my Sterling B2B and use its 'cleverness' to feed the batteries.

I put the battery on charge with the Arduino plugged into it monitoring the current and voltage, as per the bench charge photo in the last blog entry.

This is not a 3 (or 4, or 7) stage charger. It just puts current into the batteries. So unlike the B2B when it kicks in, it doesn't immediately raise the voltage up to 14.4v. As you can see it is putting in around between 1 and 4 amps to start with and seems to pulse the current as seen by the solid green band. Watching the current readings so by on the serial terminal it looked like it did a few seconds of 3-4A then dropped to 1A for a second then back up again. You can see the voltage slowly raises and the current reduces as the voltage increases. I left it going overnight expecting to have reached around 14.4v or so by the morning. Slightly alarmingly it had brought the voltage right the way up to 15.1v. This is considerably higher than you should take a lead acid battery as they start to gas, usual at around 14.4v... but the addition of Calcium in the battery can raise the gassing level. My batteries are 'maintenance free' which is actually a stupid term which just means 'once the electrolyte has boiled off, you can't top it up'. But some batteries do do some cleverness to catch the gas and try and re-condense it back into the battery. My batteries have no obvious vents in them, so I can't see anywhere for the gas to escape. They didn't seem warm or bulging or anything so I hope not damaged them.

In effect what I have done is what is termed an 'equalisation charge' which is when you the battery up to a higher than normal voltage to try and get all 6 cells in the battery to the same level. This invariably causes some gassing in the battery and does overall reduce its lifetime, but on the other hand lessens (supposedly) the chance of one cell lagging behind the others and eventually dying prematurely rendering the battery useless (which actually happened to one of my previous batteries).

Many places say you shouldn't try and equalise a sealed battery as it causes gassing, which is bad. That makes sense. But I'm hoping doing this as a one-off has had a positive effect. I'm kind of working on the basis that if I can't revive these batteries and get their performance up to where they should be then I'm going to be needing to buy some new batteries anyway. So kill or cure.

When I checked the battery this morning and it was at 15.1v I could hear some sound from the battery, so I'm guessing it was gassing. If there was some sulphation on the plates, then hopefully this will have helped to remove some of it. time will tell.

I switched the charger off and left the battery to see what the voltage would return to. As you see in the graph, shortly after 8am, when the current is stopped the voltage dramatically drops to around 13.5v and then slowly drops of thereafter. At the end of the graph it is at 13.22v and you can see it is slowly falling still. There is no load on the battery other than the Arduino itself, which is pretty small, but hopefully enough to put enough load on the battery so that we get meaningful voltage readings.

I might try and find  aspare headlight bulb to wire up to the battery to see what that does to the voltage reading. Fingers crossed, if I've managed to revive this battery then we should see a much smaller voltage drop when the load is applied (after taking into account the surface change still on there holding it above 12.8v).

Saturday 2 February 2013

Bench Charge

I've taken one of the batteries out of the van to bench charge it to see if I can nurse it back to better health. Here is a quick photo of it in the garage connected to a charger via the Arduino and shunt. The Arduino is recording the battery voltage and current to the SD card.

Battery on bench charge with battery monitor

Another graph

Went out for a drive today. Here is a graph of voltage and current over time. I've tried to scale it so that 0 Amps is at the same position as 12.8V on the y-axes.

Current and Voltage over time whilst driving
The interesting thing is that the Sterling B2B is only putting in 16A of charge when driving. The charger is rated to 50A and the alternator is 75A, so I should be able to get some more current in. Indeed, when I switched on some load the battery with the charger running, the battery was still getting a constant 16A, which means the charger has current to spare, but the battery can't take it.

I think I would expect a battery to be able to take more than 16A charge rate. The general recommended rate for charging a lead acid battery is 20% of its Ah rating. ie. for a 115Ah battery, it should ideally be charged at 23A. So I would expect the battery to be able to take more.

I did notice that my Sterling B2B charger has been on the 'Gel' setting all the time I've had these batteries (2.5 years). The charger actually has a 'Sealed Lead Acid' setting, which is more appropriate. According to the manual the Gel setting has a slightly higher float voltage, but the main difference is it's bulk stage duration says '12-24 hours' versus '1-12 hours' for the SLA setting.

So I'm now wondering if my batteries have been being undercharged all this time. Thinking about the general pattern of charge on my batteries they are either charged by the Sterling B2B when driving or by the solar panel when stationary. I've long suspected that the Sterling gets confused by the solar panel. When we start driving, the Sterling B2B charger measures the voltage on the battery bank and from there works out how long the bulk charge stage should be. Since the solar panel is always on, the batteries read a higher voltage then they really are. So I think the Sterling has been running the bulk cycle too short. This combined with being on the Gel setting maybe means they have never reached the end of the bulk stage properly.

Voltage/Current reading overnight

I left the arduino logging current and voltage readings to the SD card last night. I switched on the fridge in the van and a pair of halogen lights. It looks like the fridge attempted to run right at the start but then gave up. I'm guessing as it was running from just a single battery, the low voltage cutout kicked in straight away. This is not a good sign for the health of my batteries :(

Voltage and Current readings of single 115Ah battery overnight
As you can see, the voltage drops down immediately as a load is applied. It was sitting at 12.80 volts at rest. As soon at the load of 3.5A was applied the voltage dropped down to around 12.45v and then kept falling overnight. What is interesting is the shape of the voltage line over time. With a constant current it takes a distinct change in slope at around 1 hour in.

When I went outside to switch the load off at 7:30am you see the current immediately drop to near zero and the voltage immediately jumps up. It then takes about an hour to stabilise. Then settles at around 12.3V.

I'm not sure exactly what this is telling me, apart from something does not look right. The total Ah discharged over the 9 hours is 29Ah. Which is about 25% of the capacity of a 115Ah battery. The battery was at around 10 degrees C last night, so would have had a bit smaller apparent capacity than the stated 115Ah. That said the 115Ah is the C/20 rate (ie. when drawing 5.75A) so we were drawing less and so that probably would have cancelled out the effect of the cold.

A voltage reading of 12.3V indicates a state of charge of approx 60%. I'd be expecting, based on the Ah drawn to be around 75% SoC at the end, and so a voltage of approx 12.40V.

I'm about to take my daughter out to pay for the weekend, and will leave the monitor connected to the battery and hopefully we will see the effect of the Sterling B2B charger kicking in.

Friday 1 February 2013

Shunt Arrived!

My 50A shunt has finally arrived from China! So I went out this evening to connect up the shunt to the batteries and the Arduino.

Arduino battery monitor connected up to shunt and batteries
Oddly, I couldn't get the current reading calibration right. There is a calibrate method in the INA219 library, and I passed in the various values for the shunt and voltage and the readings kept coming out too low. I connected my multimeter in ammeter mode in series with the shunt and found I was 2.3 times too low. So I've multiplied up in the code and putting various loads on the batteries it seems to keep in tally with the multimeter, so I've left it like that for now. Voltage readings were much better now than my last attempt.

The black wire you can just about see in the photo is powering the arduino via the barrel socket and voltage regulator. It is connected directly to the battery terminals. The voltage reading was still a bit low is is multiplied up in code by 1.0034 and now it tallies with my multimeter for the range of voltages we are interested in. Of course my voltmeter could be inaccurate anyway, but these readings now do feel right, and also tally with what the Stecca solar regulator thinks the voltage is (although that only has one decimal place, the change from 12.7 to 12.8 for example seems to happen the same on the Stecca and the Arduino now).

There are 3 batteries in the bank, but I've disconnected two of them via the quick-disconnects I have on the negative terminals, so I'm just measuring one individual battery.

Interestingly I appear to have a small 0.05A parasitic load on the batteries from somewhere. I'm guessing it might be the Sterling B2B or the Webasto Thermotop in sleep mode. Everything else goes via my main control switch panel and is switched off. And no, it is not the Arduino itself, I've already discounted that from the figure ;)

So I have left it logging again overnight. I've left two halogen spots on (about 3.5A in total) and the fridge on (about 3A on 50% duty cycle). So this should discharge a single battery a reasonable amount. I should be able to go out tomorrow morning and switch the loads off... will leave it some time to stabilise and then pull the SD card out and we can look at the results now we have current and more accurate voltage readings.

I probably should have disconnected the solar panel too... as that will probably start charging when the sun comes out in the morning.... well will be interested to see if we can see its effect on the graph. It is meant to be a sunny day tomorrow.