I have a uC project where different digital pulse signals will be patched into specific inputs (it is for a modular synth).
The inputs may be 0-5V but they also could be -12 to 12V. What would I do to make sure no matter what the voltage input is, it appears as a 0 or 5V pulse at the uC inputs?
My first instincts:
1. Use a resistor and 5V zener diode at the input
2. Use a a comparator with diode on the output so that it boosts any signal to 0/12V and then use a voltage divider to bring down to 5V
The inputs may be 0-5V but they also could be -12 to 12V. What would I do to make sure no matter what the voltage input is, it appears as a 0 or 5V pulse at the uC inputs?
My first instincts:
1. Use a resistor and 5V zener diode at the input
2. Use a a comparator with diode on the output so that it boosts any signal to 0/12V and then use a voltage divider to bring down to 5V