How bad would it be if I had the 9v plugged into RAW while I had the USB attached? Would it overload due to two power sources or does the circuitry account for that?
While
Arduino Microdoes have both 5V and 3.3V voltage regulator,
Pro Micros have only one, bypassable via a pair of solder pads (JS1 in the corner, left open for USB +5V):
Because Arduino Micro has no RAW pin, we are talking about SparkFun
Pro Micros or its clones. (The design is known to be pretty good, and the
hardware license (CC-SA-4.0) allows clones.)
You can open the SparkFun Pro Micro schematics and board layout in
EasyEda here (does not require registration or anything), or download the Eagle files
from the SparkFun Github repo for the Pro Micro. The Arduino Micro schematics are
here in PDF form. That is, no need to believe me, check for yourself.
On the Pro Micros, when the JS1 pads are connected, the USB +5V line goes through a polyfuse (limiting current to 500mA max or so), and from there directly to the board VCC. That is, there is nothing but a 500mA polyfuse between the board VCC and the USB +5V line. The RAW line goes to the voltage regulator input. There is a diode stopping the regulator input from backfeeding to the USB +5V line, but the output is directly connected to the board VCC. (The regulator used must accept a bypass situation, where the regulator output voltage is one diode drop lower than its input, or it will be damaged when the board is connected to USB.)
So, there are several possible cases you need to consider:
- You have a Arduino Micro.
There is a supply selection circuit that disconnects USB +5V line when VIN is present.
It is safe to provide power to the board using the VIN pin, whether or not the board is connected to USB.
- You have a Pro Micro (clone), with a 5V low-drop regulator, JS1 pads not connected.
The polyfuse and the diode are between USB +5V line and the regulator input. RAW is connected directly to regulator input.
This does mean that when USB is connected, RAW voltage is at least (5V - one diode drop), but as long as your RAW supply is at least +6V, this does no harm.
Your board always runs on 5V regulated voltage, and it is safe to connect both USB and RAW at the same time.
- You have a Pro Micro (clone), with a 5V regulator, JS1 pads connected.
There is a diode blocking RAW from feeding back to the USB connector; but, the board VCC is connected to the USB +5V.
So, if your computer provides a lower USB +5V line than the 5V regulator on board, you may be backfeeding power back to your machine via USB, which is bad.
- You have a Pro Micro (clone), with a 3.3V regulator, JS1 pads not connected.
When you provide the board power via the RAW pin, the board will operate at 3.3V. If you connect it to USB, it will suddenly switch to 5V power.
I do not know if this is okay, but I would advise against it.
- You have a Pro Micro (clone), with a 3.3V regulator, JS1 pads connected.
The board always operates at 3.3V. The diode will protect from the board backfeeding power to your USB +5V line.
However, when you connect the board to USB, the RAW pin will be at least one diode drop lower than +5V.
So, as long as your RAW pin is either disconnected, or connected to a voltage supply higher than +5V, you are safe to connect the board to USB.
In summary, cases 1, 2, and 5 are safe. For Pro Micro or clones, check which voltage regulator it has.
Personally, when working with Pro Micro (clones) or other USB-programmable microcontrollers (I have a dozen or so!), I use an USB isolator (usually
this one from fleabay, basically an implementation of the ADuM3160 appnote) and/or an USB cable where the +5V line is disconnected.
I prefer the isolator, because that keeps my USB ports safe. (The switch chooses between 1.2 Mbit/s and 12 Mbit/s operation; the latter is suitable for Arduino Micros and Pro Micro clones, as that's the fastest ATmega32u4 can do. The isolator does not support 480 Mbit/s high speed USB devices.) Just note that these isolators cannot provide full 500mA, but somewhat less, something like 300mA maximum (due to losses in the isolated DC-DC converter). The
Olimex USB isolator is a variant which has an extra power jack (8V to 15V supply, regulated to 5V) that can supply up to 750mA to the device (but note that this supply is isolated only from the computer, not the device; there is only a voltage regulator in between).