• Finally some Hardware

    Benny Cheung10/03/2025 at 15:16 0 comments

    This is a quick update, as I'm a bit busy preparing for my CISSP exam. However, it's an exciting one. We've got a case prototype done. Although it's just version one (and I've already started changing some of the mounting positions), it's still a big step for the project. Some of the PCBs are already getting finalised, and the modifications to the casing should follow soon. I've already updated the photo on the project page so you can refer to it. Also, I'm changing some board dimensions to suit the modularity of the project better. I'm still not sure about the connector selection, to be honest, so I'm looking forward to more input on that. I'll definitely update more on that after my exam.

  • Casing Selection

    Benny Cheung09/23/2025 at 03:15 0 comments

    As a project focused on integrating the flexibility of electronics prototyping platforms with real-world deployment, the selection of a casing is crucial, as it determines the overall form factor of the entire system.

    Some prototyping platforms do provide enclosures, such as the RAK Wireless WisBlock platform. Although these enclosure systems offer various mounting methods, they are not always user-friendly. For example, a temperature sensor may not be able to measure ambient temperature accurately, and buttons cannot be accessed by the user without opening the enclosure. For other electronics prototyping platforms, casings are less of a priority, such as the MIKROE Click board system or Digilent Pmod. These systems support boards of varying sizes, making it very difficult to design a universal casing that can accommodate all potential modules. There have also been some attempts to address both the development platform and casing needs. I came across TinkerForge, which is a solid system, but I believe I can improve upon it by offering a better case design at a lower cost.

    DIN rails have always appealed to me greatly. They seem highly versatile for a wide range of electrical applications. I think most of us are familiar with the circuit breaker form factor. In my view, it's an excellent starting point, as it satisfies the following requirements: user interaction, a pre-existing form factor, and expandability. Let me explain further below.

    Phoneix Contact DIN Rail Housing

    User interaction is key. From LED indicators to buttons, users often require various physical interactions to check the device's status and control it (without relying on the internet, which I consider especially important). The front cover allows users to interact with the device and retrieve useful information.

    This form factor also enables the use of circuit breaker enclosures, which saves a lot of time in sourcing the right casing. Most users are familiar with it, and it's commonly available at an affordable price. The wide array of auxiliary components and modules provides great flexibility for different applications. Users can also plug in multiple modules to scale up their systems as needed.

    Typical Enclosure for Din Rail

    Wrapping things up, going with DIN rail casings—like the ones from Phoenix Contact—feels like the sweet spot for this Modular Micro PLC. It mixes modularity, easy access for users, and solid real-world setup without all the hassle of custom boxes. This way, we get something expandable, familiar, and tough enough for the field. Can't wait to whip up some prototypes and show off the early designs—keep an eye out for how it all ties in with the connectors and modules we've chatted about. What do you reckon? Got any ideas for tweaks or other form factors? Hit me with your thoughts!

  • Connectors

    Benny Cheung09/16/2025 at 14:41 10 comments

    The next question to consider is selecting a connector system for the project. For that, we have a lot of materials to start with. Let me list a few here.

    There are tons of options available on the market. Just like creating a new standard, there are always pros and cons to selecting which system.

    At the end of the day, the connector isn't just a plug—it's a promise of connectivity. Our main feature here is delivering a unified interface that handles I2C, SPI, UART, and GPIO without breaking a sweat. Why these? They're the Swiss Army knife of maker and industrial comms:

    • I2C: For daisy-chaining low-speed sensors and peripherals. It's everywhere in Qwiic/STEMMA worlds, and we'll make it the default for quick expansions—think temp/humidity modules stacking like pancakes.
    • SPI: High-speed data for displays, SD cards, or precision ADCs. Pmod-style headers nail this, and it's crucial for our IO modules handling real-time analog signals.
    • UART: Serial bliss for debugging, GPS, or modem links. Shields and HATs often expose this cleanly, and we'll ensure it's there for custom MCU handshakes.
    • GPIO: The wildcard—digital pins for buttons, relays, or whatever wild idea you throw at it. This is where Arduino/RPi influences shine, giving users raw control without abstractions.
    • Power: Most importantly, VCC and 5V for powering the board, which is equally crucial.

    My current approach is to mix and match different systems: using Pmod (1.27mm pitch) for GPIO, Qwiic for I2C, and a 6x2 1.27mm pitch IDC connector for all SPI, I2C, and UART. Power will be using JST XH connector for a max of 3A power delivery. I guess this mostly covers all the use cases as illustrated in Pmod (but I don't understand why so many boards use SPI—maybe because of speed?). Coming up next, probably some real designs for your review. Stay tuned.

  • Designing the System Architecture for a Modular Micro PLC

    Benny Cheung09/07/2025 at 03:09 0 comments

    For a modular system, the architecture is critically important, as it determines the platform's functionality and modularity. From the earliest conceptualisation of the project, I envisioned a system similar to the Adafruit Feather and SparkFun Qwiic ecosystems, which offer excellent modularity for prototyping. However, different systems come with their own pros and cons. The deeper I delve into various connector options, the more I realise it's challenging to find a generic connector that suits all purposes. That said, the discussion of connectors will be saved for another time.

    While conducting research, I came across a Reddit post that caught my attention. One comment stated that Arduino PLCs combine the worst aspects of both the Arduino and PLC worlds, and I somewhat agree. Here's the link:

    https://www.reddit.com/r/PLC/comments/145ukb4/arduino_opta_good_or_garbage/

    Therefore, some of the most important features I want to incorporate are as follows:

    - Modularity down to the HMI, IO, and MCU levels
    - Expandability with multiple modules
    - Form factor compatible with DIN rail casing for easy deployment, with potential for other mounting methods

    In fact, it may resemble an Arduino Opta, but that's not the main focus. The emphasis is on hosting various modules with multiple functions within a unified casing. With that in mind, the following designs have been developed.

  • The Messy World of Prototyping and Why Modular PLC

    Benny Cheung08/31/2025 at 09:43 0 comments

    The Prototyping Nightmare: From Chaos to Reliability

    I've tackled various projects in the past, many of them large-scale and heavily involving electronics. In my experience, the toughest challenges aren't always the technical aspects, like writing software or connecting wires. Instead, it's figuring out how to make the setup reasonably secure, reliable, and quick to deploy in the field. Too often, you end up with wires everywhere—jumper cables snaking across breadboards, sensors dangling precariously, and everything held together with nothing more than hope and electrical tape. It's fine for rapid testing on the bench, but as soon as you need something durable for real-world use, it all unravels (quite literally). This has been my reality far too many times.

    Prototyping should spark excitement, not feel like a constant fight against disorder. That's what inspired me to envision a system that's truly modular, effortless to expand, and free from the tangled mess of connections that plagues so many builds.

    Picture of the early days of the project at university. Look at all those cables in the bottom right corner. It works, but not reliable.

    The PLC Predicament: Costly Overkill and Wiring Woes

    Traditional Programmable Logic Controllers (PLCs) set the benchmark for industrial automation, but they're far from ideal for makers and prototypers. First off, they're notoriously expensive—I've recommended them to friends working on similar prototypes, only for them to balk at the price and stick with makeshift Arduino setups instead. Even for me, without severe budget constraints, it's tough to justify shelling out that much for a field-deployed prototype, especially when I rarely use half the features I'm paying for.

    The wiring situation doesn't help either; it's rarely neat or straightforward. You often deal with a web of parallel cables just to distribute power to sensors and controllers, turning the whole thing into a confusing nightmare. I've always wished PLCs could incorporate simple conveniences like internal pull-up resistors, similar to what you get on an Arduino—it would make life so much easier.

    The Spark: Discovering Arduino Opta and Its Limitations

    The release of the Arduino Opta PLC was exciting news for me—it's a solid step toward making industrial-grade control accessible to makers. I'm still using it in some industrial setups, but it falls short in flexibility compared to modular electronics from places like Adafruit. For instance, we once brainstormed an annunciator system that plays an MP3 voice recording when someone walks by—something the Opta isn't really designed for, and it shows in its constraints. Even before the Opta came along, options were limited, and now with it, the base configuration feels restrictive. If you're handling a larger number of I/O points, expansion modules become essential, which quickly drives up the costs.

    Market Exploration: Alternatives That Almost Hit the Mark

    This got me curious about the broader landscape, so I dove into market research to see what else was available and why none fully satisfied my needs.

    Here's a quick overview of my findings:

    • Controllino: I've used it in the past, but its reliance on I2C and IDC connectors isn't the most elegant solution—it can complicate wiring and integration.
    • Industruino: I haven't tried it hands-on, but from what I've seen, it comes across as pricey for what it offers, especially for prototyping.
    • Iono: It's a neat option overall, but the form factor doesn't fit well in standard electrical cabinets, and you'd often need an extra HMI for proper usability.
    • Revolution Pi: From Kunbus, this is a modular Raspberry Pi-based PLC with expandable I/O modules. It's capable, but the higher price point makes it better suited for full-scale industrial applications rather than casual hacks.
    • NORVI: More affordable than the Arduino Opta, but it feels a bit janky in build quality. The expansion options are quirky, and it has an old-school vibe...
    Read more »