Author Topic: How to power a circuit from two sources?  (Read 8456 times)

0 Members and 1 Guest are viewing this topic.

Offline zaptaTopic starter

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
How to power a circuit from two sources?
« on: December 26, 2013, 06:38:11 pm »
I am building a one-of circuit that will be connected to two power sources and wonder what is a reasonable way to do the power arbitration.

Here is a simplified schematic diagram


The circuit include a 5V Arduino Min Pro https://www.sparkfun.com/products/11113 , a 5V FTDI Basic @115.2K https://www.sparkfun.com/products/9716, a ATA6663 Lin transceiver chip, and a 12V/5V Linear regulator (for higher max Vin than the Arduino's LDO). The USB side of the FTDI Basic will be used with a laptop computer running on batteries (floating) so no ground issues.

The board should be able to operate in these three configurations

1. VBAT power only (USB is disconnected or laptop is off).  Arduino should function (TX, RX, leds, etc). FTDI/USB not used though the Arduino sends 0/5V signals.

2. USB power only (USB connected, laptop powered, VBAT off) - FTDI and Arduino should function (e.g. to upload a new program). Lin chip not used though the Arduino sends 0/5V signals.

3. Both VBAT and USB power. Everything should work.

Of course it is also important that nothing, including the computer, will get damaged in the above scenarios, so possibly, some protection on the signal lines may be required (hopefully not).

Thanks,
zapta
 

Offline Jon86

  • Frequent Contributor
  • **
  • Posts: 526
  • Country: gb
Re: How to power a circuit from two sources?
« Reply #1 on: December 26, 2013, 07:07:17 pm »
You could either use some kind of Diode/MOSFET circuit just to stop the current flowing into a source, or I think what would be more suitable is to use a real power management IC that switches between sources when needed, there's plenty of those devices out there so I'm sure you'll find one for your needs. USB/Battery backup is going to be the most common arrangement anyway.
Death, taxes and diode losses.
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: How to power a circuit from two sources?
« Reply #2 on: December 26, 2013, 07:17:01 pm »
eh? just use a 7805 on the 12v, surely?
 

Offline smashedProton

  • Frequent Contributor
  • **
  • Posts: 641
  • Country: us
Re: How to power a circuit from two sources?
« Reply #3 on: December 26, 2013, 07:18:02 pm »
Look at the circuitry on the top left of daves power supply schematic.  that may be what you need
http://www.garrettbaldwin.com/

Invention, my dear friends, is 93% perspiration, 6% electricity, 4% evaporation, and 2% butterscotch ripple.
 

Offline Jon86

  • Frequent Contributor
  • **
  • Posts: 526
  • Country: gb
Re: How to power a circuit from two sources?
« Reply #4 on: December 26, 2013, 07:25:19 pm »
Look at the circuitry on the top left of daves power supply schematic.  that may be what you need

If you're talking about the MCP73213 and that part of the circuit, that's a battery charger, zapta didn't mention charging the battery, just working off two supplies.
Death, taxes and diode losses.
 

Offline calexanian

  • Super Contributor
  • ***
  • Posts: 1881
  • Country: us
    • Alex-Tronix
Re: How to power a circuit from two sources?
« Reply #5 on: December 26, 2013, 07:46:45 pm »
How about just some shotkey steering diodes. Higher voltage wins.
Charles Alexanian
Alex-Tronix Control Systems
 

Offline Jon86

  • Frequent Contributor
  • **
  • Posts: 526
  • Country: gb
Re: How to power a circuit from two sources?
« Reply #6 on: December 26, 2013, 08:01:18 pm »
How about just some shotkey steering diodes. Higher voltage wins.

But if the battery wins, you're wasting battery aren't you?
Death, taxes and diode losses.
 

Offline calexanian

  • Super Contributor
  • ***
  • Posts: 1881
  • Country: us
    • Alex-Tronix
Re: How to power a circuit from two sources?
« Reply #7 on: December 26, 2013, 11:08:44 pm »
Be sure your other power source is always higher silly!  O0
Charles Alexanian
Alex-Tronix Control Systems
 

Offline zaptaTopic starter

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: How to power a circuit from two sources?
« Reply #8 on: December 26, 2013, 11:25:50 pm »
How about just some shotkey steering diodes. Higher voltage wins.

This is for the Arduino power, right? 

The FTDI is hard wired to the USB power so it will be off if the USB is disconnected or the laptop is off (we don't want to inject power into the USB cable). In this case, the FTDI will have no +5V but will get +5V signals from the arduino. Will this damage the FTDI? Will resistors in series to the signals from the Arduino, e.g. 10k,  will be sufficient protection?
 

Offline zaptaTopic starter

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: How to power a circuit from two sources?
« Reply #9 on: December 26, 2013, 11:27:58 pm »
[But if the battery wins, you're wasting battery aren't you?

This is the car battery and the power comes through the ignition switch battery consumption is not an issue in this case and so is the laptop battery power that is fed via the USB.
 

Offline calexanian

  • Super Contributor
  • ***
  • Posts: 1881
  • Country: us
    • Alex-Tronix
Re: How to power a circuit from two sources?
« Reply #10 on: December 26, 2013, 11:33:59 pm »
Then how about a relay switched set up. When shore power is applied it automatically switches in.
Charles Alexanian
Alex-Tronix Control Systems
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4172
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: How to power a circuit from two sources?
« Reply #11 on: December 27, 2013, 01:01:41 pm »
Maybe you are looking for something like an LTC4411 powerpath switcher or other hot-swap controllers.
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3041
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: How to power a circuit from two sources?
« Reply #12 on: December 27, 2013, 02:06:00 pm »
See

https://www.eevblog.com/forum/projects/primary-(eg-usb)-and-auxillary-(eg-battery)-power-steering-ic/msg299942/

Short version is that it's a harder problem than it sounds, and the couple of IC's mentioned in that thread are probably both the easiest and actually cheapest way to do it.

I still haven't gotten around to trying out my NOR based solution.

~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11712
  • Country: my
  • reassessing directives...
Re: How to power a circuit from two sources?
« Reply #13 on: December 27, 2013, 03:48:36 pm »
if you listen to a "mechanically inclined" guy, he will suggest you...

R1 = current limit to relay coil (save energy)
C1 = storage tank (avoid blackout during switching)
S1 = press closed to supply from both sources
D1, D2 = backflow protection
KISS, suit yourself.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: How to power a circuit from two sources?
« Reply #14 on: December 27, 2013, 03:49:38 pm »
Quote
Everything should work.

What does that mean? Who is going to power whom in this case?
================================
https://dannyelectronics.wordpress.com/
 

Offline zaptaTopic starter

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: How to power a circuit from two sources?
« Reply #15 on: December 27, 2013, 04:16:12 pm »
Quote
Everything should work.

What does that mean? Who is going to power whom in this case?

It's mean the three sections should work, from left to right: LIN tx/rx, Arduino, FTDI/USB.  The LIN must be powered from VBAT, the FTDI must be powered from the USB power (hard wired within the FTDI board), the Arduino can be powered from either.
 

Offline zaptaTopic starter

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: How to power a circuit from two sources?
« Reply #16 on: December 27, 2013, 04:21:01 pm »


Thanks Mechatrommer.

1. Why the relay, can't I just OR the power using the diodes?

2. If USB power does not exist, the Arduino will be power from the battery (good) but will send 0/5V signals to the unpowered FTDI chip. Can this damage the FTDI chip? If so, what is a reasonable protection? Will a series 5K resistor be sufficient?
 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11712
  • Country: my
  • reassessing directives...
Re: How to power a circuit from two sources?
« Reply #17 on: December 27, 2013, 04:34:50 pm »
1. Why the relay, can't I just OR the power using the diodes?
thats the problem with "mechanically inclined" guy he cant think clear enough. yes you can... according to him :-\ but a relay will provide extra isolation to your circuit and avoid prolonged reverse biased to the diode, which he not sure how long the yield/life time will be.

2. If USB power does not exist, the Arduino will be power from the battery (good) but will send 0/5V signals to the unpowered FTDI chip. Can this damage the FTDI chip?
put a sense line in PSU from laptop, if its goes low dont send any signal. plus the 5K current limit resistors as you suggested.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline zaptaTopic starter

  • Super Contributor
  • ***
  • Posts: 6289
  • Country: 00
Re: How to power a circuit from two sources?
« Reply #18 on: December 27, 2013, 05:00:37 pm »
put a sense line in PSU from laptop, if its goes low dont send any signal.

That's a good idea.  I can do the same also for the other side, the LIN tx/rx.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: How to power a circuit from two sources?
« Reply #19 on: December 27, 2013, 05:15:01 pm »
Quote
It's mean the three sections should work ...

Two diodes will work then.
================================
https://dannyelectronics.wordpress.com/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf