Wiring for Opto multi-channel for common GND & 12v

I'm redesigning a circuit that I built previously with an Arduino Mega into an ESP32. That circuit has had a lot of mods over the years and I'm trying to shrink & combine. So, I need 3.3v drive from the ESP32.

I have a need where there are 5 relays that I need to drive that all have a common +12v and the relays are pulled to ground to activate. There is another part of the circuit where I have to drive 8 relays where the grounds are all common and I have to provide a +12v signal to activate. In both cases, only one relay will be active at a time. Relay currents are <25ma.

I've been looking at some of the various multi-channel opto relay modules to replace the circuits that I have with both discrete components and an 8 channel Relay board driven by the old MEGA. I was looking at something like this:
DONGKER Optocoupler Isolation Board,DC 3.3V 5V PNP NPN 8-Channel Signal Converter Opto Voltage Isolation Module: Amazon.com: Industrial & Scientific

I don't know how to connect these modules (I would use 2 modules) using a common Ground on one module and a Common Vcc on the other module. I can't seem to find any help with the circuits to show how to connect them, other than when the relays (or driven device) are isolated.

Or is there another module that I could use besides this one?

Sir Michael

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.