Two 5v power sources and one to USB

Go To Last Post
14 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I am designing a board based on Atmega32u4 which is powered through USB. The 5V, 500mA from the USB is more than enough to power the board. However, I have an additional board connected to it. The additional board uses an external power supply, flowing though a 5V regulator (xx1117) and powers it. Now, what happens if 5V from the second board is connected to 5V USB board? There are no diodes across either boards to avoid reverse voltage.

 

The connection is a simple pin-to-pin connection where 5V from external supply is directly connected to 5V USB supply which is in-turn connected to a computer. Now, what happens? Does the higher current from secondary supply flow into the computer's USB and kill the port? Or it makes no difference apart from increase in current? If there may happen any damage, how to avoid it?

Kindly help.

 

Thanks,
Praveen

Robot building is all about sharing & learning
-----------------------------------
www.robotplatform.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use diodes to isolate the two sources or check out the LTC4412 and a p-fet if the voltage drop is a concern.

 

 

 

FF = PI > S.E.T

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Diode is not an option as the design cannot take less than 5V. Will check LTC4412 and p-fet...

Robot building is all about sharing & learning
-----------------------------------
www.robotplatform.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do not connect the second board's 5 volt supply to the one with the usb power supply. Only connect their ground wires together and the signal wires.

Ross McKenzie, Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the response. But the board is stack able and sits on top of 5V of base board (with USB Power). So, I do not have that option.

Robot building is all about sharing & learning
-----------------------------------
www.robotplatform.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

praveen_khm wrote:

Thanks for the response. But the board is stack able and sits on top of 5V of base board (with USB Power). So, I do not have that option.

 

But, you said...

I am designing a board based on Atmega32u4 which is powered through USB.

That means that you can change the design because it is not finished yet. And if you have finished it... you have failed at the first hurdle. Start again.

Ross McKenzie, Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok. Let me clear it. The base board which has an Atmega32U4 is designed to be stack able (cannot make any changes here). That has a 5V pin which is connected to USB 5V. Now, I am designing another board which sits on top of it which has a power jack connected to external power / battery and through a regulator, provides 5V. This board sits right on top of the base board. I still have an option to provide a jumper on the secondary board so that user can choose what he wants, but kind of scared in case the user does not remove the jumper and connect it directly.

 

Now, the question is what happens? What happens if both the lines meet? Does it kill the USB port, or nothing at all happens since they both are at the same voltage and only current increases?

Robot building is all about sharing & learning
-----------------------------------
www.robotplatform.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You should NEVER feed 5 volts back towards the connected usb provider of power. NEVER.

 

So to be brutally clear... you want to be able to power both boards from either the USB source or the external source, but you cannot/will not change the design of the bottom board. Fail.

Ross McKenzie, Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So to be brutally clear... you want to be able to power both boards from either the USB source or the external source

 

Thank you for the advise. Since I cannot change the base board design, I will try changing the new board design. If not, yes, will start again.

Robot building is all about sharing & learning
-----------------------------------
www.robotplatform.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Many (most? all?) of the Atmel Xplained-Pro boards can be powered from USB and external 5V - so take a look at how they do it. Some of them certainly use FETs ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As mentioned above, do NOT connect the two 5 V sources together, (unless you have a special chip / circuit to do so).

 

The issue is that the two 5 V sources will not be at EXACTLY the same voltage.  One will be a little bit higher, the other a little bit lower.

Each of them will try to regulate the Bus at their voltage, and they will fight each other.

Likely one, or both, power supplies will die, perhaps catastrophically, damaging all of the other circuitry as well.

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for all the help.

@DocJC, thanks for answering the "What happens if" question clearly.

 

I have attached a circuit (taken from one of the arduino boards and modified it). Can someone confirm if it is possible to use this schematic to isolate the 5V input and USB power? The design (in my logic) is if there is external 5V, that will flow into VCC and if there is no input (or if it is less than VUSB), then VUSB 5V will flow.

 

Also appreciate if any other logic is suggested (involving few parts and less cost). But the output should always be 5V, so no diode suggestions.

 

Thanks,

Praveen

Attachment(s): 

Robot building is all about sharing & learning
-----------------------------------
www.robotplatform.com

Last Edited: Wed. Apr 6, 2016 - 11:21 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you turn on the PFET and turn on the VUSB power, won't it still, essentially, be tied to the Vcc power?

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your .png is adapated from the the Uno R3 schematic.  Here's what it actually looks like:

 

 

This circuit will turn on the p-channel when Vin is < 6.6V.  That is to say, the intention is to derive power from USB when external power is less than the specified minimum recommended input voltage for the board of 7V.  For voltages below 6.6V, USBVCC and the 5V regulator output will be tied together via the p-channel.

 

While the NCP1117 has a protection diode which will allow it to survive a higher voltage applied to its output than is applied to its input, but this doesn't consider what will happen to the device supplying power to the board in the first place.  It also doesn't consider what will happen to USBVCC when it is asked to source current through the NCP1117's protection diode into a connected but too-low-voltage or powered-off power supply.

 

Another issue is what happens when VIN is between about, say, 5.8 V and 6.6V.  The NCP1117 has a drop out of about 1V, so it will still push out at least 4.8V when VIN is as low as 5.8V.  This output will be tied to USBVCC, and the problems DocJC mentioned might be in play.

 

Bottom line, this isn't a great idea.  Have a look at the part mentioned by @ki0bk in #2.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]