Address Book
 

NeoCortec
 

PULSIV
 

MikroElektronika d.o.o.
 

Panasonic Industry
 

Cambridge GaN Devices
 

Traco Power
 

BALLUFF
 

Seica
 

PEI-Genesis
 

KEYENCE
 

CML Microcircuits
 

SAMTEC
 

ams-OSRAM
 

INTEL
 

TDK Corporation

21.12.2024 11:32:23
bloky
maketa
HomePage
Electronic-components
Embedded
Industry automation
Security
Test & measurement
Tools
Electromobility
Solar energy
Lighting
Jobs
Training , Trade fairs, Evens
Virtual events
Interesting video
Various

Access Point WBE750
 
NETGEAR Unveils the Ultimate Tri-band Wi
Intel Core 14th Gen i9
 
Intel Core 14th Gen i9-14900KS Powers De
DDRH-15/30/45/60
 
Mean Well’s DDRH Series Isolated Ultra-W
TimeProvider® 4500 Series
 
TimeProvider® 4500 Series Is the Industr
IAM-20381HT
 
TDK announces new 3-axis accelerometer,
Microchip’s 5071B
 
New Cesium Atomic Clock Provides Autonom
POLOLU-4980
 
MINIATURE STEP-UP/STEP-DOWN CONVERTERS F
MANSON SDP-2210
 
MANSON SDP-2210 PROGRAMMABLE LABORATORY
DPI 750E
 
RS Components adds range of enhanced pre
conga-TR4
 
AMD Ryzen™ based congatec COM Express mo

ARDUINO – COMMUNICATION USING THE ETHERNET NETWORK
For many years, the creation of extensive computer networks has ceased to serve only for connecting computers.

The drop in prices and the increase in the computing power of small microcontrollers began the rapid process of connecting low-power devices, mainly those performing control and measurement functions, to local Ethernet networks or even the global Internet network. Moreover, these solutions began to appear also in professional industrial networks, gradually replacing older systems based on RS232 and derivatives. Thus, at the beginning of the twenty-first century, the era of the so-called Internet of Things (IoT) began. Although the current IoT market is dominated by devices communicating mainly via wireless networks and Wi-Fi, ZigBee, BLE or Z-Wave standards, still in many hardware solutions (mainly from the so-called IIoT – Industrial Internet of Things), requiring reliable transmission and data security, the Ethernet network remains one of the most popular solutions. The creators of the Arduino platform did not leave the demand from the designers of IIoT devices unanswered, and they extended the standard range of Arduino modules with Ethernet Shield 2, addressed to individual users, or Arduino MKR ETH SHIELD for professional solutions, based on WIZnet controllers W5100/W5200/W5500 and integrating MAC and PHY circuits in one integrated circuit. This offer was quickly expanded by independent producers, who added to it new and much cheaper modules based on the popular ENC28J60. This article contains a short description of both solutions: the official one, based on the W5x00 series chips, and mainly community-developed Open Source/Open Hardware solutions based on ENC28J60 modules.

Communication using WIZnet W5x00 modules and the Arduino Ethernet library

An important advantage of the official modules based on the W5x00 series systems (including their hardware counterparts, for example OKYSTAR OKY2102 or DFROBOT DFR0125 overlays) is to provide full software support in the form of the Ethernet library embedded in the Arduino stack. Thus, the user can start creating the program right after launching the Arduino IDE, without the need to install additional software packages.

Figure 1. OKY2102 (left) and DFR0125 (right) modules, equipped with the WIZnet W5100 controller

Depending on the variant of the WIZnet system and the amount of available RAM, the Ethernet library supports a maximum of four (for the W5100 chip and RAM <= 2 kB) or eight (W5200 and W5500 systems) parallel incoming/outgoing connections. The software interface of the library has been divided into five classes, grouping individual functionalities. The Ethernet class is responsible for library initialization and configuration of network settings (including IP address, subnet address or access gateway settings). An IPAddress class has been created for IP addressing. To run a simple server application on the Arduino side, it will be necessary to use the EthernetServer class, which allows data to be recorded and read from all connected devices. A complementary class is the EthernetClient class, which enables, in a few simple calls, to prepare a functional network client that performs data write and read operations from the server. For UDP communication, the Ethernet library provides the EthernetUDP class. A full description of the classes with the relevant methods is available at:

Go to the Arduino website

As is characteristic for the Arduino platform, all the complex operations of the program are implemented directly in the supplied library – the developer receives a limited, but very functional set of APIs, so that the development process is fast and does not require detailed knowledge of the network stacks. Therefore, let us analyze the construction of the simplest server application, provided with the Ethernet library, the task of which is to listen to incoming connections from the Telnet protocol client.

The server application code starts adding the header files necessary to establish SPI communication (WIZnet modules exchange data with the microcontroller using this protocol) and the Ethernet library header files:

#include <SPI.h>
#include <Ethernet.h>

The next step is to configure the network parameters (MAC address of the controller, IP address of the access gateway and subnet mask) and create a listening server on port number 23 (the default port for the Telnet protocol):

byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};

IPAddress ip(192,168,1, 177);
IPAddress gateway(192,168,1, 1);
IPAddress subnet(255, 255, 0, 0);

EthernetServer server(23);

In the body of the setup() function, it is necessary to initialize the Ethernet library and start the listening process. Additionally, the configuration of the serial port is available, thanks to which messages about the server address, new client connection and data received during the established session can be displayed:

void setup() {

  Ethernet.begin(mac, ip, gateway, subnet);
  server.begin();

  Serial.begin(9600);
   while (!Serial) {
  }

  Serial.print("Chat server address:");
  Serial.println(Ethernet.localIP());
}

The main loop of the loop() program waits for a connection from the client and checks for readable data. When receiving data, it sends such data back to the client, unchanged, thus performing a simple echo function:

void loop() {

  EthernetClient client = server.available();

  if (client) {
    if (!alreadyConnected) {
      client.flush();    
      Serial.println("We have a new client");
      client.println("Hello, client!"); 
      alreadyConnected = true;
    } 

    if (client.available() > 0) {

      char thisChar = client.read();

      server.write(thisChar);
      Serial.write(thisChar);
    }
  }
}

The correct operation of the above application can be tested using any Telnet protocol client (e.g. Putty in Windows or telnet command in Linux) or with the use of another Arduino kit and the EthernetClient class.

Communication using ENC28J60 modules and external libraries

Alternatively, instead of officially supported WIZnet W5x00 systems, modules based on the ENC28J60 controller (e.g. OKYSTAR OKY3486 or ETH CLICK) can be used. With a lower price and a package that is easier to install manually (as opposed to the circuits contained in W5x00 80-pin LQFP packages the ENC28J60 controller is available in 28-pin SSOP, SOIC, QFN packages, as well as in the SPDIP package, intended for through-hole mounting), this circuit is very popular among hobbyists.

Figure 2. OKY3486 (left) and ETH CLICK (right) modules equipped with the ENC28J60 controller

Despite the lack of official support from Arduino, many open source libraries have been made available to programmers, ensuring quick integration of ENC28J60 chips with the software. Particular attention should be paid to the UIPEthernet and the EtherCard libraries, the latter being made available under the GPLv2 license. The undoubted advantage of the former one is the compatibility of the API interface with the official Arduino Ethernet library, thanks to which the application development process can be independent from the choices made between the W5x00 systems and the ENC28J60 system in the hardware. The other project – EtherCard – implements an independent programming interface which, depending on the programmer's preferences, may turn out to be an interesting alternative. Like in the case of the Arduino Ethernet library, implementation of a quite complex functionality (e.g. the implementation of the DHCP client) can be done in just a few lines of code:

#include <EtherCard.h>

static byte mymac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};

byte Ethernet::buffer[700];

void setup () {

  Serial.begin(57600);
  Serial.println(F("
[testDHCP]"));

  if (ether.begin(sizeof Ethernet::buffer, mymac, SS) == 0)
    Serial.println(F("Failed to access Ethernet controller"));

  Serial.println(F("Setting up DHCP"));
  if (!ether.dhcpSetup())
    Serial.println(F("DHCP failed"));

  ether.printIp("My IP: ", ether.myip);
  ether.printIp("Netmask: ", ether.netmask);
  ether.printIp("GW IP: ", ether.gwip);
  ether.printIp("DNS IP: ", ether.dnsip);
}

void loop () {
  ether.packetLoop(ether.packetReceive());
}

 

https://www.tme.eu/gb/news/library-articles/page/43654/arduino-communication-using-the-ethernet-network/

 

 

2021091601 / 16.09.2021 / Embedded / Transfer Multisort Elektronik Sp. z o.o. /

Miniature safety relays by Panasonic
Safety relays are used to build circuits that protect electrical and electronic devices and their users. These are elements with a specific design and high parameters, which is perfectly illustrated by the characteristics of Panasonic products.

Amass introduces a series of LC connectors
In today's fast-paced world of electronics, connector reliability and performance are fundamental to the smooth functioning of devices.

Raspberry Pi Compute Module 4S
Raspberry Pi is a popular computing platform which has become incredibly popular with technology enthusiasts, hobbyists, educators, as well as professionals.

RASPBERRY PI COMPUTERS NOW OFFICIALLY AVAILABLE IN THE TME CATALOGUE

SIGNAL-CONSTRUCT INDICATORS AND SIGNALLING DEVICES
Buttons and indicators are the most basic interface components of numerous devices, from industrial machinery to consumer appliances. They come in a wide variety of formats, sizes, and electrical specifications – you can find many of them in our product catalogue.

BELDEN AND ALPHA WIRE – CABLING SOLUTIONS FOR DEMANDING USERS
Extensive experience, top product quality and satisfaction among customers all over the world are some of the factors that make Belden and Alpha Wire leading global suppliers of cabling, wiring and transmission solutions or connectivity technologies.

MINIATURE OLED DISPLAY FROM RAYSTAR
OLED displays, which revolutionised the optoelectronics market two decades ago, are constantly evolving. On the one hand, their electrical performance and lifespan are improving, while on the other, they continue to undergo the miniaturisation process.

MURATA SENSORS AND METERS – PRECISION AND RELIABILITY
Sensors of various types play a key role in electronic devices. They are indispensable for monitoring, collecting data, and supporting intelligent systems that have changed the way the world works nowadays.

TECH MASTER EVENT PLATFORM
Eager to share your projects with the world? Searching for an innovative and creative platform to do so? Look no further than the Tech Master Event website! It's an ideal space for technology enthusiasts who love to experiment and create.

NEW SOLDERING STATIONS FROM JBC
Soldering station technology continues to evolve as the miniaturisation of devices and components constantly progresses. Modern professional equipment used in service stations or laboratories in which electronic circuits are made manually is characterised by high functionality which surpasses the capacity of the “classical” tools.

GAMING, COMPUTER ACCESSORIES AND OTHER RELATED PRODUCTS
Long gone are the days when gamers had to make do with a worn, dusty PC, whose case was held together by four different screws and a piece of string. Nowadays, computer fiends go for high-performance hardware and flashy computer stations.

POWER SUPPLY BY PANASONIC ‒ AN OVERVIEW OF THE OFFERED SOLUTIONS
In the modern world, basic electronic components, such as resistors, capacitors, and inductors are often overshadowed by the universally applied microprocessors. However, it is these seemingly insignificant components that form the foundation without which no advanced electronic system could exist. Thanks to them, the basic tasks and functions of electronic circuits can be carried out.

Company of the week

NeoCortec

Interesting video


electronica—Leading the way to the All Electric Society


GAMING, COMPUTER ACCESSORIES AND OTHER RELATED PRODUCTS


New video for Pilot VX


electronica 2024, 12.11.-15.11.2024, Munich, DE


Video Report from AMPER 2022


Address Book


NeoCortec


PULSIV


MikroElektronika d.o.o.


Panasonic Industry


Cambridge GaN Devices


Traco Power


BALLUFF


Seica


PEI-Genesis


KEYENCE


CML Microcircuits


SAMTEC


ams-OSRAM


INTEL


TDK Corporation


Giada


RS group


NOKIA


ANRITSU


Digi-Key Electronics


AERS


Flex Power Modules


Danisense


BINDER


Parker Hannifin


DANFOSS


MOXA


Alliance Memory


Intelliconnect (Europe) Ltd.


KIOXIA Europe GmbH



Calendary
intersec Dubai 2025, 14.-16.1.2025
DistribuTECH, 11.2.-13.2.2025, Dallas, TX
asiamold select, Guangzhou, CHN, 25.-27.2.2025
AMPER 2025, Brno, CZ, 18.-20.3.2025
productronica China, Shanghai, 26.-28.3.2025
electronica China 2025, Shanghai, 15.-17.4.2025
electronica India 2025, Dehli, 17.-19.9.2025
SEMICON Europa, München, DE, 18.-21.11.2025
productronica 2025, München, DE, 18.-21.11.2025
electronica 2026, München, DE, 10.-13.11.2026

Interesting video
The ISS Design Challenge ...

Interesting video
Mouser Electronics Warehouse Tour with Grant Imahara



naše portály dle jazyka:

česko/slovenská jazyková verze:
WWW.ELEKTRONIKA.CZ
WWW.ELEKTRONIK-INFO.CZ

anglická jazyková verze:
WWW.ELECTRONICA.ONLINE
WWW.ELECTRONIC-INFO.EU
WWW.COMPONENTS.ONLINE

polská jazyková verze:
WWW.ELEKTRONIKA.ONLINE/pl
WWW.ELEKTRONIK-INFO.PL

ruská jazyková verze:
WWW.ELEKTRONIKA.ONLINE/ru
WWW.ELEKTRONIK-INFO.RU
naše portály dle zaměření:

ELEKTRONIKA.ONLINE :
WWW.ELECTRONICA.ONLINE
WWW.ELEKTRONIKA.CZ
WWW.ELEKTRONIKA.ONLINE/pl
WWW.ELEKTRONIKA.ONLINE/ru

ELEKTRONIK-INFO:
WWW.ELECTRONIC-INFO.EU
WWW.ELEKTRONIK-INFO.CZ
WWW.ELEKTRONIK-INFO.PL
WWW.ELEKTRONIK-INFO.RU

COMPONENTS:
WWW.COMPONENTS.ONLINE
  kontakt:

MALUTKI media s.r.o.
Těrlická 475/22
735 35 Horní Suchá
tel. 00420-603531605
e-mail: info@malutki-media.com



All trademarks are the property of their respective owners.
ISSN 1801-3813