Arduino PLC

The PLC (Programmable Logic Controller) has been and still is the basic component of the industrial automation world. PLCs are usually pretty expensive pieces of hardware, which led many people who know micro-controllers to come up with their own ideas to implement similar functionality.

Arduino is a kind of universal programmable controller, although it is only the “core” and in any case it has been built for general applications; with a little of external hardware (essentially interfaces capable of transferring signals from sensors and to actuators, reducing the EMI which may damage the microcontroller) and an appropriate software may, however, become something very similar to a PLC. For output you can use Arduino Relay modules. For input you can use varying Arduino sensors of build your own adapter for some industrial sensors.

Arduino as a programmable logic controller (PLC) tutorial we will explain how to “convert” our Arduino board in a PLC-like controller.  There are several ways to turn Arduino into a Programmable Logic Controller, and Arduino as a programmable logic controller (PLC) tutorial presents two: Ladder Logic for PIC and AVR software and ladder.h Generator for LDmicro → Arduino. Also OpenPLC project has a OpenPLC Ladder Editor that can generate code for a standard arduino from a ladder diagram.

In some applications PLCs are more used as IO interfaces for SCADA systems more than doing the controlling. If you want to make Arduino board to look like PLC from SCADA point of view, you can put in software that make it to communicate with MODBUS or other suitable SCADA protocol. One easy way to experiment is to try SCADA for Arduino that includes both Arduino software and SCADA software. I tried it and you can read my experiences with it at Experimenting with SCADA for Arduino posting.

If you are worried if your Arduino based rat’s nest would survive in industrial environment or would be accepted by industrial control people, it is a good idea to to consider available Arduino compatible products designed for industrial control applications. There are now several commercial products built for Arduino PLC applications:

CONTROLLINO advertises to be first software Open-Source PLC. It is ARDUINO compatible.It started as Kickstarter project, but is now available directly from manufacturer web site. It advertises to be designed  to control your Internet of Things and be CE & UL certificated. For more details check the video ARDUINO + PLC = CONTROLLINO

Industruino is an Arduino compatible industrial controller. Industruino is a fully featured Arduino Leonardo compatible board housed in a DIN-rail mountable case + prototyping area + onboard LCD + membrane panel. With this product you will be able to permanently install your Arduino application to industrial. Industruino is a pre-built solution offering a range of industrial voltage level I/O. All controlled with the ease of Arduino coding.

Industrial Shields has a selection of Arduino compatible industrial PLC hardware that can be plugges to DIN rail. The ARDBOX PLC, as it uses an Arduino UNO or Arduino LEONARDO, lets you program it through the USB. M-DUINO family is based on Arduino Mega. This PLC can be programmed using the Arduino IDE platform

 

BieMme Italia offers Soft PLC Arduino which is based on Advanced Arduino Relay Shield. You plug your Arduino to this shield, and it should be then industrial compatible with the control voltage and electrical protection. BieMme Italia also has Bmini All-in-one that has 4 optoiso­lated 24V dig­i­tal inputs, 4 high qual­ity relays, 8 ana­log inputs, PWM, I2C, RS485, Eth­er­net and more.

 

 

 

225 Comments

  1. Tomi Engdahl says:

    The Arduino team has announced a new piece of software for its Arduino Pro range, aimed at the upcoming programmable logic controller engineer: the Arduino PLC IDE.

    Arduino PLC IDE Blends the Worlds of Programmable Logic Controllers and Arduino Sketches
    Designed to support all major PLC programming languages plus Arduino sketches, the Arduino PLC IDE is a new venture for the company.
    https://www.hackster.io/news/arduino-plc-ide-blends-the-worlds-of-programmable-logic-controllers-and-arduino-sketches-2b1ce3d7cc43

    The Arduino team has announced a new piece of software for its Arduino Pro range, aimed at the upcoming programmable logic controller (PLC) engineer: the Arduino PLC Integrated Development Environment (IDE).

    “With the demand for PLC programming rising due to the spread of automation in a wide range of industrial fields, we felt we had to step up for our community of budding and experienced engineers,” the company writes of its latest software release. “That’s why we have just launched a dedicated Arduino PLC IDE, which supports the five languages defined by the IEC 61131-3 standard: Ladder Diagram, Functional Block Diagram, Structured Text, Sequential Function Chart and Instruction List.”

    The software, available to all, is designed to combine traditional PLC programming and Arduino sketch programming in a single environment. A range of libraries are included, supporting features including embedded machine learning and no-code Fieldbus configuration for CanOpen, ModBus RTU, and ModBus TCP.

    The launch comes a month after Arduino launched Opta, its first-ever “micro PLC,” based on the STMicro STM32H747XI and designed for use in the Industrial Internet of Things (IIoT).

    More information on the Arduino PLC IDE, which uses a more detailed interface than the traditional Arduino IDE, is available on the Arduino Pro site

    https://www.arduino.cc/pro/software-plc-ide

    Reply
  2. Tomi Engdahl says:

    An Affordable And Programmable PLC
    https://hackaday.com/2022/12/08/an-affordable-and-programmable-plc/

    We’re all used to general purpose microcontroller boards such as the Arduino or its many imitators, but perhaps we don’t see as much of their industrial cousins. A programmable logic controller (PLC) is a computer designed to automate industrial machinery, and comes with protected interfaces and usually a specific PLC programming environment. Thus [Galopago]’s work with an inexpensive Chinese PLC clone is especially interesting, providing a route forward to using it within the Arduino IDE ecosystem.

    Opening it up, the processor is identified as an STM32F103, and the connection needed to place it in bootloader mode is identified. Then it can be programmed from the Arduino IDE, even though its bootloader can’t be changed. Then to complete the process it’s necessary to identify the various different inputs and outputs by old-fashioned hardware reverse engineering.

    Repurposing a PLC clone for use with Arduino
    https://galopago.github.io/english/repurposing-plc-clone-arduino/

    Attack of the clonesPermalink

    These boards mention compatibility with GX software, which is manufactured by a Japanese company that makes PLC and also cars. At first sight, the compatibility is not official, as no trademark is printed. Their origin is unknown, maybe they were simplified copies based on original schematics and source code, or somehow the native binary format of the PLC was reverse engineered and an interpreter was built and runs in the microcontroller translating the code. Most of the cards are based on STM32 microcontrollers, and according to some articles and videos, the original programming software actually recognizes them as an original PLC!

    Due to their low cost (around $25 USD), and for their relay isolated outputs, optically isolated inputs, RS232 serial port and regulated power supply, are great candidates for small projects as long as they can be programmed with a free multi-platform tool like Arduino or STM suite. In addition, a schematic diagram is needed to find out which I/O of the microcontroller goes to which peripheral in the board!

    Reply
  3. Tomi Engdahl says:

    From https://www.facebook.com/groups/1562990120614822/permalink/3550469188533562/

    I’m looking for a new PLC to try out some automation and I/O integration for various projects and I was wondering what peoples go to or favorite PLC / Logic controllers are?

    I have some “Ideal Specs” that I normally look for on a good number of projects I will list below, but if your favorite doesn’t check all the boxes I would still like to know it and what you like about it!

    Ideal PLC Spec’s
    - Ethernet Connection
    - TCP/IP Communication (UDP is a plus)
    - DC Power/Logic (12V/24V)
    - High Speed Inputs (Not all but some)
    - Sink/Source Outputs (Prefered over Relay)
    - Analog I/O (Can be an add-on module)
    - Prefer Function Block Diagram or Scripting Programming
    - LCD Screen is a plus or a cheap HMI

    Any and all recommendations would be great! Looking online hasn’t shown much for being able to easily compare different manufactures

    I think you can get all or most of those features in just about any PLC line. Mostly comes down to which particular CPU and IO modules you select. I don’t have a huge amount of experience in this area, but for getting started without spending a huge amount of time and money check out Automation Direct. I’ve used their Click line which is very good value for money, but they have a few other lines that I think are more sophisticated, and they have great documentation right there on the website that should help narrow down what you need.

    For the HMI, often those are pretty straightforward to connect as an outboard device. You’d create all of the screens in a tool specific to the HMI and then set up a mapping for registers and bits between the HMI and whatever PLC.

    https://www.automationdirect.com/adc/shopping/catalog/programmable_controllers#start=0

    Andrew Berry I agree with automationdirect, the Click PLCs are very easy to use.

    I haven’t tried many, but if I don’t need anything coded I usually go for Siemens Logo. For relatively simple things it’s great, easy to make projects involving multiple units via network, and show and adjust parameters via the built in display. Being able to change the programming via micro SD has been a life saver. It’s not sexy or flashy, but for projects where it’s a good choice it’s probably the best choice.

    If code is needed I go for Controllino, but I’m also very curious about the new Arduino Opta. (the latter is a lot more PLC-like than the Controllino, which essentially is an Arduino on a DIN rail with 12/24V IO)

    Some day I’ll take the plunge into Beckhoff. Having hardware modules for stuff like DMX, DALI and AC/DC dimmers is very tempting, and they’re quite popular in the entertainment/staging space.

    https://www.controllino.com/

    Reply
  4. Tomi Engdahl says:

    “For those on track to become electrical engineers, this may end up being a stepping stone between the two worlds.”

    Make: Magazine recently featured the new Arduino PLC IDE.

    Arduino Brings PLC Features To Their IDE
    https://makezine.com/article/technology/arduino/arduino-brings-plc-features-to-their-ide/

    Admittedly, most makers in their workshop aren’t going to harness this. However, for those on track to become electrical engineers, this may end up being a stepping stone between the two worlds.

    Reply
  5. Tomi Engdahl says:

    Arduino Opta is a micro PLC for industrial IoT applications
    Arduino has recently announced the Opta micro PLC with industrial IoT capabilities adding yet another solution to the Arduino Pro family.
    https://www.cnx-software.com/2022/11/17/arduino-opta-micro-plc-industrial-iot-applications/

    Reply
  6. Tomi Engdahl says:

    In this video, YouTuber Jakob Sagatowski takes a first look at the newly released Arduino PLC IDE. Watch as he takes you through the complete process of installing the IDE and configuring the Arduino Pro Portenta Machine Control to run a simple PLC program.

    Arduino PLC
    https://m.youtube.com/watch?v=mq1xgubaQeA

    Reply
  7. Tomi Engdahl says:

    Following the release of the new Arduino PLC IDE, Control Automation has put together a tutorial that introduces programming and understanding of the function blocks common to all IEC 61131 languages, starting with bit commands, timers, and counters.

    How To: Use the Arduino PLC IDE to Build Basic Ladder Diagrams
    https://control.com/technical-articles/how-to-use-the-arduino-plc-ide-to-build-basic-ladder-diagrams/

    Reply
  8. Tomi Engdahl says:

    The RevPi has a strange new Raspberry Pi
    https://www.youtube.com/watch?v=cVLrPqh2FFM

    Thanks to Revolution Pi for sending this RevPi Connect S along with the Compute Module 4S.

    Contents:

    00:00 – Revolution Pi’s problem – no Pis!
    00:43 – Compute Module 4, with an S
    02:27 – Delidded, accidentally
    03:26 – A drop-in replacement (mostly)
    03:51 – DIN-rail industrial computer
    04:39 – The biggest downside

    Reply
  9. Tomi Engdahl says:

    Control Automation’s new Arduino PLC IDE tutorial shows how to connect various peripheral devices, such as a VFD and a six-axis robot, to the Portenta Machine Control using analog inputs and outputs.

    https://control.com/technical-articles/arduino-plc-ide-tutorial-2-analog-i-o-and-external-devices/

    Reply
  10. Tomi Engdahl says:

    DirectIndustry highlights three new products released in 2022 that represent a major step forward for the industries they are serving, including the Arduino Pro Opta!

    “By adopting Opta, industrial engineers can implement an easy-to-use and affordable PLC in their stack without the long learning curve required by other established solutions.”

    https://emag.directindustry.com/2023/01/03/best-of-2022-new-innovative-products/

    Reply
  11. Tomi Engdahl says:

    Arduino PLC
    https://www.youtube.com/watch?v=mq1xgubaQeA

    The Arduino PLC and the Arduino PLC IDE… there has been a lot of buzz around it since it was announced recently. I’m a long-time user of the Arduino eco-system and have been using their IDE for over 10 years for various projects. Guess if I was surprised when they released their new IDE aimed at the industrial automation industry! The Arduino PLC IDE only supports one board right now, the Arduino Portenta Machine Control, and luckily I had just been using one of these boards for another project recently, so I could try the new PLC IDE that Arduino have released.

    0:00 Introduction
    3:10 Download & installation
    7:25 First start & impressions
    15:46 Version control?
    18:31 OOP
    20:11 Connect to PLC
    26:13 License activation
    28:11 Compile & online change
    34:25 Wrap-up

    Reply
  12. Tomi Engdahl says:

    Check out this video to learn how Jakob Sagatowski makes an Arduino Portenta Machine Control talk to a Beckhoff Automation PLC via Modbus TCP.

    https://m.youtube.com/watch?v=G4LdrMfbTOc

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *

*

*