In my project I have an optocoupler Rail 32 units like the proto below . I want to link it to my MCU with 2 mcp23017 digital Input . Do I need to put a Schmitt Trigger before the mcp23017 to have a perfect electronic PCB signal as i have a common 5 dc volt and how to size the 5 volt supply for the 32 optocouplers .And want to optional count the pulses input to make some scenario like 1 pulse ON/OFF nb 2 pulse for an other action..
Note
24dc trigger input on the optocoupler link to a switch
5dc volt output to digital input mcp23017