I just took apart a low end PLC.
It is based on an ARM, and there is no optoisolation (nowhere). Digital inputs are juste buffered with 14050BG ICs, and analog inputs use 10358 ADCs. Output relays are driven with a ULN2003A, as you suggested. All inputs are refered to 24V ground. The 5V is generated by a 7805 in series with a 2 watts resistor (on my side I use a step down converter).
I also retrieved pics from a chinese crappy VFD I took apart a few years ago : all digital inputs isolated, and it *seems* to me that analog input is a R2R ladder, and is also optoisolated. Pics are not great, so I can't say. And I can no more take it apart, it is in service.
I can use belt and suspenders at no cost (all the components are in the drawers...). It is easy to make a mistake while building electrical cabinets, or while connectting them to the motors and buttons. Until now, I never fried anything, but I generally use bullet proof high end industrial devices, not DIY ones !
I am not confident with just a transistor or buffer between a µC and a 24V coil relay. I prefer not be mixing 24V and 5V on the positive side. And OpenPLC designers seem not to be confident themselves, as they isolated output relays. I could use 5VDC relays, but I have a large stock of 24VDC and only a few 5VDC.
Inputs I made are slighly different from OpenPLC: the LED is in series with the opto LED, and I use no Schmitt inverting buffer but software debouncing. The best library I found is DebounceInput, and it works perfectly for my use. Yes indeed, inputs will not be grounded/earthed at PLC level, but externally. (they are on the breadboard, but it is only for coding and testing).
There will be no link with USB, except for software updates and obviously with no motor running. USB cannot be used on a ProMini, as RX/TX are shared with the MAX485. Jumper is needed to allow communication OR software update.
All inputs and outputs will be fused, but not on the PCB (the empty DIN module is only 150mm wide). I will use 6mm DIN rail fuse holders I already have.
I don't buy anything if I can do the same with my component stock. I buyed 10th of kg of components, electrical and eletronics, in the good old times , when eBay sellers did not offer "buy it now" as only option. I made amazing bargains. Since then, I use these components. And therefore, I probably will not be playing with SMD and double layer PCBs until many years !
I will post some more schematics later.