This worked pretty well at first until my PC suddenly shut down. Since then, my USB port has unfortunately stopped working, although I have updated and reinstalled the driver in the device manager.
Does anyone have any idea what could have caused the problem so that another port won't break next time?
Thank you very much in advance!
I have run into the same problem when using a power supply plugged into the wall to run the steppers I could not have the usb plugged in at the same time as the power supply was. had to do the programming and then disconnect the usb to run it. found out I could use my lap top as long as it was not plugged in to the wall.
Whilst in the correct section a schematic would be most useful.
Even if it is hand drawn !
From what you have posted it may be you were powering the motors via the Arduino ? (BAD THING)
Disconnect EVERYTHING from the board then try an upload of the example blink sketch.
Simple the Arduino is a computer, NOT a power supply. Rule 1 never power ANYTHING inductive with the Arduino even if it can supply the power. What you are experiencing is probably failure to follow this rule. Also you may have fed power back into the USB port, this is a big NO-NO. I do not know how many computers you can afford to buy but try this first. Why not start by defining the problem with specifications including a flow chart and schematic. Define what is the expected outcome. Purchase the Arduino cookbook and read it, this will give you some basics. also use the online tutorials and videos available, there are many good ones on this web site. At this point you will be able to define the problem and may have already solved it.
Using a powered USB hub to connect to the Arduino can protect your computer to some degree.
If you were driving a stepper you should have been using a stepper driver like the DRV8825.
You can add 1k--2k resistors in series with both the step and direction pins to such a driver to protect
the Ardiuno much better should the driver get fried, which sounds like what happened here, allowing
high voltages back into the Arduino and USB cable.
Such resistors also allow you to power down the stepper driver while uploading a sketch.
Unfortunately I forgot to give you some significant information.
The project was based on several tutorials, including 3D Printer | Homemade - Part 1 - YouTube.
I used a 240 watt power supply, an Arduino Mega 2560 and a RAMPS 1.4.
Grounds may be an issue. Back in the era of the Northwood P4, it wasn't uncommon for a computer to reboot when something was plugged into the USB port and a static discharge ocurred at the moment the shields met. I have seen that with multiple computers of that era. If you hook two separately grounded systems together, each ground may be at a different potential. If you are using a laptop at the end of that USB cable, try running the laptop from the battery, rather than plugged into the wall.
Not directly related to your issue:
Not being familiar with 3D printers, but a little familiar with stepper motor drivers. I noticed that each driver has a current adjust pot on it in the video. It's common to run stepper motors at higher than rated voltages to get some snap in the motion. At higher voltages, the maximum winding current is reached more quickly. You must set the current protection on the driver to make sure that the current rating is not exceeded at the voltage you are using to drive the stepper. The stepper can draw a lot of current, which could also brownout some other parts of the system if the current is uncontrolled.