Filling the landscape with Solar Utility Nodes.
Open sourcing the solution of small scale electrification.

Monday, April 29, 2013

The Sad Fact about measuring the State-of-charge of a Lead-Acid Battery

Two important features which we feel necessary to include in the node are both an ammeter for the solar panel output and state-of-charge indicator for the battery. The ammeter has been going well and at the moment we only have some small calibration issues. Measuring the state-of-charge however proves to be much more difficult.

The state-of-charge (SOC) of a battery is referring to the amount of potential energy it currently contains which is also the same as saying the number of amp-hours left. Chemically, this refers to how much of the discharging chemical reaction is still able to take place. There are a number of things which one can measure to estimate the state of charge but many of them were inappropriate for our situation. (such as using a hydrometer to analyse the electrolyte) The website here was pretty good at explaining all the different ways to measure SOC.

The easiest method for us will be measuring the voltage across the terminals of the battery. The problem with this is that if the battery has been charging or discharging for a while there is a significant variation in the terminal voltage and this variation will not be removed for a solid 2 hours. This was confirmed when measuring the voltage of the battery after a long discharge time in the lab. It is quite likely that the battery is frequently being charged and discharged and so getting an immediate and accurate SOC reading would be impossible.

We also looked into the idea of using a GMR (giant magneto resistance) which, through the phenomenon of quantum tunneling, varies its resistance due to the magnetic field it experiences. The way to use such a device would be to place it on one side of the battery while a bar magnet sits on the other side. The permeability of the magnetic field is different for plates of lead and lead-oxide (the product in a discharged battery) and so this change could be detected. There are a lot of questions to be answered with this method such as how sensitive does the sensor need to be, in what range of operation and how how strong does the bar magnet need to be. It appears that no one has really used this method before except in very recent prototypes. It was deemed that this method was too new to try and implement in this project.

So the solution that Lydia came up with reduced flexibility but really gives the same impact. We wanted the user to have the ability to know the SOC of the battery so that they could better judge the prioritization of charging the battery or powering a load. What we will implement is a SOC meter which measures the open circuit voltage of the battery terminals but the condition of using it accurately will entail only being able to use this device after a long period of rest. This period will be night time and so immediately before the day's use of the node, the user will record the SOC of the battery and at that moment make a judgement about whether or not to prioritize charging or loads for that day.

What we are desperately looking for now are the voltage values which correspond to the state of charge for our particular battery. We will call Interstate Batteries and hope that they have this information.

Saturday, April 20, 2013

Building the Box: Current Measurement

The Control Box

The "Control Box" of our node is what contains the bulk of the components; basically everything other than the solar panel and the battery.  So therefore, the box must contain all of the circuitry to output the correct voltages and plugs for phones, connect lights, etc. The way we envision it now, the box will need 3 main elements:

1. Current measurement device: measuring the current output of the solar charge controller
2. Voltage measurement device: measuring the charge of the battery
3. Interface for charging/lights: site where you would be able to plug in a phone or set up lights

      The box needs to be resistant to both dust and water so we are thinking of an entirely sealed container made from plastic because this is easy to make holes in and customize. With a complete seal there is no chance for air flow which is usually favored for heat dissipation. Given that Masaka, where we will deploy, has hottest temperatures floating around 25 - 30 °C for only a portion of the year this should not be a problem. The thing that will get the hottest are the phone chargers and those have been observed to only give off mild heat. The questions of what switches, what types of seals and which wiring to use is still up in the air but has been discussed. A later post should give all these details soon.

Today we prototyped the Current Measurement element.  

This piece (see the following circuit diagram) measures the current output and translates it into LEDs, so it's easy to tell the relative amount of power you're getting out of your panel, and make the critical decision of whether you should be using this time to charge phones/other devices or if this is an appropriate time to only charge the battery for later use.  There are 8 LEDs, one lit LED means one amp of current, two lit up means two amps, etc.
(NB: each IC chip  the image below has two MCP6002 opAmps in it.)



The circuit diagram below shows a similar image as in a previous post however this image has a few updates. Obviously in the ammeter built there were in fact 8 LEDs to give greater resolution. The diagram uses 3 dots to indicate that the a unit setup is repeated. The voltage regulator used, U1, gives an output of +5 V and the resistor values were chosen accordingly to give a reference voltage equal to the voltage drop across the ballast resistor (MP915). The calculations of all the resistor values are shown under the diagram in a series of tables.



The table below shows how each opAmp is able to get the correct reference voltage so that it turns on for the intended current. A summary table (top right) also shows how much current was to be used if all 8 LEDs were on. The current drain is not negligible but the the ammeter would only ever be operated temporarily by a push switch and so this should not be an issue in terms of energy loss.



One point of confusion: On one of our real multimeter ammeters we were measuring a current of 1.5 amps, whereas a measurement of voltage across the 0.1 ohm resistor indicated that the current was greater than that (and we saw between 2 and 3 LEDs light up).  We're still a little unsure about where the discrepancy is between these values. The value of the resistor was verified to be 0.1 Ohms and so it would be very hard to disagree with the amount of voltage being dropped across it. More lab testing in exact conditions will need to be done.

Coordinating with Voltage Measurement:
One thing we hope to do is coordinate the displayed LEDs for current and voltage measurements, so you can look at them and qualitatively (without calculating amps/volts/etc.) decide what it would take to fully charge your battery.  I.E.: construct a similar voltage measurement which has 8 LEDs (or could be more for higher resolution) such that 1 LED means 1/8th charge, 2 means 2/8th, etc.  Then, by coordinating correctly, pair the two measurement systems such that if you have 6 of 8 lights lit up for battery charge, and two lights lit up on current output, then you can say that in some fixed time (maybe an hour), the battery will be fully charged if you don't divert power to charge things and if the solar output remains relatively constant.  The readout would look similar to this:


This would hopefully be an extremely intuitive interface because the literal number of LED's (or literal length) from current output can be imagined to geometrically overlay the unlit LED's in the battery charge display. For this to work the way in which battery charge relates to terminal voltage will need to be researched. Obviously, in a perfect world, the voltage of a battery should not decrease because each c]m-ell has a precise voltage difference across it dependent on the element of the electrodes and the electrolyte. But I think that there still is a relationship between charge and voltage. Although it is definitely not the case that zero charge correlates to zero voltage.

Sunday, April 7, 2013

Measuring Current for Greater Energy Management

When the solar node is receiving energy from sun light there is a variable amount of current that might be produced. The solar panel is relatively consistent in its 21 V output but the current can range from 0-6+ A depending on the intensity of the sunlight. We have not tested midday sunlight yet but we hope to get a rough 7 A out of the panel.

When the node is deployed in an un-electrified village it is likely that the energy produced by the node would be in high demand from not only the community clients but also the house hold owners of the node. Obviously, during the day is the only time available to charge the battery and given enough sun light there should be enough current produced to charge a few phones and charge the batter at a reasonable rate. If there are 4 phones charging each drawing 0.5 A and the solar panel is outputting 7 A we will have 5 A left over to put into the battery. The battery we are using is 40 Ah and so given 8 hours of good sunlight we could charge the battery almost entirely.

But there will be times when there is not a steady 7 A coming from the solar panel. If the day is particularly cloudy or it is winter time there will inevitably be a lower current output. This will lead to times when a decision needs to be made based on the owner's priorities for either satisfying the load of charging phones or charging the battery so that the house can have night time lighting. To make this decision an indication of the current being outputted from the solar panel will need to be available which motivated the design of a circuit to indicate current flow with just 3 red LED's.

A circuit to measure current turned out to be quite hard to make. You need to place the circuit in series and attempt to make the circuit have as little resistance as possible so as to not change the current flow when the circuit is inserted. The diagram below is the first prototype which will be tested.



The circuit is deigned to indicate 2, 4 and 6 A of current flow. There are three comparators  (OP1, OP2, OP3) which all supply their V+ to output when the voltage across R1 is surpassed. OP1 has a reference voltage (into IN-) of 0.2 V which means it will turn on LED 1 when there is at least 2 A passing through R1. OP2 and OP3 have reference voltages of 0.4 and 0.6 respectively to turn on for 4 and 6 A. The reference voltages are taken from a voltage regulator which drops the 12 V battery supply to 3 V (although the diagram says 2.85 V). It is very important to use a voltage regulator here because the battery voltage will vary with charge level and the reference voltages need to be very secure for good measurement.

R1, the MP915, has been ordered from Caddock through Element14 for 3.20 $ a piece. This resistor is also rated at 15 W which is a good safety buffer considering how much power this will need to dissipate. If 7 A is going through the circuit the power will be 4.9 W as calculated by the P = I2R law. The vision for this circuit is that it will live in the command module of the node with the LEDs visible to the user. There will be a push-to-make switch that will engage the ammeter when pressed. This will ensure that the current is only momentarily measured and not constantly measured. This should prevent too much heat building up on R1 and the voltage regulator as well as reducing unnecessary energy loss.

When the parts arrive this circuit will be tested. If this circuit works well it should be very easy to expand the circuit to accommodate more current increments. Additionally a circuit will be built to display the voltage of the battery via a series of LEDs. This will be shown in a later post.

16th April: Just did a preliminary test with one opAmp to test the theory of the circuit. Worked perfectly but used the MCP6002 opAmp configured as a comparator. Also used a 5V regulator, the LM7805C which was used for the phone charging circuit, which can regulate a maximum input voltage of 35 V. This means that the battery will not need to be used as an external power source as shown in the diagram but the power to drive the ammeter can come directly from the source it is measuring if there is also a link to ground. This is the case for many of the components and so will significantly reduce wiring hassle.