Arduino based PLC boards  B Zone AnalogTechnical Details

M-DUINO PLC Arduino Ethernet 42 I/Os Analog/Digital PLUS


Initial Installation


Industrial controller Arduino IDE is the Original platform to program Arduino boards. This cross-platform application is available on Windows, macOS and Linux and under the GNU General Public License. Arduino IDE supports C and C++ code structuring. Industrial Shields recommend using Industrial Arduino automation IDE to program Arduino Based PLC’s, but any Arduino industrial automation control system compatible software are compatible with Industrial Shields Controllers.

Apart from that, Industrial Shields bring the possibility to select your Arduino based PLC into your Arduino IDE and compile your sketches for the different PLC controller (programmable logic controller)

Download the Arduino IDE 1.8.6: 

Windows Installer


Install Industrial Shields units to Arduino IDE:

Industrialshields boards

Inputs & Outputs


Voltage variation  between  –Vcc (or GND)  and  +Vcc, can take any value. An analog input provides a coded measurement in the form of a digital value with an N-bit number.  In Digital and Analog I/O there’s self insulation, so its posible to connect them in a different power supply than 24 V.  

Inputs: (12x) Analog (0-10Vdc) /Digital (5-24Vdc) configurable by software


Arduino PLC Analog Imputs Typical Connection


Voltage variation  from  –Vcc (or GND)  to  +Vcc, with no intermediate values. Two states: 0 (-Vcc or GND) and 1 (+Vcc).  In Digital and Analog I/O there’s self insulation, so its posible to connect them in a different power supply than 24 V.  

Inputs: (12x) Analog (0-10Vdc) /Digital (5-24Vdc) configurable by software

              (14x) Digital Isolated (5-24Vdc). 


- Digital Isolated Input

Arduino PLC Digital Isolated Imput Typical Connection 

- Digital No Isolated Input

Arduino PLC Digital No Isolated Imput Typical Connection


Interrupt Service Rutine.  A mechanism that allows a function to be associated with the occurance of a particular event. When the event occurs the processor exits immediately from the normal flow of the program and runs the associated ISR function ignoring any other task. 

Interrupt Pin Arduino Mega Pin MDuino
INT0 2 I0.5/INT0
INT1 3 I0.6/INT1
INT0' 18 I1.5/INT0
INT1' 19 I1.6/INT1

    - I0.5/INT0 and I0.6/INT1 also as Pin3 and Pin2. Enable Interrupts turning ON the switches number 3 and 4 of down communication switches.
    - I1.5/INT4 and I1.6/INT5 also as Tx1 and Rx1. Enable Interrupts turning ON the switches number 1 and 2 of up communication switches.


Code example 

In this example we activate INT0 using pin I0_5 from M-duino board. When there’s a change  

#define INTERRUPT I0_5 //other pins: I0_6, I2_6, I2_5, I1_6, I1_5 (M-Duino) I0_0, I0_3, I0_2, I0_1 (Ardbox)

volatile bool state = false;

void setup() {
  attachInterrupt(digitalPinToInterrupt(INTERRUPT), function_call_back, CHANGE);

void loop() {
  if (state == true){
    Serial.println("Interrupt activated");
    state = false;

void function_call_back(){ //Change led state
  state = true;



Ethernet  is the technology that is most commonly used in  wired local area networks  ( LANs ). A LAN is a  network  of computers  
and other electronic devices that covers a small area such as a room, office, or building. It is used in contrast to a  wide area  
network (WAN) , which spans much larger geographical areas. Ethernet is a  network protocol  that controls how data is  
transmitted over a LAN. Technically it is referred to as the IEEE 802.3 protocol. The protocol has evolved and improved over time  
to transfer data at the speed of a gigabit per second.

Our M-Duino family incorporate the integrated W5500 IC.

WX5500  is a Hardwired TCP/IP embedded Ethernet controller that provides easier Internet connection to embedded systems. This chip enables users to have Internet connectivity in their applications by using the single chip in which  TCP/IP  stack, 10/100  
Ethernet MAC and PHY are embedded. The W5500 chip embeds the 32Kb internal memory buffer for the Ethernet packet  
processing. With this chip users can implement the Ethernet application by adding the simple socket program.  SPI  is provided for 
easy integration with the external microcontroller. 


Hardware configuration 

*IMPORTANT:  Make sure that your Ethernet PLC is powered (12-24Vdc). Just with USB is insufficient power to power up the  
Ethernet communication.


Switch configuration

For the Ethernet communication protocol there isn’t  any switch  that  affects  it. So it does not matter the configuration of the  
switches to implement Ethernet communication. 

Used pins

For Ethernet communication protocol, the defined  Arduino Mega  pin is  pin 10 , which is connected and already internally  
assembled to the  WX5500  Ethernet controller. W5500 IC communicates to the Mega board via  SPI bus  already assembled too.  
You can  
access easily to  Ethernet port  in our Ethernet PLCs, it is located at the top of the communications layer.

Ethernet hardware configuration must be plug and play. 



*IMPORTANT: Make sure to download the Arduino based PLC boards for Arduino IDE.

Software Configuration:

Once the hardware configuration is done, it is possible to proceed with the software configuration and also its usage. Firstable it is necessary to include
the Ethernet2.h library provided by Industrial Shields (has the same functionallity as Ethernet.h and also
the same usage).

#include <Ethernet2.h> 
* Remember that for the V7 version or earlier versions you must use the <Ethernet.h> library.

Ethernet2 Library - functions.

* Ethernet2.h library has the same functions as Ethernet.h.