Need your circuit to have battery backup? Here's how to sense when your power jack is unplugged and put your circuit into low power mode. When you have a plug in the power jack, the third pin in the jack floats. When you remove the plug, that pin (accessible via the through-hole just below the power jack) is grounded. If you put a 100k pullup resistor to 5V on it, and then it can be a signal pin. When power is connected, that pin is at vcc.
[00:20] <FenPalmTX> +5 means the jack is inserted, and 0v means the jack is removed.
[00:20] <FenPalmTX> Handy if you put that on an interrupt pin, and have a backup battery circuit.Makes an easy way to determine that you are no longer running on battery power, and can instead start to charge the batts, or just stop whineing about low bats. ;-D
http://schematics.blogspot.com/2006/10/battery-backup-for-sram-or.html





