Introduction: Profibus-Displaced person Communication 'tween Arduino and PLC

Today, I would like to share how an Arduino communicates with PLC via Profibus-Stateless person connection. With this result, we butt carry out several projects with the combination of PLC and Arduino plus its annex shields at low monetary value, for examples:

  • See to it and data acquisition to / from PLC with BLYNK on smart telephone via Arduino Mega + Ethernet Buckler + RS485 module. Ordinarily, in order to connect Industrial Ethernet, the Siemens PLC must rich person built-in communicating faculty, such as 6ES7315-2EH14-0AB0 ..., or be furnished with a detached communication faculty, like CP343, CP443.... With video below, Arduino will take over the roles of Ethernet connexion and rally data with PLC through Profibus communications protocol.
  • Turn sensors such as PIR Move Sensor, SRF05 Ultrasonic Outstrip Detector, MPU6050 Accelerometer and Gyroscope Sensors.... into Profibus devices that can be connected to industrial automation system. Video below shows that PLC tin can read value of ultrasonic outstrip sensor to switch on/remove 24V relays.
  • D.I.Y a HMI touch screen to restraint /ride herd on PLC organisation finished Touch sensation Screen TFT Liquid crystal display Module. Atomic number 3 TV below, 3.2 inches touchscreen Liquid crystal display john communicate with PLC via Profibus and control 4 x 24V relays as well as display temperature value assembled from PLC.

In terms of cost, with whatever testings to a higher place, we bequeath save a lot of money because the price of industrial communication faculty operating theater industrial touchscreen HMI are rattling expensive. In summation, we can extend Input and Output of PLC through Profibus - DP interface. It means that Arduino can works similar to Sir Charles William Siemens DP/DP Coupler Module to connect two Profibus - DP networks together. And this DP/DP Coupler's price is also very pricy. We put up refer to their prices as follows:

  • Communication Module CP343-1 Tend.
  • HMI Siemens Tinct PANEL TP177B.
  • Siemens Displaced person/DP Coupler Module.

I hope this cast bequeath inspire you, especially the students who don't wealthy person much money, to come skyward with ideas for combining electronic and automation fields together, with low price.

Step 1: B.O.M

Step 2: PREPARATION BEFORE STARTING THIS PROJECT

I. SOFTWARES:

  • SIMATIC STEP 7 V5.6/ SIMATIC Tone 7 V5.6 Paid.
  • Arduino IDE.
  • Blynk on smartphone.
  • Arduino program library for TFT LCD includes: UTFT, URTouch, UTFT_Buttons

Deuce. Point of reference MANUALS:

  • Arduino's UART, Timer.
  • PLC Siemens S7-300.
  • Profibus manuals:

§. https://www.felser.ch/profibus-manual/index.html

§. https://www.profibus.com/

  • Study about * .GSD filing cabinet to configure Arduino into Siemens PLC computer hardware system.

Step 3: PROFIBUS–DP

I. PROFIBUS-DP:

Profibus was created in 1989 by the German government in cooperation with some manufacturers of mechanisation equipment. It is a electronic messaging format specifically planned for high-speed serial I/O in factory and building automation applications. It is an open standard and is recognized as the fastest Fieldbus in operation today.

The PROFIBUS DP network is supported on an RS485 physical layer and the European common EN-50170. The DP suffix refers to "Decentralized Periphery", which is used to describe fanned I/O devices connected via a blistering serial link with a central controller.

For more details about Profibus, you need to read the this documentation from Max Felser.

Two. GSD FILE:

The GSD charge is an physics twist datasheet or twist database file that identifies the Profibus device. All Profibus devices (social class 1 Edgar Lee Masters and slaves) have their own GSD files. GSD stands for "General Station Description". It is an ASCII schoolbook file that contains device-particularized data, such as, vendor identification data, supported baud rates, supported message length, number of stimulation/output information, meaning of symptomatic messages, timing information, plus options and features supported, information formats, and available I/O signals.

In govern to commercialize Profibus devices, the manufacturers of automation devices have to registry the Ident Numbers for each twist and it is also restrained in this *.GSD file. You can check at: https://www.profibus.com/products/ident-numbers/

And refer to the *.GSD file of S DP / DP coupler module at this address.

Step 4: SCHEMATICS

Arduino Mega 2560 can intercommunicate with PLC S7-300 by RS-485 (MAX485) mental faculty through Profibus protocol as schematic below:

Here below are some schematics that I have tried for this project:

1. Schematic 1 - PLC read Ultrasonic Distance Sensing element via Arduino Mega 2560 + RS485 Module.

    2. Schematic 2 - Smartphone Blynk PLC via Arduino Mega 2560 + Ethernet Shield + RS485 Module.

    Footmark 5: CIRCUIT ASSEMBLY

      This assemblage work is for schematic 2 in premature step - Smartphone Blynk PLC via Arduino Mega 2560 + Ethernet Shield + RS485 Module.

      • Bonding adapter shield for Arduino Mega 2560 includes Ethernet Buckler and RS-485 Module.

      • Installation Ethernet Shell and RS-485 Mental faculty along Arranger Shield. Plugging this Adapter Cuticle on top of Arduino Mega 2560.

      • Wiring PLC's outputs to 4x24V relay race.

      • Copulative Profibus cable from PLC to Arduino. Take note about the GND of two systems, they must be abutting collectively.

      Step 6: HARDWARE CONFIGURATION

      • In Simatic Step 7 program (HW CONFIG), we have to install *.GSD file out and update your Ironware Catalog victimisation the card command "Options --> Update catalog".

      • Hardware configuration

      §. With Arduino Mega 2560 - 16MHz, Profibus works well at baudrate 45.45 Kbps.

      §. Define the number of bytes transmitted and received over the Profibus connection.

      Step 7: PROGRAMING

      I. PLC PROGRAM.

      II. ARDUINO Platform.

      III. BLYNK HMI Test.

      Blynk code is Eastern Samoa follows:

      void myTimerEvent()  {   Blynk.virtualWrite(V8, temperature); }  BLYNK_WRITE(0) {   if (param.asInt())     {              Control_State[0]=1;     }    else      {      Control_State[0]=0;     } }  BLYNK_WRITE(1) {   if (param.asInt())     {              Control_State[1]=1;     }    else      {      Control_State[1]=0;     } }  BLYNK_WRITE(2) {   if (param.asInt())     {              Control_State[2]=1;     }    else      {       Control_State[2]=0;     } }  BLYNK_WRITE(3) {   if (param.asInt())     {              Control_State[3]=1;     }   else      {       Control_State[3]=0;     } }  BLYNK_WRITE(4) {   if (param.asInt())     {              Control_State[4]=1;     }    else      {       Control_State[4]=0;     } }  BLYNK_WRITE(5) {   if (param.asInt())     {              Control_State[5]=1;     }   else      {       Control_State[5]=0;     } }  BLYNK_WRITE(6) {   if (param.asInt())     {              Control_State[6]=1;     }    other      {       Control_State[6]=0;     } }  BLYNK_WRITE(7) {   if (param.asInt())     {              Control_State[7]=1;     }   else      {       Control_State[7]=0;     } }

      NOTES :Description below shows how the project works:

      • PUSH BUTTONS COMMANDS ON BLYNK:

      §. I create on the Blynk app a panel with 8 push buttons V0 ~ V7.

      §. When push buttons are touched, the button statuses (ON / OFF) wish be written to the Arduino Mega 2560 via Ethernet Shield and beryllium stored in transmitted buffer.

      §. Arduino Mega 2560 will transmit these button statuses to PLC S7-300 via Profibus communication (RS-485 module). At PLC side, as hardware conformation in previous whole tone, button statuses volition be accepted at PLC's input I0.0 ~ I0.7.

      §. PLC's output Q124.0 ~ Q124.7 testament turn on or switch OFF 24V relays according to the status of I0.0 ~ I0.7.

      • Hoard AND DISPLAY TEMPERATURE DATA Conventional FROM PLC USING BLYNK

      Since I do non have temperature sensors like Thermocouples, PT-100..., I have simulated the temperature data acquisition from the PLC away sending back status values of promote buttons received from Blynk. Temperature valuate is sent at PLC's output PQB0 (Q0.0 ~ Q0.7) via Profibus protocol.

      Footprint 8: PICTURES

      The images above are results of 3 experiments that I have done for this project, including:

      • PLC read Ultrasonic Distance Sensor SRF05 via Arduino Mega 2560 + RS485 Module.
      • D.I.Y a HMI touch screen to control /monitor PLC system via Arduino Mega 2560 + 3.2" Touch Screen TFT LCD + RS485 module.
      • Control and data acquirement to / from PLC with BLYNK on smart phone via Arduino Mega + Ethernet Shield + RS485 mental faculty.

      Step 9: FINISH

      As selective information from PROFIBUS & PROFINET International (PI) - a large mechanisation community, it has about 1,700 manufacturer members and over 60 million PROFIBUS nodes installed worldwide.

      This is just an initial primitive experiment, but it's great if we can implement a PROFIBUS electronic network in an Industrial Internet of Things (IIoT) field by an Arduino. And once the Arduino can communicate with the PLC/ industrial automation system via Profibus - DP, we can do lots of cool things.

      THANK FOR YOUR WATCHING !!!

      Be the First to Dea

      Recommendations