Assumption: 3V minimum supply voltage wanted by system.
Best solution:
The 4 cell solution gets slightly more of the total available energy from the battery pack and has 4/3 of the battery volume so 4 cells would run for about 1.4 x as long as 3 cells.
Batteries people use will PROBABLY have a per cell voltage of from about 0.9 Volt minimum to about 1.6 Volt maximum.
You are very unlikely to have people use LiIon (3V to 4.2V/cell). AA (= 14500) cells are available in LiIon but are extremely rare on the consumer market.People who have them will usually be educated enough to not use them in this application.
It is possible that people could have primary Lithium AA (about 3V) or other very rarely available cells, but this is extremely unlikely. Mercury, Zinc Air, LiFePO4.
Voltages below are the reasonably extreme limits
Most likely cells are -
- NiCd - 0.9 - 1.3 V
- NimH - 0.9 - 1.4V
- Alkaline - 0.8 - 1.6V
- "Zinc Chloride / LeClanche - 0.8 - 1.5V
- LiIon - 3 - 4.2V
ZnCl is standard cheap torch or radio battery.
Alkaline batteries are nominally 1.5V but consistently measure 1.55V or slightly more when fully charged. NimH are nominally 1.2V but can be 1.35V soon after charging.
So, excluding LiIon te voltage range is about 0.8 - 1.6V/cell.
If you want rechargeables to be ttreated well then 1.0V is sensible lower limit at low currents so 1.0 - 1.6V
SO:
3 cells: 3 x 1.0 - 1.6 V = 3V- 4.8V
4 cells: 4 x 1.0 - 1.6V = 4V - 6.4V
(The above is for new and exhausted cells. For "sensible" voltages of 1.0 - 1.5V th range is 3-4.5V and 4 - 6V for 3 and 4 cells)
In the most unlikely case of LiIon being used then 3 cells gives 9 - 12.6V and 4 cells gives 12V - 16.8V. Unusual but needs to be designed for if damage is to be avoided.
SO:
With 3 cells you JUST get down to 3V at 1.0V/cell. Below that with eg ZnCl run very flat. Below 1.0V all cells have very little capacity remaining so a 3V LDO regulator would be "good enough" This could be linear with almost 100% efficiency at 3V in and 3/4.5 = 66% efficiency at 4.5V. A buck converter may run in the 80% - 90% range. The relatively low Vin and range of voltages means the 90-95% achieveable with buck in some cases would not easily apply here. So, a linear LDO regulator would work well enough here.
With 4 cells you JUST get down to 4V at 1.0V/cell. (Or down to 4 x 0.8V = 3.2V with eg ZnCl run very flat. So a 3V LDO regulator would easily provide 3v out. This could be linear with around 75% max efficiency at very low battery voltages and as little as 50% efficiency at 6V in. A buck converter may run in the 85% - 90% range - slightly better than with 3 cells. SO a buck converter would make a lot of sense with 4 cells.
If you want to protect against people using LiIon cells you need to protect against 3 x 4.2 = 12.6V or 4 x 4.2 = 18.8V Vin.
You could either shut down the system with a warning at these voltages (especially if a linear regulator was used) or accept the lower overall efficiency with a buck converter) as a system optimised for half the voltage of LiIon cells would probably be less than optimum when LiIon was used.
At the bottom end I'd cut off operation at 1V/cell to protect rechargeable cells - unless you wanted every last 'drop' of energy. (With 3 cells you need just over 1V / cell with an LDO linear).
Buck-boost with 3 cells allows you to get slightly more from the batteries with 3 cells but has less efficiency overall so probably makes no sense compared with a linear LDO.
I think that a very good option is to take advantage of the PIC uC that you already have in your design and its analog (ADC) input ports for monitoring the batteries voltage and to drive the switching between those batteries using MOSFETs instead of BJT transistors. Using the uC you should not need the two comparators that you show in the picture and you will have a more intelligent charging/monitoring battery circuit that could lead to improve the batteries duration. This uC could stay in sleep mode (or low power mode as second option) all the time using interrupts to read the ADC channels. You should run the uC from its internal RC oscillator operating at the lowest frequency as possible to decrease the power consumption.
I also recommend you using Schottky diodes instead of 1N4148 and to put a small bulk capacitor at the output of the power selector circuit (or switching circuit). Those Schottky diodes will drop less voltage than the 4148.
If you decide to use the uC for the battery voltage level monitoring, try to use the internal fixed voltage thresholds that the uC provides for the internal comparators, because if you don't do that you could have some problems reading wrong analog values because those batteries are used to power the uC too (you will have ratiometric voltages).
I hope this help.
Best Answer
LTC4415 is the IC to be used for such application. An enable pin can be used to set the threshold at which you desire the switch over. Here is the Datasheet. http://cds.linear.com/docs/en/datasheet/4415fa.pdf