First, some background. I'm building a cockpit for home entertainment, and the parts mentioned are part of a panel with some toggle switches and backlighting. I'm an iOS developer and pilot and have very little experience with electronics. What i have created is based on Google, Youtube and the DCS-forums.

So today i managed to burn two of my custom Arduino slaves while troubleshooting a connectivity issue, but i have no idea why. They both worked fine, and as i was disconnecting and reconnecting cables i noticed a very slight smell, and the backlight went to max power totally uncommanded. I changed the Arduino and the same thing happened with the second one.

I whipped out my thermal camera which showed around 150 degrees C on both the 5v regulator (U5) and the ATMega 328p (U1). I then tested for continuity and found that 5V and GND is shorted on both boards. On board one 5V, GND and 12V of the AMS1117-5.0 are shorted, and on the second board GND and 5V are shorted. I then went ahead and desoldered one part at a time until the short disappeared, and it went away with the ATMega328p. I then put back all the components except the ATMega328p and there was no short until i soldered the ATMega328p back.

So it looks like something burned out the ATMega328p? The question is what. The LED strip used for backlighting pulls 400mA (measured) via a ULN2003A (U3). It's rated for 500mA per darlington pair and I'm using three pairs for the backlight just in case.

I'm thinking about two possible causes, but it could really be anything.

  1. Is it possible that the ULN2003A is pulling more than 10mA from the Arduino via the base pin and killing it?

  2. Or could my repeated connecting and disconnecting have caused this? Its a Molex Micro-Fit connector that i was playing with, and not loose wires, so i can't have shorted anything. If i connect a third Arduino without the backlight, everything works for a long time. The only thing i haven't tried here is to repeatedly disconnect and connect it in fear of burning a third Arduino. Instead i want to ask here if anyone can spot any obvious issues.

All parts are from JLCPCB and are most likely clones, don't know if this could be the issue. I'm leaning more towards it being my own mistake, but thought I should mention this anyway.

My design is available here: https://github.com/maciekish/warthogathome/tree/beaef25d9c7dcaca54424555aea5099789fc8391/KiCad%20PCBs/Nano%20Slave



  • \$\begingroup\$ So what is RJ1? What are the loads driven by ULN2003? Why is RS-485 ground behind a switch? \$\endgroup\$
    – Justme
    Oct 16, 2022 at 19:57
  • \$\begingroup\$ RJ1 is an RJ45 jack connected to a hub and an RS485 master. It provides data and power to the slaves. The only load driven by the ULN2003 is the piece of LED strip at 400mA. RS-485 is behind a switch because it interferes with programming as they both connect to the serial pins of the ATMega328p. \$\endgroup\$ Oct 16, 2022 at 20:16
  • \$\begingroup\$ It will still interfere. The worst thing you can do is switch the ground of ICs to disable them. \$\endgroup\$
    – Justme
    Oct 16, 2022 at 20:17
  • \$\begingroup\$ Yes, thats why the GND is behind a switch. Anyway, thats not the issue, programming works fine. The issue is the burning ATMega328p. \$\endgroup\$ Oct 16, 2022 at 20:19
  • \$\begingroup\$ That's still wrong and should not be done. Which exact wires you were hotplugging, the 8p8c connector (RJ-45 is not a connector but something else)? \$\endgroup\$
    – Justme
    Oct 16, 2022 at 20:23

1 Answer 1


The system is likely not designed to be hot-pluggable.

Likely what happened is that some of the 12V pins and some of the data pins got connected first before any GND pin, or there was a momentary disconnect of GND pin while 12V and some data pins were connected.

The ground return path will then be through TXD and RXD pins through the AVR.

There is a reason why some connectors exist that connect some pins first and some pins last. So for example USB connectors are hot-pluggable for this reason. It connects the connector shell ground first (discharges most ESD to equalize potential differences), then supply and ground pins connect, and finally the data pins when power supply and ground are already safely connected.

  • \$\begingroup\$ "The ground return path will then be through TXD and RXD pins through the AVR." this means that in effect i would have fed 12v through the AVR? Sounds like this could be what happened, so maybe i will try the third Arduino tomorrow without trying to hotplug stuff. Thank you. \$\endgroup\$ Oct 16, 2022 at 20:43
  • \$\begingroup\$ And you also need to keep th GND always connected to RS-485 transceiver for the same reasons. When the grounds are disconnected, return currents again go via TXD and RXD pins. So that is very bad design which should never be done. \$\endgroup\$
    – Justme
    Oct 16, 2022 at 20:51
  • \$\begingroup\$ When the GND of the MAX487 is OFF, it is not connected via RJ1, only via ICSP header to programmer. Its only used during programming, so this shouldnt be an issue? \$\endgroup\$ Oct 16, 2022 at 20:56
  • \$\begingroup\$ How else should i disconnect an SMD component like the MAX487 during programming of the AVR? \$\endgroup\$ Oct 16, 2022 at 20:57
  • \$\begingroup\$ The MAX487 is connected to 5V and all the other pins except GND. Like I said, return paths for that chip must travel via other pins if they are low. So even if it solves your problem, the solution to disconnect RS-485 transceiver ground while still being connected to RS-485 bus and MCU and supply is just creating worse problems. For example you could just make it go disabled in an orderly fashion so it does not drive the MCU RXD. Or just route the MCU RXD through it if most simple solution is needed. \$\endgroup\$
    – Justme
    Oct 16, 2022 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.