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.
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.
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.
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.
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).
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.
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.