Electronic – arduino – Wire up multiple slave Arduino devices to a master Arduino device

arduinoserialwiring

I want to use serial communication between a master and multiple slaves.

I've already connected the RX of the master to the TX pins of both slaves, and vice versa (thus connected the TX pin of the master to the RX pins of both slaves). I also connected the GND pins.

But now I got weird characters when I open the serial monitor window.

Now how do I properly connect a master Arduino device with at least two slave Arduino devices using the RX and TX pins? Do I need to connect 5V pins?

PS: I see a lot of words like "SPI" and "I2C", and people start using terminology. But I'm not thát experienced, so please, if using the terms, explain them.
Another PS: I want the Arduino devices to use power from the master Arduino device.

Best Answer

Now how do I properly connect a master Arduino device with at least two slave Arduino devices using the RX and TX pins? Do I need to connect 5V pins?

Poor-man's networking:

The circuit below is "naughty" in the extreme but can be made to work "well enough".
You can do the same thing using formal gates.

Top circuit:

Master + N secondaries.
Master is always heard by all secondaries.
Master can hear any one secondary.
Secondaries cannot hear other secondaries.
Multiple secondaries transmitting simultaneously corrupt both signals.

Master RX is pulled up by resistor.
Either slave can pull Master RX low by setting their TX low.
Only one slave can :"talk" at a time if corrupt transmissions are to be avoided. Max limited by time constant of R plus circuit capacitance.
Too low an R cannot be pulled down properly by TX.

Bottom circuit: All peers.

Any can send (one at a time).
All will receive anything sent.
Sender will receive own transmission and can judge if transmission was corrupted.

Useful for eg Pure-ALOHAnet or slotted-ALOHAnet operation.
Or for that matter token ring, round robin or most other network systems. Even CSMA/CD

enter image description here

Pullup resistor value left as an exercise for the student.

Polarity shown assume TX idle level is high.
Reverse diode polarities and use pulldown for TX idle is low.