Does this picture look familiar to anyone? In particular, the raised bump of melted plastic on what used to be the voltage regulator for the Mega2650? I hope not too many!
Well let me tell you about how this one came to be. The Mega2650 was connected to 3 motors via 2 Adafruit motor shields, 2x 5W LED drivers, and a dfplayer mini mp3 player. To power all of this, I had a 12V battery feeding 2 breadboard rails. The rails powered the Mega through the Vin and GND pins; and supplied power to the 2 LED driver boards (This was a bad idea). The mp3 player was powered separately from a wall wart due to the high power demand of the speakers. The USB connection was also available to supply 5V. I had jumper wires establishing a common ground between the power supplies. See the attached sketch.
With the 12V battery on and supplying the Mega via Vin, and the LED driver boards, there was no problem and everything functioned correctly. However, when powering down the system, I first turned off the 12V battery supply. Big Mistake! The problem was that the Vin pin was now in the situation of supplying power TO the breadboard rails instead of taking power from it. So the big hungry led boost driver board likely decided it would take as in much current as possible from the poor little Vin pin to maintain its programmed output to the LEDs of 350mA @ ~ 13V. Seeing as the supply voltage was now only 5V via USB the current from Vin must have been greater than 1A to maintain the 5W LED output. And of course the voltage reguator is only rated to 1A. Sorry Mega!
Another danger of constant-current LED drivers is the nature of the boost driver operation to raise the output voltage as high as necessary to achieve the current setting. If the connection to the LEDs is severed, the output voltage will likely rise to the maximum open-circuit output of the board. In one case for me this was over 40V. If you reconnect the output to the LEDs while the board is powered you will apply the open-circuit voltage to the LEDs, and in my case caused the loss of $20 of equipment.
I guess the lesson is when multiple power sources and constant-current loads are connected in a system really think about what's going to happen when they are switched on and off!