I've also used to common emitter configuration described by Docedison with the 2505.
I would be interested in a discussion from knowledgable folks about why one might choose the common emitter versus common collector, if all you are interested in is generating a digital signal to be read by an I/O pin.
(you might also confirm that you are getting the right amount of current through the LED - should be about 10 mA @ 12V with the 1k resistor.