Protecting PCs from Arduino UNO driving motors

Is there a foolproof way to safely use a laptop's USB port to power an Arduino Uno and have a serial connection between the two?

I've created a short course introduction people to solenoids, brushed DC motors, hobby servos and steppers all controlled by an Arduino UNO and with drivers where needed.

In my years of using Arduino, there was one time a sketch caused my laptop to shutdown, but I restarted it and all was fine.

In about two weeks of this course, two PCs have shut down permanently and several have shut down and recovered a few mintues later. I've not been able to get the exact setup of the circuit at the moment of death.

I would have guessed that laptops made by the big manufacturers would have USB ports with some sort of protection. I've used Macs and never had a real problem. The people delivering the class are checking the circuits before they power them up, but it seems that problems are still occurring. To me, the most jarring problem is that this even happened running a stepper with a TB6600 driver. That driver most beautifully shows the separation of the low Signal power from the high Power power!

We ordered "USB port isolators" based on the ADUM 3160 chip and have had some success, but those devices also seem to crap out at an alarming rate.

If anyone has successfully tackled this issue, I would sure like to hear how you did it! Thanks.

How are these devices powered ?

From one of your other threads.
"I attached a motor shield with an external DC supply with two servos and two DC motors."

Adafruit motor shiels (and copies) have a design fault, where the servo connectors are powered from USB or from the 5volt regulator. That might be ok, for a while, for a single tiny SG-90 servo, but certainly not for larger and/or two servos. This will fry the USB/laptop and/or the 5volt regulator on the Arduino. Servos need an external supply.

We need a connection diagram, and a parts list.
Leo..

The solenoid, DC motor and stepper with a 12v wall-wart. The servos with a 4xAA (6V) battery pack. The solenoid is isolated from the Arduino with a 5V relay. The DC motor via a L298N driver and the stepper by a TB6600.

Thanks.

The servos are powered with a 6V (4xAA batteries) external supply. I have the circuit on Fritzing which apparently is not allowed anymore.

Please take a few moments to draw out by hand a schematic diagram with pins, connections and parts clearly labeled, and post a pic. Pencil and paper work well.

A powered USB hub could be a better solution.

Who says.
Fritzing in the hands of a noob could be a disaster, but it's fine if you know what you're doing.
Leo..

These are the two circuits that have most recently been involved in trouble.

I see that "Perry Bebbington" requested we don't use Fritzing in the "How to get the most out of this forum" post.

Thanks for taking the time to make that drawing.

If the wall-wart is not galvanically isolated from the household line neutral or Earth ground, it is possible that noise or a ground loop between the PC and the motor power supply would be a problem.

Otherwise I would not expect such a problem with either setup. You might use a multimeter to check if there is an AC voltage between the chassis of the laptop/PC and the Arduino GND.

Thanks, jremington, for that suggestion. It would have never occurred to me.

Where exactly would I put the multimeter probes to make that measurement?

I would expect the PC USB ports would have some sort of protection against that kind of situation. Am I wrong?

Set the multimeter to an AC voltage range, and touch one probe to Arduino GND, with the Arduino disconnected from the PC, and the other to any PC GND (any exposed metal on a USB port or plug, for example).

This video explains the problem: https://www.youtube.com/watch?v=PACur_GcTJ0

It is most likely to happen if, for example, the PC and the motor power supply are grounded to different branches of the AC wiring.

Thanks. I ended up watching the whole series to fully understand this.

From all of the the replies here, I'm thinking that that powered USB hub might be the solution in that it would establish a reference ground for the PC and the Arduino.

A switch in the usb RED wire will Isolate the PC power from the Arduino power. Put it in a box like this:

Don't know if it's worth mentioning but from my experience the L298N driver is not a great product. It over heats very quickly, I had two L298N drivers blow up and destroy my laptop before I realised not to use it again.

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