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.

 

 

 

131 Comments

  1. Tomi Engdahl says:

    DIN Rail Mount for Arduino YUN, UNO and Nano © GPL3+
    https://create.arduino.cc/projecthub/hwhardsoft/din-rail-mount-for-arduino-yun-uno-and-nano-6907fd

    How to use the ArduiBox Open DIN rail enclosure set for Arduino Nano, UNO and Yun Rev 2.

    Sometimes it is useful to mount your Arduino project permanently in a control cabinet – for example in home automation or industrial applications. In such cases our ArduiBox enclosure for Arduino Nano, UNO and Yun Rev2 can help you to come to a rugged solution with professional look.

    Reply
  2. Tomi Engdahl says:

    PLC Training Center
    https://www.hackster.io/saifalikabi/plc-training-center-213b18

    PLC IEC-61131-3 ladder programming >>> Modbus TCP/IP >>> PID tuning >>> HMI >>> Wiring diagram.

    Reply
  3. Tomi Engdahl says:

    PLC Training Center © GPL3+
    https://create.arduino.cc/projecthub/saifalikabi/plc-training-center-213b18

    PLC IEC-61131-3 ladder programming >>> Modbus TCP/IP >>> PID tuning >>> HMI >>> Wiring diagram.

    Reply
  4. Tomi Engdahl says:

    UniPi 1.1 & 1.1 Lite
    https://www.unipi.technology/products/unipi-1-1-1-1-lite-19

    The UniPi 1.1 and 1.1 Lite are a simple and inexpensive expansion boards for the Raspberry Pi computer, allowing it to function as a programmable logic controller (PLC). It is also the direct predecessor of the UniPi Neuron product line.

    https://www.partco.fi/fi/automaatio/20509-unipi-v11lite.html

    Reply
  5. Tomi Engdahl says:

    DIN Rail Mount for Arduino YUN, UNO and Nano
    https://www.hackster.io/hwhardsoft/din-rail-mount-for-arduino-yun-uno-and-nano-6907fd

    How to use the ArduiBox Open DIN rail enclosure set for Arduino Nano, UNO and Yun Rev 2.

    Reply
  6. Tomi Engdahl says:

    Arduino MKR DIN Rail Mount
    https://www.hackster.io/hwhardsoft/arduino-mkr-din-rail-mount-543440

    Simple enclosure and breadboard to mount Arduino MKR boards in a cabinet for prototyping.

    Reply
  7. Tomi Engdahl says:

    Arduino RS485 DIN Rail Mount
    https://www.hackster.io/hwhardsoft/arduino-rs485-din-rail-mount-23f247

    How to mount an Arduino and an RS485 shield (or any other shield) in a cabinet on a DIN rail.

    Reply
  8. Tomi Engdahl says:

    Simatic IOT2020 and AWS – Open Source Solution with Node-RED
    https://www.hackster.io/jancumps/simatic-iot2020-and-aws-open-source-solution-with-node-red-128a41

    AWS IoT Core integration, with open tools.

    Steps:
    Install AWS nodes in Node-RED
    Register the IOT2000 as a Thing in the AWS IoT Core
    Place certificates on the IOT2000
    Make an inbound (MQTT Subscribe) flow
    Make an outbound (MQTT Publish) flow

    Reply
  9. Tomi Engdahl says:

    With six inputs, isolated as three pairs, the Debounce HAT aims to make switch bounce problems a thing of the past.

    Nyantronics’ Six-Input Raspberry Pi-Compatible Debounce HAT Prepares for Crowdfunding Launch
    https://www.hackster.io/news/nyantronics-six-input-raspberry-pi-compatible-debounce-hat-prepares-for-crowdfunding-launch-3da338571054

    With six inputs, isolated as three pairs, the Debounce HAT aims to make switch bounce problems a thing of the past.

    Because the bounce issue is handled in hardware, there’s no need for any debounce routines in the software side — while each of the three input pairs are isolated up to 2kV AC with 2.5mm spring terminal connections accepting 22-16 AWG wires.

    “Debounce HAT was born out of necessity,” Posch explains. “We were implementing a switch detection circuit to determine the state of a door lock etc. in a room, which required a debounce circuit. This prototype showed the need for a fully opto-isolated circuit to protect against ESD that could be transferred via the metal door handle by a person touching it courtesy of walking on carpet during winter time.

    http://www.nyantronics.com/debounce_hat.php

    https://github.com/MayaPosch/DebounceHat

    Reply
  10. Tomi Engdahl says:

    Glen Akins has dived into AutomationDirect’s ProductivityOpen PLC ecosystem, designing a custom add-on board programmable — like the PLC to which it is connected — from the Arduino IDE.

    https://www.hackster.io/news/glen-akins-designs-releases-a-multifunction-add-on-shield-for-the-productivityopen-plc-ecosystem-17c217ca2a21

    Reply
  11. Tomi Engdahl says:

    Building an Add-On Module for the Automation Direct P1AM-100 Open-Source PLC
    https://bikerglen.com/blog/p1am-100-open-source-plc-custom-add-on-modules/

    Reply
  12. Tomi Engdahl says:

    Wazazoski’s Daisy-Chain DIN-Mount I2C IO Modules Vastly Expand the Raspberry Pi’s Capabilities
    https://www.hackster.io/news/wazazoski-s-daisy-chain-din-mount-i2c-io-modules-vastly-expand-the-raspberry-pi-s-capabilities-134b6ec83588

    Based around the MCP23017 expander and PCA9517, the boards include status LEDs for each input and output in the chain.

    “[A] few months ago I was asked to make some IO modules for my friend’s automation which used Raspberry Pi as a main controller,” Wazazoski writes. “Modules had to meet his specifications: 24VDC powered; 8 relay outputs; 8 optoisolated inputs; DIN rail mounted; Daisy chainable; I2C bus connected (3.3V AND 5V tolerant); some sort of ‘interrupt signals’ from inputs present, from all connected modules

    “I came up with a design based on [the Microchip] MCP23017 chip: [A] 16 port, I2C port expander.

    Reply
  13. Tomi Engdahl says:

    Ignition SCADA + MKR WiFi 1010 © GPL3+
    https://create.arduino.cc/projecthub/NRobinson2/ignition-scada-mkr-wifi-1010-4d2284

    If you’re trying to learn Ignition and want a source of actual data, this tutorial demonstrates how to feed Ignition with Arduino.

    Reply
  14. Tomi Engdahl says:

    From https://hackaday.com/2020/04/26/hackaday-links-april-26-2020/
    Automation Direct is offering Arduino-compatible, industrial-grade programmable controllers. Their ProductivityOpen line is compatible with the Arduino IDE while having industrial certifications and hardening against harsh conditions, with a rich line of shields available to piece together complete automation controllers. For the home-gamer, an Arduino in an enclosure that can withstand harsh conditions and only cost $49 might fill a niche.

    https://www.automationdirect.com/adc/shopping/catalog/programmable_controllers/open_source_controllers_(arduino-compatible)/productivityopen_(arduino-compatible)/controllers_-a-_shields/p1am-100
    ProductivityOpen Arduino-compatible CPU, microSD card slot, (1) microB-USB port(s), external 24 VDC required.

    This product uses Arduino IDE or ProductivityBlocks for programming and is not compatible with the Productivity Suite.

    This product is compatible with Productivity1000 modules.

    Reply
  15. Tomi Engdahl says:

    https://github.com/automationdirect/productivityblocks

    ProductivityBlocks is an open source block programming tool for the Arduino IDE. The application is primarily designed to program a P1AM-100 CPU with the P1AM-100 library, but it may also be used to program other Arduino boards supported by the Arduino IDE.

    ProductivityBlocks is based on the ardublock project.

    https://github.com/AutomationDirect/ProductivityBlocks/wiki

    Reply
  16. Tomi Engdahl says:

    Harris Newsteder’s PL1-0 Offers an Easy Link Between Up to Eight PLC Sensors and Any 3.3-5V MCU
    https://www.hackster.io/news/harris-newsteder-s-pl1-0-offers-an-easy-link-between-up-to-eight-plc-sensors-and-any-3-3-5v-mcu-5c509b0b3f70

    Supporting a mix of sensors in PNP or NPN mode at up to a 30V operating voltage, the PL1-0 is a clever universal interface board.

    “I designed this board out of frustration with the cost and usability of PLCs. So often at my job I wanted to make a simple machine, fixture, or test rig but I didn’t want to pay hundreds of dollars for a PLC with only 6 digital inputs and 6 digital outputs,” writes Newsteder of the project. “An ESP32 is only $7.00 USD, more powerful, and has more interface options than a PLC. Why can’t I use this microcontroller with the rock-solid sensors available to me in industry?”

    Newsteder has confirmed that the PL1-0 board will be released under an open source licence, and that it will launch with a detailed user manual and support for “as long as people continue to use it.” More information, and a link to be notified when the crowdfunding campaign goes live, can be found over on Crowd Supply now.

    https://www.crowdsupply.com/newsteder/pl1-0-universal-sensor-interface

    Reply
  17. Tomi Engdahl says:

    Benefits of learning ladder logic for industrial programming
    Ladder logic is challenging for industrial programming, but it is a valuable skill for engineers looking to enhance their skill set.
    https://www.controleng.com/articles/benefits-of-learning-ladder-logic-for-industrial-programming/?oly_enc_id=0462E3054934E2U

    Reply
  18. Tomi Engdahl says:

    Which IEC 61131-3 programming language is best? Part 1
    With so many programmable logic controller (PLC) programming languages and standards from which to choose, what is the right choice for automation and controls applications? Part 1 provides an overview and focuses on Ladder Diagram (LD) and Sequential Function Chart (SFC).
    https://www.controleng.com/articles/which-iec-61131-3-programming-language-is-best-part-1/?oly_enc_id=0462E3054934E2U

    Reply
  19. Tomi Engdahl says:

    Building The Ultimate Raspberry Pi Automation Controller
    https://hackaday.com/2020/08/19/building-the-ultimate-raspberry-pi-automation-controller/

    The project takes the form of an IP65 industrial enclosure and support electronics that the Raspberry Pi Zero W plugs into. While expandable in nature, [Frank] has a core set of features he’s aiming for as a baseline such as additional serial ports, integrated uninterruptible power supply, a battery-backed Real Time Clock (RTC), an array of programmable status LEDs, and support for XBee and GPS plug-in modules. Feedback is provided through a pair of four digit seven-segment displays and a color 320×480 TFT screen running a custom user interface.

    https://hackaday.io/project/171999-picon-one

    Reply
  20. Tomi Engdahl says:

    Din rail enclosure sets for Raspberry Pi, PiZero, Arduino, ESP8266 & ESP32

    https://www.hwhardsoft.de/english/projects/

    Reply
  21. Tomi Engdahl says:

    miniPID
    https://github.com/tekdemo/MiniPID

    This is a small, fully self contained PID class designed to help provide simple, efficient tuning, and simple integration wherever any level of PID control might be needed.

    All code is contained in a single C++ class, and doesn’t depend on any specific compiler or toolchain. However, example Arduino sketches are included.

    Reply
  22. Tomi Engdahl says:

    Din rail enclosure sets for Raspberry Pi, PiZero, Arduino, ESP8266 & ESP32
    https://www.hwhardsoft.de/english/projects/

    Reply

Leave a Comment

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

*

*