I'm still new to Arduino, so I made a DC motor speed control circuit using PWM using the Arduino as the 5V power supply connected to my PC. The interesting part is that when I set my PWM to 255, the motor would run at its highest speed, but would slowly lower its speed, until it stops and the power supplied from my USB port gets cut off. Why is this happening? Is the motor pulling too much current from the motherboard? Did I just cause permanent damage to my PC?
Since we have no idea what Arduino you have, what your "DC motor speed control circuit" is or how much current your motor is taking it's difficult to be certain whether you have damaged the PC. It's probably more likely to be the Arduino. Or your driver. Or even the motor.
But driving motors or servos from the Arduino 5V pin is never a good idea unless you are absolutely certain that the motor current will always be less than the pin's limit.
I'm still new to Arduino, so I made a DC motor speed control circuit using PWM using the Arduino as the 5V power supply connected to my PC. The interesting part is that when I set my PWM to 255, the motor would run at its highest speed, but would slowly lower its speed, until it stops and the power supplied from my USB port gets cut off. Why is this happening? Is the motor pulling too much current from the motherboard? Did I just cause permanent damage to my PC?
You should never be powering any motor from a logic supply, that's asking for expensive damage.
I would advise using a powered USB hub to protect the laptop or computer if you ever have high voltage
or inductive loads in an Arduino circuit - USB power direct from your motherboard provides a route
for destroying a computer if you have a mishap on the Arduino side.
Powered hubs are much less stressful to replace...