# Electronic Circuits and Projects Forum

1. ## DC power supply changes

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?

2. A couple of questions that will help decide the easiest/best way to do it:
What is the current load on the +5 volts and is it constant? If it is pretty constant we could sense the current from the battery with a simple circuit. Also this might allow us to put the filter cap on the other side (right) of the 1N4002 diode and make it smaller. Otherwise just a big cap on the 12 volts would help. Also make sure the 12 volts for your circuit comes from the source not from somewhere in the string of "stuff" (pumps and such).

3. Glad to hear that a capacitor will help. I can't always control the 12 volt source. In my case, I connect to a 12V light circuit on a boat's house battery bank. Occassionaly I get the audible alarm when the boat's fresh water pump starts, which I know is a large load. The load on the +5 volts is small but it will vary from 75 to 200mA. Any suggestions for the capacitor size and location and the circuit for sensing current from the battery will be appreciated. Note that the battery is trickle charged (6 - 10mA) when connected to external power.

4. Can't you just use J3-4 to control the alarm? Whenever the external power is present (>~5V) J3-4 is pulled low. A pull-up on J3-4 will give a high logic level when the battery is providing power.

5. Originally Posted by alec_t
Can't you just use J3-4 to control the alarm? Whenever the external power is present (>~5V) J3-4 is pulled low. A pull-up on J3-4 will give a high logic level when the battery is providing power.
That's exactly how it works right now. However, I do get the occasional alarm with a brief sudden voltage drop on the external power supply, which I hope can be solved with a large capacitor. Also, if the external power supply's voltage drops below that of the internal battery, I don't get the alarm because J3-4 is still pulled low even though I am running on the battery. With a 12 volt external supply that should not happen often but it is possible. That's why I thought it would be better to alarm only when running on the internal battery.

6. So what you need is a voltage comparator with a sluggish response, which triggers the alarm whenever V+ < Vbat for some minimum time. As a comparator has a high input impedance the capacitor value needed to slug the response will be modest.

Power Supply 12mod.gif

The time constant for T1 base voltage change is ~ 100 secs but can easily be changed to suit the V+ voltage dip characteristic.

8. Alec,

I've never used one but I'll start reading up on voltage comparators. Thanks for your help.

9. Our posts seem to have overlapped in time. I draw your attention to post #7 and the one-transistor comparator I used to replace your T1.
Edit: this might require some modification to the AVR input circuitry. To avoid that, a second transistor could be added (I can redraw the circuit if needed).

10. Alec,

I am a hardware novice so I will need some explanation for your one-transistor comparator. I can see that the external power continues to provide current to the base of T1. Does the RC time constant (470000 * 0.00022) mean that T1's base will continue to receive current from the capacitor for about 100 seconds after external power is lost or some fraction of that time? With your circuit, what logic levels would I see at J3-4 when 1) no external power and capacitor discharged, 2) external voltage > battery voltage, and 3) external voltage < battery voltage. Thanks.

123 Last »
 Tags
 Similar Threads Thread Starter Forum Replies Last Post Stabilised Power Supply with Current Limiting mechie Electronic Projects 41 11th May 2009, 10:20 PM about a power supply project rippy Electronic Projects Design/Ideas/Reviews 11 9th April 2007, 01:41 AM toshiba power supply greg Datasheets, Manuals or Parts 36 1st March 2006, 01:23 AM Power supply/ current supply design inkedallusion Electronic Projects Design/Ideas/Reviews 1 17th December 2002, 01:10 AM advice needed on designing power supply 440uf Electronic Projects Design/Ideas/Reviews 14 24th October 2002, 05:12 AM
Electronic Circuits  |  Learning Electronics

Join our community with over 100,000 Members! It's free, easy and when you're logged in you have many more features! Click to register.
Page Time: 0.11184 seconds      Memory: 7,670 KB      Queries: 17      Templates: 0