Arduino Hub (Or Bit Relay) - Help Needed

Hey, i’m doing a project at the moment that involves trying to link up 2 Ethernet cables to a Arduino (Via 8 pins each) and to have it transmit bits to the corresponding pin (e.g pin 1 - pin 9 with pins 1-8 being one Ethernet port and pins 9-16 being the other.) All it has to do is be able to Re-transmit the data (So not much processing needed). The biggest problem i have is that the arduino will not sense the bit’s coming down the wire and im not too sure if its due to the arduino not being able to keep up with the data or if the signal is too weak for it to register. (Iv tested multiple layouts to get any result but haven’t been able to see any) I have a feeling im doing this wrong though. Ill also post a schematic (Note: i am using a Mega 2650 instead of a Uno but the program only had Uno & im using half the pins because the layout wouldn’t fit 16. But this would work if the Ethernet cable was running half duplex)

Thank you very much and i look forward to seeing your guys responses.

P.s: I'm pretty new to arduino and programming, But i am a network engineer so i understand what the data is doing and how the protocols work. Essentially all im looking for is: "if pin1 == HIGH then pin 4 == HIGH" etc. But when i do something like that the Ethernet port keeps going up and down (This is why i think the arduino is not able to keep up with the data coming through and isnt re transmitting it fast enough for the PC at the other end to think its a stable connection so it keeps dropping it.) But in saying that everytime the connections up (usually 0.5sec or so) packets are transmitted to the other PC but then it drops.

Ok so abit of development has happened. Iv directly connected all the wires to the corresponding wire except one, Which i have redirected through the arduino, with a delay of 5 i think iv matched the clock rate of the interface as this does transmit data across fine. Next step is to do this with all of the pins.

int LED = 13; // LED initiate Pin int IN = 12; // Input Wire int OUT = 11; // Output Wire

void setup() { pinMode(LED,OUTPUT); pinMode(IN,INPUT); pinMode(OUT, OUTPUT); digitalWrite(LED, HIGH); delay(1000); digitalWrite(LED, LOW); }

void loop(){ int Sensor = digitalRead(IN); switch (Sensor) { case 0: Sensor == HIGH; digitalWrite(OUT, HIGH); break; case 1: Sensor == LOW; digitalWrite(OUT, LOW); break; } delay(5); }

Also Seems using a few pull down resistors filter out alot of noise on the wire, i'm able to register the bits at the moment but am working on the correct delay to accurately represent the clock rate.

Are you connecting these Arduino pins to an ethernet interface on another device?

SurferTim: Are you connecting these Arduino pins to an ethernet interface on another device?

Yep, I have 2 computers both with one end of the cable attached, and a arduino in the middle (I'v cut the cable in half and connected it to a breadboard and arduino). And they have correct IP address.

There is no way the Arduino can keep up with both computers. Each has at a minimum a 10MHz connection, and the Arduino is running at 16MHz.

But besides that, the TX and RX lines are a balanced connection. There is a TX+, TX-, RX+, and RX- line. That normally requires a transformer in the RJ45 connector to convert to an unbalanced line. In my "old" electronics days, we referred to that as a balun.

Ah, that would explain alot. Plus i might have to run it at 1GHz (The network this was going to go into requires that it can cope with that speed) so that will completely leave the arduino out of the equation. I think it's time to go back to the drawing board and looking at a re-design. But thank you very much, i have learnt so much the last few days trying to solve this problem.