0
\$\begingroup\$

I'm currently developing a project that involves components with about 2A current draw. These are controlled by an AVR Atmega168 processor with Arduino bootloader over a CH340G USB TTL converter. The controlling is done by a program I've written in Windows, so there's an data transferring additional to the USB powering. (CH340 datasheet: https://www.olimex.com/Products/Breadboarding/BB-CH340T/resources/CH340DS1.PDF).

Since there's no way a USB port can supply a current close to 2A, a wall wart will be required to supply additional power. ATM I've found no other solution than to tie all 5Vs together. At now 5Vs and GNDs are planned to be connected through 5V and GND planes on a manufactured PCB. And that of course makes me bump into some serious concerns about the safety of the ICs:

  • What will happen if e.g. the wall wart supplies 5.1V and the Computer USB delivers 5.0V? Will either the ICs or the computer USB port get bricked, maybe both since it is somehow some kind of a short circuit?
  • What could happen if I connect the wall wart first and connect USB afterwards? Or USB first and then the wall wart? Is there a chance of generating magic smoke?
  • I've heard about ground looping. Is that a problem in my circuit? If yes, what can I do about it?
  • Is there any good protection circuits or things like that to make sure that connecting 5Vs to each other directly is safe and data transferring still works?
  • The CH340(G) datasheet says that for high current applications, it's safe to tie 5V USB to 5V external if bridging the USB 5V over a 1 Ohm resistor. Does that make much sense? Does the resistor act like a protection?
  • I've seen the Vin and VCC solutions for Arduino Unos, Megas and Nanos. They all have protection circuits but require higher input voltages <6V. That would require an additional step down regulator and would give additional unwanted heat since 6-8V wall warts are rather uncommon, so 9V would be next. Is it possible to get rid of the VReg and maybe use other parts of protection circuitry?
  • Are there some other problems that exist but I forgot to mention?

Sadly components can't be turned off while being connected to USB - that would make my project senseless after all :-)

Thanks in advance for any kind of help!

\$\endgroup\$
1
\$\begingroup\$

Do not tie all 5V connections together. Only GND is required to be connected since it is the common reference for all voltages; each device will receive power separately from their corresponding source. The 5V wall wart should be connected to the 5V pin of the Arduino and every device other than the USB-UART bridge.

You should be able to connect the wall wart first and then the bridge, but if you want to be extra careful you can use a 74LVC2G240 powered by the bridge's 5V output; LVC devices support Ioff, which basically means that all inputs and outputs are high-Z when no power is supplied.

Ground loops aren't usually a problem with 2-prong wall warts, but if you use a 3-prong wall wart then you should verify that its GND does not connect to earth ground; this will eliminate the possibility of a ground loop through the bridge. Star distribution will handle the rest.

\$\endgroup\$
  • \$\begingroup\$ Thank you a lot for your answer @Ignacio Vazquez-Abrams! So if I got it right, a common ground reference is enough for the D+ and D- transfer so that everything gets recognized correctly? Also thanks for the 74LVC2G240 suggestion. That would, according to the datasheet, result the following connections: GND tied together Converter receives 5V from computer USB, everything else 5V from xternal Buffer VCC to 5V from USB Buffer /1OE and /2OE VCC from Xt Supply Buffer 1A, 2A connected w/ USB D+ D- Buffer 1Y, 2Y connected to the converters D+ D- input ? \$\endgroup\$ – Frank Kesselwagen Aug 12 '15 at 9:20
  • \$\begingroup\$ The '2G240 is for the RX and TX from the bridge. \$\endgroup\$ – Ignacio Vazquez-Abrams Aug 12 '15 at 9:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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