More often than not, projects need to communicate with external equipment. Setting up the connections for those communications to happen can be wired or wireless. Is one way better than the other? Are the options always interchangeable? What about costs — is one always a cheaper option?
This article will discuss and compare the pros and cons of wired and wireless connections to help you decide what will work best in certain situations.
There are two different methods of communicating over wires: serial and parallel. While each requires its own respective protocol, parallel communication is easier to realize because timing — while still being relevant — is not critical for successful transmission.
When you read values from a RAM chip, for example, you’ll most likely have to supply the address bits all at once and the RAM’s data lines will contain the information you requested. Each bit has its own line and the transmission works in parallel.
In comparison, many EEPROM chips communicate over a single data line via a serial interface and the data has to be sent one bit at a time in a strict time frame:
Pros of Wired Communication
- Natively supported by most devices
- Simple communication protocols
- High data rates
- Less susceptible to interference
- The connected host can be used as a power supply
- The best method for directly interfacing ICs, like logic gates
Cons of Wired Communication
- Might use a lot of CPU time (for example Arduino’s SoftwareSerial)
- Need wires
- Might require a custom protocol
- Limited portability
Wireless communication can be achieved in various ways. One common way is through light, like with infrared LEDs. Another is through electromagnetic fields. It's common to use an ESP8266 breakout board to achieve a wireless connection.
Similar to wired connections, each method requires a protocol. A protocol is necessary because there are many wireless devices communicating at the same time that could interfere with your project.
Pros of Wireless Communication
- No wires - keeps designs clean
- Devices are more portable
- Can use existing infrastructure (like cellular networks)
- Reliable and well-established communication protocols
- Hardware supports CPU when sending the data (less CPU load)
- Best when used for communicating between devices with operating systems
Cons of Wireless Communication
- Might require additional hardware/infrastructure
- More prone to interference
- Limited range
- Devices need their own power source
- External devices (like the ESP8266) will still require a wired connection
So Which Option is Better?
Unfortunately, there isn’t a set general answer to this question. However, here are some factors to consider:
Try to use a wired connection whenever the devices won’t be moved around a lot once they are connected.
Consider the data rate you want to achieve. This won’t make a huge difference for most applications, but I try to use a wired connection where speed matters and when large amounts of data are submitted in a short period of time.
What infrastructure is available for you to use? Does your project require additional devices (like WiFi repeaters or antennas) or can you use other available infrastructure, such as a cellular network?
While many new development boards, like the Raspberry Pi, already have wireless interfaces on board, cheaper and older devices don’t. However, almost every MCU has a serial interface.
Reliability and Cost
Wired connections can be cheaper and more reliable compared to their wireless counterparts, but this heavily depends on various factors.
For example, take into account the distance you want to cover between two endpoints and the other hardware you will use. Also, look for reliable protocols for sending your data. For example, TCP is a well-established communication protocol.
Take Considerations for Each Project's Needs Before Starting
In conclusion, there’s no one set way of choosing between wired and wireless communication. It depends on your projects’ requirements and the amount of money you’re willing to spend.
As a rule of thumb, I’d say when you want to achieve maximum portability and can live with slightly lower transmission rates, you should use a wireless connection. When your project is stationary and a fast and cheap solution is most important, stick to a wired connection instead.