Reading isolated multichannel input with voltage drop on all channels

I am building a circuit to read atleast 22 input channels (24 vdc) using an Arduino board which essentially works on 3.3 vdc or 5 vdc.

My current setup makes use of 22 PC817 optocoupler. I am sharing the most basic circuit diagram below with only one channel reading capability to keep it simple to understand.

To drop the voltage and keep the optocoupler safe, I've used a voltage divider with a 68K and 1.5K Resistance (±5%/±10% tolerance) that would drop the voltage to around 3.3 vdc, that I think would be safe for PC817 (please correct if I'm wrong).

Now since there are 22 channels to read, using 22 x PC817, 22 x 68K and 22 x 1.5K resistance adds a lot of complexity to the circuit, I wanted to know if there's a better way to do it.

I read about 8 channels Digital Isolators like Si838x, and have following questions:

  • From what I understand I can feed 24 vdc directly to this IC and will be able to handle?
  • If not, is there any other alternative to this digital isolator were I can handle preferably more channels on one IC?
  • If it is a no for both 1 and 2 above, what are the best options I have for a multi-channel Opto-coupler?
  • Any other suggestions to keep the final circuit small?

As I'm used to opto coplers are responding to current, a few, say 5 - 10 mA. Voltage dividing looks like waisting components.

In theory your voltage divider supplies 0.5V, too low for an opto coupler. In fact it limits the current to 0.3mA, also too low for an opto coupler.

As already mentioned a single current limiting resistor is sufficient instead of the voltage divider.

One 4.7k series resistor would limit the LED current to about 4.8mA, the PC847 has 4 opto couplers per chip.

After getting the signals down to low voltage you might use a port expander like:

A voltage divider for the opto LED is just wrong.
They (LEDs) are current driven, so all you have to do is reduce the current to a safe value.

A single 22k resistor in series with the opto LED would do.
That limits opto LED current to ~1mA.
More than enough to pull a digital pin with internal pull up LOW.
Leo..