Energy-harvesting from old batterys

If you use a switch mode power supply it ought to be able to convert any input voltage up/down and flatten every battery you feed it with. But unless you have a large supply of 'flat' batteries, I doubt that you will recover enough energy to justify the investment in your device or the effort of using it. Connecting and disconnecting batteries just to get a few watt-seconds of energy from each one would be quite tedious, I would imagine.