Desktop Factory Teaches PLC Programming

How to train young engineers in industrial automation is a thorny issue. Most factories have big things that can do a lot of damage and cost tons of money if the newbie causes a crash. Solution: shrink the factory down to desktop size and let them practice on that.

Luckily for [Vadim], there’s an off-the-shelf solution for miniaturizing factory automation: FischerTechnik industrial training models. The models have motors, conveyors, pneumatic cylinders, and sensors galore, but the controller is not exactly the industry standard programmable logic controller (PLC). [Vadim] set out to remedy this by building an interface between the FischerTechnik models and a Siemens PLC. He went through a couple of revisions of his board, including one using rivets from the sewing store to interface with the FischerTechnic connectors. Eventually, he settled on more robust connectors and came up with a board that lets students delve into PLC programming without killing anyone. The video below shows it going through its paces; we can only imagine where playing with these kits as a kid would have led us.

As great as [Vadim]’s system is for training engineers, we can also see it helpful in getting kids interested in a career in industrial automation. We recently covered a similar effort to show kids big science using LEGO Mindstorms. Both of these can help get STEM kids to see the wider world of technical careers and perhaps steer them into automation. After all, the people who make the robots are probably going to be the last ones obsoleted, right?

Continue reading “Desktop Factory Teaches PLC Programming”

Industrial Indicator Makes the Move from PLC to FPGA

Industrial controls are fun to use in a build because they’re just so — well, industrial. They’re chunky and built to take a beating, both from the operating environment and the users. They’re often power guzzlers, though, so knowing how to convert an industrial indicator for microcontroller use might be a handy skill to have.

Having decided that an Allen-Bradley cluster indicator worked with the aesthetic of his project, a Halloween prop of some sort, [Glen] set about dissecting the controls. Industrial indicators usually make that a simple task so that they can be configured for different voltages in the field, and it turned out that the easiest approach to replacing the power-hungry incandescent bulbs with LEDs was to build a tiny PCB to fit inside the four-color lens.

The uniquely shaped board ended up being too small for even series resistors for the LEDs, so a separate driver board was also fabbed. The driver board is set up to allow a single 5-volt supply and logic levels of 3.3-volt or 5-volt, making the indicator compatible with just about anything. The finished product lends a suitably sinister look to the prop.

If you’re not familiar with the programmable logic controllers such an indicator would be used with in the field, then maybe you should try running Pong on a PLC for a little background.

Modular portable conveyor belt

When teaching Industrial Automation to students, you need to give them access to the things they will encounter in industry. Most subjects can be taught using computer programs or simulators — for example topics covering PLC, DCS, SCADA or HMI. But to teach many other concepts, you  need to have the actual hardware on hand to be able to understand the basics. For example, machine vision, conveyor belts, motor speed control, safety and interlock systems, sensors and peripherals all interface with the mentioned control systems and can be better understood by having hardware to play with. The team at [Absolutelyautomation] have published several projects that aim to help with this. One of these is the DIY conveyor belt with a motor speed control and display.

This is more of an initial, proof of concept project, and there is a lot of room for improvement. The build itself is straightforward. All the parts are standard, off the shelf items — stuff you can find in any store selling 3D printer parts. A few simple tools is all that’s required to put it together. The only tricky part of the build would likely be the conveyor belt itself. [Absolutelyautomation] offers a few suggestions, mentioning old car or truck tyres and elastic resistance bands used for therapy / exercise as options.

If you plan to replicate this, a few changes would be recommended. The 8 mm rollers could do with larger “drums” over them — about an inch or two in diameter. That helps prevent belt slippage and improves tension adjustment. It ought to be easy to 3D print the add-on drums. The belt might also need support plates between the rollers to prevent sag. The speed display needs to be in linear units — feet per minute or meters per minute, rather than motor rpm. And while the electronics includes a RS-485 interface, it would help to add RS-232, RS-422 and Ethernet in the mix.

While this is a simple build, it can form the basis for a series of add-ons and extensions to help students learn more about automation and control systems. Or maybe you want a conveyor belt in your basement, for some reason.

Continue reading “Modular portable conveyor belt”

Mod Your Camera With ModBus

Industrial hardware needs to be reliable, tough, and interoperable. For this reason, there are a series of standards used for command & control connections between equipment. One of the more widespread standards is ModBus, an open protocol using a master-slave architecture, usually delivered over RS-485 serial. It’s readily found being used with PLCs, HMIs, VFDs, and all manner of other industrial equipment that comes with a TLA (three letter acronym).

[Absolutelyautomation] decided to leverage ModBus to control garden variety digital cameras, of the type found cluttering up drawers now that smartphones have come so far. This involves getting old-school, by simply soldering wires to the buttons of the camera, and using an Arduino Nano to control the camera while talking to the ModBus network.

This system could prove handy for integrating a camera into an industrial production process to monitor for faults or defective parts. The article demonstrates simple control of the camera with off-the-shelf commercial PLC hardware. Generally, industrial cameras are very expensive, so this hack may be useful where there isn’t the budget for a proper solution. Will it stand up to industrial conditions for 10 years without missing a beat? No, but it could definitely save the day in the short term for a throwaway price. One shortfall is that the camera as installed will only save pictures to its local memory card. There’s a lot to be said for serving the images right to the engineer’s desk over a network.

We’ve seen [Absolutelyautomation]’s work before – check out this implementation of Pong on an industrial controller.

PLC and Linear Actuators Automate Double-Hung Windows

Very few residential architectural elements lend themselves to automation, with doors and windows being particularly thorny problems. You can buy powered doors and windows, true, but you’ll pay a pretty penny and have to go through an expensive remodeling project to install them. Solving this problem is why this double-hung window automation project caught our eye.

Another reason we took an interest in this project is that [deeewhite] chose to use a PLC to control his windows. We don’t see much love for industrial automation controllers around here, what with the space awash in cheap and easy to use microcontrollers. They have their place, though, and a project like this is a good application for a PLC. But the controller doesn’t matter at all if you can’t move the window, for which task [deeewhite] chose 12V linear actuators. The fact that the actuators are mounted in the center of the window is probably necessary given the tendency of sashes to rack in their frames and jam; unfortunately, this makes for a somewhat unsightly presentation. [deeewhite] also provides the ladder logic for his PLC and discusses how he interfaces his system with Alexa, a WeMo and IFTT.

We’d love to see this project carried forward a bit with actuators hidden under the window trim, or a rack and pinion system built into the window tracks themselves. This is a pretty good start and should inspire work on other styles of windows. While you’re at it, don’t forget to automate the window blinds.

[via r/DIY]

OpenPLC is Ready for Hacking

It’s been nearly four years since we covered [Thiago]’s OpenPLC project. He never stopped working on it, and now it’s in a highly polished state.

If you read our initial coverage of this project, it would be easy to assume that he just wanted to control some halloween decorations. He is actually a PhD student at the University of Alabama in Huntsville. His research topic is SCADA (aka Industrial Control Systems) cyber security. His goal was to find vulnerabilities in PLCs and, hopefully, fix them. However, no PLC manufacturer releases their source code, and he was having trouble getting a deep understanding of something so closed.

So, since no one was going to open their code and hardware for him he simply made his own. OpenPLC can be programmed in all 5 IEC 61131-3 languages: ST, IL, LADDER, FBD and SFC. On top of that, it lowers the barrier of entry to developing this kind of industrial hardware by being compatible with all the favorites Arduino, Raspberry Pi, Windows, Linux, etc.

“The OpenPLC is the first fully functional standardized open source PLC. We believe that opening the black-box of a PLC will create opportunities for people to study its concepts, create new technologies and share resources.”

Pong on Industrial Controllers

Programmable Logic Controllers (PLCs) are a staple of control automation. Sometime in the 60s or 70s, they replaced a box full of relays to implement the kind of “if-this-then-that” logic that turns thermostats on or directs machinery. Sometime in the 90s or 2000s, some more computing power was added, giving us the Programmable Automation Controller (PAC). And if reading Hackaday has taught us anything, it’s that if you give people a little bit of computing power, they’ll implement Pong (or Snake or Doom!).

We were sent a link where [AbsolutelyAutomation] does just that: implements a remotely-playable Pong on a bit of industrial control. Even if you don’t have a PAC sitting around, the details are interesting.

The first step is to get graphics out of the thing. The PAC in question is already able to speak Ethernet, so it’s “just” a matter of sending the right packets. Perhaps the simplest way to go is to implement the remote framebuffer (RFB) protocol from VNC, and then use a VNC client on the PC to send the graphics. (As they point out [CNLohr] has done this quite nicely on the ESP8266 (YouTube) as well.) So an RFB library was written. [AbsolutelyAutomation] points out that this could be used to make boring things like user-friendly configuration and monitoring screens. (Yawn!)

Graphics done, it’s easy to add a Pong layer over the top, using the flowchart-based programming interface that makes homage to the PLC/PAC’s usual function as an industrial controller. (Oddly enough, it seems to compile to a Forth dialect to run on the PAC.) And then you’re playing. There’s code and a (PDF) writeup available if you want more info. If you don’t have a PAC to run it on, the manufacturers have a simulator for you.

We’ve never worked with a PLC/PAC, but we know the hacker spirit when we see it. And making something that’s usually located in the boiler room play video games is aces in our book. This sparks a memory of an industrial control hacking room at DEF CON a few years back. Maybe this is the inspiration needed to spend some time in that venue this year.

We know we’ve got controls engineers out there. What’s the strangest thing you’ve programmed into a PLC?