How to power a circuit from two sources? - Page 1
Forum section: electronics / projects

author: zapta
author_rank: Super Contributor
timestamp: December 26, 2013, 06:38:11 pm
content: 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 diagramThe circuit include a 5V Arduino Min Prohttps://www.sparkfun.com/products/11113, a 5V FTDI Basic @115.2Khttps://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 configurations1. 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

author: Jon86
author_rank: Frequent Contributor
timestamp: December 26, 2013, 07:07:17 pm
content: 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.

author: Macbeth
author_rank: Super Contributor
timestamp: December 26, 2013, 07:17:01 pm
content: eh? just use a 7805 on the 12v, surely?

author: smashedProton
author_rank: Frequent Contributor
timestamp: December 26, 2013, 07:18:02 pm
content: Look at the circuitry on the top left of daves power supply schematic. that may be what you need

author: Jon86
author_rank: Frequent Contributor
timestamp: December 26, 2013, 07:25:19 pm
content: Quote from: smashedProton on December 26, 2013, 07:18:02 pmIf 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.

author: calexanian
author_rank: Super Contributor
timestamp: December 26, 2013, 07:46:45 pm
content: How about just some shotkey steering diodes. Higher voltage wins.

author: Jon86
author_rank: Frequent Contributor
timestamp: December 26, 2013, 08:01:18 pm
content: Quote from: calexanian on December 26, 2013, 07:46:45 pmBut if the battery wins, you're wasting battery aren't you?

author: calexanian
author_rank: Super Contributor
timestamp: December 26, 2013, 11:08:44 pm
content: Be sure your other power source is always higher silly! O0

author: zapta
author_rank: Super Contributor
timestamp: December 26, 2013, 11:25:50 pm
content: Quote from: calexanian on December 26, 2013, 07:46:45 pmThis 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?

author: zapta
author_rank: Super Contributor
timestamp: December 26, 2013, 11:27:58 pm
content: Quote from: Jon86 on December 26, 2013, 08:01:18 pmThis 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.

author: calexanian
author_rank: Super Contributor
timestamp: December 26, 2013, 11:33:59 pm
content: Then how about a relay switched set up. When shore power is applied it automatically switches in.

author: Jeroen3
author_rank: Super Contributor
timestamp: December 27, 2013, 01:01:41 pm
content: Maybe you are looking for something like an LTC4411 powerpath switcher or other hot-swap controllers.

author: sleemanj
author_rank: Super Contributor
timestamp: December 27, 2013, 02:06:00 pm
content: Seehttps://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.

author: Mechatrommer
author_rank: Super Contributor
timestamp: December 27, 2013, 03:48:36 pm
content: 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 sourcesD1, D2 = backflow protectionKISS, suit yourself.

author: dannyf
author_rank: Super Contributor
timestamp: December 27, 2013, 03:49:38 pm
content: QuoteWhat does that mean? Who is going to power whom in this case?

author: zapta
author_rank: Super Contributor
timestamp: December 27, 2013, 04:16:12 pm
content: Quote from: dannyf on December 27, 2013, 03:49:38 pmIt'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.

author: zapta
author_rank: Super Contributor
timestamp: December 27, 2013, 04:21:01 pm
content: Quote from: Mechatrommer on December 27, 2013, 03:48:36 pmThanks 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?

author: Mechatrommer
author_rank: Super Contributor
timestamp: December 27, 2013, 04:34:50 pm
content: Quote from: zapta on December 27, 2013, 04:21:01 pmthats the problem with "mechanically inclined" guy he cant think clear enough. yes you can... according to himbut 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.Quote from: zapta on December 27, 2013, 04:21:01 pmput a sense line in PSU from laptop, if its goes low dont send any signal. plus the 5K current limit resistors as you suggested.

author: zapta
author_rank: Super Contributor
timestamp: December 27, 2013, 05:00:37 pm
content: Quote from: Mechatrommer on December 27, 2013, 04:34:50 pmThat's a good idea. I can do the same also for the other side, the LIN tx/rx.

author: dannyf
author_rank: Super Contributor
timestamp: December 27, 2013, 05:15:01 pm
content: QuoteTwo diodes will work then.