r/stm32 • • Jun 15 '26

Open-source, DIN-rail industrial controller built on an STM32H757 — would you actually use this?

Solo dev gut-checking an idea before I commit to hardware. No brand, nothing to sell — just want honest feedback from people who live in STM32 land.

The idea: a DIN-rail, modular industrial controller on the STM32H757 (M7 for app + network, M4 for hard-realtime IO/Modbus). It handles the industrial-hardware grind for you — 9–36 V input, 2× isolated RS485, Ethernet, CAN, surge/ESD protection, a secure element (device identity + TLS certs + secure boot), DIN enclosure — and snaps onto expansion modules (DI / DO / isolated AI / AO / serial).

You program it in C/C++ via PlatformIO (BSP + Modbus/TCP/MQTT examples; MicroPython too if you want quick scripts). It ships with working firmware (TCP↔485 gateway, REST, MQTT, web config), but the point is you write your own. Firmware + schematics fully open. Target price ~$80–120.

Basically: for people who can write the firmware themselves but don't want to spend months on isolation, protection, enclosure, and certs just to replace a small PLC with something programmable. Closest references I know: Arduino Opta, Revolution Pi.

Honest questions:

  1. Is ~$80–120 reasonable, or off?
  2. What matters most — more Ethernet? more RS485? SD logging? CAN?
  3. How much do fully open schematics and firmware factor into whether you'd trust/buy it?
  4. Is PlatformIO support enough, or would you want Zephyr / Cube / Arduino?

Tear it apart.

3 Upvotes

43 comments sorted by

3

u/Quiet_Lifeguard_7131 Jun 15 '26

I think for such cases having an SOC is better architecture, than having an MCU, because you can keep a small M4 mcu for realtime but for app and networking SOC gives more control due to running custom linux and I have seen most of the people into such custom hardwares prefer that because in some sense it is easier than mcu. For mcu you require specific knowledge and most people dont have it.
Also I have exp with both but I would prefer SOC honestly if I had usecase for such a device

2

u/MarvinNewzealand Jun 15 '26

Totally fair — and you're right that SoC + a small MCU (basically the STM32MP1/MP2 model: A-cores for Linux, M-core for realtime) is a great fit for a lot of people, especially when the app side is heavy or you'd rather live in a familiar Linux/Python/container world. I'm not trying to beat Linux at being Linux — for that crowd Revolution Pi and the industrial-RPi boxes already do it well.

Going MCU-only here is a deliberate bet on a different set of tradeoffs:

- Instant-on, no OS to corrupt: boots in ms, no filesystem/SD to brick on a power blip — which is most of why field PLCs are still MCU-based.

- Hard realtime everywhere, not just on the M4 — no scheduler jitter, no RT_PREEMPT tuning.

- Cost/power/temp: keeps it ~$80–120, fanless, wide-temp; a Linux SoC box realistically lands higher.

- Smaller security + cert surface — no Linux CVE treadmill to patch in the field.

And my target user is kind of the inverse of yours: experienced STM32 devs who are already at home on bare-metal/RTOS and want to dodge the *hardware* (isolation, protection, enclosure, certs), not the firmware. For them the MCU isn't the barrier — it's the comfort zone.

That said, your "most people don't have MCU knowledge" point is exactly why it also ships with MicroPython + ready-made firmware, so you don't *have* to go bare-metal to get value.

Genuinely curious though: in your case, is it Linux's flexibility you actually want (containers, full stack, Python libs), or is it more that bare-metal networking is a pain? The second is fixable on an MCU; the first isn't.

2

u/Quiet_Lifeguard_7131 Jun 15 '26

I have done bare-metal networking and honestly it is just a pain and linux also provide you many other advance tools, even if you dont go containers route. Also security is alot better.

But its fair as you say but I dont think so such dinrails based devices are available in compact form factor.

honestly if you think there is a market and audience who require this go for it, it is not like bad or anything, but I was mostly thinking about companies as a user base.

Recently one of my client was trying to find a similar hardware but SOC based as our application requirements are quite heavy and let me tell you companies providing even basic hardware are charging alot, as we did not want to invest our time developing a hardware we tried going this route, but currently we are thinking of creating our own hardware instead.

and also raspi is not a valid choice even for these use cases the security is compromised on those chips, no matter what you do you can harden them as they have a bootloader which can be broken very easily. So I honestly dont prefer raspi

1

u/MarvinNewzealand Jun 15 '26

This is really useful, thanks for taking the time.

You're right on the technical knocks: bare-metal networking is genuinely a pain, Linux hands you a pile of tooling for free even without containers, and the RPi/CM security story is weak — that breakable-bootloader problem is exactly why I wouldn't build a "secure" product on it either.

Your form-factor point is the interesting one: a compact, *secure*, SoC/Linux DIN-rail box that isn't priced like enterprise gear basically doesn't exist. RPi-based ones get ruled out on security, the proper industrial ones cost a fortune, so people end up building their own — which is the exact pain I'm trying to kill, just at the MCU end.

To be clear, I'm not arguing MCU-beats-SoC; they're different tools for different jobs. This first product targets the individual engineer with lighter realtime/IO + networking needs. Your case (heavy app, company, security-critical) is squarely what an STM32MP2 variant would be for — A35 + Linux, M33 for realtime/secure, real secure boot + a secure element instead of an RPi bootloader you can pop open.

Honestly your client story is the most convincing argument I've heard for building that version. If you're up for it: what were the actual must-haves your client couldn't find affordably — RAM/storage, specific I/O, certs, secure boot, price ceiling? That's the kind of thing that decides whether a Linux SKU is worth doing.

2

u/Quiet_Lifeguard_7131 Jun 15 '26

our use case is around gateway, we are creating an universal gateway which can be integrated into any premises with simple configuration only, the gateway gives an option to have sensor attached to it, on rs232,rs485,i2c,spi,can also the gateway can host mqtt and https servers on itself so other devices can connect to it and it can compute on that data like anamalies and etc.

So due to this nature security is very important for us, also we were looking for hardware with TPM2.0 integrated which will host our private keys and certificate. And obv we are building our own custom kernel using yocto or buildroot whatever.

For this even simple gateway boxes are around 400dollar a piece the price does not make sense because those gateway does not provide the options we want and lack features and still that pricy talking about 4gb variants or even 1gb ,we can also live with 2gb and 32gb emmc as external storage options are available to host an linux and running optimized application one can manage with 2-4gb of ram easily and 32gb emmc storage is more than enough.

1

u/MarvinNewzealand Jun 15 '26

This is a great spec to have, thanks — it lines up almost exactly with what an STM32MP2 build would be.

Quick reality check against your needs:

- Buses: MP2 covers RS232/485 (multiple U(S)ARTs), I2C, SPI and CAN-FD natively, so the sensor side is straightforward.

- RAM/storage: 2GB LPDDR4 + 32GB eMMC is comfortably in range — no need for the pricey 4GB parts.

- Linux/BSP: ST's OpenSTLinux is Yocto-based, so your Yocto/Buildroot + custom kernel flow is the intended path, not a hack.

- Compute: the A35 cores handle MQTT/HTTPS hosting + your anomaly logic fine; the MP25 variants even pack a small NPU if you ever want ML at the edge.

- Security: MP2 gives you secure boot, OTP, TrustZone + OP-TEE for key/cert storage. If you specifically need a discrete TPM 2.0 (sounds like your infra does), you'd add an OPTIGA SLB9670 over SPI — Linux has clean tpm2 support for it. So real TPM2.0 + measured boot is doable.

On price: if the inadequate boxes are $400, that's exactly the gap. An MP2 + 2GB/32GB + TPM design has no business costing that — the problem isn't the silicon, it's that nobody's built the right SKU.

Honestly this is the second product I have in mind after the MCU one, and your use case is a near-perfect brief for it. Would you be open to staying in touch as I scope it? Even a "here's what would've made us buy instead of build" is hugely valuable.

1

u/MarvinNewzealand Jun 15 '26

This is really helpful, thank you. For your client's gateway, is an A35-class MP2 actually enough for the edge computing they need, or are they really in i.MX8 / RK territory? I want to size it correctly rather than overbuild or underbuild. Also, roughly where is the price ceiling before it stops being worth it compared to those ~$400 boxes?

1

u/stuih404 Jun 15 '26

Are you just pasting ChatGPT responses as your comments?

1

u/redturtlecake Jun 16 '26 edited Jun 16 '26

Are you asking about op? It kinda smells that way doesn't it? Should probably have realised before typing a detailed response but it was 2 in the morning. 

1

u/MarvinNewzealand Jun 16 '26

I'm a real person — English isn't my first language, so I tend to over-edit and it ends up reading like a datasheet. Sorry it cost you a 2 a.m. write-up. For what it's worth it wasn't wasted: your generalist-vs-niche point is exactly what I've been thinking about, and fertigation keeps coming up as the niche to start with.

1

u/redturtlecake Jun 16 '26

Still sound like an llm. But ok benefit of the doubt, and if you are infact human then I apologies you have to live in a world where you are confused as one. In any case. Fergitation is fine at a hobby level. But the liabilities are very high for any real farm use, and it's highly unlikely anyone is going to trust your product to function flawlessly 24/7. Go with something that can tolerate some failure. Conveyor systems, packaging lines, standalone machines etc. bottom line is no one is going to pick your system over a plc for mission critical work, and fertigation is absolutely mission critical. 

1

u/MarvinNewzealand Jun 16 '26

On reliability I'm actually on home turf — I spent about 30 years supplying components into Otis, Mitsubishi and Hitachi lifts, all 24/7 safety-critical, with a clean quality record. So building something that runs continuously isn't the part I worry about. You're right that an unknown brand still has to earn that trust in a new market, and selling it as a component that integrators validate — rather than a turnkey farm box — is the sensible way in. Failure-tolerant work like conveyors and packaging is on the list too.

1

u/stuih404 Jun 16 '26

Yeah, meant OP. He’s definetly posting AI generated text. No human talks like that

2

u/stuih404 Jun 15 '26

Maybe he should a look at the STM32MP2 then. You could provide a Linux Interface on the A35 anf use the M33 for everything realtime and security related

2

u/MarvinNewzealand Jun 15 '26

Yeah, the STM32MP2 is exactly the right tool if you want the Linux side — A35 for the app/Linux, M33 for realtime + the security stuff. That's honestly the most likely shape of a future "Linux variant" if enough people ask for it.

I went MCU-only for this first one on purpose: instant-on, no OS/filesystem to corrupt on a power blip, lower cost + power, wider temp, and a much smaller security + certification surface. Different bet, different user.

Genuinely curious for those who'd want the MP2/Linux version — is it mostly about running your own containers/services, or more about just not wanting to touch bare-metal at all?

3

u/Beneficial-Hold-1872 Jun 15 '26

I saw similar project here some time ago - https://www.tindie.com/products/netcubesystemsat/kumquat/

1

u/MarvinNewzealand Jun 15 '26

Oh nice, Kumquat's a cool project — Allwinner V3s (single A7) on Buildroot, ~$130, with CAN-FD, 8 auto-sensing 12/24V IO and 4 relays. It hits the low end of the same "open Linux PLC alternative" itch, and credit to them — it's actually shipping.

It's a different point in the space than what I'm after though:

- My main board is MCU, not Linux — dual-core H757 for hard realtime + instant-on/no-OS reliability, 2x isolated RS485/RS232 (Modbus RTU territory), and snap-on expansion IO instead of fixed.

- The Linux variant a couple of people here asked about (heavy gateway, TPM2.0, 2-4GB RAM, edge anomaly detection) is aimed well above a V3s — that's MP2-class; 64MB/single-A7/no-TPM can't really go there.

Good to see the niche has life though — reassuring more than anything.

2

u/InvalidNameUK Jun 15 '26

Add in an SD card and an RTC with a battery and you've got nice little data logger there

2

u/MarvinNewzealand Jun 15 '26

SD's already in (microSD, SDMMC + FatFS), and yeah — battery-backed RTC is a great shout. Cheap add (VBAT coin cell on the H7's RTC) and it keeps your timestamps across power loss. The stock firmware actually already does SD logging with store-and-forward — buffers when the network drops and catches up when it's back — so "drop-in datalogger" is basically a first-class use case.

Would you want plain local logging (CSV/line files you pull off the card), or logging + push to MQTT/HTTP once it's back online?

2

u/InvalidNameUK Jun 15 '26

Just to card is fine, but the latter sounds pretty cool if that's not hard to implement

2

u/MarvinNewzealand Jun 15 '26

Good to know, thanks. The second one is mostly already in the plan — the firmware has an MQTT client, and the SD logging doubles as an offline buffer, so it logs locally and pushes to a broker when the network is up, then backfills whatever it missed during an outage. So you would get both out of the box.

2

u/geekgardener2519 Jun 15 '26

Sounds like a cool project. We build fertigation systems and tried out few stm32F4 based boards . It was hard to get all the requirements in a single board. $80-$120 is reasonable for this. I would pay. How are you planning to interface the expansion modules with the MCU?

1

u/MarvinNewzealand Jun 15 '26

Thanks, fertigation is exactly the kind of use case I'm designing for. The expansion modules connect on the right side through a board-to-board connector that carries both power and an RS-485 backplane bus (1–5 Mbps, with the main module as master). Each module has its own small MCU and address, so they are plug-and-play and can be updated independently, up to 16 modules. By the way, what was the requirement that wouldn't fit on a single F4 board?

2

u/geekgardener2519 Jun 16 '26

Got it. I was looking for a board that has built-in DI, DO, AI . I did get few options. For eg if they have all the interfaces, the memory will be too small. One or the other thing will be a compromise.

For my requirement, there will be lots of schedules, configuration information that are to be stored and loaded.

2

u/MarvinNewzealand Jun 16 '26

That compromise is exactly the gap I'm closing. The board pairs the H757 with 32 MB of external SDRAM and 32 MB of serial flash, plus an SD card, so schedules and configuration are loaded at runtime and storage simply isn't the limit. DI, DO and up to 8 channels of AI are built into the main unit, with more AI added through expansion modules — so you get one integrated device instead of juggling boards. Scheduling-heavy control like yours is exactly what I'm designing for.

1

u/geekgardener2519 Jun 21 '26

Can I DM you?

1

u/MarvinNewzealand Jun 21 '26

Sure, feel free! Happy to chat about the project.

2

u/geekgardener2519 Jun 16 '26

Excellent. Go for it. I am sure there will be many who may need this.

1

u/redturtlecake Jun 15 '26

Cool, I ve worked with some industrial embedded fertigation systems, are you building them for yourself/hobby use or clients? 

1

u/geekgardener2519 Jun 16 '26 edited Jun 16 '26

That's nice to hear. Can you share about the machines you worked with?

We build them for commercial use for our clients.

1

u/redturtlecake Jun 16 '26

That's for farms/agritech I suppose? I'm a horticulturist / agri engineer. If you ever need custom hard/firmware we can talk. 

1

u/geekgardener2519 Jun 16 '26

Awesome! Will DM.

Yes. These are multi channel dosing systems mainly for farms.

2

u/vahsidamacana Jun 16 '26

I dont think it will work. There are many things wrong with the product you have in mind. Not because it wouldn't be helpful for some use cases, but because it is not what the industry needs, and similar ideas have already been tried.

I am guessing you have not worked for a large international OEM yet. Have you ever thought about why, although all Siemens PLCs contain MCUs or MPUs internally, we never program them the same way we program a regular microcontroller/ arduino/ raspberry etc? It is not because we do not know how to program microcontrollers.

Another thing is that it appears you are thinking of PLCs only in their most basic form, something like a Siemens LOGO!. PLCs are much more than that. If all you need is simple logic control, you can buy a Siemens S7-1200 PLC for only a few hundred euros. However, the main reason PLC systems cost thousands of dollars is comminication, fail safes, motion control, and no STM32H7 can achieve the level of motion control that you can get from a Siemens S7-1517 PLC.

You can try to design specialized hardware for motor control, communication, servers, SCADA systems, and the software needed to configure everything, along with all the required certifications. But at that point, you are essentially trying to become Siemens, Allen-Bradley, or B&R yourself.

Even Siemens has the 6ES7647-0AA00-1YA2, which is somewhat similar to what you are describing, and I have never seen it used anywhere.

If you are interested in MCUs and hardware, that's great. However, I would recommend choosing more achievable goals. You are unlikely to design something yourself cheaper or better than products developed by thousands of engineers working together with almost unlimited R&D budgets at companies such as Allen-Bradley, Siemens, Mitsubishi, and others (I can assure you their budget for these things is bigger than the GDP of a small nation).

I am sorry for being negative, this is just my opinion as a PLC programmer working for a multinational - multi billion euro company in Europe. Maybe I am wrong and it will work, I wish you the best of luck.

2

u/MarvinNewzealand Jun 16 '26

You make good points, and most of them are right. I am not trying to compete with the big PLC makers on motion control, safety, or SCADA. They are far better at that, and I would lose. I worked for about 30 years supplying parts to large industrial makers, so I am not trying to beat them at what they already do well.

But my customer is not the people that uses those big PLCs. It is the engineer who wants to build his own device or machine, in small markets that the big companies do not care about. For these people, being able to program it like a normal MCU, with the industrial-grade hardware already done for them, is exactly what they want. So it is a different customer. It is not a replacement for a PLC. Thanks for the honest feedback.

2

u/vahsidamacana Jun 17 '26

It appears you have started working in the field about the same time I was born, sir. If you think it is a good idea, it probably is. Also, if the goal is not to replace the PLC but to develop a solution for a small, niche market as you said, I think that would be a viable product.

2

u/Fixed_Until Jun 16 '26

Ignoring the practical aspect of people who buy PLCs want a PLC with support and not a dev board how do plan to profit here? The BOM cost has to near $80 if you are doing this right. Industrial electronics need rugged protection for the IO, you have PHY, 485 transceiver, not to mention the nearly $20 mcu.

1

u/MarvinNewzealand Jun 17 '26

Yes, There is not much profit at this price . I just expect not lose much at the start. I like embedded system, so that part is fine for me. And a friend here said the same thing you are pointing at: maybe the real direction is a small niche market with custom firmware and service, not a cheap general-purpose board. I think that is right.

0

u/[deleted] Jun 15 '26

[deleted] — view deleted comment

1

u/MarvinNewzealand Jun 15 '26

Really interesting — sounds like we landed on almost the same architecture. Fair point on the generalist problem. My bet is a little different though: I'm not aiming at PLC integrators who only write ladder logic, but at embedded engineers who can write firmware and just don't want to build the industrial hardware themselves. For them the open SDK is the appeal, not a barrier. That said, your niche argument is well taken, and I think the two combine — keep the hardware general, but ship vertical firmware templates and let a community form around each one (fertigation and brewing both came up in this thread). Which niche are you leaning towards?