External power supply and connections usb

Hello,
I have a project for a robotic arm powered by an external 24v power supply which powers an arduino mega at 11v on the Vin pin. However if the arduino is powered on the Vin track before being plugged into usb it becomes undetectable by the computer (tested on different computer).

So I would like to know if you can connect the usb cable after powering the arduino with an external source or you must connect the usb first.
Thanks in advance !

11V is a bit high, 7V to 9V is recommended on Vin.


You should be able to have Vin powering the Arduino before you plug in the USB cable.

Show us your schematic.

Could the too high voltage on Vin be the problem?
Here is an image of the cablage:

Thank you for your help !

You can connect power in any order, but to be detectable by the computer your arduino board should be restarted after connect to the USB.
When you connect the USB first - arduino restarted itself, but if you connected arduino that have been powered before - you have to reset it manually.

Thank you very much, would there be a physical or software way to restart the arduino when the usb is plugged after the Vin power supply. Because the goal would be to make the robot educational so to be able to program it without accessing the card?

...physical path - you can place the arduino reset button somewhere on the surface of your robot...

Software way - Classical Arduino as Uno, Nano and Mega - has functionality to reset the board when the user open the Serial Monitor program in the PC. Perhaps it can help you to solve your problem.
But I don't know, if this will work BEFORE Windows detected the board.

That is strange. I have a MEGA powered through the Vin from an UNO and I can connect the USB on the MEGA at any time and reload the sketch without issues.

Indeed, it is strange. I just tried with a Windows computer (mine is under MacOs) and it works. The problem therefore comes from MacOs. I will continue to look for solutions!
Thanks for your help.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.