One key concept that might help in clarifying any misunderstandings is this:
- A voltage is the potential difference between two points in a circuit, it is not an absolute value of any physical characteristic at a single point in a circuit. Thus, there is no absolute potential involved, it is relative value, a difference.
How this applies:
The "ground" of the Arduino is the point (or PCB trace, to simplify the concept) relative to which, the potential on the "Vcc" trace of the Arduino is measured. Thus, when powered by the USB cable, the Arduino's "ground" is the measurement basis, and is incidentally at the same potential as the "ground" of the computer whose USB port is being used.
The "negative" of the battery is merely one of two points across the battery, between which the potential difference i.e. the voltage of the battery is measured. Relative to the rest of the (electrical) universe, the "negative" terminal of the battery is floating, i.e. has no specific relative value until this so-called negative terminal of the battery is connected to a circuit.
When you connect the negative terminal of your battery to the ground of the Arduino, you are providing a reference value for the battery, relative to the Arduino. Thus, only while such a connection is made, the "positive" terminal of the battery is at a potential of "battery voltage" compared to the Arduino's zero level or ground.
If, instead, you connected the battery "positive" to the Arduino ground line, then the other terminal of the battery would be at a negative value compared to the Arduino's zero level or ground.
The battery, or for that matter any arbitrary voltage, is relative to the reference you provide. It is a difference, from your defined base point in the circuit, not an absolute value, to reiterate the basic principle mentioned at the start here.
I would go with a single mains-to-12V adapater, preferably one that's a switching model.
The switcher will waste less energy generating the +12V rail than the linear, and can regulate its output without dummy loads / burning power unnecessarily.
For the 5V rail, consider building a 12V-to-5V buck converter if the load current justifies it.
("Less than 0.5A" makes the decision less than clear - how much less than 0.5A? If it's 100 microamps, use a linear regulator. If it's 0.49A, you're probably better off with a buck.)
Best Answer
Your 2 wall-warts by themselves don't have a common DC ground. Each one is isolated from AC. As a result, they are isolated from each-other.
You should be able to power the circuits off two separate wall-warts and have them communicate. Connect the grounds GNDA and GNDB with a wire. It doesn't sound that you need to keep the domains galvanically isolated.
An opto-coupler would be useful if you want to keep the domains galvanically isolated.