Arduino Ethernet – ElectroSchematics.com

A while ago I was contacted by Oliver Rieder from Eltima (https://www.eltima.com) about getting involved with their wonderful Serial over Ethernet Connector software. I had thought about this in the past but came to the same conclusion that I do not have enough resources to extensively test the software. However, my friendly editor-in-chief Adam Carlson directed me to blend a do-it-yourself project idea and the software review together. I got inspired by this and thought I would give it a go!

How to access Serial ports over Ethernet network?

Eltima’s Serial over Ethernet software allows you to share COM ports over the network and connect to remote serial devices like they were attached directly to your local computer. If your new laptop lacks a serial port or you need supplementary COM interfaces for communicating with all of your COM-based devices, this software will let you create as many virtual serial ports as you need.

According to Eltima, the Serial to Ethernet Connector is available for Windows, Linux, and Windows Mobile. The program gives you an easy way to create unlimited number of virtual serial ports if you don’t have a real COM interface in your computer or if there are not adequate physical ports for all of your serial devices. Virtual serial ports will work exactly like hardware ones and emulate real serial port behavior and parameters.

By following the official link provided below, you can download and install Serial to Ethernet Connector on all computers that will participate in serial port sharing and usage. Since both client and server software are included in a single installer, the client and server can be installed either on Windows and/or Linux OS machines (command-line version only) – thanks to the cross-platform capabilities of Serial to Ethernet Connector!

What is the Definition of Ethernet?

Ethernet is another name given to the prevalent packet switched LAN

Technology, initially developed as an experimental coaxial cable

network by Xerox Corporation. The Ethernet is named “ether” because of its passive characteristics, the active electronic elements are associated with computers linked to the network which makes possible the functioning of the Ethernet network.

Now it is worth noting that Ethernet and LAN (Local Area Network) have a close relationship with each other, where the Ethernet is the primary technology which made the concept of LAN practical. The major difference between Ethernet and LAN is the working of Ethernet is not centralized while LAN functions in a centralized manner. In another context,

Ethernet is also a protocol which helps in the networking and the communication among the nodes in various networks.

Bored? I am coming back to the topic. See the below links are for your leisure reading!

A quick jump into the game

The review started by downloading (and installing) the Serial to Ethernet Connector (SEC) application for my Windows 10 (x64) laptop. It took only a few minutes to finish the setup. Fast and perfect! The only thing I needed was the license key, but that was already allotted by Oliver for free. So, I am pleased with the final cost ($0).

I got the impression that users of all experience levels might benefit from this program’s intuitive interface and list of features. Despite the clarity of the user interface it might take some time to learn your way around the program. Fortunately, SEC’s Help Menu provides links to online resources to support you learn how to use all its features. For example, this is the user guide link – https://wiki.eltima.com/user-guides/sec-pc.html

On the bottom line, Eltima’s SEC is a nice application. It runs smoothly, and the online help resources makes it a good choice even for tyros. However, the demo version comes with a 14-day trial period offer, so you need to pay around $260 for a single-user license (https://www.eltima.com/products/serial-over-ethernet/).

This is an unbiased software review. I neither have any affiliation with Eltima, nor an interest in marketing any of their products/services. The showcased software product(s) should be handled by the user at his or her own risk and responsibility.

The DIY fun challenge!

Now to the tale of my first-time experiment with Ethernet. Normally I’d start a microcontroller project with the right hardware to accomplish the proposed task, and work forward to figure out how to formulate the needy code and find appropriate third-party applications if necessitated. In this case, I was forced to walk in reverse ie start with an application in front and work backwards to prepare the quick test/evaluation hardware to complement.

At this point I would like to draw your quick attention to the fact that I am talking about how to add Ethernet feature to an Arduino, while putting the SEC software aside for some time. I wanted to make a very cheap and simple experimental set up to test out some Ethernet ideas. As the aim was to begin with a crude project, I went to the world wide web for some affordable and available solutions. After some thorough searches I found that I need an Ethernet module for my Arduino board(s) to get a head start. So, I bought one piece of the quite popular ENC28J60 Ethernet modules.

Here, the number ENC28J60 simply refers to a chip developed Microchip (http://www.microchip.com). The 28-pin ENC28J60 chip (https://www.elecrow.com/download/ENC28J60%20Datasheet.pdf) is a standalone Ethernet controller (for 10BASE-T network). Since it has an SPI interface, microcontrollers like Arduino can talk to it. Note that in the 10BASE-T designation, the 10 indicates the maximum speed – 10Mbit/sec.

This is the ENC28J60 Ethernet module I randomly picked. If looking for one, you will find that there are many variants, but this module is widely available, cheap, and more stable than the “W5100” Ethernet module!

This 12-pin header module includes all required components for the Ethernet controller, plus a 3.3V linear voltage regulator, and a single port RJ45 jack with integrated magnetics and built-in indicators for connection to an Ethernet LAN. See datasheet of the HanRun® Single Port RJ45 Connector https://datasheet.lcsc.com/szlcsc/Zhongshan-HanRun-Elec-HR911105A_C12074.pdf

Okay, now let me recap how I rigged up my first experimental setup (Arduino Uno plus ENC28J60Module).

  • First, I uploaded the following test code (adapted – from web) to my Arduino Uno. To get that done, I downloaded one proven Arduino library – the “EtherCard”(https://github.com/njh/EtherCard)
  • Next, I made the hardware wiring as shown in the below table. The Ethernet module used by me has an onboard 3.3V regulator, and its data pins are 5V tolerant
  • And then I powered my hardware assembly up by a 9V battery and made a ping test from my Windows 10 laptop. Yes, it worked!

TEST CODE →

[code]

#include <EtherCard.h>




static byte mac[] = { 0x74, 0x69, 0x69, 0x2D, 0x30, 0x31 };

static byte ip[] = { 192, 168, 1, 10 };

byte Ethernet::buffer[500];




void setup () {

if (ether.begin(sizeof Ethernet::buffer, mac, 8) == 0)

Serial.println("Ethernet Controller Access Failed!");

if (!ether.staticSetup(ip))

Serial.println("IP address set Failed!");

}




void loop() {

ether.packetLoop(ether.packetReceive());

}

[/code]

HARDWARE WIRING →

ARDUINO UNO ENC28J60 ETHERNET MODULE
D13 SCK
D12 SO
D11 SI
D8 CS
GND GND
5V 5V

Oh, I almost forgot that! To do a ping test from your computer to your ethernet setup, you must configure the IP settings in your computer. I used these settings in my laptop.

This is what my “ping test” hardware setup looked like:

Next after the tea break…

Now I am in the middle of the sequel of this experiment. As usual, I plan to share the do it yourself project here, when it is completed!

Leave a Comment