I would have preferred that, but like I mentioned in my post, I will have parallel switching requirements. The load is actually a relay switch rated at 24vdc (150mW), so I would ofcourse need a logic level shift. Plus the MCU (STM32 or thinking about adding a shift-register in order to keep count of GPIO pins in check) might not be able to deliver more than 70-80 mA, while I can have 9-10 relay switches (as load) that would be an over kill for the MCU - taking into consideration that the MCU will have some sensors adding to its workload.Can the MCU pin drive the load directly?
Okay, then it depend upon how much current you can supply to the input and the minimum transfer ratio of the opto, as to whether you need the added transistor.I think it'll be somewhere around 7-10 ma.