I'm after any suggestions for converting a digital input in the range of 3-24vdc to a 3.3v signal for a microcontroller.
I need to handle a total of 32 inputs (each of which could vary anywhere between those voltages), so density is more important than cost.
Someone suggested a non-inverting hex buffer like TI's CD4050 (http://www.ti.com/lit/ds/symlink/cd4050b.pdf) might be the solution, but I'm not entirely sure if it will handle multiple different input voltages.
Thanks in advance for your suggestions.
EDIT: The inputs will be connected to either:
- Various mechanical switches which may pull the line to GND or to a voltage anywhere in the given range of 3-24v
- Sensors of various types with digital outputs. Those outputs could be low (gnd) or high with voltages that could be anywhere in the given 3-24v range, depending on the type, make and model of the sensor.
Any of the inputs could be connected to any type of switch or sensor within the limits specified above.
EDIT 2: Multiplexers and the like are unfortunately not possible as timings are VERY tight and interrupts of varying priority are to be used extensively which requires direct connections to the microcontroller pins.