I assume that you are asking how to take the 15.27V to 12.64V declining supply and to produce an efficient steady 12V out.
Solution Summary:
Use a proper battery box - the voltage drop you are seeing is completely unacceptable.
For testing the drop across the battery contacts form part of the load, which is OK, BUT as it obscures the battery voltage due to battery to contact voltage drops it causes measurement problems.
Proper charging
Your stated charging voltage of 15 Volt is too low. You need just under 18V to fully charge 12 x NimH in series. If you really only have 15V then the batteries will never fully charge and you will not get the full 2000 mAh/cell.
As you state that the starting loaded battery voltage is > 15V the charger MUST be > 15V max - measure it and determine how it changes with load.
Use a constant current load for testing. See below for details.
An LM317 and one resistor will provide this.
Check battery capacity is genuine.
Many batteries do not provide the claimed capacity.
Use a Buck converter.
A buck converter can add maybe 10 to 15% more run time after everything else is sorted out but is pointless until you fix the other major issues.
The most efficient way of converting a varying battery voltage to a lower output voltage is to use a buck converter.
BUT your figures suggest that there is "summat aglae" - something is very wrong indeed.
30 ohms load at 15V or less Vout should give 500 mA max.
2000 mAh / 500 mA = 4 hours.
Discharge rate is ` 500 mA/2000 mAh = C/4
At that level a NimH cell should be at an average of 1.15V or so and fairly flat across most of its range.
Where you measure end point of the battery depends very much where you measure the voltage. As you have such a terrible battery holder (dropping about 5V at 500 mA !!!) you should consider this part of the load and measure the voltage at the battery.
If you consider end point to be 1V/cell you should get about 4 hours down to 12V measured at the battery. As the battery contacts are interleaved with the batteries it is hard to tell which is load and which is holder loss and which is battery voltage etc.
The battery holder is a major issue - fix or replace it!
You report
15.27 / 12 = 1.27 V/cell initial
14.39 /12 = 1.2 V/cell at 1 hour
12.64 /12 = 1.05 V/cell at 2 hours
Regardless of the reasonableness of these with time, lets look at the conversion efficiency they represent with a linear regulator.
12/15.27 = 78.6%
12/14.39 = 83.4%
12/12.64 = 94.9%
You can easily get better than 78% with a buch regulator
You can get better than 83% with only moderate care.
You can get beter than 95% only with much effort and care.
So, the start mid and end point voltages are such that a buck regulator will help.
BUT if the buck regulator gives 95% out and you would otherwise average 85% it will extend time by only about 95/85 = about 12% more.
Whereas, fixing your battery box and wiring will double the run time.
That's assuming that the batteries really are giving 2000 mAh. That's something yo need to check.
A constant current load can very easily be arranged using an LM317.
Connect an R = V/I = 1.25V/500 mA =~ 2.5 ohm resistor from Vadj to Vout.
Voltage into Vin
Output from Vadj (NOT from Vout).
Yoi now have a constant current load that allows much more consistent testing.
Note that charging 12 batteries in series will require attention to balancing. Without this you are almost certain to get imbalance problems so that one or two cells fully discharge first under load leading to early failure.
Your reported charging voltage is too low.
NimH cells need about 1.45V each to fully charge.
12 x 1.45V = 17.4V= say 18V
If your voltage source used for charging does not reach 18V open circuit then your cells are not getting a full charge.
Your reported voltage of 15V/12 = 1.25V/cell is too low.
Change this to 18V and you may get 2 x the result.
As a test, charge the batteries in a commercial charger and see what results you get.
The battery you have chosen is a typical Lithium Poly with a maximum voltage of 4.2v, dropping to 3.7v according to the description linked to in the OP; however the datasheet says it can be discharged to 2.75v, which is more typical of these batteries..
The RFduino can operate with voltages from 1.9v to 3.6v, with a typical voltage of 3.0v. (It's too bad it can't operate up to 4.2v like a lot of cell modems do, then it could be connected directly to the battery.)
However if you put a silicon diode with a typical forward voltage drop (Vf) of around 0.7v in series with the battery, this will drop the battery voltage range to 3.5v down to 2.0v, which is just right for the RFduino. And diodes are much much cheaper than regulators.
The venerable 1N4148 has a forward drop Vf of 0.6v at 1 ma, and 0.8v at 20 ma.
Best Answer
You speak of dropout voltages, which makes me think you are planning to use a pair of linear regulators for this, such as a 7812 and a 7805.
At idle, a Pi draws about 0.4 A.1 P=VI, so you're talking about burning up 7 × 0.4 = 2.8 W across the second regulator.2 That's a fair bit of waste.
A bare TO-220 regulator has a 50°C/W thermal resistance, and 50 × 2.8 comes to 140°C over ambient. Ambient temperature will only be as low as 20-25°C indoors, and then only if you're running this device naked on the workbench with a fan blowing on it. Unless your final application will have this thing running in a ventilated case outside in winter, count on the actual ambient temperature to be higher as the electronics heat up the air inside the case.
The second regulator is almost certain to destroy itself if you don't put a fairly big heat sink on it.
But it gets worse.
The first regulator will also be producing heat, up to about 5 W worth of it.3 The heat sinks on both regulators will have to be bigger than you calculate for each alone, since they will each be heating up the air inside the electronics' enclosure. The dual regulator system will come to an equilibrium higher than if you were running the two regulators in separate enclosures.
A far superior solution is to use one of the many off-the-shelf DC-DC converters that will put out both 5 and 12 V from a single input supply. You will find that there are models covering a wide range of input voltages. Any battery that can put out enough current for your job can be made to work.
When you start stringing many cells together into a high-voltage battery, you make it much easier for the battery to kill itself due to cell reversal. The fewer the cells you can use in series, the better. Another of the advantages of the DC-DC converter solution is that you can find types that will put out more voltage than they take in,4 so you could get away with just 1-4 cells, which is less likely to self-destruct.
You might be able to avoid the requirement for a regulated 12 V supply. LEDs don't really want constant voltage, they want constant current. The EE 101 way to get that is to drop a constant voltage across a fixed resistor, but there are a whole lot of ways to make a constant current source/sink. So, you'd put the CCS either between the raw supply voltage and the LED array or between the LED array and ground, then run the Pi from a 5 V DC-DC converter.
Footnotes:
It can go way up from there.
The second regulator only sees the 12-to-5 V drop, due to the way you've drawn your system in the question. Thus, we can ignore the battery voltage question for this part of the analysis.
The first regulator throws off even more heat than the first, for a couple of reasons.
First, the battery can't drop below 12 V+Vd, the regulator's dropout voltage, if we're going to meet your "stable voltage" requirement.
To get the full use out of the battery, you want to divide a single cell's lowest useful voltage into the lowest battery voltage you can tolerate to get the minimum number of cells. Then you multiply that by the highest voltage of the battery to get the peak battery voltage.
NiMH cells are still the most DIY-friendly sort. NiMH cells range from about 1.35 V when fresh off the charger down to about 0.8 V when nearly dead. If we use a regulator with a 2 V dropout voltage, we divide 0.8 into (12+2) V, which comes to 17.5 cells, which we have to round up to 18 × 1.35 V = 24.3 V. That means the first regulator could be throwing off another 12.3 × 0.4 = 5 W!
As the battery voltage drops, heat thrown off the the first regulator will also drop, unlike heat produced by the second regulator, which sees a constant voltage. It only drops to about 4 W, though, so it does't really change our conclusions.
Lithium rechargeables differ on behavior from NiMH a fair bit, but if you run the same calculations on them, the conclusions don't change much.
But all of that only considers the heat due to the Pi's power draw. You also have to add the current required by your LED matrix, which you haven't specified. If it's another 400 mA, you double the power wasted in the first regulator.
At a cost of higher input current.