65 points · by Lwrless · 2y ago · 86 comments
Industrial automation is exactly this. If you look up the history of the PLC, Dick Morley, founder of Modicon, specifically designed it to hide the computer part. The reasons were twofold: partly for marketing as in ye olde days computers were big, expensive and required costly engineers, and to enable plant electricians and other maintenance personnel the ability to program them using ladder schematics which is why we have ladder logic. So from the beginning the PLC has been targeted at non-technical personnel.
> Automation direct PLCs are cheaper than whatever they're hawking here and almost certainly way more robust (having used a few, they were surprisingly good).
Indeed, though I only like the Click. I have two Clicks at home and used them at work for all sorts of little projects. I haven't bothered with their Productivity line as I dont think it's a very forward thinking platform as its stuck in the 90's with parallel busses on backplanes with proprietary expansion (literally a clone of their Koyo DL series). Then there is their legacy Direct Logic series from Koyo which is solid as hell but long in the tooth. Now they are selling LS Electric which makes me feel they are all over the place PLC wise.
For bigger automation projects I use Beckhoff gear which is very modular and their EtherCAT protocol is very well designed and thought out - deterministic structs over Ethernet. My only gripe is the big shitty Visual studio shell IDE that tends to fall over but every automation vendor has big shitty IDE's. Thankfully they have a FreeBSD runtime alternative to Windows Embedded for the controller side. I can write real-time PLC programs in C/C++ and whatever on the Windows/BSD side. Or stick with IEC 61131-3 languages.
> Anyone who is using PLCs in a remotely serious industrial fashion is almost certainly going to keep buying Rockwell or Siemens anyways.
That is more of an industry trope: "no one ever got fired for buying IBM" but replace IBM with AB for the USA or Siemens in Europe. Basically, Enterprise grade automation with all the associated enterprise goodness: high cost, licensing, price gouging legacy support, and poor technical decisions. I stay away from it.
I have a construction project involving several buildings with overlapping infrastructure. Everything gets connected to EtherCAT as quickly as possible. Electric generation: solar panels, batteries, inverters. Energy management: branch circuit monitoring, weather forecasts, solar forecasts, load control for things like EV charging and water heating. HVAC: heat pumps, buffer tanks, circulation pumps, valves. Building automation: lighting, access control. I just add I/O wherever, connect over Ethernet, and glue all the signals together in software.
I wouldn't dare approach a project like this with Arduino.
A while back, I was investigating security options for PLCs (in the light of e.g. stuxnet), and while Siemens and Rockwell do ultimately feature such things, there was always a lot of "you can trust our security schema, but you can't trust that open-source stuff, anybody could put anything in there".
There are very good reasons to use PLCs, that the Arduino PLCs completely fail to address. But I'll bet that a lot of criticism within the industry will come down to "its open source, so you can't trust them!".
And you get fast deterministic control with etherCAT no problem.
Don't sleep on beckhoff
Best of all, no middle men distributors to dick around with. It is so easy to buy their stuff compared to almost all other controls hardware.
And there are others, Omron, Mitsubishi, Wago etc.
Allen Bradley is unreasonably expensive below a certain scale that isn't small and Siemens is not much better - you can easily blow 20k on just a single CPU module, and TIA Portal on a preconfigured laptop is 20k.
Rockwell (for AB programming) has changed to subscription model, but last time I had to buy Studio 5000 is was 10k for ladder and another 10k for the other languages.
Plus a PLC won't run of a battery for a month, or a year, but a microprocessor will, it is all about your use case.
Have 100% used arduino to PoC industrial electronics in a startup setting.
About the only people who seem impossible to get anything reasonably priced from are Allen Bradley, who even have usb->rs485 converters they sell for $1400.
With Ethernet that supports both Modbus TCP and Ethernet/IP, two very standard industrial protocols*: https://www.automationdirect.com/adc/shopping/catalog/progra...
Note: I *HATE* EIP but we're stuck with it in the USA.*
TIA portal makes me want to kill myself sometimes, but Siemens AX is now just vscode with extensions!
I assume you don't think 61131-3 ladder/FBD/etc is horrible, only ST? If so, it's just pascal and not C/Algol.
Otherwise seems totally reasonable?
They are similarly priced to the arduino and the hardware interface is several orders of magnitude more robust.
Like, just put some 220 ohm resistors, PCB spark gaps, and ESD diodes on every pin, and you've covered a lot already.
I'm planning on ordering some PCBs for something similar in a few days, and I'm still confused about why this doesn't exist already.
So many simple cheap things could be done to make Arduino better. Like, connecting individual pins is fun very briefly as a beginner, after that I want nice clean professional r/cableporn.
Give us 3 pin servo plugs or STEMMA connectors for everything.
Put a diode on the USB-C line so I can power it externally without back feeding and breaking the spec.
Maybe figure out your inrush current so I can have some peace of mind that it won't break itself with inductive current spikes.
Maybe stop using crappy blue relays. 99% of DIY projects do not switch 120vac. Why can't we have protected MOSFETs that don't wear out?
Can we quit using a different pinout for ever everything? Just make your module copy something similar. Every little I2C display thingy has a different pinout for no reason, seemingly evenly distributed across all the possible combinations.
Give us a 5v IO pin for addressable LEDs. Why am I still using discreet 5mm LEDs with dead bug soldered on resistors for space-constrained stuff?
Hobby type MCU boards are too deep in the "Hacker" mindset, where the tech is the focus, as opposed to being part of something else.
Adafruit does great stuff, but so many boards are just... Meh.
Anything you build without getting a custom PCB almost always winds up as cable spaghetti even for trivial things, and it doesn't need to be like that.
I hate how many screw terminals appear in the average PLC wiring scheme, but there's really no other way to get things as customizable as the customer wants without servicing a million and a half SKUs. It sucks, but that's the business.
If you make all the IO pins accessible, you'll never protect them all fully or have any room for dedicated special purpose connectors, but if you choose the most common features and only support those you can do a lot.
For the board I'm doing I only have 3x servo plugs or STEMMA connectors, plus an LED strip output, switched 5v output, and Qwiic/Stemma QT plug, plus headers for the most common class D amp and RS485 modules.
That covers about half of all Arduino stuff I've ever done, and leaves a ton of room for onboard features even on a 35x70mm board.
Standard relay is good for 50 million OPs, if you use them within manufacturers ratings.
Just one example, did you know that most relays have a minimum switching current, and if you don't meet it they will fail pretty quickly. I bet you never even considered that.
Unless I know going to want to switch AC or something, or it's a special safety relay.
People who make cheap off the shelf gadgets don't use Omron.
That's actually really interesting to know about the minimum switching current though!
No one in their right mind is using this as a product around which to build a machine or a business.
It actually scares the shit out of me when I see stuff like this because I know someone naive will use one somewhere completely inappropriate and something bad will happen.
(Ex EE for ref)
Don't do stuff you don't understand. I'm certified in Ex design and Functional Safety and see amateur hour most days.
I wonder who's going to be the first to integrate something like VSCode in their dev environment.
The dev tools in the industrial automation industry are so depressing, luckily we have the excellent Ignition (from Inductive Automation) for HMI/SCADA development.
We have actually been getting away from proprietary PLC's just so we can get away from IEC 61131. Its taken a few years but we are about there.
But it's walled behind a license fee. So no ladder for everyone, but rather, ladder for people who are already using ladder and aren't gonna drop their PLCs to adopt Arduino.
Sad.
And further reinforces the "what the hell is Arduino doing" feeling.
My dad had an industrial machine and he coherced the maker to give him the sources and it was done with this versapro thing.
Graphical environment + a gazillion of memory bugs because there were no variables, just memory addresses, and you were supposed to remember how many numbers to skip, depending on the size of the variable.
Over two decades ago I was programming a Foxboro PLC in their SALL language, which was compiled down to C. Variables and control structures! And you could hack the C if you wanted your state transitions to go faster.
In Allen Bradley rslogix it can be entered quickly using the keyboard.
In my opinion the ladder paradigm is poor when dealing with numeric values, and function block better serves the purpose there
Structured Text is superior when it comes to calculations, bit manipulation and code flow (loops, conditionals etc). Sequences diagrams are advantageous for abstracting sequences. Function Block Diagrams are good for connecting abstractions. They all have their place imo, except Instruction List, which I can’t think of having a single advantage.