0

Is it possible to uncrimp a RJ45 plug and connect the wires directly to the Arduino pins? I guess I'd have to decrypt the ethernet signal then on my Arduino which might not have enough processing power at command for such a task.

I don't want to do it with an Ethernet shield, so please don't link any in the answers.

  • 3
    If it was that easy there wouldn't be any Ethernet shields around. Ethernet is a complex system with specialist electrical requirements. It can't be interfaced direct. – Majenko Dec 15 '15 at 14:26
  • I'm curious what you are trying to achieve. Would you mind explaining? – Butters Dec 15 '15 at 14:53
  • @Butters i simply wanted to avoid the need of a shield and then i was curious if it would be possible. nothing exciting unfortunately :) – philx_x Dec 15 '15 at 16:00
  • Does it need to be Etherenet, or is wireless okay? You may be able to use the Adafruit Huzzah ESP8266 breakout. Very flexible little chip, and way cheaper than an Uno and Ethernet shield. – Butters Dec 15 '15 at 16:10
  • I'm posting this question here because I do not have enough rep. Would you still be able to pass the communications through an unmanaged switch? – Gabri Botha May 18 '17 at 18:35
0

Electrically, you don't have to worry about anything, as the previous answer stated, but Ethernet (Even 100Mbps FastEthernet, much less Gigabit) is way too fast for the Arduino to read. digitalRead() is roughly 100x too slow, it takes roughly 4 microseconds, and even doing direct port reads is 5x too slow. This doesn't take into account another operations, much less the fact that the clocks on the Arduino's don't run that fast.

100Mbps FastEtherent runs at roughly 31MHz, or 31,000,000 Hz. That is FAST compared to our Arduino's, which have a clock speed of only 16MHz.

To answer your question in a word, no, it is not possible to do what you ask.

  • 1
    Ethernet is LVDS and requires isolation. You need some kind of extra hardware to turn that LVDS into a +5/GND signal. There is no ground in LVDS, so you cannot interface to it directly. – Majenko Dec 15 '15 at 17:07
1

I am by no means an expert on this, this answer is ~20 minutes of me googling things, but I would say that in theory it is probably possible to do this with an arduino, at least at the lower transfer rates anyway, and certainly from a "will it kersplode my board" point of view - probably not since ethernet runs at +/- 2v (ish) and ~10mA (ish). However:

The ethernet protocol is exceedingly complex, with many layers needed to actually communicate with anything useful, all of which you would have to implement from scratch (there won't be a library to just drop in) and I'm not completely convinced that an entirely software-based implementation of the stack would fit on the arduino (but I could definitely be wrong there - and actually, on further thought, this probably is wrong, but I reckon I couldn't write it so it fit, but I'm a reasonably average human being).

Arduino is all about hacking and re-inventing wheels just for the fun of it but I am absolutely certain that there is no fun to be had re-engineering Ethernet and TCP/IP and all of the stuff in betweeen from scratch (obviously my opinion, I enjoy all sorts of things others don't, so YMMV).

My suggestion would be - if you don't like ethernet shields, look into getting a 'raw' ethernet controller chip (like the one soldered onto an ethernet shield) and build it directly into whatever device you're trying to make first, that'll give you plenty of exposure to how ethernet works at that level, then you can decide if you're still up for re-inventing the brain that invented the wheel. Good luck!

  • okay .. i might wanna reconsider if i want to do it without the shield :D I was just wondering if someone has ever done that .. would be a cool project for someone who wants to study TCP/IP though. thanks for the insight – philx_x Dec 15 '15 at 10:10
  • 2
    What are you trying to achieve? There might be a more straightforward way to do it using the usb/serial connection to a computer or similar. – MalphasWats Dec 15 '15 at 10:26
1

As others have stated, it's not physically possible for an Arduino to encode or decode standard Ethernet protocol messages over CAT5 cable with wires at one end connected directly to the Arduino pins, and the other plugged into a standard Ethernet device. Standard Ethernet runs at least 10 Mbit/s for 10BASE-T, each bit Manchester encoded, so effectively 20 Mbit/s. See "TCP/IPv4 and Ethernet 10BASE-T/ 100BASE-TX Debugging" for a lot of photos of what the standard Ethernet protocol looks like on an oscilloscope screen. An Arduino running at 16 MHz can't sample a pin at 20 Mbit/s.

However, Arduinos can easily transmit and receive messages using a variety of other, slower communication protocols. Devices that use such protocols can often be wired directly to the Arduino pins, with the Arduino programmed appropriately with that protocol.

Occasionally people use CAT5 cable (commonly called "ethernet cable") to carry those non-Ethernet messages from one device to another.

Sometimes people wire a RJ45 socket (also called a 8p8c socket) directly to an Arduino and corresponding RJ45 socket wired directly to the other device (often with a big "THIS IS NOT ETHERNET" warning on both sockets), and use standard off-the-shelf CAT5 patch cables with standard RJ25 plugs (also called 8p8c plugs) to carry those non-Ethernet messages between the sockets. (For example, the connection between the Arduino-compatible "Motherboard 1.2 Generation 3" and the "Stepper Motor Driver 2.3 Generation 3" used in some early RepRaps; the TechZone Thermocouple A-D converter and other 1-wire devices that use the 1WRJ45 standard; etc. As far as I can tell, none of the many CAT5 cables Nate connected to various Arduinos in "Lessons from Rebuilding Illumitune" actually carry any Ethernet messages.)

Sometimes people cut and strip the ends of CAT5 cable, using them as a convenient bundle of wires that can be used pretty much like any wire.

Hooking wires directly between two Arduinos (or an Arduino and some other device using some non-Ethernet protocol) often seems to work when both are plugged into the same power supply and connected by a short cable. The "extra hardware" people use to interface between an Arduino and a Ethernet network or CANbus or RS485 bus or MIDI or etc. helps avoid a variety of problems that happen when two devices are plugged into different power supplies or have long cable runs between them or both.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.