I'd like to detect whether a line has 12V on it or not and read that into my micro. The 12V will be quite dirty (from a car). I was thinking of just using a transisitor, feeding the 12V into the base (via a resisitor) and using the collector to gnd the micro pin. Will this be enough isolation or should I use an opto isolator?
Thanks, Michael