Have a doubt on software serial

Could I use 8meter wire in tx and rx for software serial?

I don't think it makes any difference whether you are using SoftwareSerial or HardwareSerial. Eight metres is a long distance but it is worth trying if you have the cable. I presume you know you also need a GND connection. It may be a good idea to use 4 wires so you have two twisted pairs - Tx with GND and Rx with GND.

Another option might be a wireless connection using a pair of nRF24L01+ modules. If you have to buy cable the modules might be much the same price.

...R
Simple nRF24L01+ Tutorial

Serial data transmission is always limited by the capacitance of the wires. The driving signal must charge the wire capacitor to begin a pulse and then discharge the capacitance to end the pulse. This caused the rise and fall of the edges of the pulse to flatten out. The receiving end looks for the rising and falling of the signal to determine when the pulse begins and ends. When they are flattened out, the actual length of the pulse is hard to determine.

The longer the wires, the more the signal is distorted. Using shielded wire makes this situation even worse. Industry solution was to raise the signaling voltage and use slower data rates. You can't raise the voltage above 5 volts unless you add interface cards to both ends of your wire.

So, start with a Baud rate of perhaps 2400 and get the communications working and then try higher speeds until errors occur.

Paul

Thank you, your idea is great but i can use maximum 2 pin on my microcontroller, when you mentioned the price are same i got the idea to use extra esp8266 as i can only use max 2 pin (rx,tx)

Paul_KD7HB:
Serial data transmission is always limited by the capacitance of the wires. The driving signal must charge the wire capacitor to begin a pulse and then discharge the capacitance to end the pulse. This caused the rise and fall of the edges of the pulse to flatten out.

Just got this crazy idea: would it be possible to use a MOSFET gate driver to enhance the signal?

So Tx - gate driver - long wire - Rx. Those things are designed to drive capacitive loads, fast, and they won't care whether there's a MOSFET gate or some other kind of capacitor.

wvmarle:
Just got this crazy idea: would it be possible to use a MOSFET gate driver to enhance the signal?

So Tx - gate driver - long wire - Rx. Those things are designed to drive capacitive loads, fast, and they won't care whether there's a MOSFET gate or some other kind of capacitor.

Sure! But that capability is what you get with RS-232, RS-422, etc. So just use those adapter boards with the Arduino.

Paul

It's not just capacitance and drivers. There are also reflections.
If you terminate both ends of a long transmission line with the right resistor value, then capacitance and reflections automagically disappear. Cat-5 has AFAIK a characteristic impedance of 150 ohm.
Leo..