Safely connecting a Microcontroller with a separate power supply to USB

Thread Starter

programmer6502

Joined Feb 1, 2014
132
Hi,

I'm working on a project with basically a home built breadboard Arduino using an Atmega328p. I've been powering the microcontroller from USB (using a FT232R USB serial breakout board) but am to the point now where I need more current than USB can offer. However, I still need to use the USB port to monitor results on a serial terminal coming from the microcontroller on my computer at the same time and occasionally reprogram.

So when I power the microcontroller with a separate 5v power supply to gain higher current capacity, how do I go about simultaneously connecting it to USB without doing damage? Can the grounds be tied so that the separate 5v voltages are referenced the same?

As of now without a separate supply, I'm using the connections VCC, GND, TX, RX, and DTR on my FT232R breakout board.

Thanks
 

MaxHeadRoom

Joined Jul 18, 2013
28,686
Coupling the grounds should not be a problem, is there no way you can access 5v from one of the drive sockets that come direct from the P.C. Pwr. S?
This will be the same source.
Max.
 

Thread Starter

programmer6502

Joined Feb 1, 2014
132
Coupling the grounds should not be a problem, is there no way you can access 5v from one of the drive sockets that come direct from the P.C. Pwr. S?
This will be the same source.
Max.
I suppose I could, but it would be inconvenient. Plus I commonly use a laptop when prototyping. My microcontroller circuit will eventually make it's way into an RC vehicle, I'm just experimenting with some power hungry 2.4GHz modules first.

And I'm sure it's not going to be last time I'll need more current when prototyping so I need to find a worth while method to solve the problem.
 

OBW0549

Joined Mar 2, 2015
3,566
So when I power the microcontroller with a separate 5v power supply to gain higher current capacity, how do I go about simultaneously connecting it to USB without doing damage?
This is what I call a "non-problem."

USB doesn't care if you connect its Vcc output to anything other than the FT232R; it's perfectly acceptable to leave Vcc unconnected while powering the rest of your device from a separate supply.

Can the grounds be tied so that the separate 5v voltages are referenced the same?
Yes, tie the grounds together.
 

Thread Starter

programmer6502

Joined Feb 1, 2014
132
Thank you all for answering my question and the witnesses. And I assume the same also applies when using battery(s) as the separate power source? (Just checking)
 

Picbuster

Joined Dec 2, 2013
1,047
Hi,

I'm working on a project with basically a home built breadboard Arduino using an Atmega328p. I've been powering the microcontroller from USB (using a FT232R USB serial breakout board) but am to the point now where I need more current than USB can offer. However, I still need to use the USB port to monitor results on a serial terminal coming from the microcontroller on my computer at the same time and occasionally reprogram.

So when I power the microcontroller with a separate 5v power supply to gain higher current capacity, how do I go about simultaneously connecting it to USB without doing damage? Can the grounds be tied so that the separate 5v voltages are referenced the same?

As of now without a separate supply, I'm using the connections VCC, GND, TX, RX, and DTR on my FT232R breakout board.

Thanks
Disconnect the mpu power from the ftdi chip.
Feed the ftdi chip from 5V pc cable (USB power).
Connect the mpu to 5V separate powersup
This works and give you the advantage that the usb is always connected regardless the mpu state.
picbuster
 

ErnieM

Joined Apr 24, 2011
8,377
It doesn't matter if your second supply is a wall wart or a battery or anything else. As long as you have the five volts to run your project just connect the common grounds together and you are good to go.
 

odm4286

Joined Sep 20, 2009
265
Hi,

I'm working on a project with basically a home built breadboard Arduino using an Atmega328p. I've been powering the microcontroller from USB (using a FT232R USB serial breakout board) but am to the point now where I need more current than USB can offer. However, I still need to use the USB port to monitor results on a serial terminal coming from the microcontroller on my computer at the same time and occasionally reprogram.

So when I power the microcontroller with a separate 5v power supply to gain higher current capacity, how do I go about simultaneously connecting it to USB without doing damage? Can the grounds be tied so that the separate 5v voltages are referenced the same?

As of now without a separate supply, I'm using the connections VCC, GND, TX, RX, and DTR on my FT232R breakout board.

Thanks
Hopefully this will save you some you some trouble. Since you say your project requires more current than a USB port can supply I'm assuming you're drawing more than an amp. Keep in mind that if your power supply cannot handle that without a massive voltage drop you will see VERY strange behavior from your MCU. I swore my code was incorrect until I realized the 9v Alkaline battery I used dropped voltage so fast my PIC behaved erratically. If you go the battery route, try for a lithium battery their voltage with respect to current draw curve is much more forgiving.
 

Thread Starter

programmer6502

Joined Feb 1, 2014
132
Sounds good. The battery it would be connected to is a NIMH 7.2v 3300MAh battery. So plenty of amperage and the battery is fed to an ESC with a built in regulator that drops it to 5V. I've actually run a microcontroller on it before with a filter cap and haven't had any issues at all.

Well I think that about answers all my questions, I appreciate the help! Always nice to get some confirmations before attempting something that could potentially fry expensive equipment.
 

ErnieM

Joined Apr 24, 2011
8,377
I am not a big fan of using a battery on a breadboard, reason being that "plenty of amperage" thing. If you happen to short something out they WILL melt wires and do other bad things.

It is fine if you exert some extra care, and don't look supprised if your breadboard melts down to a slag heap.
 
Top