
An open source battery switch project from Open Electronics:
Given two batteries, it chooses the one to connect to the load based on the voltage measured at their poles. It can also be used to switch DC power supplies.
More details at open-electronics.org.

I love those spade connectors. Where to get them?