I was wondering if it was possible to use the utp port of a computer/laptop to transmit and receive data to an external device?

If you take a cat5 cable there are 8 wires, so lets say you have an Arduino would it be possible to use those wires for serial communication? If so how can I program the utp port? And is there a specification for this (for example use wire x for output and wire y for input..)

Thanks in advance, Regards

Ps: I had no idea on which sub.stackexchange to ask it hopefully it suits here.

  • 1
    There is no such thing as a "UTP port". – Ignacio Vazquez-Abrams Jun 25 '14 at 21:40
  • @Vazquez-Abrams Sorry didn't know that, I assumed the ethernet port in a computer was called the utp port. How do you call it then? – joell Jun 26 '14 at 7:15
  • 1
    You call the Ethernet port the "Ethernet port". Because it talks Ethernet. – Ignacio Vazquez-Abrams Jun 26 '14 at 7:58

By "UTP", I'm assuming you're referring to Unshielded Twisted Pair. The shielding and twisting aren't really relevant, because they're just physical characteristics of the cable itself. They don't have any bearing on the sender or receiver.

The salient point about UTP is that it uses differential transmission. That is, the data is sent down two wires at the same time, but one is inverted. The receiver uses the difference between the two signals to reconstruct the original data, eliminating any interference which may have been introduced en route.

Assuming the voltage level is safe (0-5v for most boards), you could connect each wire directly to an analog pin on the Arduino. If you read both continuously, and apply suitable thresholds/triggers in software to identify level changes, you could probably reconstruct the original signal.

It's definitely not ideal though, as ADCs are comparatively slow, and you would never be able to read both at exactly the same time. That means the transmission would have to be quite slow in order to work. The exact speed would depend on how quickly your program could poll the ADCs and process the result.

It would be much better to use some external circuitry to handle the differential signal. It could then produce a nice clean digital output which you could feed directly to any input on the Arduino. It should be able to run a lot faster, and leave your program free to do other things. Any good electronics vendor will stock a variety of ICs which would do the job, depending on your exact requirements.

Setting up your computer/laptop as a sender is a totally separate issue though. Many different ports use differential signals in some form, including ethernet, USB, and RS-232 (old DE-9 serial ports). Unfortunately, it would be very difficult to get direct control of their signal lines. You would almost certainly have to write your own device drivers, which is a pretty huge undertaking.

If you want to send serial data from your computer to an Arduino, the easiest way is just USB-to-TTL conversion. Most Arduino boards have this built-in, connected directly to the hardware serial lines on the microcontroller (which is how you upload programs/sketches). Alternatively, you can get external cables which do the conversion, and you can connect it manually to other pins, processing it using software serial.

| improve this answer | |
  • Thanks for this answer, so I can't (easily) use that cable to communicate with my computer and an external circuit? – joell Jun 26 '14 at 7:16
  • If you're using it as an Ethernet cable, then you can connect your Arduino to a network (usually via a switch/router). You would either need an Ethernet shield for your Arduino though, or an Arduino board which has Ethernet built-in. You can then program the Arduino to send/receive network traffic, using the Ethernet library. – Peter Bloomfield Jun 26 '14 at 8:43
  • At best you can connect at 10BaseT, which is the slowest implementation available for UTP. I believe I've seen a project in Elektor doing just that with only an AVR to do raw Ethernet. But you can't control the interface pins directly. The signals on ethernet are AC by nature because of the output transformer. – jippie Jun 28 '14 at 5:54
  • The Elektor article is called "Software-defined NIC, Ethernet-broadcasting op een AVR" (110733). The article was published in NL in April 2013, but I believe it was published earlier in other regions. It uses an ATmega644 clocked at 20MHz and is used with an old webcam to send images to a PC (approx. 2 images per second). – jippie Jun 28 '14 at 6:10

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.