Good ol' Ethernet. This ‘ancient’ protocol has withstood the test of time. You almost certainly use Ethernet at home and at work. Ethernet has a standardized connector, the venerable RJ-45. When you need something to "just work," often a wire will do that. (Just because it's "IoT" doesn't mean it's wireless, just that many Things happen to be wireless.)
Here are some of the good things about Ethernet:
- World wide universality, completely open and free standard - no patents or licensing!
- Just about every hotel/home/office has an Ethernet port for connecting to the internet.
- High speed, 1 GBPS Ethernet is available on many routers and on some single board computers. But even the ‘slowest’ 10 Base T has better high-speed throughput than legacy WiFi (802.11b/g)
- No interference from other Wireless protocols, no drop-outs. A reasonably designed NIC won’t suffer from flakiness
- Can go up to 100 meters on a single cable
- No passwords/usernames/pairing. Plug in and go!
- Fairly inexpensive to implement - many chips have built in Ethernet MAC, so you only need a PHY and plug.
- Can be used as a private intranet, or connect directly to the Internet
- Requires a permanent cable connection
- High current draw - expect ~200-300mA all the time
- Large and chunky connector
- Watch out for default passwords on Things that plug in directly to the Internet!
The biggest benefit of Ethernet is the high speed and plug-and-play. No SSID configuration or pairing.
There are some security considerations (we'll get into security later), but there are benefits of just having a wire since someone needs physical access to tap or connect to Ethernet. If you have a wire and MAC-assigned IP addresses you generally have more control over what and who can access something. Just don't use default passwords on your IoT devices and expose them to outside internet directly without being smart about security.
Ethernet is generally used when you do not need a lot of range (you're stuck with the length of the cable after all) and you need to move around a lot of bits.
Common Ethernet-connected IoT devices are:
- Cameras - video, especially lately, has gone up to 720p which can strain WiFi connections
- Voice (VoIP)
- Set-top boxes - video/audio streaming and storage
- Game systems
- Industrial equipment that is permanently installed
- Devices that need ‘air gapped security’ and cannot use wireless connectivity
- High-reliability control like industrial control, robotics or medical etc.
Ethernet can range from 10 Mbps to 1 Gbps (1000 Mbps). 10-base-T is what you’ll find on small microcontrollers, 100-base-T (100Mbps) is found on many higher-power microcontrollers or single board computers, 1 Gbps is what you’ll find on high end equipment that needs to stream a lot of data. Compare that with future transports we’ll discuss, that are sometimes specified in ‘bps or ‘kbps!
Since Ethernet is royalty-free, universally used, and reliable, it's common to find ways to add Ethernet on a device. That is to say, you will not be the first person who wants to Ethernet-connect.
If you're using our Feather series of boards you can add Ethernet very easily with our Ethernet Featherwing. It is 10-base-T only, and uses common SPI to send and receive data. It works well, and has nice link/activity indicator lights on the plug. There's an Arduino library for the Wiznet 5500 chip, and the Wiznet chip handles all the transport-and-below layers.
Raspberry Pi computers like the Pi 3 have 100-base-T Ethernet built in and default work when plugged in. Literally no effort from the development side required!
100-base-T is the most common speeds you'll find above the most simple microcontrollers, and can handle video/audio streaming just fine.
Other higher-end single-board computers like this ASUS Tinker may come with 1 GBPS Ethernet. Because gigabit Ethernet can't run over USB 2.0 at full speed, you can't use a common USB-to-Ethernet converter. If you need the speed, the board needs to have native hardware support or a Thunderbolt/USB 3 class port
One down-side of Ethernet is that it has a fairly high current draw, and you’ll need to budget 200-300mA of constant current available during listen/transmit. However, since you're running a wire anyway for an Ethernet device usually you can plug in for power and/or get Power over Ethernet PoE.
PoE is a network standard that puts 48V on the unused data wires (or, with Gigabit Ethernet, shared with data wires). This allows the network cables to carry data and power. IP cameras, VoIP phones, lighting, and wireless access points are where you'll see most of this action. PoE routers are becoming fairly common and they’re very affordable.