Wired Data Transmission

Transmitting Data Over Wires

Wired communication is used all over the place without you probably even noticing: components like displays or sensors typically use wired protocols to communicate with microcontrollers.

For communication between devices, wireless technologies have become increasingly popular, however anyone requiring reliable, fast, and secure communications still counts on wired data transmission whereever possible.

Here are some examples of wired protocols used for data transmission:

Intra-Board Communication

Devices often consist of many different and independent components, such as displays, sensors, or microcontrollers. These components need to communicate with each other. The four most widely used wired protocols are these:

  • Serial (UART, Universal Aynchronous Receiver/Transmitter): simple serial two-wire protocol similar to morse code. It can be used to transfer small amounts of data over relatively long distances with a minimum of hardware effort.
  • USB (Universal Serial Bus): USB is a truly universal bus system that not only manages power but can also communicate and transmit data at very high speed. Via UART bridges (i.e. CH340), USB devices (such as a PC) can communicate with UART devices (such as an ESP8266). Modern microcontrollers (i.e. ESP32 C3, C6, S2, S3) come with native USB support and communicate directly over the USB interface.
  • I2C (Inter-Integrated-Circuit): Two-wire short-range protocol designed to interconnect components within one device. This slow protocol is used for components that do not need to exchange large amounts of data at high speed, for example sensors or small mono-color displays.
  • SPI (Serial Peripheral Interface): Four-wire full-duplex high speed data protocol designed to synchronously transmit data between a dedicated master and one or more slave devices, typically all inside one device. Due to its overhead (master/slave architecture, four data wires), it is used when data transmission speed becomes important, i.e. to connect to large and colorful displays or a high-speed Ethernet device.

Short Distance Communication

Wired communication protocols don’t actually care what they are used for, so all of the previously mentioned protocols could also be used to communicate between devices over long distances. However, these protocols are designed for short distances, and they all become susceptible to interferences and noise signals the longer the cables get. Reliable communication is possible only for (very) short distances:

Bus System max recommended distance Transmission Speed (typical) Wires
UART 15m 9.6-115.2kbps 2
USB 3m 60Mbps 8
I2C 1m 100/400kbps 2
SPI 20cm 80MHz 4

The table above provides a rule of thumb. It is a simplification, and many sub-standards have evolved, affecting maximum speed and number of wires used for these bus systems.

There are known tricks and workarounds for using these protocols over much larger distances (i.e. active cables or amplifiers) however these protocols are just not designed for bridging long distances, and there are better protocols for it.

External Communication

One well-established and reliable protocol for high speed data transfer over relatively large distances is Ethernet which can bridge distances of up to 100m without sweat and tricks.

By adding an Ethernet adapter to your project, you are basically just adding a specialized long distance protocol. The Ethernet adapter in turn is connected to your microcontroller using a short-distance SPI connection.

Aside from pure data transfer, adding Ethernet connectivity to a device enables it to be connected to a LAN (local area network) in the most reliable and safe way.

Wired - Advantages

While wireless communication is convenient, wired communication has its own set of advantages:

  • Speed: Wired transmissions can reach very high data transfer rates (i.e. 100MBps with Ethernet)
  • Reliability: Once a data transmission cable is in place, it performs very reliable. There are no interferences, external noise signals, weak field strengths, etc.
  • Security: While wireless communications can be picked up by anyone, wired transmissions are physically protected. An attacker would have to physically tap into the communications wire.
  • Low Interference: Wired protocols do not influence other wired protocols as information is bound to the physical wires.

Slow Website?

This website is typically very fast, and pages should appear instantly. If this site is very slow for you, then your routing may be messed up, and this issue does not only affect done.land, but potentially a few other websites and downloads as well. Here are simple steps to speed up your Internet experience and fix issues with slow websites and downloads..

Comments

Please do leave comments below. I am using utteran.ce, an open-source and ad-free light-weight commenting system.

Here is how your comments are stored

Whenever you leave a comment, a new github issue is created on your behalf.

  • All comments become trackable issues in the Github Issues section, and I (and you) can follow up on them.

  • There is no third-party provider, no disrupting ads, and everything remains transparent inside github.

Github Users Yes, Spammers No

To keep spammers out and comments attributable, all you do is log in using your (free) github account and grant utteranc.es the permission to submit issues on your behalf.

If you don’t have a github account yet, go get yourself one - it’s free and simple.

If for any reason you do not feel comfortable with letting the commenting system submit issues for you, then visit Github Issues directly, i.e. by clicking the red button Submit Issue at the bottom of each page, and submit your issue manually. You control everything.

Discussions

For chit-chat and quick questions, feel free to visit and participate in Discussions. They work much like classic forums or bulletin boards. Just keep in mind: your valued input isn’t equally well trackable there.

  Show on Github    Submit Issue

(content created Apr 21, 2024)