Arduino mega voltage drop and burning smell

Hello all, I am creating an Arduino project using 120 electromagnets with three Arduino Megas. It was working fine when I tested each Arduino individually. Once I connect all of the electromagnets to the external power supply, it had smoke coming out. Ever since that, they are having problems. I am wondering if anyone knows what step did I do wrong and how to fix it.

So here is my set up:

I am connecting 40 electromagnets to each Arduino Mega and turn on pins one by one to see if they work.
Right now, the first Arduino works ok. Only two magnets are stayed on at all times not following the code. I think that two IRF540 are broken. However, when I tried to connect the Arduino to my computer, the port cannot be found.

When I plugged in the second Arduino Mega, it still has a burning smell. And the voltage would drop to 3.7V and 10A. Most of the magnets are still working but with weaker suction power. I tried to switch to a new Arduino but the voltage still drops.

And the third one works well but has a burning smell in 20 seconds after being turned on.

I don’t understand why are they acting so differently and weird. Please help me locate the problems and possibly solve them.

That schematic diagram is not clear enough. Further, the gate of the mosfet appears to be connected to +12v rail . The rest I can’t see well enough to comment.

Draw the schematic by hand and post a picture of it. Label the mosfet pins

I have reposted a hand draw version diagram. Please check it out. I’m connecting 40 magnets to one Arduino Mega. I am wondering if the problem is caused by IRF540N…

  1. The IRF540N is not really a logic level mosfet. Its RDS(on) is quoted a 10 volts. However, if the current you are consuming per mosfet load is small, and the mosfet functions correctly and does not get hot, this should not be a big problem.
  2. Current consumption of those electromagnets. What is it mA ? and have you measured the resistance to verify ?
  3. If the computer no longer recognises the USB interface, that is bad news. You may get avay with programming the Mega with a USBTTL adapter but I would not hold out much hope.
  4. Any idea where the smoke was coming from ? With the way you have wired it, even if the Mosfet had a direct short to ground, the Mega should be 1k away from it (5mA)
  5. A short circuit in operation could, of course, explain a lot. A reversed flyback diode also.

Nice start on the schematic. It helps if you put dots where the wires connect. do not continue the wire past the last connection and blank wires just confuse things. Your MOSFET has a missing connection. From what I gather you fried your power supply.

Breadboards are for low power logic devices, and the tracks will burn if you try to use them for motors, servos and electromagnets.

You need to use logic level MOSFETs with Arduino. One of many examples.

oh i realized the diagram is correct, my problem is that I connected the power supply wrong. Thanks the problem is solved!

1 Like

Good Job! Schematics are a big help in troubleshooting problems.