Solution for accepting 3-24v as digital high for microcontroller
You could use dual pre-biased transistors (16 required). If the MCU has suitable internal pullups you would not require any other parts. R1/R2 of 22K/22K or 47K/47K could be suitable. The input voltage rating is -10V to +40V for those values. 



They're about 2mm x 2mm, so they don't use up much board space.