Auto switch the power from 5V adapter to 9V battery when the adapter is failure.

Thread Starter

Arjune

Joined Jan 6, 2018
234
Will this circuit switch to battery with a power failure. I plan to power my clock. Would D1 overload the base of Q1? The battery is 9v and the power supply is 5v.

Switch to battery_Arjune.png

The circuit should cut off the common cathode display with a power failure to conserve battery
 

AlbertHall

Joined Jun 4, 2014
12,345
It will switch the cathode supply correctly but Q1 and Q2 will do nothing.
The base of Q3 will be about 0.7V with power and 0V without. To switch on Q2 fully its base needs to be near the battery voltage and there's nowhere that can come from.
 

ScottWang

Joined Aug 23, 2012
7,397
1. How's the draw current of the Clock?
2. Are you sure that the Clock can be supply up to 9V?
3. The circuit used Schottky diode to reduce the voltage drop to 0.3~0.4V.
4. The Output current setup to around 50mA, R2 and R5 use 2K then the output current will be about 20mA.
5. Q1 used for cutoff the base current of Q2 when the city power is apply to the adapter and output 5V.
6. If you have try this circuit then you can adjust the R4 more higher to try does the Q1 could turn on to cut off the base of Q2, because it will draw the current from battery when Q2 doesn't turn on, so you can make R3 and R4 as higher as you can.

Auto Switching The Power from 5V adapter to 9V Battey_Arjune_ScottWang.png
 

sghioto

Joined Dec 31, 2017
5,380
Here's a different version to eliminate any battery drain when the supply is active. C1 may or not be needed depending on the capacitance in the clock Vcc circuit.
SG
EEE 5 to 9 volt switcher.PNG
 

BobaMosfet

Joined Jul 1, 2009
2,110
There's a much better way to do this. Use a 9V wallwart power-supply into a 5V regulator. Connect your 9V battery in parallel with power from the wallwart, using a 1N5818 diode to prevent mains from driving power backwards through the battery. The diode also acts as a slight voltage drop between the battery hot and the wallwart hot, so that as long as wallwart provides power, the battery cannot power the regulator. But if mains disconnects for any reasons, the battery will instantly supply power to the regulator.
 

Thread Starter

Arjune

Joined Jan 6, 2018
234
1. How's the draw current of the Clock?
2. Are you sure that the Clock can be supply up to 9V?
3. The circuit used Schottky diode to reduce the voltage drop to 0.3~0.4V.
4. The Output current setup to around 50mA, R2 and R5 use 2K then the output current will be about 20mA.
5. Q1 used for cutoff the base current of Q2 when the city power is apply to the adapter and output 5V.
6. If you have try this circuit then you can adjust the R4 more higher to try does the Q1 could turn on to cut off the base of Q2, because it will draw the current from battery when Q2 doesn't turn on, so you can make R3 and R4 as higher as you can.

View attachment 162510
I'm guessing the clock uses about a hundred milliamp although it has six 7 segment displays and I'm sure the clock can handle up to 10v safety since it uses CMOS ICs. It seems to be a phenomenon that the clock would use less than a hundred milliamp considering the use of the 6 displays for Hour, minutes, and seconds but anyway this would be irrelevant with the main power off and the clock pulse source uses about 20 milliamps with a transistor inverter and diode OR gate using about another 25 milliamps along with a couple of 7555 timers in monostable mode used for increased pulse width because there was some clocking problems. I'm guessing on battery the clock will use about 50 milliamps max. Sorry I don't have a completed schematic to post. I like your circuit but it's a little too complicated for me.
 

crutschow

Joined Mar 14, 2008
34,284
My preference of the circuits posted is the one in post #5 by sghioto.
It's relatively simple, requires no relays, and draws no significant current from the battery when the 5V is available.
Below is the LTspice simulation.

upload_2018-10-27_19-41-16.png
 

Thread Starter

Arjune

Joined Jan 6, 2018
234
Will this circuit switch to battery with a power failure. I plan to power my clock. Would D1 overload the base of Q1? The battery is 9v and the power supply is 5v.

View attachment 162498

The circuit should cut off the common cathode display with a power failure to conserve battery
I attached another circuit which is much simpler for me.

6 diodes v drop_Arjune.png
 

ScottWang

Joined Aug 23, 2012
7,397
The circuit should be ok.
But when the current is exceed hundred mA, you should be considering the diode voltage drop maybe will exceed 0.7V then Vf=0.7V*6=4.2V, the Vout of battery will be less than 5V then you might just in series with 5 diodes, and if the current is exceed 200 mA then you can use 1N4001~4007 to replace 1N941, and the Q1 could use logical level N MOSFET to replace 2N3904, the N MOSFET can be choose the Vgs>15V, Ids>3A, Rds(on)<=20mΩ, the R1 is no needed and connects a 10K from Vg to Ground as Rgs, that is to avoid when the circuit lose the power from adapter and then the Vg will become a floating or unpredictable status.
 

crutschow

Joined Mar 14, 2008
34,284
Instead of using a 9V battery, why not use four AAA batteries or two 3V lithium cells (such as CR2032) to give you 6V.
That way you don't need so many diodes to drop the voltage for your diode isolation scheme.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
18,176
Instead of using a 9V battery, why not use four AAA batteries or two 3V lithium cells (such as CR2032) to give you 6V.
That way you don't need so many diodes to drop the voltage for your diode isolation scheme.
I was just going to suggest that!! CrutsChow is brilliant indeed.
But now we still don't know if this is a CMOS clock that draws 5Ma or a much older TTL logic clock with 27 ICs that draws over 300 Ma. So how ling will the backup actually last??? Another option is to have a 10F supercapacitor supply the logic and supply the driver circuit with non-backed up power. But there might be an issue with feeding input signals to unpowered IC devices. So it may have a problem with that.
 

ArakelTheDragon

Joined Nov 18, 2016
1,362
I did not read all the posts, sorry is someone suggested this or if I am making a mistake, but I think "Q1" on the original circuit will not be switching. On a bipolar PNP transistor, the base needs to be more negative than the emitter with "0.6VDC". When your power supply is ON, the "Q3" transistor will conduct. But when its off, how do you expect any voltage on the "Q1" emitter? The upper "Q2" base current flows towards the "Q2" emitter.
 

Thread Starter

Arjune

Joined Jan 6, 2018
234
I attached another circuit which is much simpler for me.

View attachment 162594
I used 4 diodes with 0.8v drop each and a 9v battery giving 8v. Adapter out was 6.6v and the clock power out was 5.7v. With a used alkaline battery at 8v the clock power out is 5v. Good, but the count was sporadic as I interrupted battery power by applying the adapter power of a prototype mod 60 counter as a test. I think I need a 5v regulator to regulate adapter power and battery. I think the 7805 regulator has low power loss at no load (5mA?)
 

Thread Starter

Arjune

Joined Jan 6, 2018
234
The attached schematic of my circuit works good for my test modulus 60 counter so it should work good for the clock. I live in Rockland county NY and the clock to be assembled is at my mom's house in the Bronx, NY. backup.png
 
Top