0
\$\begingroup\$

i'm still working on my usb meter.

I still have a problem in my design, I would like to implement an external power supply and a battery. I was looking for a circuit that would switch automatically between the supplies.

When the external supply is plugged in, i would like it to run on that supply, else on the battery. Also the battery can't depleet when the device is running on the external supply.

I lookded some circuits up on the internet but they were always controlled by a microcontroller, which is not an option in my circuit.

Anyone have any ideas?

Kind regards

\$\endgroup\$
  • 2
    \$\begingroup\$ This is unclear because you don't mention the external power supply, battery and what voltage and other requirements the system has. Perhaps you can add a schematic / block diagram or a more detailed description of what you have in mind? \$\endgroup\$ – PeterJ Oct 23 '14 at 12:19
  • \$\begingroup\$ A microcontroller ? Do you mean an integrated circuit ? Because there are "simple" chips that will do the job with a few external components. \$\endgroup\$ – FredP Oct 23 '14 at 12:20
  • \$\begingroup\$ Hey, excuse me forgot it. The power supply would consist of 9V 2A( overkill). the batttery would be a 9V block battery. The fixture uses 1A max. Yes I'm lokking for a simple chip which doesn't need an input to select the power supply \$\endgroup\$ – Joris Aerts Oct 23 '14 at 12:22
  • \$\begingroup\$ Something like that intersil.com/en/products/power-management/battery-management/… ? There are many others. Also similar (but not exactly) questions with usable ideas : electronics.stackexchange.com/questions/96059/…, electronics.stackexchange.com/questions/21570/… \$\endgroup\$ – FredP Oct 23 '14 at 12:32
  • \$\begingroup\$ I read the Specs from the ICL7673, it would be a good solution only that it has an Iout MAX of 35mA which is a little short. \$\endgroup\$ – Joris Aerts Oct 23 '14 at 12:45
1
\$\begingroup\$

Just a connector? Battery connects at J21 power supply at J29. When supply is plugged in it breaks the GND connection for the battery.

enter image description here

|improve this answer|||||
\$\endgroup\$
1
\$\begingroup\$

I am currently working on a similar problem. Got a handheld device and it should switch to battery supply and back based on an external voltage.
I came up with a pretty basic and draft design, here's the schematic:
schematic
So what does it do?

This circuit basically switches the GND path of the battery on and off on your load, based on the state of V-Ext.

Case 1:
-> V-Bat connected, V-Ext disconnected

R3 pulls V-Ext to GND-Bat. Therefor Q2 is switched off and the gate of Q1 loads a charge via R1.
Q1 switches on, and GND-Bat is connected to the actual circuit.

Case 2:
-> V-Ext gets connected
Now, that V-Ext is connected, voltage on the base of Q2 increases, switching Q2 on. Therefor Q2 pulls the gate of Q1 to GND-Bat, discharging it and turning it off.
The battery is now disconnected. But keep in mind that a small current still flows through R1. About 1mA on a 9V battery.
D2 & D3 separate GND-Ext and GND-Bat. This is important! Both ground paths are needed for Q2 to switch properly, but they have to remain separated, otherwise you wouldn't be able to switch one at the output.

Case 3:
-> V-Ext gets disconnected, again
It's the same as Case 1, actually, with one little difference.
R3 pulls V-Ext to GND-Bat, and Q2 switches off, as before. However, it takes a while for the gate capacitance of Q1 to load properly. Meaning there's a delay in switching where no ground is connected and no closed circuit exists. Now, that's what C1 is for. It prevents a short voltage drop which could cause problems and flattens any ripple caused by connecting or disconnecting an external power source.
But how to calculate that delay? Easy! Look in the datasheet of the Mosfet you desire and look for the gate capacitance.
t_delay = 5 * R1 * Cgate
So if the gate capacitance is, for example 100pF, it'd be
tDelay = 5 * 10kOhm * 100pF
tDelay = 5 * 10,000Ohm * 0.0000000001F
tDelay = 0.000005s
tDelay = 5us
this formula calculates the time until the gate is fully charged, however, Q1 usually switches on, earlier. I like to overshoot a little with these thresholds. I think C1 is way to large in this setup, btw.

Some final words:
This circuit is nothing else but a simple NOT gate (which would be Q2) driving the gate of Q1.
As mentioned earlier, this circuit draws a "standby current" from the battery as long as you also connect it to an external power source. You can decrease that current by increasing R1. However, since R1 is a factor in the formula for switching delays it will also increase your switching delay. I think it should be safe to replace R1 with 1 megaohm, though.
Also be careful with V-Ext. It is the primary input, meaning, this circuit will switch to V-Ext, even when it's way to small. Even if it's just 1V! Do not buffer V-Ext with a capacitor, it will ruin this setup. To prevent this you could use a voltage divider on the base of Q2. R3 also prevents V-Ext and therefor the base of Q2 from floating. Induced voltages of disconnected leads acting like an antenna are not a problem.

There were some messes in my previous post, I hope I fixed everything!

|improve this answer|||||
\$\endgroup\$
  • \$\begingroup\$ Hi Alzurana, I get your circuit and it would work properbly.Only i'm still worrying if Q1 Q2 wil switch properly because I need to use switches which can handle a current around 1.5A. \$\endgroup\$ – Joris Aerts Oct 24 '14 at 7:25
  • \$\begingroup\$ Q2 is just a logic switch. It's not switching large currents, therefor any small signal transistor is suitable. A standard BC546 would do the job. Q1 is your power transistor for the battery and yes, it has to be able to switch your 1.5A properly. Luckily, most mosfets support that easily. A simple IRF510 for Q1 would work. It's rated up to 4A. ->(Sidenote: D1 is within your power path, so it has to be rated at least 1.5A as well. D2 and D3 can be the smallest diodes you're able to find.) \$\endgroup\$ – Alzurana Oct 24 '14 at 14:48
1
\$\begingroup\$

I posted something like this a few months ago, but I don't know where it is so here it is again:

When the external supply is connected, the relay common connects to the normally open contact, and when the external supply is disconnected the common reverts back to the normally closed contact.

enter image description here

|improve this answer|||||
\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.