External Power plus USB Leonardo

Hi Gang

This may be a silly question. Am I able to have external power plus USB connected at the same time on my Leonardo? I am using 9V to power the Arduino and have a device powered off the GND and VIN that requires 9V. I want the USB connected as well so that the board is used/seen as a HID device.

Cheers

Jase

I was going to ask something pretty much like this as I'm in a situation like yours...

With another of my development board (Teensy) this can be done as long as you have a modified USB cable (red wire cut)... I was wondering if the same was required for Arduino or the fact that you have power on the external plug was disabling the USB power in some ways...

I think this should answer your question though:

In my case, my vin is lower than 7.5v so I guess I have to use a modified USB cable...

Hi RicThot

Thanks for the reply. I have read the linked thread many times but I'm still confused :frowning: . Are you saying that in your application because your VIN is less than 7.5V the Voltage Regulator switches to USB power so in order to 'trick' it you have cut the red on the USB cable?

In my application in contrast because my VIN is greater than 7.5V the Voltage Regulator switches to VIN. Does this mean it will cut the voltage on the USB and simply use the data lines?

I suppose what I'm asking is if I'm powering my Arduino with 9V and have the USB connected acting as HID device will be OK i.e. it won't damage anything?

Any assistance would be greatly appreciated.

Cheers

Jase

I'm far from being an expert, but your conclusion matches my understanding, all this based on the post refered above.

Apparently, under 7.5v, you shouldn't connect a powered USB cable as well as external power. Although I don't think it can damage the board, the guy seem to metnion voltage drop and fluctuation instead. Above 7.5v, it seem that the board will switch power to Vin only.

If you REALLY want to be on the safe side though, I guess the best thing is to get a cheap USB cable and cut the red wire...

Hi RicThot

Much appreciated :slight_smile: .

Cheers

Jase

suppose what I'm asking is if I'm powering my Arduino with 9V and have the USB connected acting as HID device will be OK i.e. it won't damage anything?

Perfectly OK to have both a Vin voltage and USB voltage applied at the same time, the board was designed to handle that case. The USB +5vdc never goes through the on-board +5vdc regulator because the USB power is already a regulated +5vdc voltage source coming from a PC if attached. There is a simple on-board FET switch that just turns off the USB power if the Vin voltage is of the proper value or higher.

Lefty