Think I just killed my laptop with Arduino

I had the Arduino Mega connected via USB to my Dell XPS, then I connected a 9V battery through the DC jack on the Arduino and my laptop shut off immediately. How bad is this?

The USB port on the laptop has some protection, but sometimes the USB port is directly connected to pins of the processor. A 9V battery is not very strong. Some Arduino boards have a polyfuse.

Which Arduino board did you use ?
There is a good chance that everything is okay.
There is a small chance that one or more USB ports are damaged.
There is also a chance that the computer can no longer be used. Did you try to turn it on ?

Maybe you should test that Arduino board before using it again.
A little more protection can be added by putting the Arduino board after a USB hub.

Not bad if your description is accurate. But if it would be accurate, your laptop wouldn't have shut off. So my guess is you did something else than what you said. Not saying you're not telling the truth on purpose, but perhaps you just made a mistake.

I used the Keystudio Mega board. I have tried turning it on. It also doesn’t light up when I connect the charger

Does it reboot and work normally, if you disconnect the Arduino?

So I have the Arduino powering 4 LEDs and taking digital readings from 4 piezo discs. I also have a 24V solenoid connected which I had connected to the Vin pin which is why I connected the 9V battery hoping that it would power the solenoid. I messed up I just didn’t think it was possible to damage the laptop with an Arduino.

I know I should have an external power source for the solenoid and I do, but it broke earlier today so I was using the arduino to power it temporarily while testing.

I don’t think the solenoid was activated as it would require the piezo to read high which I don’t think it was at the time.

I had the Arduino plugged in to my laptop for about 5 seconds with no issue, then the second I plugged in the 9V battery the laptop died.

Oops. A solenoid can generate voltage spikes of thousands of volts. That can kill just about anything, including a human. I'll bet you did not have a flyback diode across the coil, as well.

Never, ever change wiring while circuits are powered up, or connected to a laptop, etc.

I put a switch on the red (power) lead of the USB programming cable to prevent just that. I can run the Mega off whatever power I want w/o backfeed issues.

1 Like

That's one...

...and that's two sources of nasty voltage spikes that can easily kill your Arduino.

With a little bit of bad luck, those spikes could also trip (or rip...) your USB host controller.

Yeah, in the case of AMD Ryzen apparently. But usually USB connects with the south bridge or even a dedicated USB host controller (less likely, especially in a laptop). Still, a motherboard replacement is even less funny than a CPU replacement in your average laptop.

I did have a fly back diode, not sure if it matters at this stage though

Update: I opened up the laptop and reconnected the battery and it works again! Doesn't seem like there's any damage to anything thankfully.

What can I do to make sure my laptop is never at risk again?

Buy an ESP32 and use it via OTA.

Right... A powered hub will provide some protection. You can fry the hub without frying your computer (usually).

The solenoid is "suspicious" but the diode should have protected everything if it's wired correctly.

And you can't drive a solenoid directly from an I/O pin. It needs a MOSFET or transistor driver circuit.

You can also "zap" a board with a static discharge from you body when you touch the circuitry.

1 Like

Add a switch ...

Hub is good. Sometimes though the hardware just doesn't want to play nice. I have a Nano 33 of some sort that would on occasion hard reboot my Mac if I connect them directly. Unsurprisingly, I don't any more, so the Nano is just a paperweight now.

1 Like

Over the years I've destroyed two powered USB hubs messing with Arduino projects. The now very old computer that was connected to them appears to have no damage.

For what it's worth this is the hub that has kept my computer safe.

I bought a powered USB hub the other day for this reason, more or less. It also has individually switched ports. Two observations:
1: When applying external power to the hub, the computer trips because of an overly sensitive protection circuit on the USB host controller (HP EliteDesk machine). So that part is out of the window.
2: While the ports are individually switched, switching them off (a) does not galvanically separate the data lines from the hub and (b) USB devices can still phantom power each other if they're connected (e.g. two arduino boards or other pcb's connected to separate USB ports).

Sorry about the rant. I'm sure the HUB would still protect the machine against mishaps. I know one of its predecessors did, although all other devices connected to the hub went with it to heaven.

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