Arduino Opta Hands-On: A Budget Industrial PLC That Also Runs Arduino Sketches
イチケン / ICHIKENArduino has released a product that looks like it belongs in a factory control cabinet. The Arduino Opta is a PLC (Programmable Logic Controller) in the Arduino Pro line, co-developed with the relay manufacturer Finder. The presenter wanted to know whether an Arduino-branded device could work as a real industrial controller. He describes the Opta as a bridge between hobby Arduinos and industrial PLCs. In the video he examines the hardware and the model lineup, then runs three demos: one as a plain Arduino, one as a ladder-logic PLC, and one combining the two.
Why PLCs Exist: Replacing Relay Sequence Control
Before looking at the device, the presenter explains what a PLC replaced. Factory automation used to rely on relay sequence control, where large numbers of relays were physically wired together to implement the control logic. He lists several problems with that approach:
- Changing the control behavior meant rewiring, which took a lot of time.
- Relays are consumable parts and need frequent maintenance.
- They draw a fair amount of power.
- The relays themselves are physically large.
PLCs moved that control logic into software. The ladder diagrams once used to design relay circuits are now written as programs running on the PLC. The PLC evaluates the logic, and depending on whether a signal is on or off, it opens or closes relay contacts that switch high-power loads. In his summary, the PLC handles the complex control and the relay handles switching power on and off.
The Hardware and Its Ports
The presenter says the Opta is essentially a PLC despite the Arduino name, and it can be used in three ways:
- As an Arduino, with sketches uploaded from the Arduino IDE.
- As a PLC, with ladder programs written in the Arduino PLC IDE.
- As a combination of both, with ladder logic and sketches working together for more advanced control.
The benefits he highlights are access to Arduino libraries and a development environment that is ready to use from the start.
He then goes through the built-in ports:
- Power: 12V to 24V input, the same range as a standard industrial PLC.
- Inputs: combined digital/analog. Analog inputs accept up to 10V; digital inputs are 24V. The analog inputs measure voltage only, not current, so current-loop sensors require a separately sold expansion module.
- Outputs: four mechanical relays rated 250V AC, 10A. He thinks these can handle most loads as long as motor inrush current is accounted for.
He adds a caution about the relays. PLCs are expensive, and mechanical relays wear out, so for switching high-power loads such as motors he would put an external contactor between the Opta and the load. He considers the I/O count a bare minimum, but enough for small projects.
Model Variants and Pricing
Opta comes in three tiers, and all of them have I/O ports, a USB port for programming, and an Ethernet port:
- Opta Lite: the entry model.
- Middle tier: adds RS-485.
- Opta WiFi: the top model, which adds Wi-Fi and Bluetooth.
The presenter bought the WiFi model. He has no current plans to use wireless, but chose the version that can do everything. By his figures, the Lite costs 25,000 yen and the WiFi model 33,000 yen, both before tax. He thinks the Lite can do almost everything unless you need wireless features, such as reading PLC variables over Wi-Fi or pushing sketches remotely.
Expansion Modules
Up to five expansion modules can be chained to the right of the main unit. Each module has an identifying number printed on it, but the presenter found the numbers too small to read easily. He covers three modules:
- Digital expansion with mechanical relays: 16 programmable inputs and 8 mechanical relay outputs. He suggests it for cases where the Opta's built-in channel count isn't enough.
- Digital expansion with solid-state relays: also 16 programmable inputs, with 8 solid-state relay outputs rated 24V, 2A. He recommends it for fast switching at low voltage.
- Analog expansion: 6 programmable inputs, 2 programmable outputs, and 4 PWM channels. Inputs and outputs can each be set to voltage or current mode, which the base unit cannot do. He points to this module for sensors and actuators that don't work with the main unit's voltage-only I/O.
Demo 1: Using the Opta as a Plain Arduino
The test setup was meant to resemble typical factory automation equipment. It included the Opta, a switching hub, a DC power supply, and a Patlite-style warning light that communicates over Ethernet.
First, the presenter wrote a sketch in the Arduino IDE and uploaded it over USB-C. The sketch makes an output blink at 0.25-second intervals while a button is held. It mostly worked, but he admits he wrote the code hastily and it had glitches:
- Depending on when the button was pressed, the light sometimes didn't start right away.
- Sometimes it kept blinking after the button was released.
He attributes these problems to the delay() function blocking the program. He concludes that for this kind of behavior, it may be better to use the Opta as a PLC.
Demo 2: Ladder Logic in the Arduino PLC IDE
Next he wrote a ladder program in the Arduino PLC IDE, which is a separate download. Using all of the IDE's features normally requires a paid license, but the Opta comes with a license built in, so everything is available from the start. He points out that this means the prices he quoted earlier include the license.
His ladder diagram has an input contact and an output coil. Inputs can be mapped to the programmable input terminals or to the user button on the Opta. Coils can be mapped to the built-in indicator LEDs or the built-in mechanical relays, among other things. He used the user button as the input and added a timer that passes its signal through only after the input has been held continuously for at least one second. The output lights an indicator LED and closes one of the built-in relays.
In the demo, holding the user button for one second makes the relay click audibly and the LED light up. To confirm the relay could actually carry a load, he wired an incandescent bulb to it. The bulb lit one second after the button was pressed and went out as soon as the button was released. (He noted that the bulb gets quite hot and warned viewers to be careful.) He found that the Opta behaves very much like a real PLC.
Demo 3: Combining Ladder Logic and an Arduino Sketch
The last demo shares data between a ladder program and a sketch. In the ladder, a pushbutton on an input port sets a variable named in1 to 1, and that value is passed to the sketch. This requires extra configuration: every variable used by both the ladder and the sketch must be declared as a shared variable. The sketch reads which button was pressed and lights the matching lamp on the warning light over Ethernet.
He ran into one problem. If a code comment contains full-width (Japanese) characters, the build fails. He believes it compiled successfully but got an error at the upload step, and he warns Japanese users to watch out for this.
In the working demo, each button press makes the corresponding lamp on the warning light turn on instantly. The light connects to the PLC by LAN cable through the switching hub. He describes the response as smooth. It also handled several buttons pressed at once and rapid random presses.
He then suggests a more practical version of the same setup: connect a sensor's output to a PLC input, and when the reading exceeds a threshold, send a signal to a relay to stop a machine and turn on a warning light. He also sees value in being able to talk to other Ethernet devices through the switching hub.
Verdict
The presenter says he expected an Arduino-branded PLC to be somewhat limited, but found it to be a solid product. He recommends it for small control systems and educational use. He considers the pricing a good value: 25,000 yen for the Lite with Ethernet and 33,000 yen for the Wi-Fi model. He contrasts this with other manufacturers' PLCs, where the software is often sold separately and the hardware can be hard for individuals to buy. For that reason, he sees products that make PLCs easier to try as especially valuable.
This video is brought to you by DigiKey.
Hello. Did you know that Arduino has released a product like this? Here it is. This one, which looks exactly like industrial equipment, is a PLC (Programmable Logic Controller) called Arduino Opta. This is one of the products in the Arduino Pro series. I'm wondering if Arduino actually makes products like this. This is a product co-developed by Finder, a relay manufacturer, and Arduino.
I think this product serves as a bridge between an Arduino for hobby use and an industrial PLC. This time, I'm going to try using this out in real life. I'll be reviewing what it's like. But first, let me introduce today's sponsor.
This time, on the DigiKey Japanese YouTube channel, we will be holding a special event to celebrate our 5th anniversary. On the DigiKey Japanese channel, over the past five years, I've created more than 200 videos, and we currently have as many as 75,000 subscribers. To celebrate, we're holding a tech quiz with prizes to be won. To everyone who answered all the questions correctly, we're giving away a DigiKey-branded gadget bag. It's a surprise which bag you'll win! Anyone can participate, so please feel free to apply.
What's more, you can also win a microcontroller development board from NXP Semiconductors in a raffle. Since this requires registration and posting on the DigiKey TechForum, if you're interested, please check it out via the link in the description.
First of all, regarding what a PLC is: control that was previously achieved through a combination of physical wiring and relays is replaced by software running on a PLC. In the past, automated control systems in factories used a large number of relays, wired and assembled for relay sequence control.
However, this comes with a number of issues. If I want to change the control system, I'll have to rewire it, and it used to be time-consuming. On top of that, relays are consumable parts and require a lot of maintenance. It actually uses quite a bit of power. And the relay itself is actually quite large in terms of size. I was dealing with a variety of problems.
Since it's difficult to handle and requires a lot of maintenance, PLCs have made their debut. PLCs have replaced the control programs that were previously implemented using relays and wiring. The idea is to integrate it into the software running on the PLC. With this type of relay-based control, I'm sure you've heard of ladder diagrams. The ladder diagram we were working on in the relay course—I'll just program the same thing using the software on the PLC.
Depending on whether that signal is on or off, by closing or opening the relay contacts, we control high levels of power. To summarize, the PLC handles the complex aspects, such as control, and a relay is responsible for turning the power on and off.
Here is the actual item. Although it's called an Arduino, it's essentially a PLC. Upload a sketch using the Arduino IDE, and it can also be used as an Arduino. Write a ladder program in the PLC IDE development environment that will be introduced later, and it can also be used as a PLC. Furthermore, by combining the ladder and the Arduino sketch, it now also supports advanced control functions.
The best thing about using it is being able to use Arduino libraries, or that a user-friendly environment is set up from the start. That's the part.
Let's also take a look at the specifications of the ports that are readily available. First, the top-left is the power supply. Since this PLC supports 12 V to 24 V input, it can be used just like a standard industrial PLC. To the right of that is a digital/analog input port. For analog inputs, the maximum is 10 V. For digital inputs, the voltage is 24 V. As for analog inputs, they are voltage inputs, and it does not support current input. If you want to work with current input, a separately sold expansion module is required.
There are mechanical relays for four output channels. Since it's 250 V AC, 10 A, as long as you're careful about the motor's inrush current, it looks like it should be able to handle most loads. However, since PLCs themselves are quite expensive, considering the service life of mechanical relays, when controlling the on/off operation of high-power loads such as motors, I'd like to install a contactor like this on the outside.
As for input and output, the specifications call for providing only the bare minimum number of items. I think this should be enough for a small-scale project.
Actually, Opta has a variety of models. From the top-of-the-line model I purchased this time to the most basic entry-level Lite, all models feature input/output ports, a USB port for programming, and an Ethernet port. If we take it up a notch from here, there is also a model that includes RS-485 in addition to this. The top-of-the-line model, which has been upgraded yet again, is equipped with wireless features such as Wi-Fi and Bluetooth. This is the WiFi model.
The one I bought this time is a WiFi model—the top-of-the-line model. However, for now, I don't have any plans to do anything using Wi-Fi or Bluetooth, so I decided to go ahead and buy the top-of-the-line model that can do everything.
Depending on your budget, the cheapest Lite is 25,000 yen, excluding tax. The WiFi device I bought this time cost 33,000 yen before tax. Unless there's a need for things like retrieving variables from a PLC over Wi-Fi or adding sketches, basically, you can do just about anything even with the Lite version.
Let's also take a quick look at the expansion modules we mentioned briefly earlier. As for the expansion modules, here's an example: use them in combination. You can link up to five units. Basically, the unit on the far left is the PLC itself, and you connect the expansion module to the right side of it. You can tell the modules apart by looking at the numbers in this area, but they're pretty small, so it's hard to tell which is which.
This module that you can see right now is an expansion module that increases the number of channels. You can add 16 programmable input channels and an 8-channel mechanical relay. If the number of channels available on Opta alone isn't enough, this expansion module looks like it would work well.
This also features 16 programmable input channels. It has eight output channels, but the output section uses solid-state relays. Since the rated specifications are 24 V and 2 A, if you want to switch at high speed at a low voltage, you might want to use this expansion module.
And here is the final module. This is an analog expansion module, and it adds six programmable input channels, two programmable output channels, and four PWM channels. You can select voltage or current mode for both input and output. This is a feature not found on the Arduino Opta unit itself. If you want to use sensors or actuators that are not compatible with the Opta unit's voltage input and output, this module comes in handy.
From here on, we'll actually start using Opta. Since we have this opportunity, let's make it look like a typical piece of factory automation equipment. I'll also try communicating over Ethernet using a Patlite. As shown here, the setup includes the Opta unit, a switching hub, a DC power supply, and a Patlite.
Opta is technically an Arduino, so for now, I'll try using it as an Arduino. Write the code in the Arduino IDE and upload it. This time, I used a USB-C cable to write the data. Let's give it a try. It looks something like this.
It seems to be working, at least. I wrote some code that makes it blink at 0.25-second intervals only while the button is pressed. It looks like it's working properly. Since I wrote this code pretty haphazardly, there are a few glitches here and there, but it does kind of look like it's moving, doesn't it?
This Arduino code implementation uses a delay function. It feels like that's having a direct negative impact. Depending on when you press it, sometimes it just doesn't start glowing right away. Like this, it just keeps flashing. Also, it doesn't seem to go away even when you let go of it. Regarding how this works, I think it might be better to use it as a PLC.
Next, I'll try using it as a PLC. I'd actually like to try writing a ladder myself. In this case, the development environment called the Arduino PLC IDE will be required separately. If you want to take full advantage of this PLC IDE's features, normally, a license would be required, but since Arduino Opta has a built-in license, all features are available from the start. I believe we were just talking about the selling price a moment ago. So that price includes the license, right?
Here's what it looks like when you actually use it. The ladder diagram looks like this: prepare an input button and an output coil. Regarding the input section, you can assign programmable inputs, and you can also use the user button built into the PLC itself from the start. This time, I decided to use the user button that comes standard with Opta itself. For the coil, you can assign the indicator LEDs built into the main unit from the start, or the built-in mechanical relay, among other things.
This time, we've also added a timer. If the timer receives a continuous input for one second or longer, I've set it up so that the output comes from the timer. So, for this operation, if you press and hold this button for at least one second, the indicator LED lights up, and I set it to close the built-in mechanical relay.
Here's what it looks like when you actually try it. If you press the user button here like this for one second, do you understand? Can you hear the relay clicking? The built-in indicator LED looks like this. That looks good.
Is it actually okay to run a current through the relay? I'll check it thoroughly. Something like this. If you do it right—hot! This is an incandescent bulb, so it gets pretty hot. Let's be careful.
Something like this. After pressing, after one second, the relay is activated, and it's like a light suddenly turning on, isn't it? Press. One second. If you let go, it disappears right away. As you can see, I think it behaves quite a bit like a PLC.
Next, I'll try combining PLC ladder logic with an Arduino sketch. First, here's the ladder. Add a pushbutton to the input port. When you press that, the variable "in1" will be set to 1. We'll pass that variable to the Arduino sketch. If you want to do this, additional configuration is required. Variables used in both ladder and sketch must be defined as shared variables.
I also wrote some code for the sketch section. Depending on which button is pressed, I'm working on making the Patlite's bulb, connected via Ethernet, glow.
There's one point here that caught my attention. If you use full-width characters in comments within your code, an error occurred and I can't compile it. I'm pretty sure it compiled successfully, but when I tried to upload, I got some kind of error. If you're actually planning to use Opta, please be careful.
When you actually try it, this is what happens. There's a button here. If you press this, the emergency light flashes at the same time the button is pressed. I'm connecting this strobe light and PLC via a LAN cable through a switching hub. It moves pretty smoothly, doesn't it? Of course, it also supports simultaneous button presses. Even if you just click around randomly like this, it works properly. I think it's pretty good, don't you?
This time, I'm using a simple setup consisting of a button and a flashing light, but, for example, the sensor's output is connected to the PLC's input, and when the sensor exceeds the threshold, send a control signal to the relay, stop the machine, and turn on the warning light. You'll be able to use it for such applications as well. Via a switching hub, you can also connect to other Ethernet-enabled devices. It's actually pretty nice to be able to communicate.
So, I tried using the Arduino Opta, an industrial-grade PLC from Arduino. Since it's an Arduino, I thought it would be a bit less feature-rich, but it's actually a surprisingly sturdy product. For those who want to set up a small-scale control system, or if you want to use it for educational purposes, for example, I think this would be a pretty good option.
The price is 25,000 yen, including Ethernet, and the high-end version with Wi-Fi costs 33,000 yen, so I think it's actually pretty good value for the price. In fact, with other companies' PLCs, the software is often sold separately. To begin with, it can be difficult for individuals to purchase them, so products like this, which make it easier to get started with PLCs, are invaluable.
So, if you found this video helpful, please give us a thumbs-up and subscribe to our channel! If you have any questions or concerns, please feel free to leave a comment as well. Thank you for watching the video all the way to the end.
Article published · Updated
