Fried Arduino Mega and my laptop - what did I do wrong ?

Hello everyone,

In my project, I encountered something wild (at least to me). I created a shield for the Mega and supplied it with 12V through the Vin pin. While doing this, I also connected the USB so I could read the serial data and upload code. For some reason I still don't understand, I fried my laptop when I connected the Arduino via USB. The Arduino also seems dead as I can't upload anything to it.

Here are the schematics of my circuit:
t2.pdf (89.0 KB)

I would appreciate it if someone could shed some light on the matter.

Thanks!

Just a quick 'off the top of my head' Many if not most boards have a warning that says do NOT use VIN and USB at the same time. AFAICT the newer boards have a diode to prevent back feeding (what killed your laptop).
Those of us who do a lot of experimenting use a USB isolator so the attached (misbehaving board) can NOT affect the laptop.
There are lots on Amazon, some are better than others, some have different ports etc, pick what suits you best. Here is the first one on my search in Canada, adjust URL as required.
https://amz.run/9R7t

J7 shorted ?

I used two 14.8 pins together so we will have redundancy. when it happened only one cable was connected to J18 pin 2.
i think,as there is no voltage difference they can be connected together :slight_smile:

that would have saved my laptop :frowning: . but it is weird that they don't mention this on the Arduino power section here:

Power

The Mega 2560 can be powered via the USB connection or with an external power supply. The power source is selected automatically.

External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the GND and Vin pin headers of the POWER connector.

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may become unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.

The power pins are as follows:

Vin. The input voltage to the board when it's using an external power source (as opposed to 5 volts from the USB connection or other regulated power source). You can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.
5V. This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.
3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
GND. Ground pins.
IOREF. This pin on the board provides the voltage reference with which the microcontroller operates. A properly configured shield can read the IOREF pin voltage and select the appropriate power source or enable voltage translators on the outputs for working with the 5V or 3.3V.

"

I am sure I read (on the website) that there is a fuse. And are you being precise with terminology, VIN is a specific pin, and +5V is a different pin. I think you were warned, but I may be biased.
Your laptop may also have a fuse so is salvageable, the board may be also. I would NEVER apply more than 5V to a pin, if you use the jack then using the USB won't damage anything.

Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.

1 Like

There's a P channel MOSFET on the Mega that's supposed to prevent 5V backfeeding to the USB when external power is applied. If you look at the Mega's schematic, it's controlled by an LMV358 rail to rail opamp. The opamp applies 5V to the MOSFET's gate when external power is detected, isolating the USB's 5V line from the output of the Mega's 5V regulator.

Unfortunately, a lot of boards use a LM358 opamp instead, which is not a rail to rail unit. It only applies 3.5V ish to the MOSFET's gate, which is not enough to turn it off. Result: 5V backfeeds to the USB.

Replacing the LM358 with a LMV358 fixes the problem. A more quick and dirty solution (that's too late for your laptop), is to pull the opamp's output up to 5V with a 10K resistor from the MOSFET's gate to the 5V tab on the 5V regulator.

2 Likes

Yep it pushed 12 V into Vin, not the 5V pin.

That's interesting. But does it also applies to genuine arudino boards?

I just got my self a new Mega. How can I make sure that I will be able to read the data using the USB but no frying the laptop or the board? I will USB isolation for the laptop but what about the arduino? Should I disconnect Vin when using the USB?

Unfortunately, yes. I have a genuine Arduino Uno here with a LM358 on board rather than the LMV358 the schematic says should be there. I have no reason to think that the same thing could not be true of genuine Megas as well.

What is the 12V source? Batt or mains PSU?

Its a power supply unit that goes into a charging board and from there the voltage goes to the PCB

@xepo23
If at any time, did you have the Mega plugged into the USB without power applied to the shield?
That would do it

I blew up two pc's , when the Arduino(Nano) is powered from a 220v bench supply and the Laptop is also on charge from 220v then the earth between the pc and the power supply had a voltage between them.

I did cut my program lead and put a jumper in the positive wire so I can still use the USB cable while the Nano is running from the PSU.

Your case maybe different.

image
That's an isolated DC-DC converter. Why use it if you have both GND's connected?

Anyway, taking a wild guess, something went wrong around driver chip U1, resulting in 24V appearing on its inputs, destroying the Arduino and taking the USB port with it.

Generally back-feeding USB with 5V does nothing. It's not a good idea, but won't destroy anything. However, presenting 12V (or higher) on USB data pins will generally fry the host hub and potentially other parts connected to it especially if the hub is part of the computer mainboard. Given the extent of the defect (both arduino + laptop), the most likely failure mechanism involved this particular problem.

The thing is , the laptop was connected to its own battery. So If my understanding is correct it shouldn't have done this...

See post #13

yes i believe that there was a time i did it but i am not sure. but why would that be a problem?
if i understand correctly - when only the USB is connected the Arduino is powered through it.
if i use the shield and supply 12V to Vin then it should work from there.
if both of them are connected at the same time - that is where the problem occurs.

am i missing anything?

Anytime Vin is less than the USB voltage there is the possibility of current flowing out of the Vin pin.
You have quite a few things on the 12V net that could look like dead shorts for a while. Capacitors, the TSR1, the UWE DC-DC converter, even the 7805s might look like shorts.

so what i did right now, is connect a 24dc stable power supply , and checked every pin in the PCB. it seems like each of them does indeed have the right voltage.
when it happened nothing was connected to the PCB but the Arduino so i believe the 12V was stable.
do you think there is a chance the 12V in the Vin goes below 6.6V at any of the points?