By "iPhone charger" I assume you mean 5V 500 mA power source. Note that some USB outlets only provide 100 mA until the device actually answers the USB protocol and requests more than that, although wall outlet based ones will have all the juice all the time.
You can use a boost converter to take the 5V input to a 15V output. Either build one on your own using a switching controller, an inductor, some capacitors, and some amount of diodes/transistors, or buy a ready-made one from vendors like CUI or Murata or RECOM. Note that the current at 15V will be about 150 mA with 500 mA in at 5V and 90% efficiency.
Then, use a charge circuit for NiMH batteries. It's OK to parallel the charge circuit putting current in, and the device drawing power out from the batteries, as long as the charge circuit is properly current limited and follows the battery chemistry charging profile.
Actually, given that 1.2V NiHM cells have a max charge voltage of between 1.4V and 1.5V, 15V may not be enough, given the likely drop in the charge circuit. You may need to go to 18V. If you're ambitious, you could control the output voltage of the boost converter based on the current charge level of the batteries. That'd take some careful design tuning, but would make the whole system more efficient.
Stacking NiMH to get to 12V seems bad, though. I'd rather use something safe like a LiFePO4 battery, and charge that from the 5V (using a direct charge circuit, or using a buck converter that is controlled as a charger for higher efficiency.) Then use a boost converter from the battery to generate the 12V output needed. Again, such boost converters can be hand-built, or can be bought from providers. The charger would connect to the battery. The on/off switch for the whole device would connect/disconnect the battery to the boost converter that goes to 12V.
In both cases, the device could run on charger power, assuming the total draw at 12V is less than 150 mA (meaning total power draw of about 2 Watts or less.)
For the average DIY guy I guess you have these technologies to tinker with:
- Lead acid
- Lithium (mix of different sorts)
- Nickel Metal Hydride
By specifying it as "portable" you probably don't want the charger to be heavy. Then you can remove Lead acid from your list. The NiMH batteries have quite high energy density nowadays but the charging and maintaining of the cells are a bit more complicated than for Lithium. We assume Lithium for this case.
The nominal cell voltage for a lithium cell can be around 3.6V per cell (depends on make and model). If you're going to charge directly to the USB port you would need 5V input to the phone. So you would be best off using two cells at 7.2V nominal. This would then have to be converted with preferably a DC-DC to 5V.
The Galaxy S4 has a 3.8V cell with 9.88Wh. To double the battery capacity you would need an equal amount of Watthours (cell voltage x Amperehours) in your backup battery. Calculating for 10% loss in your DC-DC you would need a 7.2V cell pack of at least 1.35Ah.
And then you still have the task of doing a charger for your backup battery.
Best Answer
Battery discharge curves and you
Batteries indeed vary in voltage as they are discharged. This is a function of the chemistry of the battery, and specified by the battery maker as a discharge curve, characteristic of the chemistry of the battery but also varying with the discharge rate and a few other parameters (such as temperature).
For instance, a 12V sealed-lead-acid battery's discharge curve is shown below (this is one of the most common types of small-ish 12V batteries):
As you can see, the battery starts off at around 13V and discharges to 9V before not having much life left in it. The good news, though, is that power amplifier ICs like yours don't care much as they are designed to work over a range of voltages; for instance, your TDA7492P can run on anywhere from 8V (a single, rather flat, 12V lead-acid battery) to 26V (almost enough to run on 2 12V lead-acids in series). The volume may go down as the battery drains, but that's OK.
I want more runtime!
You can connect batteries in series to boost the voltage (a 9V alkaline battery is really 6 1.5V alkalines in series, in a neat package), or in parallel to boost the available current capacity without changing the voltage. Since the TDA7492P can't quite take 2 12V lead-acids in series (especially during charging), you'll have to connect your 12V batteries in parallel. (This does introduce complications when you go to charge them, but lead-acid batteries are tolerant of this. Lithium-ions, on the other hand...)