Hello
I have a 12V DC motor (with 10k+ rpm). I thought, well 5V should be enough to test it, even if it is not on the highest speed and torque. When I connect it directly to my Leonardo, after some seconds my board keeps disconnecting from windows. Why is this happening? I understand that the motor wants to draw more amperage but what is the reason behind the disconnecting issue?
If you power the Leo trough the barrel connector then the regulator IC can supply 1A which is for both the ATmega32u4 and the motor. Even small DC motors draw more especially at start. The microcontroller probably stalls and the pc thinks the USB has disconnected.
Look at the schematic of the Leonardo and measoure the current drawn by the motor as Bob suggested, you 'll see for yourself.