12V to 5V switcher directly into arduino 5V line - will work with USB?

I'm running my arduino on a 12V battery. I'm using this buck switcher for power efficiency...

...and have connected it directly into the arduino uno 5V line (not the VIN etc).

Can I still plug a USB into this to read the serial out? Or will the buck switcher and PC USB power supply fight each other?

You'll be backfeeding into the USB port and might damage something.

Its generally a bad idea to apply power to the 5V pin. It is only designed to supply power to other circuits, not accept it. There is a switch that disconnects the USB power line if there is sufficient voltage on Vin, but that does not apply to the 5V pin.

More about stupid USB design in a commercial product: Computer killing powered USB hub. (Mac murderer) - YouTube

It really depends on the kind of Arduino you use (and didn't mention :wink: ). For a Uno it can cause problems but for a Nano it's fine :slight_smile:

septillion:
It really depends on the kind of Arduino you use (and didn't mention :wink: ). For a Uno it can cause problems but for a Nano it's fine :slight_smile:

This is true. I tend to forget about the Nano since if I want small size I have Pro Minis.

Yeah, that's my favorite as well. But in that way the Pro Mini is the same as the Nano, You can power it "from USB" via the USB-serial at the same time as giving it 5V on the 5V pin :slight_smile:

septillion:
Yeah, that's my favorite as well. But in that way the Pro Mini is the same as the Nano, You can power it "from USB" via the USB-serial at the same time as giving it 5V on the 5V pin :slight_smile:

Actually no. The Pro Mini has absolutely no input protection for the 5V power pin. What happens depends on if the USB-Serial converter plugged in has the protection or not. I imagine that most of the FTDI breakout boards are just a straight pass-through with no protection at all. You should not provide power to 5V or RAW while an FTDI board is powering a Pro Mini, because it could backfeed power back to the computer (have I mentioned that that's bad?).

Mm, when I read you post I started to look for a Pro Mini on my desk. Damnnnn, just cleaned it.. Opened up the schematic and indeed, no diode. ::slight_smile:

BUT, then I opened my pile of (clone) Pro Mini's and they ALL have a diode in line with the power from the FTDI header... So yeah, it depends on the board. But all my Pro Mini's (and I have like 8 styles...) all have a diode. So connecting power to it while connected via the FTDI header isn't a problem. Luckely, because that's what I've always done (without a problem) because I thought they ALL had a diode by designed. I'll keep that in mind when I get my next batch!

I'm going to ask the question of "if you are plugging in USB to use the serial monitor, why not use the USB 5V to power the arduino as well, and simply unplug the 12v?"

An interesting observation. I checked my Pro Minis that I bought from Microcenter (branded Inland) and they all have Schottky diodes too. The product picture on Sparkfun does not, and actually has a different layout. I wonder what the source of the second layout is. I can't imagine some cheap chinese clone manufacturer would ever bother designing their own board when Sparkfun provides the Eagle files on their website.

So it looks like it depends on which version you get.

tinman13kup:
I'm going to ask the question of "if you are plugging in USB to use the serial monitor, why not use the USB 5V to power the arduino as well, and simply unplug the 12v?"

Some other device might be using the 12V, like a motor or solenoid. It's possible to rewire the project to account for that, but you can only do that if you are aware of the issue and are able to disconnect it from the Arduino and still have it connected to what needs it.

tinman13kup:
I'm going to ask the question of "if you are plugging in USB to use the serial monitor, why not use the USB 5V to power the arduino as well, and simply unplug the 12v?"

Because the system is out in a shed and uses the 12V battery supply to power a 4 AMP water pump. So, it isn't suitable for USB power.

I would like to eventually attach a Raspberry Pi to log the arduino output and display the aggregated data on a webpage, but the initial USB connection is just to see what is going on.

It is working great at the moment, but no USB or raspberry Pi at the moment.

Jiggy-Ninja:
You'll be backfeeding into the USB port and might damage something.

Its generally a bad idea to apply power to the 5V pin. It is only designed to supply power to other circuits, not accept it. There is a switch that disconnects the USB power line if there is sufficient voltage on Vin, but that does not apply to the 5V pin.

More about stupid USB design in a commercial product: https://www.youtube.com/watch?v=Uh6iKilgtG0

The VIN is simply the power jack after a the polarity protection diode, so it still feeds into the linear regulator circuitry. It would seem a waste to use a buck switcher to drop to 7V, say, then let a liner switcher drop the remaining 2V.

By feeding into the 5V directly I'm letting the buck do all the power supply which is more efficient, especially on battery power - but I think I then bypass any USB safety circuitry - not sure.