Blog

PLCs for You and Me: Hands-On with the Arduino PLC Starter Kit and Opta WiFi - Hackster.io

Please ensure that JavaScript is enabled in your browser to view this page.

To say that Arduino is, for many, synonymous with microcontrollers is no exaggeration. The company's success in the hobbyist and educational markets is legendary, and its recent moves into the industrial market with its Arduino Pro range have been enjoying equal attention. Now, it's coming for the programmable logic controller (PLC) market — but can it compete with the incumbents? SGMGH-20ACA41

PLCs for You and Me: Hands-On with the Arduino PLC Starter Kit and Opta WiFi - Hackster.io

To gain a toe-hold in the sector, as well as to address what the company projects will be a worsening skills gap as retiring engineers and developers aren't being replaced with fresh blood boasting the necessary talents, Arduino has launched the PLC Starter Kit — a bundle that includes its range-topping Opta WiFi "mini PLC," two quick-start simulator boards for inputs and outputs, and all the accessories you need to get everything running, plus a free online training course claimed at 20 hours of content.

Join us as we dive deep into the Opta ecosystem, and see if Arduino's magic lightning can strike twice.

Arduino Opta Lite/Opta RS485/Opta WiFi

Arduino Opta Digital Expansion Module

Arduino Opta Analog Expansion Module

As the specs above show, the Opta isn't a single device: it's a growing ecosystem. The original Opta Lite, Opta RS485, and Opta WiFi modules sit at the heart of that ecosystem, offering a DIN-mountable industrially-focused logic controller platform based around STMicro's dual-core STM32H747XI system-on-chip. For those who might find the eight inputs and four outputs limiting, the new Opta Digital and Analog Expansion Modules clip into a compact AUX expansion header to boost pin count considerably — and can be daisy-chained up to five modules deep if you're still running out of pins.

It's the Arduino PLC Starter Kit that is likely to be of most interest, though. A recent addition to the family, the collection is designed to help address the skills shortage in industrial automation — while, handily, getting a new generation of engineers and programmers invested in the Arduino ecosystem. It bundles an Arduino Opta WiFi, the range-topping model, with two "simulator" modules for input and output — allowing you to quickly build a testbench environment on a single short length of DIN rail (not included).

The Arduino PLC Starter Kit isn't just about the hardware in the bundle: it's designed for use with an online training course developed by Arduino and which covers the gamut from the history of programmable logic controllers to inter-device communication via Modbus RS485. In total, there's a claimed 20 hours of content included — primarily designed for those who are coming to the world of PLCs from Arduino's more traditional microcontroller family.

Essentially, the Arduino Opta PLCs are microcontrollers in a fancy housing and with a few integrated peripherals. If you had any doubt about that, it would be immediately dispelled by the fact you can program any Opta model using the standard Arduino IDE 2 and Wiring library — even to the point that many existing Arduino sketches can be easily loaded onto the Opta with a minimum of modification.

PLCs, though, live in a slightly different space to a normal microcontroller. Key to this is how they're programmed, which typically involves using a language that adheres to the IEC-61131-3 standard — first published in 1993. These languages are split into two logical types: the text-based languages Structured Text (ST) and Instruction List (IL); and the graphical languages Ladder Diagram (LD), Function Block Diagram (FBD), and Sequential Function Chart (SFC).

For this, Arduino has developed a separate integrated development environment dubbed, sensibly enough, the Arduino PLC IDE. Unlike the standard Arduino IDE, it supports the full gamut of IEC-61131-3 languages — and, also unlike the standard Arduino IDE, it requires a license. For those looking to use it with the Portenta Machine Control board, that means an additional $17.60 fee on top of the hardware cost; for Opta users, though, a license is included as standard with the hardware.

The need to license the IDE isn't the only speed-bump awaiting newcomers to the Opta family, either. The Arduino IDE is famous for its cross-platform compatibility, being installable on everything from a Windows or macOS laptop to Linux running on a Raspberry Pi; the Arduino PLC IDE, by contrast, is a Windows-exclusive package — and is limited to Windows 10 or higher on 64-bit x86 hardware at that, meaning it's incompatible with the new Windows on Arm devices hitting the market this year.

Assuming that Windows exclusivity isn't a deal-breaker, installing the Arduino PLC IDE is a relatively painless process. Once installed, you can open it up and start a program in one of the five supported IEC-61131-3 languages — and it's even possible to mix IEC-61131-3 projects with Arduino sketches, if you've legacy code you're looking to bring with you to the world of Opta.

The training course, which is freely accessible for all registered Arduino users to read regardless of whether or not they've bought the PLC Starter Kit, takes a little while to get to going hands-on with your first project. The first chapter, which Arduino rather pessimistically assumes will take the reader a full hour to grasp, briefly touches on the Arduino IDE 2 and Arduino PLC IDE and their differences, then offers an overview of Ladder Diagram, Function Block Diagram, and Structured Text — of which only two, Ladder Diagram and Function Block Diagram, actually make an appearance in the course.

The second chapter, which is extremely unlikely to take even the novice reader the two hours Arduino estimates, takes a step back and offers a potted history of PLCs and the Modbus protocol before looking at the features of the Opta. Even the next chapter, which is somehow estimated to take only an hour despite being considerably more technical than the ones preceding it, doesn't go hands-on, instead focusing on an overview of the Modbus TCP/IP protocol — and, disappointingly, sticking to the outdated "Master/Slave" terminology many projects have moved beyond.

It's not until the fourth chapter that you actually get to make the Opta do something, and in classic hardware "hello, world" tradition that something is lighting up an LED. Eagle-eyed readers skimming the Arduino PLC Starter Kit's list of components may be surprised that there's no mention of LEDs in there, but there's a good reason for that: all models of Opta, including the bundled Opta WiFi, feature integrated status LEDs for their outputs. Toggle a relay and the correspondingly-numbered LED illuminates — whether or not there's anything connected to said relay.

This essential first project is written in Ladder Diagram, and the chapter walks you through the process step-by-step. It doesn't, however, really explain what you're doing: you create a switch object, assign it a variable, and leave the contact type set to "normal" — with no explanation of what that means, nor when you'd use the other options of "negate," "positive," or "negative." Likewise, the even more numerous settings for coil type aren't explained — and while the guide claims you'll be using the digital input simulator board included in the bundle, it's actually written to use the Opta's onboard user-programmable button instead.

The second project isn't much of an improvement, as not only does it not make use of either of the input boards included in the PLC Starter Kit but it requires a component not found in the bundle: a 24VDC motor. The chapter opens with controlling the missing motor with Ladder Diagram, then moves on to Functional Block Diagram. The next chapter again looks at controlling the motor you haven't got, bidirectionally this time, then the next into combining everything into a four-output control system for the motor that still wasn't included.

At this point you're expected to be 12 hours into the 20 hour course, and you have used neither of the simulator boards included in the bundle. You might expect that to change for the next section of the course, but you'd be disappointed: instead, the course spends the next five hours on configuration communication between two Opta PLCs over a Modbus TCP/IP network — something you again can't do with just the hardware included in the Arduino PLC Starter Kit, requiring as it does two Opta PLCs. It's only as you enter into the last three hours of the 20-hour course, bizarrely, that the temperature sensor board is mentioned.

In fact, it's only in the very last chapter of the course — more than half of which, at 11 hours, you can't actually follow hands-on unless you buy a motor and a second Opta PLC — that you're shown how to wire the two simulator boards up, creating a project that uses two of the switches on the input board to control resistive heaters on the temperature sensor board then captures the changing temperature using the Arduino PLC IDE's "Oscilloscope" function — "actually an acquisition software," the guide's author writes.

The course, then, is a bit of a bust. The writing is clunky, bounces off the surface of the topics it aims to cover without making a real dent, and focuses predominantly on hardware not included in the Arduino PLC Starter Kit — only making use of the two bundled simulation boards in the very final chapter. It's in this project where you're also told you'll need a "router switch" and "LAN cable," which are never mentioned again and do not form part of the project's wiring diagram: the Opta WiFi is instead connected directly to a controlling PC over USB and no network functionality is used.

The training course gets a failing grade, but that doesn't mean you should be turned off the Opta ecosystem as a whole. The PLC Starter Kit's simulation boards are a clever approach to reducing the amount of hardware you need to experiment with PLC programming, and it's a shame the course doesn't open with their use.

For those willing to put in the legwork to learn PLC programming themselves, rather than relying on the materials Arduino has provided, or who are already familiar with IEC-61131-3 programming, there's a lot to like about the Opta platform. The Arduino PLC IDE is accessible, if also unavoidably more complex than the Arduino IDE 2, and the hardware is undeniably powerful. The new Digital and Analog Expansion Modules, in particular, offer a great way to easily increase the capabilities of a base Opta without having to add multiple PLCs to a project or get tangled in unnecessary wiring — and Analog Expansion Module's true analog output capabilities are particularly tantalizing.

The power of the hardware and IDE, sadly, make the failings of the training course even more glaring. The course claims it will use Structured Text as well as Ladder Diagram and Functional Block Diagram, but there's no sign of it being used in any of the materials reviewed here. There's use of the Ethernet port to connect two Opta PLCs together over Modbus TCP/IP, if you're willing to buy a second Opta PLC to go with the one in your Starter Kit, but nothing about using it to connect to the Arduino Cloud or similar. Even more strange is the fact neither Wi-Fi nor Bluetooth, major selling points of the bundled Opta WiFi PLC, are used in the course at all — leaving you wondering why Arduino didn't simply include the cheaper Opta RS485 or Opta Lite in the bundle instead and cut the price accordingly.

As the company's first real attempt to break into the PLC market, the Opta ecosystem is a real gem. The hardware is slick, the form factor well-suited to integration into existing industrial automation setups, and the launch of the new Expansion Modules shows that Arduino is serious about offering the capabilities PLC programmers need — albeit it, for now at least, exclusively for those working on Windows.

The training course is a disappointment, it's true, but not irredeemable: Arduino, with its origins in education, has a long history of delivering accessible tutorials over time, and it's to be hoped that the presently-weak materials intended to support the Arduino PLC Starter Kit will be improved in the future. It will be interesting to see, too, if the course is expanded to cover more of the Opta WiFi's integrated capabilities — in particular Wi-Fi and Bluetooth connectivity.

For now, though, the Arduino PLC Starter Kit is only recommended for those who don't need to be walked through everything step-by-step and who are interested in hands-on self-directed learning — or those with existing PLC programming experience who want a handy hardware bundle for experimentation before making the jump from their existing platforms to Opta. For these, it's a well-thought-out collection of parts that serves as an excellent starting point for a range of projects.

The Arduino PLC Starter Kit is now available on the Arduino Store at $385; the standalone Opta PLCs are priced at $146.40 for the Opta Lite, $160.80 for the Opta RS485, and $193.20 for the Opta WiFi as-reviewed; the D1608E Digital Expansion Module is $136.80 with the D1608S at $146.40, with pricing for the yet-to-launch Analog Expansion Module not available at the time of writing.

Additional information on the Opta ecosystem is available on the Avnet website.

PLCs for You and Me: Hands-On with the Arduino PLC Starter Kit and Opta WiFi - Hackster.io

SGMGH-55ACA61 Hackster.io, an Avnet Community © 2024