The schematic shows the power supply I'm using. V+ is unregulated 10-14V and J2 is a rechargeable 9V battery. T1 is connected to an AVR microcontroller pin with a pull-up. When the pin goes high I know I've lost external power and I'm running on the battery and an audible alarm sounds.
There are two problems I'd like to solve. First, I can get the audible alarm if another large load like a pump motor starts on the 12V external power source. Would a large filtering capacitor between V+ and GND solve the problem? If so, how do you determine the size? Right now the AVR pin connected to T1 tells me when I've lost external power. I'd rather have the AVR know when I'm running on the internal battery, which will happen if the external voltage source drops below the battery's voltage. Any ideas how to modify this power supply?
There are two problems I'd like to solve. First, I can get the audible alarm if another large load like a pump motor starts on the 12V external power source. Would a large filtering capacitor between V+ and GND solve the problem? If so, how do you determine the size? Right now the AVR pin connected to T1 tells me when I've lost external power. I'd rather have the AVR know when I'm running on the internal battery, which will happen if the external voltage source drops below the battery's voltage. Any ideas how to modify this power supply?