What Ohm Termination Resistor is needed for this schema ? What, Where and How? I'm building a Master-Slave system using some arduino pro mini as slaves and a Mega 2560 as Master to communicate over RS485 config via MAX485. Since i'm newbie in RS485 i know that i need to put some termination resistor somewhere is the line but i don't know where and how, also i don't know how much ohm should it be. My Baud rate is 9600 and i'm using twisted pair cable (CAT5) and it's 120 meters long.

UPDATE 1:
My goal is to get data from each slave time to time, every slave is connected to a temperature sensor and sends temperature value to master on demand (when master asks for it.) The master asks for temperature value from all slaves separately (of course!) and repeatedly every 500 ms. First it asks slave 1 to send data and then slave 1 sends data to master, then master asks slave 2 to send data and slave 2 sends data to master and so on. after 500 ms, it does this again.



UPDATE 2:

Master side code (Mega 2560):

#include &lt;AltSoftSerial.h&gt;
#define DE 2 //RS485 Data enable pin. HIGH=Transmit, LOW=Receive
String inputS = "";
boolean stringComplete = false;
AltSoftSerial altSerial;

void setup() {
 altSerial.begin(9600);
 Serial.begin(9600);
 pinMode(DE, OUTPUT);
}

void loop() {
 digitalWrite(DE, HIGH); //Transmit
 altSerial.println("MEGA:ProMini1");
 altSerial.flush();
 digitalWrite(DE, LOW); //Receive
 CheckAndReceiveFromMax(); //Check if data received
 if(stringComplete){
   inputS.trim();
   if(inputS.equals("ProMini1:ACK"))
    Serial.println("MEGA: ProMini1 Acknowledged: " + inputS);
   else
    Serial.println("MEGA: Not valid On ProMini1: " + inputS);
   stringComplete = false;
   inputS = "";
 }
delay(100);
digitalWrite(DE, HIGH); //Transmit
altSerial.println("MEGA:ProMini2");
altSerial.flush();
digitalWrite(DE, LOW); //Receive
CheckAndReceiveFromMax();
if(stringComplete){
  inputS.trim();
  if(inputS.equals("ProMini2:ACK"))
    Serial.println("MEGA: ProMini2 Acknowleged: " + inputS);
  else
    Serial.println("MEGA: Not valid On ProMini2: " + inputS);
  stringComplete = false;
  inputS = "";
}
delay(500);
}

void CheckAndReceiveFromMax()
{
 while (altSerial.available()) {
 char inChar = (char)altSerial.read();
 inputS1 += inChar;
 if (inChar == '\n')
  stringComplete1 = true;
 }
}


Slave side code (Pro Mini1):

#include &lt;AltSoftSerial.h&gt;
#define DE 7
String inputS = "";
boolean stringComplete = false;
AltSoftSerial altSerial;

void setup() {
 altSerial.begin(9600);
 Serial.begin(9600);
 pinMode(DE, OUTPUT);
}

void loop() {
 digitalWrite(DE, LOW); //Receive
 CheckAndReceiveFromMax(); //Check if data received
 if(stringComplete){
  Serial.print("String received: ");
  inputS.trim();
  Serial.println(inputS);
  if(inputS.equals("MEGA:ProMini1")){
   Serial.println("ProMini1: Mega called me!");
   digitalWrite(DE, HIGH); //Transmit
   altSerial.println("ProMini1:ACK");
   altSerial.flush();
   digitalWrite(DE, LOW);
  }
 stringComplete = false;
 inputS = "";
 }
}

void CheckAndReceiveFromMax()
{
 while (altSerial.available()) {
 char inChar = (char)altSerial.read();
 inputS += inChar;
 if (inChar == '\n')
  stringComplete1 = true;
 }
}


And the same code for ProMini2, ProMini3 and so on.

OUTPUTS:
When master calls ProMini1, the ProMini2 answers, and when master calls ProMini2, ProMini1 aswers. Also, received data is not always in correct format. 

Server Serial Monitor:

 MEGA: Not valid On ProMini1:  roMini1:ACK
  :
MEGA: Not valid On ProMini2: ProMini1:ACK
MEGA: Not valid On ProMini1:  roMini1:ACK

MEGA: Not valid On ProMini2: ProMini1:ACK


MEGA: Not valid On ProMini2:  roMini1:ACK


.
.
.
For low data speeds, like 9600bps, termination is usually not necessary.