It happened to me already several times to be working on projects where I need to connect the arduino board to an external power supply while receiving serial data from the board, and be using these batteries (link). When I turn on the battery, the computer shuts down automatically, and in the worst cases, some arduino boards dont work anymore.
most recently, I was trying the steppertest example from Adafruit motor shield.
what is going on here?
It is my understanding that it is not a problem to connect power to the barrel and the usb simoultaneously right?
Right, there should not arise a problem from connecting a battery. I only could imagine wrong polarity, and an Arduino board (which one?) with missing protection precautions.
Do you have connected further modules, which may overload the on-board voltage regulator?
Did you disconnect the loading supply from the battery pack?
Well, the thing is that it happened already in different circumstances. so different modules might or might not be present when the problem arises, and then I would discard that this is the problem.
Wrong polarity is definitely not the problem
It happened with both an UNO and a MEGA, all of them chinese clones
I was thinking that perhaps the battery has a spike of voltage when it turns on?
And exactly after writing that, I checked the voltage of the battery. When I turn it on, just for an instant I read in the multimeter: OL and then 16.67, and then it normalizes between 10 and 12 volts. Is it possible that this spike is the problem?