I have a ~12 V battery (automotive, so VERY noisy) that I would like to measure the voltage of on an Atmega. I'm wondering what would the most effective method to do that be? An ADC that is ~12 V tolerant but communicates on 5 V logic power? Some sort of optocoupler to isolate the 12 V signal, then resistors to drop down to 5 V?
tl;dr: Have 5 V microcontroller, how to sense 12 V voltage from vehicle without frying the microcontroller if overvoltages occur.