A Cheap DIY PLC Based On The Atmega328P

If you’re running a big factory, you’ve probably got a massively expensive contract with a major programmable logic controller (PLC) manufacturer. One shudders to think about the cost of the service subscription on that one. If you’re working on a smaller scale, though, you might consider a DIY PLC like this one from [Mr Innovative.]

PLCs are rarely cutting-edge; instead, they’re about reliability and compliance with common industry standards. To that end, this design features the ATmega328P. Few other microcontrollers are as well understood or trusted as that one. The device is compatible with RS232 and RS485 and will run off 24 VDC, both of which you would find in a typical industrial environment. It offers 24 V digital inputs and outputs, as well as analog inputs and outputs from 0 to 10 V. [Mr Innovative] demonstrates it by hooking up a DWIN human-machine interface (HMI) for, well… human interaction, and a variable frequency drive to run a motor.

If you want to run a basic industrial-lite system but can’t afford the real industrial price tag, you might enjoy tinkering around at this level first. It could be a great way to get a simple project up and running without breaking the bank. Video after the break.

Continue reading “A Cheap DIY PLC Based On The Atmega328P”

Arduino PLC Keeps The Beat

For most of our prototype, hobby, or one-off electronics projects it’s perfectly fine to use a development platform like an Arduino Uno or something to that effect. They’re both easy to program and easy to wire up to projects without breaking the bank. But if you step into an industrial setting where reliability is paramount even in places that are noisy, vibrating all the time, hot, or otherwise unpleasant for electronics, you’ll want to reach for a programmable logic controller (PLC) that are much more robust. There is actually a PLC from Arduino, and if you want to dip your toes into the PLC world then take a look at this drum kit based on the Arduino Opta.

With the PLC at the core of the build, it’s on to making the drumming mechanisms themselves. For that, project creator [JC Audio] is using a series of solenoids attached to camera mounts with a custom 3D printed part that allows for quick assembly and disassembly so he can get the positioning of each drum sound just right. The high hat is taken care of by the noise of an internal solenoid, with the other drums striking various real drums and other solid objects in his shops. The solenoids themselves are driven by a solid-state relay expansion module to ensure there’s enough power

While the build doesn’t sit inside a factory and run for years at a time, a musician’s stage is certainly a rough enough environment that we might reach for a PLC over a standard development board for its benefits. The code for this project is available as well at the project’s GitHub page for those looking for a more advanced timekeeper to play along with their music practice, and for more details on why you might choose a PLC for your project take a look at this Arduino vs PLC showdown from a few years ago.

Continue reading “Arduino PLC Keeps The Beat”

A DIY DIN rail mounted rack of PLC components for home automation

2024 Home Sweet Home Automation: A DIY SCADA Smart Home

A SCADA-style display of icons and control buttons
Touch-screen control and monitoring

Supervisory control and data acquisition, or SCADA, systems sit in the background in industrial settings, performing all kinds of important jobs but in an ad-hoc setup, depending on the precise requirements of the installation. When we think about home automation systems, they’re pretty much the same deal: ad-hoc systems put together from off-the-shelf components and a few custom bits thrown in. [Stefan Schnitzer] clearly has significant knowledge of SCADA in an industrial setting and has carried this over into their home for their entry into the Hackaday 2024 Home Sweet Home Automation Contest. Continue reading “2024 Home Sweet Home Automation: A DIY SCADA Smart Home”

A 1960s PLC Gives Up Its Secrets

When it comes to process automation, the go-to part in most industrial settings is a Programmable Logic Controller, or PLC. These specialized computers will have a modern microcontroller running the show, but surprisingly the way they are programmed still has echoes of a time before electronic PLCs when such control would have been electromechanical.

[Thomas Scherrer] has an interesting design to tear down, it’s a Siemens electromechanical motor controller from the early 1960s. It’s not quite the huge banks of relays which would have made a fully-blown PLC back in those times, but it’s a half-way house with some simple programming capability in the form of several channels of adjustable time delay.

We’re partly sad to see this unit being subjected to a destructive teardown, but nevertheless it’s interesting to see all those very period components. The current sensor has a mechanism similar to a moving coil meter, and the four-channel timer is a mechanical sequencer with four adjustable cam-driven switches. We’re not sure we would be cracking open selenium rectifiers with such nonchalance though.

These units were built to a very high quality indeed, and though it’s obvious this one comes from a decommissioned installation it’s not beyond possibility to think there might be some of them still doing their job over six decades after manufacture. Have any of you seen one of these or something like it in operation recently? Let us know in the comments. Meanwhile the video is below the break.

Continue reading “A 1960s PLC Gives Up Its Secrets”

Humble Arduino As PLC

On the surface, a programmable logic controller (PLC) might seem like nothing more than a generic microcontroller, perhaps outfitted to operate in industrial settings with things like high temperatures or harsh vibrations. While this is true to some extent, PLCs also have an international standard for their architecture and programming languages. This standard is maintained by the International Electrotechnical Commission, making it so that any device built under these specifications will be recognizable to control engineers and maintenance personnel worldwide. And, if you use this standard when working with certain Arduinos, this common platform can become a standard-compliant PLC as well.

The IDE itself supports programming ladder diagrams, functional block diagrams, and other programming systems covered under the IEC 61131-3 standard. Not only that, it allows the combination of these types of PLC programming with Arduino sketches. The system offers many of the perks of PLC programming alongside the familiar Arduino platform, and supports a number of protocols as well including CANOpen, Modbus RTU, and Modbus TCP. It can also be used for monitoring a PLC system, essentially adding IoT capabilities to existing systems, enabling continuous monitoring, debugging, and program updates.

While not every Arduino is a great platform to build a PLC around, there are a few available for those looking for a system a little less proprietary and a little more user-friendly than typical PLC systems tend to be. There’s a reason that PLCs are built around an international standard and generally have certain hardware in mind to run it, though, and this comparison of a Raspberry Pi with an off-the-shelf PLC goes into detail about why certain components aren’t good choices for PLCs.

Automate Away The Drudgery Of CNC Manufacturing

One of the keys to making money with manufacturing is to find something that you can make a lot of. Most small manufacturers have one or two “bread and butter” items that can be cranked out in quantity, which of course has a quality all its own. The problem with that approach, though, is that it runs the risk of being boring. And what better way to avoid that than by automating your high-volume job, with something like this automated  CNC work cell?

Looks like money.

[Maher Lagha] doesn’t offer too much in the way of build details, but the video below pretty much tells the tale. The high-volume items in this case are customized wooden coasters, the kind a restaurant would buy for their bar or a business would give away as swag. The small 3-axis CNC router at the center of the work cell is the perfect choice for making these — one at a time. With no desire to be tied to the machine all day to load raw stock and unload completed coasters, [Maher] came up with automated towers that hold stacks of pallets. Each pallet, which acts as a fixture for the workpiece through multiple operations, moves from the input stack into the router’s work envelope and to the output stack using a combination of servos and pneumatics. The entire work cell is about a meter on a side and contains everything needed for all the operations, including air for the pneumatics and dust extraction.

Each coaster requires two tools to complete — one for surfacing and one for lettering — and [Maher] has two ways to tackle that. The first is to allow a stack of coasters to go through the first operation, change tools, and switch the roughed-in stock back to the input stack for the second round of machining. The other is just to build another work cell dedicated to lettering, which seems to be in progress. In fact, it looks as if there’s a third work cell in the works in [Maher]’s shop. The coaster business must be pretty good.

Continue reading “Automate Away The Drudgery Of CNC Manufacturing”

An Affordable And Programmable PLC

We’re all used to general purpose microcontroller boards such as the Arduino or its many imitators, but perhaps we don’t see as much of their industrial cousins. A programmable logic controller (PLC) is a computer designed to automate industrial machinery, and comes with protected interfaces and usually a specific PLC programming environment. Thus [Galopago]’s work with an inexpensive Chinese PLC clone is especially interesting, providing a route forward to using it within the Arduino IDE ecosystem.

Opening it up, the processor is identified as an STM32F103, and the connection needed to place it in bootloader mode is identified. Then it can be programmed from the Arduino IDE, even though its bootloader can’t be changed. Then to complete the process it’s necessary to identify the various different inputs and outputs by old-fashioned hardware reverse engineering.

This PLC may not be quite as robust as some products costing much more money, but it still represents a cost-effective way to access a microcontroller board with much of the interface circuitry already installed that would normally be required for controlling machinery. We expect that we’ll be seeing it appear on these pages over the coming months, and perhaps there might even be another comparison in the air.